Maison Posted October 22, 2020 Share Posted October 22, 2020 (edited) Which file can I move to put the option to add funds below and the two centered?Due to native translation it does not appear completely Edited October 22, 2020 by zimbahost 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 23, 2020 Share Posted October 23, 2020 15 hours ago, zimbahost said: Which file can I move to put the option to add funds below and the two centered? there wouldn't really be a file/template you can edit.... well maybe sidebar.tpl, but the coding would be a pain. a quick way to do this would be to use a hook.... <?php # Modify Sidebat Footer Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $invoicesummary = $primarySidebar->getChild("My Invoices Summary"); if (!is_null($invoicesummary)) { $invoicesummary->setFooterHtml(str_replace(array("col-xs-6 col-button-left","col-xs-6 col-button-right"),"col-xs-",$invoicesummary->getFooterHtml())); } }); 1 Quote Link to comment Share on other sites More sharing options...
Maison Posted October 23, 2020 Author Share Posted October 23, 2020 7 hours ago, brian! said: there wouldn't really be a file/template you can edit.... well maybe sidebar.tpl, but the coding would be a pain. a quick way to do this would be to use a hook.... <?php # Modify Sidebat Footer Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $invoicesummary = $primarySidebar->getChild("My Invoices Summary"); if (!is_null($invoicesummary)) { $invoicesummary->setFooterHtml(str_replace(array("col-xs-6 col-button-left","col-xs-6 col-button-right"),"col-xs-",$invoicesummary->getFooterHtml())); } }); Your code solved my problem, how do I leave a space between the two buttons? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 24, 2020 Share Posted October 24, 2020 10 hours ago, zimbahost said: Your code solved my problem, how do I leave a space between the two buttons? I would just put a spacer div between the two buttons and you can adjust the height to suit your needs... <?php # Modify Sidebat Footer Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $invoicesummary = $primarySidebar->getChild("My Invoices Summary"); if (!is_null($invoicesummary)) { $footer = str_replace(array("col-xs-6 col-button-left","col-xs-6 col-button-right"),"col-xs-",$invoicesummary->getFooterHtml()); $footer = str_replace("/div><div","/div><div style=\"height: 5px\"></div><div",$footer); $invoicesummary->setFooterHtml($footer); } }); 1 Quote Link to comment Share on other sites More sharing options...
Maison Posted October 24, 2020 Author Share Posted October 24, 2020 (edited) This code is perfect, thank you very much Edited October 24, 2020 by zimbahost 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.