Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About sdv

  • Rank
    Junior Member
  1. Thank you for the answer and mention of the lib's docs. Here is my solution: add_hook('AdminAreaPage', 1, function($vars) { if ($vars['filename'] != 'clients') return; $script = <<<'EOF' $('#inputPhone').intlTelInput("setCountry", "ua"); EOF; return ['jquerycode' => $vars['jquerycode'] . $script]; }); That's all I need! ūüĎć
  2. Here is an example of what I meant (see attachment). By default, +1 (USA) is selected. There is USA and UK pinned at the top of the list. But our billing does not have clients with such phone number. It also have not clients with +93, +355 etc phone codes. The new client search bar would be much better if default phone code could be set in settings. And, as a next step, only existing phone codes was shown (e.g. if all clients have +1xxxxxxxxxxx phone, there will be no other phone codes in list ).
  3. Hello, Is there any way to change default country phone code at new clients search bar?
  4. Hello, The PreModuleCreate docs states that it is possible to return a "key/value pairs to override the parameters to be used in account creation". However, I am unable to do it. Here is my hook: <?php function add_prefix_to_domain($vars) { if ($vars['params']['pid'] != 45) { // ignore everything except my test product return; } logActivity('Domain is: ' . $vars['params']['domain']); return [ 'domain' => 'hello-' . $vars['params']['domain'] ]; } add_hook('PreModuleCreate', 10, add_prefix_to_domain); add_hook('PreModuleCreate', 20, add_prefix_to_domain); add_hook('PreModuleCreate', 30, add_prefix_to_domain); I am expecting to see in the activity log (given that the domain for a service is "world.com"): What I actually got: Do I misunderstood the docs or there is a bug in docs or WHMCS? Does anyone have a working example of PreModuleCreate hook where the override mechanism actually works? Thanks!
  5. sdv

    Menu Icons

    Looks like Font Awesom http://fontawesome.io/icons/ These are added to page with something like: <i class="fa fa-info-circle"></i>
  6. Hi, The previous thread about adding server-side functions that runs in WHMCS context (aka Custom API) was closed without any real answer to the question. As of WHMCS 7.4 custom api doesn't work anymore, and WHMCS staff member Nate wrote that we should use Addon Modules instead of removed custom api: Nate`s reply isn't clear for me and Addon Module docs doen't help at all. Does anybody had any success in using Addon Module approach to implement custom api functions? Could Nate expand a bit on the mentioned Addon Module approach (with an example, preferably) please?
  7. Welcome to WHMCS.Community sdv! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.


Important Information

By using this site, you agree to our Terms of Use & Guidelines