Jump to content

plusplushosting

Retired Forum Member
  • Posts

    279
  • Joined

  • Last visited

Everything posted by plusplushosting

  1. In one of the client account im getting that error when attempting to update the metrics. Oddly for another account in the same server is updating without issues. Before you ask...yes, the cpanel account username exist. Any idea what else i have to check? Thanx in advance! Im on 8.1.3
  2. you are around again 🙂 ? Go get some vacations man! Thanx bro. Got it working. Im sending you my kidney in a box 🙂
  3. Hi there, I have a hook like with a side bar construction like... if (!is_null($servicesSidebar->getChild('Login to Webmail'))){ $servicesSidebar->getChild('Login to Webmail')->setIcon('fa-ticket ls ls-user'); } if (!is_null($servicesSidebar->getChild('Change Password'))){ $servicesSidebar->getChild('Change Password')->setIcon('fa-ticket ls ls-padlock'); } Is there any way to know the order whmcs is using for these items and also a way to change the order on them? Thanx in advance!
  4. Hi Brian! Thanx very much! I no longer remember how many beers I owe you 🙂
  5. Hi guys, Anyone noticed an error in v8.1.3 with the ssl transations in promo banners...i already had the following in the lang files with the language translation....for example... $_LANG['store']['ssl']['promo']['rapidssl_rapidssl']['headline'] but looks like is not picking up the translation....is happening only with SSL promo/upsell banners...the weebly and the other banners are picking up the languages translations. Thanx in advance!
  6. Hi there! Hope you are safe guys! Is there any way to pull the marketconnect products details to show in a cart through the API. I see there is a way to get the whmcs products details but im not seeing any way to pull the marketconnect addons/details of each product with the API. Thanx in advance!
  7. Found it! Was conflicting with the theme hook file, i got it organized everything in one file, now looks like a decent code 🙂 Thanx very much again! Stay safe!
  8. hahaha....that crystal ball is asking for vacations i guess 🙂 I wasnt aware that ignores it if doesnt exist....every day i learn something else , you are a source of wisdom 🙂 yeah, sometimes i assume stuff which probably i have to mention. Ill try to remove all the other hook files in case any of them is breaking this and see what happen. But is very odd, just adding those two lines is erroring, without them everything is working as expected or at least is not erroring (which is not the same). Thanx again!
  9. Hi Brian! Sorry for the half info....i don't know why you are not using your crystal ball 🙂 Lets start over as im mixing almost everything at this point. yes, the code is a domain management addon and it insert the menu on certain situations on certain domains....so i guess when the link of that icon which is attempting to change is not there, is when is trowing the error. So i guess before the ->getChild('Domain Forwarding') line should be an IF to first check if that link is there. I mixed up things i guess...my original code to change the icon was: <?php #remove some links from sidebar and change a domain forwarding link icon use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Domain Details Management'))) { $primarySidebar->getChild('Domain Details Management') ->removeChild('Get EPP Code') ->getChild ('Domain Forwarding') ->setIcon ('fas fa-ticket ls ls-pen'); } }); But then when you have provided me the link to the code to change the secondarsidebar icons using foreach, i have attempted to use that code (the one in the 4th post) to change the icon in the primaysidebar...and as you can see and guess, without luck, hahaha btw, i have many functions in the same hook file for the same sidebar, is ok? simply changing the priority number on each is the correct way? I mean, to not conflict each other. As far as i can see is working ok, unless i do add those 2 last lines in the function above. Ahh btw...this is the error....i have renamed the sensitive info Error: Call to a member function setIcon() on null in /home/username/public_html/whmcsdir/templates/themename/core/hooks/hookfile.php:15 Stack trace: #0 /home/username/public_html/whmcsdir/includes/hookfunctions.php(0): RSThemes\Service\Hooks->{closure}(Object(WHMCS\View\Menu\Item)) #1 /home/username/public_html/whmcsdir/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): run_hook('ClientAreaPrima...', Array, true) #2 /home/username/public_html/whmcsdir/vendor/whmcs/whmcs-foundation/lib/ClientArea.php(0): WHMCS\ClientArea->outputWithoutExit() #3 /home/username/public_html/whmcsdir/vendor/whmcs/whmcs-foundation/lib/Http/Message/AbstractViewableResponse.php(0): WHMCS\ClientArea->getOutputContent() #4 /home/username/public_html/whmcsdir/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php(27): WHMCS\Http\Message\AbstractViewableResponse->getBody() #5 /home/username/public_html/whmcsdir/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php(34): Zend\Diactoros\Response\SapiEmitter->injectContentLength(Object(WHMCS\ClientArea)) #6 /home/username/public_html/whmcsdir/clientarea.php(0): Zend\Diactoros\Response\SapiEmitter->emit(Object(WHMCS\ClientArea)) #7 {main} Thanx!
  10. I have modified your code but i havent got it working 😞 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $ActionDetails = $primarySidebar->getChild("Domain Details Management"); if (empty($ActionDetails)) { return; } $ActionDetailsChildren = $ActionDetails->getChildren(); $kidsToIcon = ["Domain Forwarding"]; foreach($ActionDetailsChildren as $key => $Action_details_child) { if (in_array($key, $kidsToIcon)) { if ($key === "Domain Forwarding"){$newicon = "fas fa-ticket ls ls-pen";} $ActionDetails->getChild($key)->setIcon($newicon); } } });
  11. Thanx very much Brian! I worked it out with your help and that code! Just another thing now is conflicting...based in the code i posted above.....in certain menues is happening that the child "A Records" doesn't exist, so is trowing me error (ooopps) ...should i put an IF there? I have attempted but looks like im not finding the correct one 😞 Thanx! Have a great weekend!
  12. well....is like buying me a Maserati and don't give me the key 🙂 Thanx very much man! Have a great weekend!
  13. Hi, im trying to use this hook which is changing only one of the links icon, but is there any way to change all the links with few lines or i have to create a function for every one? add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (!is_null($secondarySidebar->getChild('itemname'))) { $secondarySidebar->getChild('itemname') ->getChild('A Records') ->setIcon('fad fa-pencil'); } }); Thanx in advance!
  14. Thanx Brian! But is half working 🙂 As im using the /modules/servers/cpanel/templates/overview.tpl to modify the product details page, is not passing the variable there, even it is in the productdetails template i guess the include of overvirew.tpl is the problem. Thanx!
  15. Hi there, I have modified this Brian's hook i had....(phone for Brian 🙂 ) but is not passing the array for any reason, i guess im missing something. I wish to pass the registrar information to the clientareaproductdetails tpl Any help will be great. Thanx in advance! <?php # Written by brian! use WHMCS\Database\Capsule; function cdomain_renewals_registrar_name_inproddetails_hook($vars) { if ($vars['templatefile'] == 'clientareaproductdetails') { $client = Menu::context('client'); $domains = $vars['domains']; foreach($domains as $key => $domain) { $registrar = Capsule::table('tbldomains')->where('userid',$client->id)->where('domain',$domain['domain'])->value('registrar'); if ($registrar) { $domains[$key]['registrar'] = $registrar; } } } return array ("domains2" => $domains); } add_hook("ClientAreaPage", 1, "cdomain_renewals_registrar_name_inproddetails_hook");
  16. jajaja...you are making me harder man....was just an example...but the idea is there, how i could insert a smarty tag (any tag) and have it working, as you said the jquery will insert the code once the page is loaded. btw2 🙂 how can i replace a html in the page instead to append? Thanx!
  17. Well...no i mean, if i wish insert something like..... <?php add_hook('ClientAreaFooterOutput', 1, function($vars){ $footer = '<script>$(document).ready(function() { $("#footer .container").append("{debug}"); });</script>'; return $footer; });
  18. Just to know, this do work if i need insert a html or smarty code? I mean jquery will be processed after the page load or the smarty will be processed before? Just to know if the smarty will be processed if i insert it after the page load. btw, is there any function to to insert it in a specific orderform/cart.tpl? Thanx again!
  19. Thats the most important now! Glad to hear it. Thanx again!
  20. Thanx guys! Hi Brian! How are you doing, hopefully you are safe and healthy! Ill give it a try and see. Yeah, with the language override can be easy but i want do it this way as i have to also replace things in the header, so i guess i have to only find the header hook function name and make the modifications there. Thanx again!
  21. I found the following but i guess i need the jquery part to add the text below the copyright line....any help will be welcome! 🙂 Thanx! <?php add_hook('ClientAreaFooterOutput', 1, function($vars){ $footer = '<p>demo</p>'; return $footer; });
×
×
  • 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