Lightfaro Posted January 9, 2023 Share Posted January 9, 2023 Hi everybody! I need to delete or hide some links from the sidebar into the client area, as in attachment As they told me from the support I must do it using hooks, but I really don't know how to start Any help you can give me will be welcome. 😄 Thanks!! 0 Quote Link to comment Share on other sites More sharing options...
guillermo Posted February 27, 2023 Share Posted February 27, 2023 <?php use WHMCS\View\Menu\Item as MenuItem; // Remove "Announcements" and "Support" links from the English version of WHMCS add_hook('ClientAreaFooterOutput', 1, function ($vars) {   $footerOutput = $vars['footerOutput'];   // Remove the "Announcements" link from the footer   $footerOutput = str_replace('<li><a href="announcements.php">Announcements</a></li>', '', $footerOutput);   // Remove the "Support" link from the footer   $footerOutput = str_replace('<li><a href="submitticket.php">Support</a></li>', '', $footerOutput);   return $footerOutput; }); // Remove "Announcements" and "Support" links from the Spanish version of WHMCS add_hook('ClientAreaFooterOutput', 1, function ($vars) {   $footerOutput = $vars['footerOutput'];   // Remove the "Anuncios" link from the footer (in Spanish)   $footerOutput = str_replace('<li><a href="anuncios.php">Anuncios</a></li>', '', $footerOutput);   // Remove the "Soporte" link from the footer (in Spanish)   $footerOutput = str_replace('<li><a href="submitticket.php">Soporte</a></li>', '', $footerOutput);   return $footerOutput; }); // Remove "Announcements" and "Support" links from the French version of WHMCS add_hook('ClientAreaFooterOutput', 1, function ($vars) {   $footerOutput = $vars['footerOutput'];   // Remove the "Annonces" link from the footer (in French)   $footerOutput = str_replace('<li><a href="annonces.php">Annonces</a></li>', '', $footerOutput);   // Remove the "Support" link from the footer (in French)   $footerOutput = str_replace('<li><a href="submitticket.php">Support</a></li>', '', $footerOutput);   return $footerOutput; }); ?> yo junto con chat GPT creamos estas funciones , aca se reemplaza algunos links del footer segun idioma, remmplazamos el texto por un string vacio. Para cambiar otras secciones debes buscar el elemento que corresponde 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.