Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


webix last won the day on January 4

webix had the most liked content!

Community Reputation

1 Neutral

About webix

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello Folks. I am trying to make the languages on a addon that i am developping work and i can't figure out this. My folder structure is this: modules/addons/mycustomaddon/lang -> This is where i am putting the languages files. modules/servers/mycustomaddon -> This is where i am putting my custom addon. The module is working well if i hard code the english on the mycustomaddon.php file. I am following this guide: http://docs.whmcs.com/Addon_Module_Developer_Docs#Multi-Language My english.php example: <?php $_ADDONLANG['ModuleVersion'] = "Module Version"; My mycustomaddon.php: <?php function mycustomaddon_MetaData() { return array( 'DisplayName' => 'mycustomaddon', 'APIVersion' => '1.1', // Use API Version 1.1 'RequiresServer' => true, // Set true if module requires a server to work 'language' => 'english', ); } function xrvteamspeak3_ConfigOptions() { return array( 'Module Version' => array( 'FriendlyName' => $_ADDONLANG['ModuleVersion'], 'Type' => 'text', 'Size' => 25, 'Default' => '1.0', ) ); } // And the file continues. The problem is that the text "Module Version" doesn't show up.
  2. Hello everyone. I am guessing that most of users here on the forum aren't aware of the WHMCS request system. Anyway, i opened 2 requests about a better language support: - Duplicate product bug (translations not duplicated) - multi-language support for configurable options and option to disable existing languages For WHMCS to work on these 2 features, they need to be voted by the community. I also would like to know what you think (community fellows) about these 2 requests (or any other language request). Regards
  3. webix

    Automatic switch language

    I just developped this hook: https://forum.whmcs.com/showthread.php?122278-Auto-switch-language-based-on-browser-language&p=491210#post491210
  4. Hello Folks! I looked here in the forums about a way to get auto-translate working on WHMCS and i only found a hook based on ip address. For most of users, IP address is not accurate to get the correct language (example: switzerland has 3 languages: french, italian and german. A spanish living in UK). So, i focused on the browser language. Many people use their computers on their foreign language (browser included) but it's not a rule to follow. So, for those who want to get whmcs showed up with the correct language for the users, i developped the following hook based on another that i found on the whmcs blog for a very old version. Just create the file includes/hooks/switch-language.php and place the following code inside of it: <?php $country_to_language = array( 'default' => 'english', 'AR' => 'arabic', 'AR-DZ' => 'arabic', 'AR-BH' => 'arabic', 'AR-EG' => 'arabic', 'AR-IQ' => 'arabic', 'AR-JO' => 'arabic', 'AR-KW' => 'arabic', 'AR-LB' => 'arabic', 'AR-LY' => 'arabic', 'AR-MA' => 'arabic', 'AR-OM' => 'arabic', 'AR-QA' => 'arabic', 'AR-SA' => 'arabic', 'AR-SY' => 'arabic', 'AR-TN' => 'arabic', 'AR-AE' => 'arabic', 'AR-YE' => 'arabic', 'AZ' => 'azerbaijani', 'CA' => 'catalan', 'ZH' => 'chinese', 'ZH-HK' => 'chinese', 'ZH-CN' => 'chinese', 'ZH-SG' => 'chinese', 'ZH-TW' => 'chinese', 'HR' => 'croatian', 'CS' => 'czech', 'DA' => 'danish', 'NL' => 'dutch', 'NL-BE' => 'dutch', 'EN' => 'english', 'EN-AU' => 'english', 'EN-BZ' => 'english', 'EN-CA' => 'english', 'EN-IE' => 'english', 'EN-JM' => 'english', 'EN-NZ' => 'english', 'EN-PH' => 'english', 'EN-ZA' => 'english', 'EN-TT' => 'english', 'EN-GB' => 'english', 'EN-US' => 'english', 'EN-ZW' => 'english', 'ET' => 'estonian', 'FA' => 'farsi', 'FR' => 'french', 'FR-BE' => 'french', 'FR-CA' => 'french', 'FR-FR' => 'french', 'FR-LU' => 'french', 'FR-MC' => 'french', 'FR-CH' => 'french', 'DE' => 'german', 'DE-AT' => 'german', 'DE-DE' => 'german', 'DE-LI' => 'german', 'DE-LU' => 'german', 'DE-CH' => 'german', 'HE' => 'hebrew', 'HU' => 'hungarian', 'IT' => 'italian', 'IT-CH' => 'italian', 'MK' => 'macedonian', 'NO' => 'norwegian', 'NB' => 'norwegian', 'NN' => 'norwegian', 'PT-BR' => 'portuguese-br', 'PT' => 'portuguese-pt', 'RO' => 'romanian', 'RO-MO' => 'romanian', 'RU' => 'russian', 'RU-MO' => 'russian', 'ES' => 'spanish', 'ES-AR' => 'spanish', 'ES-BO' => 'spanish', 'ES-CL' => 'spanish', 'ES-CO' => 'spanish', 'ES-CR' => 'spanish', 'ES-DO' => 'spanish', 'ES-EC' => 'spanish', 'ES-SV' => 'spanish', 'ES-GT' => 'spanish', 'ES-HN' => 'spanish', 'ES-MX' => 'spanish', 'ES-NI' => 'spanish', 'ES-PA' => 'spanish', 'ES-PY' => 'spanish', 'ES-PE' => 'spanish', 'ES-PR' => 'spanish', 'ES-ES' => 'spanish', 'ES-UY' => 'spanish', 'ES-VE' => 'spanish', 'SV' => 'swedish', 'SV-FI' => 'swedish', 'SV-SV' => 'swedish', 'TR' => 'turkish', 'UK' => 'ukranian', // NOTE: You can add more below ); if(strpos($_SERVER['REQUEST_URI'], $customadminpath) === false && !isset($_SESSION['switch-language']) && $_SESSION['uid'] == false) { $_SESSION['switch-language'] = true; // prevent from redirecting back again in this session // we will add more here.... } $current_country = strtoupper(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)); $language = $current_country != '' && isset($country_to_language[$current_country]) ? $country_to_language[$current_country] : $country_to_language['default']; if(!isset($_SESSION['Language']) || $_SESSION['Language'] != $language) { $location = '?language='.$language; if($_SERVER['QUERY_STRING'] != '') $location .= '&'.$_SERVER['QUERY_STRING']; ob_clean(); header('location: '.$location); die(); } Once done your whmcs will switch language automatically right away. The hook is loaded automatically. This won't change the currency has it's a bit more invasive. I hope this will help you.
  5. webix

    configuring sliders

    Won't it be simplier to just add: grid_snap: true, [b]step: {$configoption.options[0]['nameonly']},[/b] onChange: function() { On the code? That way the step would be directly defined on the amount itself to be priced. This works perfectly for values that are higher than 2 decimal cases (0.00). But if i want by example price the step of 512 of ram to 0.50$, the slider will multiply 0.50 by 512 instead of multiply it by 1. If someone knows a way to get this done correctly, that would be a huge feature to be implemented. Regards
  6. Hello WHMCS team. I am testing WHMCS since some days now on a local machine and on the side developped an addon. I am very pleased with your product and plan to purchase it. However i am facing an issue with the product upgrades/downgrades. I have a product which change it's value based on a number of connections (yes, it's for a VPN server). This product has a base number of 10 connections and it can go till 200. I did that config easily with the "configurable options" and on initial purchase it works fine. The problem appears when the client want to update the product connections by exemple from 10 to 50, he can't do it because he doesn't have how-to do it. I can't send him to purchase the same product with more connections because that will create another virtual server on my VPN server. I have read your documentation and it's said that if i select the option "Configurable Options" on the product "upgrades" tab, he could upgrade or downgrade the configurable options. But that isn't working. I am doing something wrong or this is a bug? Or is it just a disabled feature because i am still on the 30 day trial period? BTW the WHMCS version is 6.0.1 Regards.

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated