以下均来自于官网,中文部分是自己用软件翻译的,请自行理解其意思
Supported Functions
Here is an overview of all functions that a WHMCS provisioning module can contain. Functions within a module are optional and need not be in the module if they don’t apply. Remember, all functions should have the prefix filename_ and then the function name. The function name is the header below.
CreateAccount
This function runs when a new product provisions. This can be by WHMCS upon checkout or payment for a new order. Also, by an admin user from the Products/Services tab in a clients profile of the admin area.
SuspendAccount
This function runs when a suspension is requested. Requested by the WHMCS Cron when a product becomes overdue, or by admin user in the Client Profile.
UnsuspendAccount
This function runs when an unsuspension is requested. Requested upon payment of an overdue invoice for a product.
TerminateAccount
This function runs when a termination is requested. Requested by the WHMCS Cron for long overdue products when enabled (Automation Settings). Also requested by an admin user in the Client Profile.
Renew
This function runs each time a renewal invoice for a product becomes paid.
ChangePassword
This function runs as a client requests a password change. The option will not show up if the function is not defined in the module. The status of the product must also be active. Admins can also invoke this command from the admin area.
ChangePackage
This function runs for upgrading and downgrading of products. This function runs when an upgrade or downgrade order placed by the client becomes paid. Admins can also
invoke this from the product management pages. The same function runs for upgrades and downgrades of both products and configurable options.
ClientArea
This function can be used to define module specific client area output. It accepts a return of HTML for display on the product details page of the client area. Output via a template file within the module folder named “clientarea.tpl” is also possible. Discussion of this function in more detail later on in the docs.
AdminArea
Used to define HTML code that displays on server configuration page (Setup > Products/Services > Servers). Used to provide an automated shortcut/login link to the integrated server control panel.
LoginLink
Used to define HTML code to link to the customers account on a server control panel. Displayed on the product management page of the admin area. The return must be HTML output or link (no forms).
ClientAreaCustomButtonArray
Used to define custom functions that your module supports. Customers can invoke and run these from the client area. The functions can perform actions or product page output in the client area. Example usages for this are to provide product management pages, bandwidth reporting pages, etc…
ClientAreaAllowedFunctions
Like the above, used to define custom functions. Customers can invoke, but are not shown as buttons by default (i.e. custom client area output will invoke them).
AdminCustomButtonArray
Used to define custom functions in your module for admin users. This can contain more functions than the client area equivalent.
UsageUpdate
Used to perform a daily import of the disk and bandwidth usage from a server. The data imported is then used to display the usage stats both within the client and admin areas of WHMCS. The data is also used in disk and bandwidth overage billing calculations if enabled for a product.
MetricProvider
Used to list the names of and collect usage for metric stats of a server. The name data is used for product price configuration within the admin areas of WHMCS. The usage data is periodically collected and stored in WHMCS for display within both the client and admin area. That stored usage is also used for generating invoice line items, if enabled in the Invoicing section of General Setting.
AdminServicesTabFields
Used to define extra fields or output to display within admin product pages.
AdminServicesTabFieldsSave
Used in conjunction with the above. This function handles the values submitted in any custom fields when a save occurs.
MetaData
Used to define a number of meta data configuration parameters. This function returns an array, consisting key-value pairs, where the key is the parameter name and the value is the parameter value.
支持的功能
以下是 WHMCS 预配模块可以包含的所有功能的概述。模块中的函数是可选的,如果不适用,则需要在模块中。请记住,所有函数应具有前缀filename_然后是函数名称。函数名称是下面的标头。
创建帐户
当提供新产品时,将运行此功能。这可以通过 WHMCS 在结账时或支付新订单。此外,由管理员区域的客户端配置文件中的”产品/服务”选项卡中的管理员用户。
暂停帐户
请求挂起时,此功能将运行。当产品过期时,由 WHMCS Cron 请求,或者由客户端配置文件中的管理员用户请求。
未暂停帐户
当请求取消暂停时,将运行此函数。在支付产品逾期发票时请求。
终止帐户
请求终止时,将运行此函数。WHMCS C
ron 在启用时对逾期已久的产品(自动化设置)请求。客户端配置文件中的管理员用户也请求。
更新
每次支付产品的续订发票时,此函数都运行。
更改密码
此功能在客户端请求密码更改时运行。如果未在模块中定义函数,则该选项不会显示。产品的状态也必须处于活动状态。管理员还可以从管理区域调用此命令。
变更包装
此功能用于升级和降级产品。当客户端的升级或降级订单变为付费时,此功能将运行。管理员还可以从产品管理页面调用此内容。对于产品和可配置选项的升级和降级,运行相同的功能。
客户区域
此功能可用于定义模块特定的工作区输出。它接受 HTML 的返回,以显示在工作区的产品详细信息页面上。也可以通过名为”客户端区域.tpl”的模块文件夹中的模板文件进行输出。稍后在文档中更详细地讨论此函数。
Adminarea
用于定义显示在服务器配置页上的 HTML 代码(设置>产品/服务>服务器)。用于提供到集成服务器控制面板的自动快捷方式/登录链接。
登录链接
用于定义 HTML 代码以链接到服务器控制面板上的客户帐户。显示在管理区域的产品管理页面上。返回必须是 HTML 输出或链接(无窗体)。
客户客户按钮
用于定义模块支持的自定义函数。客户可以从工作区调用和运行这些。这些函数可以在工作区中执行操作或产品页面输出。这方面的示例用途是提供产品管理页面、带宽报告页等。
客户端区域禁止功能
与上面一样,用于定义自定义函数。客户可以调用,但默认情况下不会显示为按钮(即自定义工作区输出将调用它们)。
管理员客户按钮
用于为管理员用户定义模块中的自定义功能。这可能包含比工作区等效更多的函数。
使用日期
用于执行从服务器每天导入磁盘和带宽使用情况。然后,导入的数据用于显示 WHMCS 的客户端和管理区域中的使用情况统计信息。如果为产品启用,数据也用于磁盘和带宽过亿计费计算。
公制提供器
用于列出服务器的指标统计信息的名称并收集使用情况。名称数据用于 WHMCS 管理区域中的产品价格配置。使用情况数据定期收集并存储在 WHMCS 中,以在客户端和管理区域中显示。如果在”常规设置”的”开票”部分中启用,则该存储使用情况也用于生成发票行项目。
管理服务塔布场
用于定义要在管理产品页中显示的额外字段或输出。
管理员服务塔布菲尔德保存
与上述一起使用。此函数处理发生保存时提交的任何自定义字段中的值。
元
用于定义多个元数据配置参数。此函数返回一个数组,该数组由键值对组成,其中键是参数名称,值是参数值。
暂无评论内容