Jump to content

developer _WHM_CS

  • Content Count

  • Joined

  • Last visited

  • Days Won


developer _WHM_CS last won the day on October 7 2021

developer _WHM_CS had the most liked content!

Community Reputation

4 Neutral

1 Follower

About developer _WHM_CS

  • Rank

Recent Profile Visitors

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

  1. contact with the module developer if the modules do not work, he can better help you
  2. Hi @juampa you can use sample code in your hooks add_hook( 'AdminAreaFooterOutput', 1, function(){ if ( ( $vars['pageicon'] == "xxx" || $vars['pageicon'] == "xxxx" || $vars['pageicon'] == "xxxx" ) && $vars['filename'] == "xxx" ) { // change to custom page data return <<<HTML <script type="text/javascript"> var values = []; if('{$name}' == 'selectedinvoices'){ $("input[name='selectedinvoices[]']").each(function() { values.push($(this).val()); }); check(values); function check(values){ if(window.location.search == ""){ var locat = window.location.href+'?customaction={$vars['pageicon']}'; }else{ var locat = window.location.href+'&customaction={$vars['pageicon']}'; } $.ajax({ url: locat, type: 'POST', data: {values}, success: function(data) { var activelist = JSON.parse(data); if (activelist.result == true){ $("input[name='selectedinvoices[]']").each(function() { var id = parseInt($(this).val()) if ($.inArray(id,activelist.pid) >= 0){ $(this).parents('tr').css("color","blue"); }else { $(this).parents('tr').css("color","") } }); } } }) } </script> HTML; }); }); push like it
  3. WHMCS developer add a function in JS file and you can use it WHMCS.http.jqClient.jsonPost({ url: "modules url",// adminerea: addonmodules.php?module=yourMudole clientarea index.php?m=yourMudole data: { // it must be include token vars1: 'data1', vars2: data2, token: csrfToken }, success: function (data) { if (data.success) { //do actin } }, error: function (error) { if (error) { } } }); you can access $_ POST in function youMudole_output($parms){} or function youMudole_clientarea($parms){} for generate response function youMudole_output($parms){ ob_clean(); echo json_encode($array); die; }
  4. Hello @jmsegura If you want to change invoice style/design you can change viewinvoice.tpl in the template folder If you want to add information such as add more discretion for a special user, you can use this hook clientareapageviewinvoice if you want to update price or add rows to the invoice for pay by customer you can user this local API updateinvoice
  5. check it use WHMCS\Database\Capsule; use WHMCS\Carbon; add_hook('AfterCronJob', 1, function($vars) { if(Carbon::now()->format('H') == '14'){ $todayRun = Capsule::table('tblactivitylog')->where("description",'like',"I did it!") ->where("date",">" , Carbon::now()->addMinutes("-30") )->first()->id ; if (Carbon::now()->format('H) == '14' AND !$todayRun) { // Do your stuff logActivity('I did it!'); } } });
  6. hi @davidashu your request does not include enough description,
  7. Hello @SSCommerce just registrar has access to check a private NameServer in the domain panel,
  8. hi @Dylank Please sure your hooks.php is on the active module folder if the module is active, whmcs will load the hooks.php file
  9. Hello @alinox whmcs uses socket connection to a top-level registrar like Verisign or Neustar there is dist.whois.JSON file in resources\domains and whmcs use it when he wants to connect to the registrar if you are a registrar you should write a Register module to connect your request to a register
  10. Hello @Waqas Saeed for add or get a item in session you can use this class WHMCS\Session::set("item", "values"); WHMCS\Session::get("item"); attention, if a client uses Chrome when he is redirecting to the callback. Chrome removes the cookies, therefore, all sessions will be expired
  11. Hi @Bets Please read this document you can not use select_query if your WHMCS version 8.+, you should use Capsule in your query
  12. Hi @crupsos Whmcs coded all files in that location by Ioncube therefore you can not use code completion if you include init.php ( it is in WHMCS root directory ) all namespace will be work in your code
  13. hi @Davor You can use following Query $orderId = Capsule::table('tblorders') ->where('invoiceid', $invoiceId) ->first()->id;
  14. hello @Vander Host if you want to use API, your solution is not good I tip to you add a new function to API the use that function first step add a php file to includes >> api folder , name belongs to the file is function name you can writ custom query in the file and return it for example : method and file name is getclinetid <?php use WHMCS\Database\Capsule; if (!defined("WHMCS")) die("This file cannot be accessed directly"); try { $clinetsItem = Capsule::table('tblclinets')->where("phonenumber", $_REQUEST['phonenumber'])->first(); if($clinetsItem){ $apiresults = ["result" => "success", "message" => "ok", 'clinetid' => $clinetsItem->id]; }else{ $apiresults = ["result" => "error", "message" => "not found"]; } } catch (Exception $e) { $apiresults = ["result" => "error", "message" => "query has a problem"]; } Example Request (Local API) $command = 'getclinetid'; $postData = array( 'phonenumber' => '+123456789', ); $adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later $results = localAPI($command, $postData, $adminUsername); print_r($results);
  • Create New...

Important Information

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