Jump to content

brian!

Honored Contributor
  • Content Count

    15088
  • Joined

  • Last visited

  • Days Won

    630

brian! last won the day on April 16

brian! had the most liked content!

Community Reputation

3250 Excellent

About brian!

  • Rank
    Senior Member

Recent Profile Visitors

48636 profile views
  1. if you bought the addons direct from ModulesGarden, then you should contact their support for help.
  2. it's not much of a security policy that at the first sign of an issue, Support effectively tells you to completely disable it! 🙄 all you should have needed to do was add the one (or more) specific tags that were causing the issue - not all of them! perhaps if I post an example from one of my devs... $smarty_security_policy = array( 'system' => array( 'enabled_special_smarty_vars' => array( 'cookies','session','server','this','capture','foreach','get','post', ), ), 'mail' => array( 'php_modifiers' => array( 'strstr', ), ), ); it's the way you've arranged the array output in the file that will be confusing - that's not necessarily your fault, I can see that's how it's now shown in the docs. 🙄
  3. I always do before posting (that screenshot wasn't Photoshopped!) - the hook returns the correct value for me on every client/service I tried... though as I said those values would be meaningless for terminated/one-time products etc. not for me. da-dahhhh! some, but not all, of the variables available to a hook point are shown on the dev pages.... https://developers.whmcs.com/hooks-reference/output/#adminareaheaderoutput Runs on every admin area page load. All template variables defined at the time the hook is invoked are made availble to this hook point. This can vary by page. The list below is not an exhaustive list. Parameters Variable Type Notes charset string System charset setting eg. UTF-8 template string The admin template being used pagetemplate string The template for the current page (if applicable) adminid int The currently logged in admin user ID admin_username string The username of the current admin user admin_notes string The private notes for the current admin user admin_perms array The permissions of the current admin user addon_modules array A list of add-on modules the current admin user has access to filename string The name of the file being called pagetitle string The title of the current page helplink string The documentation url for the current page sidebar string The sidebar output minsidebar bool Returns true if the sidebar is minimised jquerycode string jQuery code for the current page jscode string Javascript code for the current page datepickerformat string The format defined for dates in the admin area adminsonline string A list of currently online admin users Response Accepts HTML to be output within the body tag of the admin area output that's just the filename of the page in the admin area, e.g clientsservices.php
  4. if you're billing annually, and you wanted to use the promotional codes system, then creating a promo code with a 8.33% discount would effectively give them 1 month free, e.g they're paying for 11 months rather than 12.
  5. it would usually be - cart.php?a=complete ... but it might also depend on your checkout settings as to where the user is sent after checkout... https://docs.whmcs.com/Ordering_Tab#Auto_Redirect_on_Checkout
  6. the way I did it above was to take the "productselect" value from the URL - if it exists, then that's the PID number... once you have that, then the world is your oyster and off to go to query the db via any number of methods... if it doesn't exist, then it's the first product - at which point, you just do a simple query that returns the first product of that client. you can use multiple hooks in the same file - you can even use hooks within hooks if you have to (i've posted examples - but whether that is actually necessary in this case, I doubt). below is a screenshot of the quick test hook I wrote for the above screenshot - it will only get you so far and needs to be thoroughly worked through as I outlined previously. i'm not sure there is a relevant reference that I can give you - it's more a case of knowing what needs to be done and then working out the best way to do it.... so if it's using capsule (as per your example), the WHMCS doc would be here - though frankly you'd be better off reading the laravel documentation. the first change you'd likely have to make is to the second if statement - you're going to have to check if the $PID value is a number - if so, then it's a service... if it starts with 'a', then it's a product addon and you'd then have to query the tblhostingaddons table instead of tblhosting for the NID. actually, what you're probably going to have to do is instead of using value to just get the NID date, you might have to get the entire table row and then use the values in the array to work out it's status (terminated etc), it's billing cycle (one time or recurring) as they would al have an impact on whether NID exists or is of any practical use.
  7. well literally adding currency=9 to every link that goes to the subsite would be one option. 🙂 in practice, you'll have to check that the user wasn't logged in - because clients can't change their currency and can only see products priced in their own currency... so if these products weren't priced in that currency, they couldn't buy them. setting the currency in the session would be another option - is this subsite outside of the cart (e.g sales pages), or is it a product group in the cart ?
  8. trying to use $ _ GET in the hook? for some bizarre reason, we can't post that anymore. 🙄
  9. then you'll probably going to need to use a SQL query - either directly via phpmyadmin etc, or inside a report. although one problem you might run into is if this custom field was added after clients had already been created, e.g if you already had 1000 clients, and *then* added this CCF to the setup, there would be no records in the relevant database table for those 1000 clients (unless they/you had updated those values)... under those circumstances, you'd be querying for relevant field(s) that are either empty of don't exist.... if the CCF was setup before clients where created, then it should just be a straight if value is empty where condition... with relevant joins depending on what info you want to extract from the query (e.g client names etc)
  10. it would be value rather than pluck in recent versions. well it would be an AdminAreaHeaderOutput hook that uses JS to insert the relevant content. personally, i'd forget about outputting it in a new table cell - that could be an absolute pain to code in a hardcoded table... just return the value after the NDD. I would suspect you're probably looking at 20-30 lines of code here... e.g getting the ID value from the URL (or querying it if that value doesn't exist, e.g first product), handling addons, handling one-time products (which won't have NDD or NID values), handling terminated products (which will have NID but it will be irrelevant) etc. it's all doable - the output side of things is simple enough and roughly demonstrated in the hook below posted by Kian (you won't need everything he's doing in that hook)... just work through it logically.... the real pain is that i'll think you'll have to use $_ GET and so pasting the code here wouldn't work.
  11. if there are actually duplicate values in the database (check first), then there is a possible solution below - though i'd backup the database before any such SQL query! ⚠️
  12. they specifically said that ? because your quote from the support reply says something else to me, e.g you manually need to force the reissue... no doubt this will more automated in v8.2, but that's going to be someone else's problem! 🙂 I can still remember the uproar in here (in v6.3 I think) when they introduced, with no warning, the hardcoded remote WHMCS logo image in the admin email footers... you know what the upshot of all those complaints were? nothing.... even if you feature request to get it removed, it gets declined. the lesson being - if you don't like what WHMCS are doing, or going to do, then walking away might be the best solution... listening is not their strong point and when they've decided to do something, they can turn both deaf and mute. 🙉🙊
  13. in fairness, you chose the hook and didn't mention your invoicing setup. as hard as I try, I cannot make this hook fail - it's working with proformas for me... I wouldn't hold your breath waiting for that. I think either a) the hook isn't actually running on your server and/or b) your tax/invoice settings are overwriting the changes somehow.... I simply cannot reproduce the issue locally. enabling hook debug mode might be useful, as might tweaking the hook code to add a log entry upon successful running. does your site use 21 ? I thought it was a fully custom theme.... in any event, that's one for Support to deal with... the real test would be if the links fail with a clean version of Six or 21 - that should at least tell you if it's a template issue or something else.
  14. fwiw, it's showing your domain as valid to me. ✅ it can't be just logging into the admin area - they literally want a forced license reissue occurring every 10 days ? it will work the other way too... nobody can publicly (easily) tell whether anyone is using a nulled license - the script will seemingly give the same result whether it's not legit or because a legit user hasn't logged in and reissued the license (and who the hell will know that they now need to in order to keep the public appearance of the license being valid?) - this is ridiculous, but yet somehow no longer surprising.
×
×
  • Create New...

Important Information

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