Jump to content

brian!

GearHead
  • Content count

    10,067
  • Joined

  • Last visited

  • Days Won

    267

brian! last won the day on February 15

brian! had the most liked content!

Community Reputation

1,819 Excellent

About brian!

  • Rank
    WHMCS GearHead

Recent Profile Visitors

22,053 profile views
  1. brian!

    Custom Invoice not working anymore..

    it would only be applied to new invoices generated after the update - it wouldn't change previous invoices... are you/WHMCS creating new invoices and it's still not applying the correct format ?
  2. yes. one option would be not to delete but keep them as drafts - that way, you'll have a record of the invoice for your booky, and the client will never see them. deleting an invoice (which I think is disabled in admin roles by default ... and also illegal in some jurisdictions - though not yours obviously!) only deletes the entry from the tblinvoices database table - it doesn't delete the detailed entries from the tblinvoiceitems table... so even if you reset the next invoice number in WHMCS (assuming you haven't created any invoices since), it could cause errors and corruption in the database, so best avoided - unless you know exactly what you're doing.
  3. brian!

    Custom Invoice not working anymore..

    it should be... https://docs.whmcs.com/System_Requirements are you able to download the full v7.7.1 update or the v7.7.1 incremental patch from downloads.whmcs.com ? if so, getting the incremental patch and updating via FTP is still a valid, and often better, solution.
  4. brian!

    Custom Invoice not working anymore..

    which version of WHMCS are you using? there was a bug in v7.7.0 with regards to custom numbering that was fixed by a hotfix, and was included with the v7.7.1 release. if you're still on v7.7.0, you should either update to v7.7.1 or apply the hotfix; if you're already on v7.7.1, and this is still occurring, then it might be worth opening a ticket with Support.
  5. brian!

    Show local currency in PDF paid invoice

    you would need to query the database to get the exchange rate... perhaps the thread below will be of some use to you, though if this is purely for the invoice pdf template, then you won't need to use hooks as you'll be querying the database directly in your invoicepdf.tpl file.
  6. let's not start making one of those lists - we'd be here for a while. πŸ™‚ I suspect it's just a legacy thing... e.g WHMCS has always done that (as far as I can remember) when logging out. simplest solution would be to use a hook to redirect the user to a specific page when they logout - that could be back to login.php, to your homepage or even an external link... I wrote the hook below for another user using v7.5 back in May 2018, but it would still work with v7.7.1 (and probably any version of WHMCS released in recent years)... <?php /** * Client Logout Redirection Hook * @author brian! */ function logout_redirect_hook($vars){ $url = 'login.php'; header( 'Location: '.$url ); } add_hook('ClientLogout', 1, "logout_redirect_hook");
  7. I read everything (I think!)... they're just telling the hook to get ready, we're about to query/update the database... mine is probably from how the example hooks were posted when v6 came out; steven's is how they're posted now... they're both doing the same thing and at this stage, I wouldn't worry about it too much - when i'm writing a new hook, i'm using one of a number of hook templates and it will likely contain that line that i've always used... and I don't know if that new method would only work on v7.... so when I get the chance, i'll have a play and see, but don't worry about it for now - as long as the hook can find Capsule, then the queries will work. they're fine and are just incremental counter, e.g., $x++ just adds 1 to the value of $x... steven99 was using a loop with a value but no key; whereas in mine, i'm specifying to use both the value and the key, and subsequently don't need to use a separate counter variable.
  8. i'm still inclined to think so. there are none - but a lot of WHMCS is probably still how it was 10 years ago, and this may be one of those occasions. but if the database doesn't store the updated date (or any date), then you're into the realms of having to store the date yourself when you update/create an article in the admin area... but I don't think that there are any specific hook points triggered when editing an article, so no simple way to do this. you can't extract what hasn't been saved. πŸ™‚ no - just what has been programmed to be returned to be available to the template. not necessarily - as you saw with the useful/votes hook that I wrote that just amended the array with new content and returned it to the template... if the dates were naturally in the table, you could use that hook for this, but there are no dates stored. i'm not saying that it couldn't ultimately be done, just that there isn't a quick "here's a hook" solution... it's likely going to need an addon module for this, probably with custom database tables too.
  9. one option is a quick fix with css... .grecaptcha-badge { left: 0px; } and technically, you could hide it with the css code below (it still validates), but that would almost certainly be against Googles T&Cs... .grecaptcha-badge { visibility: hidden; } the real solution is probably going to involve using the "data-badge" feature - which by default is bottomright, but you can define it to be bottomleft - I can do it by editing scripts.js and changing.... // propagate invisible recaptcha if necessary if (isInvisible) { if (recaptchaContent.data('size') !== 'invisible') { recaptchaContent.attr('data-size', 'invisible'); } } else { recaptchaContent.hide() } to... // propagate invisible recaptcha if necessary if (isInvisible) { if (recaptchaContent.data('size') !== 'invisible') { recaptchaContent.attr('data-size', 'invisible'); recaptchaContent.attr('data-badge', 'bottomleft'); } } else { recaptchaContent.hide() } ... minifying it and saving as scripts.min.js now someone, perhaps one of WHMCS' own devs, who is better than me at JavaScript, should be able to make that into a hook.... long-term, there's nothing to stop WHMCS putting a left/right location dropdown toggle in the security tab, but that's heading down the road of a feature request, so it won't be happening any time soon. πŸ™„ in fact, they should have already made it multilingual - as I showed how in the thread below.... though everything seems to be defined in the .js files now, so I doubt quick template edits wouldn't work on the latest versions.
  10. yes - similar hook, you just have to change the array used and the hook point called... <?php # Remove Cancelled Domains From Array Hook # Written by brianο»Ώ! function clients_domains_hide_cancelled_hook($vars) { $hideStatus = array ('Cancelled'); $domains = $vars['domains']; foreach($domains as $key => $domain) { if (in_array($domain['status'], $hideStatus)) { unset($domains[$key]); } } return array("domains" => $domains); } add_hook("ClientAreaPageDomains", 1, "clients_domains_hide_cancelled_hook"); and then to hide the cancelled filter, you could remove it with another hook or hide it with css.. #Primary_Sidebar-My_Domains_Status_Filter-clientareacancelled {display: none;}
  11. brian!

    Save cart for later

    perhaps a better solution for your situation will be Share Cart...
  12. brian!

    Adding Cookie Control to Client Pages

    yes... occasionally, I think you might need to output in the header instead of the footer (depending on what you're trying to do), but the Google Analytics addon uses a ClientAreaFooterOutput in the same way as your hook.
  13. brian!

    Adding Cookie Control to Client Pages

    answers on a postcard, please! πŸ˜› upload the attached file to /includes/hooks (or create a new .php file in there and copy&paste the above code) and the next time you refresh your site in the browser, you should see the cookie bar... πŸ™‚ thisimattcookie.php
  14. brian!

    Hide Menu Items before user login

    lol - it only occurred to me this morning when I realised it had it's own css ID. πŸ™‚
  15. brian!

    Adding Cookie Control to Client Pages

    the following hook should work for you @thisismatt... <?php # Matt's Cookie Hook # Written by brian! function thisismatt_cookie_hook($vars) { return <<<HTML <!-- Cookie Consent by https://TermsFeed.com --> <script type="text/javascript" src="//termsfeed.com/cookie-consent/releases/3.0.0/cookie-consent.js"></script> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', function () { cookieconsent.run({"notice_banner_type":"headline","consent_type":"express","palette":"dark","change_preferences_selector":"#changePreferences","language":"en"}); }); </script> <noscript><a href="https://termsfeed.com/cookie-consent/">Cookie Consent by TermsFeed</a></noscript> <!-- End Cookie Consent --> HTML; } add_hook("ClientAreaFooterOutput", 1, "thisismatt_cookie_hook");
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines