Jump to content


Level 2 Member
  • Content count

  • Joined

  • Last visited

  • Days Won


brian! last won the day on August 22

brian! had the most liked content!

Community Reputation

2,073 Excellent

About brian!

  • Rank
    Legendary Member

Recent Profile Visitors

26,110 profile views
  1. brian!

    edit cpanel and mail links

    if you need to change it, use the first hook I posted... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { $service = Menu::context('service'); $servertype = $service->product->servertype; # Not cPanel, no links added if ($servertype!="cpanel"){ return; } if (!is_null($primarySidebar->getChild('Service Details Actions'))) { $primarySidebar->getChild('Service Details Actions') ->getChild('Login to Webmail') ->setUri('https://sdnhost.com/webmail'); } }); create a .php file in /includes/hooks, give it a relevant filename and paste the above code into it - that should then hardcode all webmail links to go to https://sdnhost.com/webmail - effectively, they'll redirect users to https://sdnhost.com:2096, but that's the correct address and port for webmail, so you could use that URL in the hook if you prefer.
  2. brian!

    edit cpanel and mail links

    I wouldn't agree with that - when someone has a problem, the more information they can post, the better (within reason!) - obviously, they should try to avoid posting paths to admin folders, security settings or passwords etc... but the fact he posted his domain, allowed me to check the redirection - if he hadn't posted that, I wouldn't have been able to tell what occurred and could only offer incomplete advice. in any event, I like it when users post their domains, as it saves me having to find who they are and if they have legit licenses or not - though I can usually find those details anyway if I choose to. a user posting their URL when asking for help is not a security concern, nor is it advertising either. anyway, checking the redirection again, it's looks like sdnhost.com:2083 gets redirected to supercp.com, but https://sdnhost.com:2083 doesn't get redirected to another site - so the hook might be a viable option after all if the URL needs to include https (if it doesn't already)... webmail no longer seems to be redirecting either.
  3. are there any third party addons installed? what happens when you login as a client - not from an admin area link, but log out as an admin, and login as a client - do you get to see the client area without issue or is there any redirection occurring ??
  4. brian!

    Assign variables in php within a hook

    i'm going to assume because you're mentioning userid, that a client would need to be logged in to see this sidebar... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { $client = Menu::context('client'); if ($client) { $newMenu = $primarySidebar->addChild('accountmanager', array( 'name' => 'Home', 'label' => Lang::trans('account_manager'), 'order' => 1, 'icon' => 'fas fa-life-ring', ) ); $newMenu->addChild('accountmanager', array( 'label' => Lang::trans('account_manager_label').$client->id, ) ); } }); now your sidebar will look slightly different because you will have those language strings already created, but in that screenshot, '41' is the user id of the logged in client... the point being that you don't necessarily have to assign it to a variable if all you're going to be doing is outputting it in the label...
  5. brian!

    social login icon

    Google+ is an option in the social tab in general settings (along with twitter and fb) and was closed earlier in the year - that's why WHMCS will be removing it.... it's unrelated to Google Sign-In.
  6. brian!

    social login icon

    with this being a custom template, your first port of call should really be it's developer - but generally, you might be able to edit /includes/linkedaccounts.tpl and tweak the layout in there... or perhaps by adding custom CSS coding to custom.css .social-signin-btns { display: block; text-align: center; width: 50%; margin: 0 auto; }
  7. what do you mean by "complements" ? are you talking about configurable options ??
  8. because a badly written hook can crash both client and admin areas - especially a hook file like yours that contains multiple hooks and other funstions within it... are there any third-party addons installed ??
  9. brian!

    edit cpanel and mail links

    you can change the links with a hook... ... but you will lose single sign on for the cPanel login and the user will have to enter their username & password. however, the hooks might be irrelevant to your situation, because if you go to sdnhost.com:2083, then you get redirected to supercp.com - so it's not a WHMCS setting doing this and therefore it maybe worth having a word with A2Hosting to see what they say about the redirection.
  10. brian!

    NameSilo Domain Prices AutoUpdate

    but resellerclub didn't write those modules for the LogicBoxes registrars, they are written by a third-party developer. 🙂 I think most registrars in WHMCS don't have any TLD/Pricing import option, there are probably only a handful that do, and nearly (if not) all of them were written by third party developers.
  11. or just rename it's extension to .php9 or whatever - that's going to be quicker and safer than deleting it.
  12. brian!

    Stamp on Invoice

    yeah, remembering what I said before about x,y & the width of the signature... you might find it easier to print out an invoice on paper, get a ruler and work out where you want the signature to go in your design... and then measure that location in mm.
  13. brian!

    social login icon

    which one? @wp4all updated the Google logo in the thread below...
  14. brian!

    Client Account Login Notification Hook

    it should just be a case of adding another break return before the signature... $values["custommessage"] = "<p>Hello $firstname $lastname,<p>Your account was recently successfully accessed by a remote user. If this was not you, please do contact us immediately<p>IP Address: $ip<br/>Hostname: $hostname<br /><br />$signature";

Important Information

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