Jump to content


Level 2 Member
  • Content count

  • Joined

  • Last visited

  • Days Won


brian! last won the day on August 17

brian! had the most liked content!

Community Reputation

2,057 Excellent

About brian!

  • Rank
    Legendary Member

Recent Profile Visitors

26,042 profile views
  1. brian!

    WHMCS Calendar Hook

    on the edit popup box ? it should work.
  2. declare the variable globally - then you can reference any element of it in the hook. so in the above example, i'm using a hook to effectively override a language string - in your case, declare $_LANG globally, then you can access it as you can with any other array.
  3. the usual way would be Lang::trans('mylanguagevariable')
  4. is "A" your default currency in WHMCS ? if so, then what you're trying to do should work. if I create a fake currency, BRI, and set it to 10x the default currency (in my case GBP)... and then run "Update Product Prices" routine from the currencies page, the BRI price for a product is updated to 10x the GBP price... if I then change the currency rate to 12, run the product price updater again, the BRI prices are changed to 12x the GBP prices... if "A" wasn't your default currency, then I don't think what you're trying to do will work without a lot of effort - but if it is, then it should work out of the box as I describe above.
  5. brian!

    WHMCS Calendar Hook

    ooh it's been years since anyone asked a question about the calendar in WHMCS! you should be able to do it with css... #calendarcontrols label.checkbox-inline:nth-last-child(n+3) {display: none;} obviously, there's no custom.css in the admin templates by default, but as you've used a previous hook of mine to add one, so you could add the above code to that.
  6. brian!

    This Pop up Add Products are hard coded

    it's not a template, it's hardcoded and I doubt you could even tweak it with a hook. I think you will have to live with it. btw - as a general point, be very careful about trying to micromanage changes to WHMCS like this - especially in the admin area... it's fine now, and probably for the rest of the year, because you're doing these changes in the v7.8 beta, but there is no knowing what changes are going to be in v8 and if you've got multiple hooks, css changes and template edits tweaking the admin area in the most minute details, then you may run into a lot of issues when updating in the future.
  7. on your site, I can't get anywhere using the Lagom theme and orderform... even with six & standard_cart, I can't add a domain registration by itself; when I add a product, I can't choose a domain to register; if I use existing to get to the next stage, then ordersummary is blank and I can't continue... I can't even get anywhere using Modern and that's one of the most forgiving templates to issues like this... possibly there are too many alternate TLDs for it to look up, but that's not the cause of the downloads issue. is this applying to old attachments, new ones or both? have you moved the attachments folder from a previous installation ?? there's no point in me testing the site using Safari (as that hasn't been updated for Windows for 10+ years), but with Firefox and Edge, i'm getting nowhere... plus if the downloads are client only, then I can't test those links... maybe Safari Mac is more forgiving to whatever the issue is and Firefox/Chrome are stricter (assuming there isn't an extension in either causing this) possibly it's a server issue - perhaps how it's handling files types or json - because whilst testing i'm seeing the way it handles certain files as unusual and I don't know if that's impacting on the running of WHMCS or not... it's certainly worth asking your hosts about this to see if they have any idea. btw - in the last few weeks have you made any server changes, e.g changed PHP versions ?
  8. that should work (with or without the single quotes) - and looking at your site, I see that it now is. 🙂 I thinks styles.css is no longer used and is just a legacy file... https://docs.whmcs.com/WHMCS_7.1_Asset_Changes
  9. using a subdomain option already exists within WHMCS and you can add it on a per-product basis as a domain option (alongside registration, transfer or use existing domain)... https://docs.whmcs.com/Products_and_Services
  10. Hi @Mauwiks technically, it's the ID value from the tblhosting database table that is used to reference this service internally... could be a product, a domain or something else - what it is isn't nicely stored in the table, it takes a little bit of investigation to determine what it is. I think the Enhanced To Do List admin widget that I posted a year ago might be able to help you... 🙂 it queries the todo list database table and attempts to identify the client/product/domain associated with those todo items... and then makes the client details (pink user icon); service details (grey server icon); domain details (grey domain icon) and assigned admin (green if assigned) available as tooltips when you run the mouse over the particular icon. I assume in the case of that screenshot, it's just a service that's been provisioned using the AutoRelease module and as part of that setup, it's currently configured to generate a ToDo list item when the provisioning occurs.
  11. they won't as it would be against the rules for them to do so here, .e.g if I had written a Google Drive module that did what the OP wanted, I wouldn't be able to tell them as it would be self promotion/advertising - though I think there is an unwritten exception to that rule that doesn't apply if the product linked to is free. only if this question had been asked in SO&R as wsa linked to (or maybe third party addons) would they be able to even mention their own commercial products or services.... and they're unlikely to mention any of their rivals services, just to help the member here. see section 3 of the above thread... for the record, i'm not aware of anything that does what the OP asks about... I could see a way to do the second part, but in the absence of a ready made solution, the OP would have to throw money at this to either option implemented.
  12. brian!

    License Registered to: Admin Side Bar

    ahh - never occurred to me that $pagetitle was translatable... curse of usually not coding on a Saturday! <?php # Change License Registered Name on License Info Hook # Written by brian! function change_license_info_hook($vars) { GLOBAL $_ADMINLANG; $licensestring = $_ADMINLANG['license']['title']; if ($vars['pagetitle'] == $licensestring) { return <<<EOF <script> $("tbody").html($("tbody").html().replace('old name','new name')); </script> EOF; }; } add_hook("AdminAreaFooterOutput",1,"change_license_info_hook"); you should have seen what this place was like 5+ years ago - there was far more of a community spirit back then with multiple posters replying to technical threads... I only stand out now because i'm the last one still doing it on a regular basis. it's not a good situation for any forums to be in to be so reliant on a small number of replying posters... but sadly you can't magic people like me (or the much missed sentq) out of thin air... if they could, i'd happily leave replying to others. it's a php hook, returning javascript trying to reference php or Smarty variables - i'm not saying it couldn't be done, just not by me quickly today... I tried, but couldn't make it work. but I assume you're not going to be changing the name every 5 minutes - so yes, it would be nice to be able to pull the info automatically, but I wasn't going to waste a lot of time trying to make it work that way when it's not really that important.
  13. brian!

    License Registered to: Admin Side Bar

    i'll post that license info hook that I mentioned previously... <?php # Change License Registered Name on License Info Hook # Written by brian! function change_license_info_hook($vars) { if ($vars['pagetitle'] == "License Information") { return <<<EOF <script> $("tbody").html($("tbody").html().replace('current name','new name')); </script> EOF; }; } add_hook("AdminAreaFooterOutput",1,"change_license_info_hook"); you will just have to update the values of 'current name' and 'new name' for the existing and replacement registered names.
  14. brian!

    License Registered to: Admin Side Bar

    yeah - I only quickly glanced at the menu code, saw that the link had an ID and assumed the rest... sadly, we're still back in the 2010s or whenever with their parent tags not having IDs. that code tells me that for any admin user who you don't want to see this license page, you could uncheck remove "Main Homepage" from their administrator roles... that will remove the link from the menu, though would probably prevent them seeing most of the widgets on the homepage too. they've probably been designed using modern standards - the menu in Blend, other than slight styling changes, hasn't really changed much in the 4-5 years it's been out... here's what it looked like in v5.3 with the code used... <li><a id="Menu-Help" title="Help" href="">{$_ADMINLANG.help.title}</a> <ul> <li><a id="Menu-Help-Documentation" href="http://docs.whmcs.com/" target="_blank">{$_ADMINLANG.help.docs}</a></li> {if in_array("Main Homepage",$admin_perms)}<li><a id="Menu-Help-License_Information" href="systemlicense.php">{$_ADMINLANG.help.licenseinfo}</a></li>{/if} {if in_array("Configure Administrators",$admin_perms)}<li><a id="Menu-Help-Change_License_Key" href="licenseerror.php?licenseerror=change">{$_ADMINLANG.help.changelicense}</a></li>{/if} {if in_array("Configure General Settings",$admin_perms)}<li><a id="Menu-Help-Check_For_Updates" href="systemupdates.php">{$_ADMINLANG.help.updates}</a></li> <li><a id="Menu-Help-Get_Help" href="systemsupportrequest.php">{$_ADMINLANG.help.support}</a></li>{/if} <li><a id="Menu-Help-Community_Forums" href="http://community.whmcs.com/" target="_blank">{$_ADMINLANG.help.forums}</a></li> </ul> I suppose you could use a redirection hook to prevent selected admin users from seeing the license page - but as you say, you might as well just edit the template...
  15. brian!

    License Registered to: Admin Side Bar

    it won't - it's not a value that's available in the template.... you'd have to pull it from the database. usually, i'd use Capsule - but as this is a configuration value, there's another way... <?php # Change License Registered Name in Admin Sidebar Hook # Written by brian! use WHMCS\Config\Setting; function license_registered_name_in_admin_sidebar_hook($vars) { $companyname = Setting::getValue('CompanyName'); if ($companyname) { $licenseinfo = $vars['licenseinfo']; $licenseinfo['registeredname'] = $companyname; return array("licenseinfo" => $licenseinfo); } } add_hook("AdminAreaPage", 1, "license_registered_name_in_admin_sidebar_hook"); it's not a template, it'll likely be hardcoded in the index.php file... needless to say there are no IDs used in their code, so attacking it JS/JQuery/css is awkward, but doable if you can hardcode the two strings (e.g not pull them from the db).... alternatively you could remove the link to this page from the menu using a hook if you wanted to - actually, you could do that with css, but as the admin templates still don't have their own custom.css file, you would need a hook.

Important Information

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