洛杉矶MC机房 高速低价18元起

WHMCS的自动货币,语言和模板设置 – 更新

提示:如果官网是英文页面,建议使用谷歌浏览器能同步翻译页面。点击下载【谷歌浏览器最新绿色便携版】
注意:部分文章发布时间较长,可能存在未知因素,购买时建议在本站搜索商家名称,先充分了解商家动态。
交流:唯一投稿QQ80059284、唯一投稿邮箱:admin@bkvps.com、网友交流QQ群号640669696。

我们的WHMCS地理定位钩的认可在WHMCS用户的全球社区中不断增长。考虑到这种令人振奋的趋势,我们非常想在2013年3月的原始博客文章中为新的生活注入新的活力,并展示当前潜力在这个简单但无疑是强大的工具中。我们在下面介绍的是您可以通过我们的钩子进行的最重要的操作目录。为了帮助您更轻松地找到特定功能,本文补充了确切的代码行和如何调整它们的明确指南。配置货币,语言和模板更改规则根据客户位置调整客户区页面已简化为最大可能级别。使用注释区域提示中提供的代码编辑代码,以实现货币,语言和模板的任何配置。12345678910/*** Define relations between countries and currencies.* Enter the currency code for each country (codes used), use the below pattern, edit it or add new entries below:*/$countryToCurrency = array(‘default’ => ‘USD’,‘US’ => ‘USD’,‘GB’ => ‘GBP’,// NOTE: You can add more below);1234567891011/*** Define language rules by assigning a language to a single country.* Use the below pattern (language name for country code) edit it and/or add new entries below:*/$countryToLanguage = array(‘default’ => ‘english’,‘US’ => ‘english’,‘DE’ => ‘german’,‘NO’ => ‘norwegian’,// NOTE: You can add more below);12345678910/*** Configure additional settings:* Firstly assign a WHMCS template to each country used.* Use the below pattern (template name for country code) edit it and/or add new entries below:*/$countryToTemplate = array(‘US’ => ‘six’,‘default’ => ‘six’,// NOTE: You can add more below);123456789101112/*** Now, define the language for each WHMCS template used.* Please note that a template available in WHMCS V7 is: ‘six’.* It is important to use a template that exists within your WHMCS system.* Not Logged In Users*/$templateToLanguage = array(‘english’ => ‘six’,‘german’ => ‘six’,‘default’ => ‘six’,// NOTE: You can add more below);根据移动设备或使用的域选择模板您可以根据使用的设备类型,平板电脑或手机指向要调用的模板。以同样的方式,指向访问者重定向的域名,为他们启用特定模板。取消注释行并提供所需的模板名称。123456789/*** You may define a mobile template per a mobile device: mobile and tablet types.* Use the below pattern (template name for mobile device) and edit the entries.* Comment out to disable the option.*/$mobileToTemplate = [// ‘mobile’ => ‘mobile_template’,// ‘tablet’ => ‘tablet_template’,];12345678/*** You may define templates per domain name. Enter a domain name and assign a template to each one of them.* Uncomment the below examples to turn on.*/$domainToTemplate = [//’www.example.mobi’ => ‘mobile_template’,//’www.example.com’ => ‘six’,];选择客户区域的可调页面当涉及到个性化整个或仅仅是客户区域的特定部分时,钩子提供了巨大的灵活性。您可以自由选择应执行更改的确切页面。12345678910111213141516/*** Enter pages in your WHMCS which the hook will be active for.* Add more pages at the bottom of the list, comment out single pages to disable the hook for them:*/$allowedScripts = array(‘p1.php’,‘index.php’,‘clientarea.php’,‘cart.php’,‘knowledgebase.php’,‘announcements.php’,‘serverstatus.php’,‘affiliates.php’,‘contact.php’,// NOTE: You can add more below);轻松禁用挂钩可能存在您不希望钩子改变客户区域的情况。您可以通过各种方式关闭特定IP地址,IP池或某些用户代理 – 所有这一切都取决于您!123456789/*** Point single IP addresses. The hook will be turned off for these addresses.* Uncomment the below list and edit the exemplary addresses, add more at the bottom of the list:*/$disabledForIPs = array(// ‘91.192.166.22’,// ‘192.168.0.39’,// NOTE: You can uncomment or add more below);123456789/*** Point full IP pools. The hook will be turned off for the addresses in these pools.* Uncomment the below list and edit the exemplary addresses, add more at the bottom of the list:*/$disabledForCidrIPs = array(// ‘192.168.56.0/24’,// ‘192.168.0.39/24’,// NOTE: You can uncomment or add more below);12345678910111213/*** Point user agents. The hook will be turned off for the enumerated here devices/browsers.* Enter a short or a full user agent name like in the examples below.* Uncomment the below list and edit the exemplary entries, add more at the bottom of the list:*/$disabledForBrowsers = array(// ‘Chrome’,// ‘Firefox’,// ‘Google-Site-Verification’,// ‘Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html )’,// ‘Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.1; Trident/5.0)’,// NOTE: You can uncomment or add more below);使用MaxMind GeoIP2获取国家/地区要跟踪客户的位置,请使用包子模块中包含的内容,或者添加自己的子模块。123456/*** Get the country using an external service, e.g. MaxMind GeoLite* http://dev.maxmind.com/geoip/geolite* NOTE: You can also create your own submodule, edit the below line in such case as only one submodule can work at a time.*/$submodule = ‘GeoIP2’;

 收藏 (0) 打赏

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

未经允许不得转载:贝壳主机网 » WHMCS的自动货币,语言和模板设置 – 更新

分享到: 生成海报
香港/美国/国内高速VPS
切换注册

登录

忘记密码 ?

您也可以使用第三方帐号快捷登录

切换登录

注册

我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活