Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About dottedquad

  • Rank

Recent Profile Visitors

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

  1. Using this example, I can access the customfield 'website' field value code: <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); use WHMCS\Database\Capsule; add_hook('ClientEdit', 1, function($vars) { //die(json_encode($vars)); $userid = $vars['userid']; foreach (Capsule::table('tblcustomfieldsvalues')->where('fieldid','1')->where('relid', $userid)->get() as $client) { //Do stuffs } }); So, my question still remains.... Do I need to use the Capsule API to access the customfields value from the clientEdit hook? Or am I overlooking something?
  2. I dug a little further and figured out how to access the customFields via $vars['customfields']['1']; , but it seems that I cannot access the customeFields inside of the clientEdit hook. I placed a die(json_encode($vars)); at the top in the clientEdit hook to output the array in JSON format so its easily readable. I then noticed the customfield could be accessible from within "olddata", but that defeats the purpose of getting the 'updated' field value. Will I need to use the Capsule API access the value via mysql?
  3. I have a working ClientAdd hook and would like to extend its feature to access the custom text field named "website". Does anyone have an example of how to grab the custom fields value? Also, I noticed the Docs mentions "customFields" variable for ClientAdd, but I don't see that variable in ClientEdit docs. Is it possible to access customFields from the ClientEdit hook?
  4. dottedquad

    More information about ClientAdd Hook?

    @brian! Where can I get the documentation to v6?
  5. dottedquad

    More information about ClientAdd Hook?

    brian!, ClientAdd still works with v7.1.2 thanks again for the help
  6. I would like to create a hook. The hook will be responsible for creating the same user that was just recently added to whmcs to another script. I followed this guide: http://developers.whmcs.com/hooks/sample-hook/ which seems rather straight forward. However, the Sample Hook is lacking more information. I would like to know all of the available $vars. I had a look in the Hook Index section of Hooks and did not find "ClientAdd" I require all of the fields:
  7. dottedquad

    Customize the Admin Menu lists?

    I will also have a look at the user roles.
  8. dottedquad

    Customize the Admin Menu lists?

    Thanks bryan! I apologize for not getting back to you sooner. I took another look inside of both theme menu.tpl files and noticed I missed a few lines. I removed all the lines that I didn't want and it worked as expected I'll make sure to check the menu.tpl files after an update and remove the lines if necessary.
  9. I'm attempting to edit the Admin menu links: I followed the guide at: http://docs.whmcs.com/Admin_Area_Template_Files I edited menu.tpl; however, the menu links that I removed from the <ul></ul> lists are still visible. I tried a page refresh, but the lists are still visible. The following are the lines that I removed menu.tpl: {if in_array("List Domains",$admin_perms)}<li><a id="Menu-Clients-Domain_Registration" href="clientsdomainlist.php">{$_ADMINLANG.services.listdomains}</a></li>{/if} {if in_array("WHOIS Lookups",$admin_perms)}<li><a id="Menu-Utilities-WHOIS_Lookups" href="whois.php">{$_ADMINLANG.utilities.whois}</a></li>{/if} {if in_array("Domain Resolver Checker",$admin_perms)}<li><a id="Menu-Utilities-Domain_Resolver" href="utilitiesresolvercheck.php">{$_ADMINLANG.utilities.domainresolver}</a></li>{/if} {if in_array("Configure Domain Pricing",$admin_perms)}<li><a id="Menu-Setup-Products_Services-Domain_Pricing" href="configdomains.php">{$_ADMINLANG.setup.domainpricing}</a></li>{/if} {if in_array("Configure Domain Registrars",$admin_perms)}<li><a id="Menu-Setup-Products_Services-Domain_Registrars" href="configregistrars.php">{$_ADMINLANG.setup.registrars}</a></li>{/if}

Important Information

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