Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 05/18/2019 in Posts

  1. 2 points
    Hi everyone, It's been quite some time since we added a new member to our Gearhead Program, A GearHead is a member of the community who is a champion of the WHMCS software. A GearHead is hand-picked by the WHMCS.Community Staff. We look for individuals who are long-standing activists in the community, courteous to other members, always providing technical insight and advice, and generally helping to make our forums a better place to learn, troubleshoot, and advance. With that in mind we're pleased to add @Kian to the GearHead ranks! A active community member for a number of years Kian provides a range of helpful responses to members right across the WHMCS.Community Platform. We look forward to seeing @Kian's future contributions to the platform alongside our current Gearheads.
  2. 2 points
    Exactly. @Remitur The problem is that WHMCS language is based on sessions so it doesn't matter what's the URL. The article will always use the default language which in your case is English. This hook should work. I tested on my dev system lazily. I'm gonna update if it doesn't work. It's commented. More information are provided below. <?php use WHMCS\Database\Capsule; use WHMCS\Config\Setting; add_hook('ClientAreaPageKnowledgebase', 1, function($vars) { /** * The way I'm getting $ArticleLanguage looks complicated but is necessary to match "Hello hello-hello" title with the rewritten URLs "Hello-hello-hello" * In fact there's no way to distinguish real dashes "-" from fake ones added by Friendly URLs of WHMCS * Keep in mind that I'm forced to use "raw" static method since WHERE statement doesn't support complex functions like REPLACE */ // Getting title from querty string $PageName = pathinfo($_GET['rp'])['filename']; // Retreiving the language of the currently displayed article by ID and title $ArticleLanguage = Capsule::select(Capsule::raw('SELECT language FROM tblknowledgebase WHERE parentid = "' . $vars['kbarticle']['id'] . '" AND REPLACE(title, "-", " ") = "' . str_replace('-', ' ', $PageName) . '" LIMIT 1'))[0]->language; // Retreiving the default language of WHMCS from tblconfiguration $DefaultLanguage = Setting::getValue('Language'); /** * This section is optional but needed if you want to protect yourself against blackhat SEO techniques (read post for more info) */ // Retreiving default language title $LegitURL = Capsule::select(Capsule::raw('SELECT REPLACE(title, " ", "-") AS title FROM tblknowledgebase WHERE id = "' . $vars['kbarticle']['id'] . '" LIMIT 1'))[0]->title; // If the URL currently in use is not 100% legit I force a redirect to the article in default langiage if ($LegitURL !== $PageName AND !$ArticleLanguage) { header('Location: index.php?rp=/knowledgebase/' . $vars['kbarticle']['id'] . '/' . $LegitURL . '.html'); die(); } /** * Here we set the right language depending on the URL */ // I check if the $ArticleLanguage is different from the language currently in use. I also make sure that $ArticleLanguage is different from $_SESSION['Language'] to avoid infinite loops if ($ArticleLanguage != $DefaultLanguage AND $ArticleLanguage != $_SESSION['Language']) { // Set language $_SESSION['Language'] = $ArticleLanguage; // Redirect visitor to current page to re-load the correct language header('Location: index.php?rp=' . $_GET['rp']); die(); } }); add_hook('ClientAreaHeadOutput', 1, function($vars) { /** * This guy adds canonical URL inside <head></head> tag so that Google doesn't penalize you (read post for more info) */ if ($vars['templatefile'] == 'knowledgebasearticle') { $PageName = pathinfo($_GET['rp'])['filename']; $CanonicalURL = Capsule::select(Capsule::raw('SELECT REPLACE(title, " ", "-") AS title FROM tblknowledgebase WHERE (parentid = "' . $vars['kbarticle']['id'] . '" OR id = "' . $vars['kbarticle']['id'] . '") AND REPLACE(title, "-", " ") = "' . str_replace('-', ' ', $PageName) . '" LIMIT 1'))[0]->title; return '<link rel="canonical" href="index.php?rp=/knowledgebase/' . $vars['kbarticle']['id'] . '/' . $CanonicalURL . '.html"/>'; } }); Even though we're now showing the right language to visitors, Google and all other Search Engines still hate us because we're providing duplicate contents. Their hate is so strong that they penalize us on SERP. Here is why: whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-water.html whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-vodka.html whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-rum.html whmcs.com/index.php?rp=/knowledgebase/55/How-to-boil-wine.html 4 URLs, same page and (duplicate) content. The only way to avoid penalties is that we let them know what's the unique URL by using rel="canonical" tag. The above hook adds it automatically where it is supposed to be (<head>here</head>). And if you are questioning why someone should use fake links, take a look at blackhat SEO techniques. One of your malicious competitor could publish some of those fake-links so that weeks later Google & co. penalize you for duplicate content. The above hook protects you from this technique forcing a redirect to the default article in case the URL in use is not the legit one.
  3. 2 points
    Yo! Congratulations @Kian 👏 @brian!, please don't leave us 🙏, I thought that you were (only) the One.
  4. 2 points
    The quick and dirty way: a simple query in phpmyadmin ...
  5. 2 points
    I was going to say that it would be easy to convert it to PDO prepared statements but the Capsule is great too. 🙂 should be easy to use those examples to convert it to the capsule. Hi brian! good to hear from you as well, good to see your still at it. I did alittle bit of coding after WHMCS but finally decided that even as a hobby i needed to call it quits for health reasons so i have not coded anything for pay in almost a year now. Part of me still misses it and sometimes ill whip up something just to learn how to do something new but thats about it. I moved to East Texas and i am loving it so much, its pretty and green and the lake it close enough to toss a rock and hit a fish lol.... But unlike NM, Texas has so many lakes its hard to chose just one, its alot like Texas girls, they are all beautiful its hard to choose just one. lol This is a very quiet rural community where the police chief dresses like a old west cowboy in the old days 🙂, its a very very small town and thats what i love about it. I bought some land here, first time land owner 🙂 and its keeping me busy, building a fence and so forth. I know im retired now but the plan is when i get to actual retirement age all i have for bills is utilities and a small HOA fee every month and the rest is for play time including fishing. So thats the plan.... so they say.. Sorry to be so long winded off topic... hope everyone is doing well and brian! take it easy man and do that voodoo that you do so well 🙂
  6. 1 point
    Hello Craft It won't matter which location you place the sub-domain directory in, these days it seems most people are creating these in the /home root rather than in /public_html/subdomain.domain.com as this helps to keep your main site and sub-domain seperated It wont have any SEO impact either way.
  7. 1 point
    @AMr Which version of WHMCS are you running? Does this occur in all browsers (chrome, firefox) if you tick the Remember me checkbox does the issue still occur? Are you using cloudflare?
  8. 1 point
    I'm sorry to see you go @brian! best of luck with your future work, you will be missed around here by myself and other WHMCS.Community Members
  9. 1 point
    I suggest you use a test domain name or a sub-domain to develop/test your WHMCS installation/website than hosting locally.
  10. 1 point
    Just like you would on any other server, assuming you have a web server and all the required software installed (LAMP) on your local computer. Make sure you are on a fixed IP with your ISP for the license check and that you have punched all the ports (firewall) on your network. This alone is just a terrible bad idea for security reasons. You should never turn your personal laptop or personal system into a public accesible web server unless you know exactly what you are doing. If your question is if WHMCS can work offline, not it cannot. It requires eventually an Internet communication for the license check. You can use Xamp or Wamp for an easy way to deploy a local server for testing. But even for testing or developing you still require a valid license from WHMCS. You cannot use WHMCS without a license, that includes developing.
  11. 1 point
    Thanks brian it's work with data feeds
  12. 1 point
    https://docs.whmcs.com/Other_Tab#Default_to_Client_Area 🙂
  13. 1 point
    another option would be to auto-close the ticket after a period of inactivity... https://docs.whmcs.com/Support_Tickets#Auto_Closing if the ticket is auto-closed before the issue is fixed, they can always reopen it.
  14. 1 point
  15. 1 point
    Obviously, bigger will always be better. If your site is small just start with the basic one and then upgrade in case of issues. Just take into account that a VPS is a full server and will require the same amount of work in terms of patches, upgrades, security, as a normal server. In that regard you will have to manage everything from the operating system to the network configuration. If you don't have a system administrator for those tasks, get a fully managed system.
  16. 1 point
    If the developers and WHMCS would use Dynamic Key protection for their code, e.g. license queries could be secured so that they are not decrypted without the correct key. There is no 100% protection, but this option would make it more difficult for crackers. Pure ioncube encryption only provides moderate protection. The Dynamic Key is not complicated, but unfortunately only few use it. The decryption of WHMCS and/or modules is not only stupid for the developers, users of such programs gain a competitive advantage because they save costs and can offer their products accordingly cheaper.
  17. 1 point
    On AffiliateActivation create the coupon code... INSERT INTO tblpromotions (code, [...etc...]) VALUES ({$COUPON}, [...etc...]) {$COUPON} should contain the ID of the affiliate in some ways (eg. Affiliate ID is 24 - Coupon code is 24AAABBB). This way you can determine the what is the right coupon to use for each affiliate by simply looking at digits. Alternatively if you don't want to store the ID in the code you'll need to create a separate table that stores the connection between 24 and AAABBB.
  18. 1 point
    Hi @crazeegeek, We've determined this could occur if the Modify Subscription feature was enabled before this feature was discontinued (only available in installations pre-2011). As a workaround, please execute the following SQL query against your WHMCS database: DELETE FROM tblpaymentgateways WHERE setting = 'modifysubscriptions' AND gateway = 'paypal';
  19. 1 point
    I wasn't aware of this thread but I have asked WHMCS for the exact same solution. We were lucky as we're using DirectAdmin as it can update curl for you. However, we're still running into all sorts of issues. The cron fails silently with collation errors--even though the collation seems to be set right. The ssl check essentially runs a DDoS on your server when the above happens when your customers have 100+ domains. The ssl check is an AJAX-call which returns a hardcoded link to an image. Good luck if you have a custom theme. @WHMCS John, I think you should be much more open in your decision making process, requests.whmcs.com is a wasteland and so far every major release has included a 'feature' that includes new banners in the admin area. I am 100% willing to increase our monthly subscription fee if you would start to listen to your customers, improve your changelogs and documentation, and stopped shipping new features that have not been tested properly.
  20. 1 point
    What, you mean the community thread where the guy from Plesk says "don't do this"?
  21. 1 point
    can you go into tblconfiguration and edit that setting manually rather than using the query ?
  22. 1 point
    I'm afraid that IDN decode library in 7.6 is not using the latest 2008 implementation. This cause serious problems including extra charges in wrongly registered IDN domains. Also, is there a way to stop WHMCS from doing IDN decode in domain search and leave the domain as it is in UTF8?
  23. 1 point
    В этом случае счет не оплатится автоматически. Клиенту нужно зайти в неоплаченный счет и применить средства с кредитного баланса.
  24. 1 point
    Hi all, I think it's time to solve once and for all the problem with the ticket system and email templates - regarding the main contact / master account holder receiving all the emails - even the ones regarding a ticket that was opened by a sub account or a contact person from his organization. The current state creates an overburden on the "master account holder" and causes misunderstandings who opens the ticket and so on (not to mentioned the spam to unnecessary participants). Please follow this scenario: - We have a company (let's name her "Macrosoft Ltd"). - We have in our WHMCS 4 contacts: 1. The master account holder - let's say his name is Tom Cruise and his rule is purchasing manager. 2. The support manager - Matt LeBlanc. 3. The sales manager - John Oliver. 4. The CEO - Elizabeth Tudor Problem #1: - When Matt opens a ticket he get an automated mail stating: Tom Cruise (Macrosoft Ltd), Thank you for contacting our support team. A support ticket has now been opened for your request and you will be notified by email when a response is made. - Please note that the ticket was opened by Matt LeBlanc - not by Tom Cruise!! Matt ask himself - WTF... I opened this ticket not Tom... - The same mail is sent also to the "master account holder" - Tom Cruise. Tom ask himself - WTF... I don't recall opening any ticket lately.... Problem #2: - In our WHMCS we see under the submitter field - Tom Cruise (Macrosoft Ltd) (although the ticket was opened by Matt LeBlanc) - only when looking inside the ticket we can see that is was submitted by "Matt LeBlanc (Macrosoft Ltd) Contact" Problem #3: - Any reply we make to Matt LeBlanc's ticket is also sent to Tom Cruise Tom ask himself - WTF... why do I keep getting this mails? (now take under consideration that Tom gets such an emails for all the tickets opened by Matt, John and Elizabeth - it can accumulate to lots of mails that's spams Tom mailbox!!!) Problem #4: - Let's say we want to sent a new quote to Elizabeth Tudor the CEO of Macrosoft Ltd Again the quote is sent to Tom (and any other contact that have the relevant Email Notifications setting) and to Elizabeth. and again - the name in the mail and on the quote is Tom and not Elizabeth!! Actually any email template that have the {$client_name} merge fields will be of Tom regardless who is the relevant contact that should receive such a mail / notification / quote etc. To sum it all up - there is a huge mix-up and confusion while using the Clients Information / master account holder information/ {$client_name}merge fields not to mentioned the amount of spam received to the email address registered under the Clients Information / master account holder. This is something relevant to any customer with more then one contact - so I'm sure that lots of WHMCS users face the same problem. If those problems weren't enough let's have few more: Problem #5 - Sometimes John Oliver sends a mail to Matt LeBlanc and add us in this mail in CC. A new ticket is opened with John Oliver set as the relevant contact. - Like stated before - Tom get's the email (and his name in the mail) - There is no way for us to see we are not the ones this mail is sent to (we are only in CC on the original mail). - If we reply to this ticket - only John (and Tom) will get the answer - nothing will be sent to Matt (unless we manually add his mail to the CC of the ticket - but there is no indication for us to do so). To sum it all up, I can't see the logic or advantages in the current situation - It create lots of problems and spam in any company that have more then one contact. I think that creating a clear and strict use of the relevant contact across WHMCS ticket, email templates and any other part of WHMCS - is mandatory. Every act we do should be related to a specific contact and only him. In the Feature requests system I found several relevant request: 12 votes - Client Contact Ticket Management https://requests.whmcs.com/responses/client-contact-ticket-management 7 votes - Disable Email to the main account e-mail https://requests.whmcs.com/responses/disable-email-to-the-main-account-e-mail 4 votes - Support ticket notifications - limit to contact participating https://requests.whmcs.com/responses/support-ticket-notifications-limit-to-contact-participating 4 votes - Improve email personalisation https://requests.whmcs.com/responses/improve-email-personalisation Total of 27 votes regarding the problem with the contact management. I think that WHMCS team should read this post and see the problems stated here and find a solution A.S.A.P But If from some strange reason it's not obvious this issue should be fixed - please please please add your votes. Thanks! Ram Thanks, Ram
  25. 1 point
    can you try it using a tweaked sql query either in the {php} tags or as an action hook... {php} tags... {php} $smartyvars = $template->getTemplateVars(); $userid = $smartyvars['clientsdetails']['id']; $query = mysql_query("SELECT tblhosting.id as serviceid FROM tblhosting,tblproducts WHERE userid = $userid AND tblhosting.packageid = tblproducts.id AND tblhosting.domainstatus = 'Active' AND tblproducts.servertype = 'cpanel'"); $result = mysql_fetch_array($query); $services = $result["serviceid"]; $template->assign('serviceid', $services); {/php} or as a hook, you could use... <?php function jackrabbit_serviceid_hook($vars) { $userid = $_SESSION['uid']; $query = mysql_query("SELECT tblhosting.id as serviceid FROM tblhosting,tblproducts WHERE userid = $userid AND tblhosting.packageid = tblproducts.id AND tblhosting.domainstatus = 'Active' AND tblproducts.servertype = 'cpanel'"); $result = mysql_fetch_array($query); $services = $result["serviceid"]; $return = array("serviceid" => $services); return $return; } add_hook('ClientAreaPageHome', 1, 'jackrabbit_serviceid_hook'); ?> as it stands, $serviceid will contain one value, e.g the first cpanel product ID it finds in the query - i'm assuming your clients only have one cpanel hosting product and so this won't matter... if they had multiple cpanel products, it would be simple enough to change the hook to generate an array of values instead of just one, which you could then output via a {foreach} in the template - but let's not describe how to do that in detail unless we need to! i'm also assuming you only want to offer the cpanel quicklinks to cpanel products...
×

Important Information

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