plusplushosting
Retired Forum Member-
Posts
279 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by plusplushosting
-
how to change sidebar menu items order
plusplushosting replied to plusplushosting's topic in Developer Corner
you are around again 🙂 ? Go get some vacations man! Thanx bro. Got it working. Im sending you my kidney in a box 🙂 -
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!
-
Hi Brian! Thanx very much! I no longer remember how many beers I owe you 🙂
-
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!
-
marketconnect products through api
plusplushosting replied to plusplushosting's topic in Developer Corner
Great! Thanx Brian! Hope you are safe and healthy! -
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!
-
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!
-
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!
-
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); } } });
-
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!
-
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!
-
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");
-
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
Thanx very much for the info Brian! Stay safe! -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
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! -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
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; }); -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
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! -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
Thats the most important now! Glad to hear it. Thanx again! -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
Great! Thanx! -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
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! -
hook to insert html code in the template
plusplushosting replied to plusplushosting's topic in Developer Corner
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; });
