Leaderboard
Popular Content
Showing content with the highest reputation since 11/05/24 in Posts
-
That's a hook I developed and sold to Hexonet. They've probably expanded it a lot though as this was many years ago. When I asked OpenProvider about it, they said they had a similar feature for WHMCS. If not, I'll just create one from scratch again. It's really dead simple: Intercept the domain registration with the PreRegistrarRenewDomain hook point Be aware that WHMCS will send the "Domain Renewal Failed", so you might want to abort sending this email as well Use the providers API to transfer the domain instead Write logic for TLDs that aren't renewed during transfer - these would to be renewed after transfer That's basically it. It's not even 100 lines of code. I still have the code but I can't share it.3 points
-
Hey, all! Been a few weeks since my last look at this thread. My initial thought was that we would go with DynaDot, but they do not support a lot of the TLDs we already offer. We had also ruled out OpenProvider initially because we had to pay them a yearly membership subscription. However... We've spent the last month crunching numbers and comparing various providers, and OpenProvider looks to be the best alternative. Even though we have to pay a yearly fee, we are saving thousands of euros every year because we get no markup on domain prices. We have been speaking with OpenProvider for the past week and signed up yesterday, getting a nice discount for the first year. Apparently, we are not the first one to contact them regarding the CentralNic migration. If I understood correctly, they have methods to take care of the migration from Hexonet/CentralNic to OpenProvider. Another incentive for us to move to OpenProvider is the fact they we can authenticate our domain and have them send emails on our behalf (such as WDRP messages). This is something I've been requesting from Hexonet for years because we had a lot of clients that were suspicious of emails coming from @ispapi.net, claiming to be sent on behalf of us. Oh, and they respond to tickets very quickly. We don't have to wait days or weeks. Looking at you, CentralNic. Hexonet has just announced that the migration dates have been moved (May 2025 instead of Feb 2025 IIRC). This gives us plenty of time to move everything. Initially, we thought we would actually need to top up our CNR accounts with 75$ - but it looks like that's no longer the case 😁 My boss is no longer annoyed about the migration. We are gonna save a bunch of money with minimal effort - and we get better service by the looks of it.3 points
-
Hi WHMCS ecosystem developers! I am excited to share an early heads-up about the upcoming WHMCS 9.0 release by the end of 2025 - a major update that brings important changes to the platform’s technical requirements. As part of this release, several core dependencies will be updated, and minimum system requirements will be increased. These changes are designed to improve performance, security, and compatibility with modern PHP standards. Key Updates in WHMCS 9.0: Minimum PHP version: 8.2 Recommended PHP version: 8.3 Minimum ionCube Loader version: 13.0.2 or higher Recommended ionCube Loader version: 14.4.0 or higher Updated dependencies: A number of underlying libraries and components have been upgraded. Some notable changes include: Smarty v3.1.48 —> v4.3.4 Legacy Smarty Tags are being deprecated and will no longer function in 9.0. Smarty Template Objects (including their use in plugins) will no longer be supported. guzzlehttp v7.4 —> v7.4.5 illuminate v7.x —> v9.0 I have attached a provisional list of dependency changes to this post. Please also use this thread to provide your feedback and ask questions of the Development Team regarding these requirement and dependency changes. These changes will require action from module developers to ensure continued compatibility. We recommend reviewing your module code and preparing for updates ahead of the release. We’ll be sharing more details, including a release window, definitive changelog and developer guidance, between now and the end of 2025 to help you get ready. Thank you for being a valued part of the WHMCS ecosystem. We appreciate your continued support and look forward to working together to make WHMCS 9.0 a successful release. whmcsv90_composerlock_provisional.txt2 points
-
@stormy, I'm glad to hear the e-invoicing feature will be a real value add for you. We are working with expert solution-providers in this space, so we're confident about delivering an easy to use and compliant solution with the broadest coverage. @andp97, Yes, by the end of the year in a pre-release version of WHMCS you will have access to this new feature. This bullet point actually describes two significant features which we're very excited about: 1. A RESTful API which provides access to the product catalogue and shopping cart logic. This will provide a suite of new endpoints to get product catalogue information, add, manipulate and get information about items in the cart (including price breakdowns and totals) and much more, all without touching the cart.php file or PHP session data. This means that power users could create their own highly-bespoke frontends whilst WHMCS handles the maths in the background, before seamlessly passing visitors to the checkout page to complete payment. 2. A brand new thin client powered by the aforementioned new API capabilities, providing a thoroughly modern purchase experience based on Vue.js. I've attached a sneak peak below. The new BuyFlow is a compiled Single-page application, meaning the layout isn't manipulated through templates, but you will be able to customise the colours to match your theme through a custom.css overrides file. The shopping cart as it exists today (cart.php and order form templates) isn't going away and will still be available if you'd like to stay with the familiar experience. Stay tuned to our blog and socials over the coming weeks for more information!2 points
-
Hi all, In 8.13 a small improvement was made to the accounting of refunded mass-pay invoices. Prior to this the totals of mass-pay invoices were included in the overall income statistics, but now they are excluded as it's already accounted for by the original invoices.2 points
-
But you did ask them, and not by just posting here? EDIT: This is a bit old now, but a fast search on this board found:2 points
-
Hello @ThemeMetro This is a known issue, and we have published a HotFix. For more details, please review the following. Apologies for any inconvenience. Kind regards, Stephen.2 points
-
Thanks to @Mytihost, I found an elegant solution for this issue. The following hook: add_hook('ClientAreaPage', 1, function($vars) { if (!empty($vars['clientsdetails']['customfields'])) { $customfieldsAssoc = []; foreach ($vars['clientsdetails']['customfields'] as $field) { $customfieldsAssoc[$field['id']] = $field['value']; } return ['customfieldsAssoc' => $customfieldsAssoc]; } }); makes available the value of any client custom field in a template, using i.e. the form {$customfieldsAssoc.17} (where "17" is the id field in the tbl customfields)2 points
-
Hi @Jade D, I have responded to your ticket, but just wanted to follow up here so there's an answer if anybody else comes across this. The underlying issue here is that your web server was advertising a domain other than that registered for your license. This causes the license cache in your install to be invalid, and so your install needs to check in with our licensing infrastructure to validate your license. Since the details we held about your license were different to those being advertised by your web server, your install kept making a request to our licensing API. We rate limit all requests made to our licensing infrastructure to ensure stability thereof for all our customers. If your server sends too many requests, it will be temporarily blacklisted as part of this rate limit. To resolve this, make sure that your web server is only advertising the server_name that we have listed in your Valid Domains. Wait for 30 minutes or so and the rate limit will be removed, then your install will get a response back from the licensing servers that your license is valid and access will be restored. If anybody is unable to get to the bottom of this, please reach out to our support team and we can help!2 points
-
You aren't authenticated in your hooks. The hooks aren't running as you - they're running as the system. WHMCS doesn't offer a native way of logging in as an admin in a hook. If you just want to download the invoice, you can include /includes/invoicefunctions.php and run the pdfInvoice($invoiceId) function.2 points
-
I take it you weren't here when WHMCS yanked owned license update "support addons" and we all lost any updating of those convenient owned and now worthless licenses many of us bought? I had two.2 points
-
Next week we'll test our module. It works like this: You define the old and new registrar modules New registrar should be configured as the default for new domain registrations for a specific TLD When WHMCS attempts to renew a domain, it will check if the current registrar module is defined as the old registrar in the module settings and if the new registrar has been configured as the default for the TLD Use the new registrars _GetTldPricing() function to see if EPP code is required and get the transfer price for the TLD If EPP code is required, fetch it from the old registrar using their _GetEPPCode() function If transfer price is set to 0, we assume domain is not renewed - renewal will need to happen after successful transfer (this part is still WIP) Run the the new registrar's _TransferDomain() function If anything goes wrong, send an email to admins If the transfer is successful, the client receives an email with relevant information and the domain's registrar module is updated. I plan on adding support for registrars that doesn't have a _GetTldPricing() method, but this would require feeding the module with information about EPP requirement and whether domains are renewed during transfer.2 points
-
I have started work on an addon module that can hopefully work with any registrar in WHMCS. You have to define the source and destination registrar module, and the addon module takes care of the rest.2 points
-
Hello everyone. I see that here are some respected figures in the WHMCS world. I made a decision some time ago, it is difficult and complex. I will try not to use anything from WebPros. This is a difficult decision, but I see that everyone shares the same feeling, they do not care about us. Is it extremely difficult to leave cPanel? YES We are working hard to improve DA as well, and we are also working on other open source control panels. Is WHMCS very good and does it solve a lot of things? YES We do not have viable alternatives yet, but I am sure that there are many people who are dissatisfied and very soon an alternative will appear... and when it does... well... An idea... Has anyone ever thought of 'making a clone' of WHMCS? Something that WHMCS modules could be used for? Where WebPros plays, I run. I am not criticizing people, but rather how business is conducted. I understand that we all wake up in the morning to make money. I do not use any pirated tools, it is very complex to stay competitive.2 points
-
2 points
-
WHMCS users and client accounts have separate contact information and they require separate updates to change details like the email addresses. The user management system allows a single user to access multiple client accounts. This separates authentication and authorization from services, billing, and support. To learn how to change the client account and the user account email address so they match please review this help guide: https://help.whmcs.com/m/managing/l/1681243-updating-user-and-client-account-details With this hook added to your WHMCS installation the system will now "Sync" the Client Account Email Address to match the User Account Email Address only when the change is made under the Account Details page via the client area. This hook adds a little "Note" under the Email Address field under the Hello Client! > Account Details section of the client area to inform that when this Email Address is changed, they will be logged out and they will need to log back in using the new Email Address they just set since this hook is updating both the client account and user account email addresses. Here is an example of the Account Details page Email Address field with this note: Via the Admin Area, when a client does this change and the hook was used it will make a log entry just like this: This entry indicates that the Client/User Email Sync Script hook was a success. Now both the Client Account Email Address and the User Account Email Address match for that client account. If there are multiple Users associated with the Client Account, this will only change the Email Address of the Owner of the account. <?php /* This script will update both the Client Account Profile email address and the user account email address when the change is made to the Account Details page for the email address field. Otherwise, you would have to update the email in both places and follow this article: https://help.whmcs.com/m/managing/l/1681243-updating-user-and-client-account-details Upload this file to your /includes/hooks directory of your WHMCS installation. There will be a Log entry when this script runs. @WHMCSDanny */ add_hook('ClientAreaHeadOutput', 1, function($vars) { // Only run if the on the Account Details page via the client area. // The action is going to be "details". This will make sure this message does not show anywhere else. $action = $_GET['action']; if($action == "details") { //Input the message under the Email Address field that they will be logged out after making the change. return <<<HTML <script type="text/javascript"> $(document).ready(function() { jQuery("input[name='email']").after('<span style="color:red; font-size:9pt;"><b>Note:</b> Changing your email address here will sync the email with your User Account. You will be logged out after you change the email. You must login using the new email address you just set.</span>'); }); </script> HTML; }; }); // prevent file from being loaded directly if (!defined("WHMCS")) { die("This file cannot be accessed directly."); } else { function clientowneruseremailsync_changeUserEmail(int $client_id, string $client_email){ // call the API and grab the owner user ID $command = 'GetClientsDetails'; $postData = array( 'clientid' => $client_id, 'stats' => false, ); $results = localAPI($command, $postData); if ($results['result'] == 'success') { // success! $client_owner_user_id = $results['client']['owner_user_id']; if (is_numeric($client_owner_user_id)){ // got a number, so it should be a valid owner user ID // now to perform the update to the user account to match the email set for the client account $command = 'UpdateUser'; $postData = array( 'user_id' => $client_owner_user_id, 'email' => $client_email, ); $results = localAPI($command, $postData); if ($results['result'] == 'success') { logActivity("Client/User Email Sync Script - Emails Successfully Changed and Synced. The e-mail address is set to $client_email for the Client Account and the Owners User ID: $client_owner_user_id", $client_id); } else { logActivity("Client/User Email Sync Script - Failed to change the e-mail address to $client_email for the Owners User ID: $client_owner_user_id . Results: ". $results, $client_id); } } } else { logActivity("Client/User Email Sync Script - Failed to verify that an e-mail change occurred on the clients profile. Results: ". $results, $client_id); } } add_hook('ClientEdit', 1, function($vars) { // Only run if the clients account profile email address is being changed. if ($vars['email'] != $vars['olddata']['email']){ // email is being changed. Update owning user accordingly. // get the client ID. It should be $vars['userid'] $client_id = $vars['userid']; // get the new e-mail address $client_email = $vars['email']; // call our helper function clientowneruseremailsync_changeUserEmail($client_id, $client_email); } }); } ?> Enhanced Version - Added a checkbox and tooltip In this new updated version of this hook, I added a checkbox/tooltip for the end-users to decide if they want to use this option to sync the Email Address under the Profile page too. Otherwise, nothing happens and WHMCS works as normal. The checkbox needs to be checked before it will run the same hook code to update both email addresses in both locations. (Account Details and Profile sections via the client area) <?php /* This hook script will update both the Client Account Profile email address and the User Account email address When the change is made to the Account Details page for the email address field only. It does not work for the Profile page. This version adds a new checkbox with a tooltip to let the end-user decide if they want to use this option or not. The checkbox needs to be checked for the hook to execute. If the checkbox does not get checked WHMCS works as expected and updates just the Account email. The Profile email account will still need to be updated if they want it to be the same. Otherwise, you would have to update the email in both places and follow this article: https://help.whmcs.com/m/managing/l/1681243-updating-user-and-client-account-details Upload this file to your /includes/hooks directory of your WHMCS installation. There will be a Log entry in the admin area when this script executes. @WHMCSDanny */ add_hook('ClientAreaHeadOutput', 1, function($vars) { // Only run if the on the Account Details page via the client area. // The page action is "details". This will make sure this message does not show anywhere else. $action = $_GET['action']; if($action == "details") { //Input the checkbox and tooltip under the Email Address field return <<<HTML <script type="text/javascript"> $(document).ready(function() { jQuery("input[name='email']").after('<input type="checkbox" name="syncEmails" id="syncEmails"> <span style="color:red; font-size:9pt;"><b>Sync Email with your User Account Email</b></span><span class="form-group"> <i class="far fa-question-circle" data-toggle="tooltip" data-placement="top" title="This option will sync your Email Address Here with your Profile Email Address. You will be logged out and will need to login with your new email address. If you do not check this option you will need to update it under the Your Profile page as well"></i></span>'); }); </script> HTML; }; }); // Prevent file from being loaded directly if (!defined("WHMCS")) { die("This file cannot be accessed directly."); } else { if (isset($_POST['syncEmails'])) { // Checkbox is checked // Perform actions and the logic to check the emails and replace them with the new one function clientowneruseremailsync_changeUserEmail(int $client_id, string $client_email){ // call the API and grab the owner user ID $command = 'GetClientsDetails'; $postData = array( 'clientid' => $client_id, 'stats' => false, ); $results = localAPI($command, $postData); if ($results['result'] == 'success') { // Success we have the owners user ID from the database! $client_owner_user_id = $results['client']['owner_user_id']; if (is_numeric($client_owner_user_id)){ // We have the ID number, so it should be a valid owner user ID // Perform the update to the user account to match the email set for the client account $command = 'UpdateUser'; $postData = array( 'user_id' => $client_owner_user_id, 'email' => $client_email, ); $results = localAPI($command, $postData); if ($results['result'] == 'success') { logActivity("Client/User Email Sync Script - Emails Successfully Changed and Synced. The e-mail address is set to $client_email for the Client Account and the Owners User ID: $client_owner_user_id", $client_id); } else { logActivity("Client/User Email Sync Script - Failed to change the e-mail address to $client_email for the Owners User ID: $client_owner_user_id . Results: ". $results, $client_id); } } } else { logActivity("Client/User Email Sync Script - Failed to verify that an e-mail change occurred on the clients profile. Results: ". $results, $client_id); } } add_hook('ClientEdit', 1, function($vars) { // Only run if the clients account detaoils email address field is being changed. if ($vars['email'] != $vars['olddata']['email']){ // Wmail is being changed. // Get the client ID. It should be $vars['userid'] $client_id = $vars['userid']; // Get the new e-mail address $client_email = $vars['email']; // Call the helper function to make the change clientowneruseremailsync_changeUserEmail($client_id, $client_email); } }); } } ?> At the time of writing this post, this process was tested on the latest stable release of WHMCS 8.9.0 I hope you find this useful. If you have any feedback or questions, please feel free to reply to this thread! WHMCSDanny2 points
-
Hello, Not at all and it's highly recommended, to change the admin path.2 points
-
I am happy to say that the development cycle of vBLink 2.0 is now complete. The release was delayed for a complete ground-up rewrite after WHMCS 4 was announced. It is not ready for download just yet; I have not taken the time to create an installer or documentation because of two major issues that may become a factor in the long term success of vBLink. The first issue is vBulletin 4 support is not included. This is in part because of the fact that I do not agree with decision by vBulletin to change the licensing structure essentially us to purchase new licenses. I own three licenses, two for production sites, one for a development site. The cost to upgrade is going to be huge, especially if I choose the publishing suite. So at this point I have no access to vB4 code. The second issue is that from a business standpoint vBLink has not been a success, or at least the free/paid model that it has been distributed with. In the past year there have been over 400 downloads of vBLink but less than 2% were paid licenses making vB4 support hardly justifiable. So the question now is what to do next, and that is the reason that I am posting this message. Obviously, vBLink without vB4 support is only going to be useful for a short time until v4 goes gold. But without a solid community and financial backing behind it, I have no reason to continue development. But one promise I will make is that if I do walk away from vBLink, I will release all source code into the public domain; I do not believe in holding code hostage. If I do in fact release vBLink 2.0, I'm thinking of a 3-tier release structure... vBLink Basic (Free, Fully Encoded with only account bridging and no extras) vBLink Pro (Mid-range cost, a few admin module source files encoded, fully functional) vBLink Pro Dev (Highest cost, fully functional with full source) All feedback is welcome and will help determine the future of this vBulletin integration.2 points
-
This module works as documented. Password reset and firewall rules are tested and functional. For support, contact support@arkhost.com as stated in the README or via GitHub issues.1 point
-
Hi all, We have published a hotfix which addresses the issue by reverting the change which introduced the non-performant query:1 point
-
oh wow! Thanks for clarifying that John. I must have been on HEAVY drugs the day I thought I saw a button there. Much appreciated that you clarified this for me.1 point
-
We're pleased to announce the release of WHMCS 8.13 Release Candidate. This marks the end of feature development for the 8.13 series and is the final stage before version 8.13 is promoted to General Availability status. WHMCS 8.13 includes the following new functionality and enhancements: Manual User Password ResetsOne of our most requested admin features is here. With over 250 community upvotes, WHMCS 8.13 introduces the ability to reset a user's password directly from the Admin Area. This...View the full blog post1 point
-
No. HEXONET Status (HTTPS API is usually used by 3rd-party Software Integrations)1 point
-
I'd recommend making a backup of any files you are planning to delete. Better yet, try moving the folder outside of WHMCS document root path. I would keep the files at minimum until you've either confirmed this solution has solved your issue or not. This way you can quickly restore your WHMCS back to its previous state in case of any unforeseen errors.1 point
-
If it's a paid addon, it's unlikely that would be ok with the seller, though I'm sure others (and myself) would like to try and spot the issue.1 point
-
Hi @elonmusk, The LocalAPI user is invoked locally. Ie. By a file on your website that isn't a part of the stock WHMCS software. This will likely be an after-market customisation, perhaps something like a custom order form. I suggest comparing your WHMCS files against the stock ones for any additionals you may have, as they could be the cause.1 point
-
Look for something common, like a .ru domain, and block that at the TLD level (unless you have customers using those). Trying to block all spammers by individual email addresses is a game you won't ever win. More effectively, you can disallow tickets by non logged-in users. Public facing things like this are abused all the time, and recaptcha only helps a little.1 point
-
We develop for Windows (.NET) and so we do not have and cannot have a Linux based server. We don't know how to secure it properly nor diagnose any problems. The overhead is too great for us. Therefore we can only use WHMCS with a virtual hosting package. The first hosting company we used was fine, however they discontinued virtual hosting to focus on dedicated, which wasn't an option for us because of the above. So we were forced to move it. We paid to move the site to another company which has proven to be poor. Most of the issues seem to be related to high load on the database server, as I type this we're seeing Gateway Timeouts. I notice that the WHMCS hosted offering, which would be ideal, remains "under development". We need a reliable hosting provider for the product. Can anyone recommend one? We'd be happy to pay more than whatever this one costs, but we can't go down the road of a VPS or dedicated box, it has to be virtual hosting only. Thank you.1 point
-
I’ve had a similar issue before, and it turned out to be a syncing problem between WHMCS and Stripe. It seemed like WHMCS didn’t update its records properly after processing a payment, but Stripe ended up charging clients twice. In my case, it was due to a misconfigured webhook or an automated retry that triggered the second charge. It’s definitely worth checking your payment gateway settings and logs, and if it keeps happening, you might want to contact WHMCS and Stripe support to get to the bottom of it.1 point
-
Thanks, while I have to admit that the module is far behind the features of HEXONET and CentralNic Reseller. One reason why that technical merger makes sense - it gives us resources to focus on other topics. There's no domain checker addon (nor any other additional addon) available for internet.bs, yet - no plans for that step even in our backlog. Regarding any Pricing Question, please reach out to the internet.bs team that's out of my scope. I am just aware of that there's no monthly account fee.1 point
-
Hello, Thank you for your reply, but I already got this sorted out i just needed a confirmation .1 point
-
PayPal integration change removed the ability to block subscriptions, which in some cases(basically all) confuse customers as to why they are still paying for something resulting in more chargebacks and disputes. An outstanding issue with the API reported over a year ago is scheduled to "maybe" get fixed some time in 2025 after it has been an issue for more than 4 years. New things implemented only exposed to addons mean a great way for the secondary market to further extract money. In times of high inflation the very worst thing you can do is raise prices. Don't have to have a masters in economics to know that, it's simple math. For the longest time the auto update has failed and while that seems to no longer happen, there was a never a conclusion as to why. Source for older versions float around the net and the code isn't pretty, so unless half the system has been rewritten since 7.x some of that stuff is still in there. The only constant in this is that good feature requests are declined so beyond the investment itself you then have to find a third-party addon if you need something "specific" (that somehow hundreds of people voted for). I have seen no meaningful change since the last price increase. Every positive offset by a new negative. If "development" costs too much, try doing what we were all forced to do in this economy: Cut costs! Instead of nickle and diming the loyal customers that propped up the business the last 10 years. You know other places grandfather long term customers into cheaper plans instead of giving them the finger. (I tried posting here from my community account, but it won't even let me, wtf)1 point
-
That wasn't the plan, actually - but that might be a lot easier! When you're building a registrar module, you have to define specific functions. It the module should be able to register domains, you need a _Register() method. If you include the registrar module's primary file (the one that defines all of these methods), you can use them wherever you like. Say, if you want to do it for domains that use the Enom registrar - this module is just called "enom" in WHMCS. You would do the following <?php include ROOT_DIR . '/modules/registrars/enom/enom.php'; //Now you can use the functions defined in enom.php: enom_RegisterDomain($domainDetails); enom_TransferDomain($domainDetails); Using the internal API basically does the same. When you call the DomainRegister API endpoint, it finds out what the registrar is for the domain in WHMCS and runs the _RegisterDomain() method from that module.1 point
-
Using configurable options, you can separate the value for the module vs the value displayed with a "|" like this: module_value|display_value In your case: one|1024 two|20481 point
-
This add-on module displays a customizable helpdesk wallboard for your support center. Includes a live (AJAX) overview of: each department with ticket count (Waiting and Open) each status with ticket count staff online WHMCS activity feed The display is pure html and css and can easily be modified as required. Some sample layouts are included. Download for free from the marketplace: https://marketplace.whmcs.com/product/7620-ut-ticketboard Installation instructions can be found here: https://uptimemodules.com/knowledge-base/installation/1 point
-
Why not simply put in a redirect? lang/russian.php > lang/english.php When the languages are updated, the redirect will remain unchanged.1 point
-
1 point
-
All they do is add what they want not what their users want. Most of us are still waiting for actual feature requests to be added and old bugs to be fixed, which they just ignore. Some of those popular feature requests have been there 10+ years.1 point
-
We have a hook to check various data from user upon registering (do not use disposable email address, do not use special characters in address, and so on...) We modified it in order to prevent registering from the USA. Full code is available here: https://github.com/DomainRegister/WHMCS/blob/master/checkuser.php1 point
-
Have you tried MarketConnect? You can fully automate the reselling of hosted email, so the hosting part gets managed for you leaving the VPS hosting part untouched. The services on MarketConnect can be promoted automatically upon the purchase of other products on your website and/or within the client area. All seamleassy integrated within the WHMCS front-end: https://marketplace.whmcs.com/connect https://marketplace.whmcs.com/help/connect/kb/ox_app_suite1 point
-
I think your domain, serverclouds.in, is not registered at registrar 😂1 point
-
For many businesses, there will be keywords that you do not want customers to be able to use. For example, you might want to prevent them from being able to create services under any of your domain names, or prevent the use of strings like "admin" or "root" in the "First Name" and "Last Name" fields. By making use of action hooks, it is totally possible to add this functionality. In this post, I'll show you how to get this setup, and how you can add your own rules. Overview To make this work, we're going to be making use of Action Hooks - specifically, the ShoppingCartValidateCheckout hook. If you've never used hooks before, I'd recommend reading our Getting Started guide, which will help you to understand the basics of what we'll be doing here. Step 1: Set up your hook file To begin, open your WHMCS instance's filesystem, and navigate to /path/to/whmcs/includes/hooks and create a new file keyword_filter.php. Now open the file, and paste in the following: <?php add_hook('ShoppingCartValidateCheckout', 1, function($vars) { // Content goes here }); This will tell WHMCS that we are using the ShoppingCartValidateCheckout hook, and will allow us to retrieve the variables provided to us. As this article goes on, we'll be adding to this base layer until we have our finished, fully-functional script. Step 2: Define your keyword filters There are many different ways that we could define what strings are banned in which fields. For maximum legibility and modularity, I've decided to use a map. This will allow us to associate one set of data (the "key"), in this case the field name(s) to apply the filter to, and another (the "value"), which in our case is a list of banned keywords. Here's the code: <?php add_hook('ShoppingCartValidateCheckout', 1, function($vars) { $fieldKeywordMap = [ [ // The 'firstname' and 'lastname' fields cannot contain the strings // "admin", "root" or "superuser". 'fields' => ["firstname", "lastname"], 'keywords' => ["admin", "root", "superuser"] ], [ // The 'email' field cannot contain the strings "@whmcs.com" or // "@google.com". 'fields' => ["email"], 'keywords' => ["@whmcs.com", "@google.com"] ], // Add more mappings as needed ]; }); Each set of 'fields' and 'keywords' is a mapping. You can add as many of these as you need. We'll be returning an error based on whether or not the field contains these keywords (i.e. if they are substrings). For example, if the user enters "admin123" for their firstname and "john.smith@google.com" for their e-mail, both of these filters will apply because the substrings "admin" and "@google.com" are present within the 'firstname' and 'email' fields respectively. You can find a full list of available fields in the documentation for this hook. Step 3: Implement logic to check field submissions for any banned substrings Now that we've defined our 'filters', we need to implement the logic that's going to make them work. Here's the full script, explained in the provided comments: <?php add_hook('ShoppingCartValidateCheckout', 1, function($vars) { $fieldKeywordMap = [ [ // The 'firstname' and 'lastname' fields cannot contain the strings // "admin", "root" or "superuser". 'fields' => ["firstname", "lastname"], 'keywords' => ["admin", "root", "superuser"] ], [ // The 'email' field cannot contain the strings "@whmcs.com" or // "@google.com". 'fields' => ["email"], 'keywords' => ["@whmcs.com", "@google.com"] ], // Add more mappings as needed. ]; // Initialise array to store error messages. $errors = []; // Iterate through all of your mappings. foreach ($fieldKeywordMap as $mapping) { // Get the 'fields' and 'keywords' separately for each mapping. $fields = $mapping['fields']; $keywords = $mapping['keywords']; foreach ($fields as $fieldName) { // Retrieve the value for the field from $vars[] provided by the hook. $fieldValue = $vars[$fieldName] ?? ''; // Check if the field is empty - if it is, skip the checks. if (!$fieldValue) continue; // Check if any of the keywords are a substring of the field value. foreach ($keywords as $keyword) { if (stripos($fieldValue, $keyword) !== false) ) { // If there is a match, add it to the list $errors[] = "'$fieldName' cannot contain '$keyword'. Please remove this and try again."; } } } } // If any errors are present, return them - otherwise, return true. return $errors ?: true; }); Here's a little summary of how it works: Iterate through all of your mappings ('filters') Check all fields for each filter If the field value is blank, skip all checks for that field - we need to do this since this field is only included for new users If the field value is not blank, carry on to checks Check if any keywords are a substring of the field value If they are, add that infraction to an array of errors to be returned If not, do nothing If there are any errors, return them. If all checks are passed and no keywords are present, return true. The only part of this code that you should need to modify is the top section, where you define your filters. If any of the filters are matched, here's what'll be displayed in WHMCS: Step 4: Prettify error messages (optional, but recommended) As it stands, our hook is completely functional. If any banned words are present, an error will be returned. However, our script looks like a customisation, and you'll probably want to make it appear like native functionality. The issues are: We're currently using the $fieldName, which doesn't read like English Language used doesn't fit in with the rest of WHMCS's error messages To second issue is fixed by adjusting the error message, so that's easy! To fix the first problem, we'll use another map to correlate each $fieldName with its "English equivalent" (which I've just called $friendlyFieldName: <?php add_hook('ShoppingCartValidateCheckout', 1, function($vars) { $fieldKeywordMap = [ [ // The 'firstname' and 'lastname' fields cannot contain the strings // "admin", "root" or "superuser". 'fields' => ["firstname", "lastname"], 'keywords' => ["admin", "root", "superuser"] ], [ // The 'email' field cannot contain the strings "@whmcs.com" or // "@google.com". 'fields' => ["email"], 'keywords' => ["@whmcs.com", "@google.com"] ], // Add more mappings as needed. ]; // Map field names that you're using above to their "English equivalent". $friendlyFieldNames = [ 'firstname' => 'First Name', 'lastname' => 'Last Name', 'email' => 'Email Address', // Add more field name translations as needed. ]; // Initialise array to store error messages. $errors = []; // Iterate through all of your mappings. foreach ($fieldKeywordMap as $mapping) { // Get the 'fields' and 'keywords' separately for each mapping. $fields = $mapping['fields']; $keywords = $mapping['keywords']; foreach ($fields as $fieldName) { // Retrieve the value for the field from $vars[] provided by the hook. $fieldValue = $vars[$fieldName] ?? ''; // Check if the field is empty - if it is, skip the checks. if (!$fieldValue) continue; // Check if any of the keywords are a substring of the field value. foreach ($keywords as $keyword) { if (stripos($fieldValue, $keyword) !== false) { // Translate the field name to a nicer name for the error message. $friendlyFieldName = $friendlyFieldName[$fieldName] ?? $fieldName; // Add it to the list $errors[] = "$friendlyFieldName cannot contain '$keyword'"; } } } } // If any errors are present, return them - otherwise, return true. return $errors ?: true; }); Simply add a new mapping for each $fieldName that you use in the $friendlyFieldNames array, and they'll read well and feel like a native part of WHMCS: And there we have it: a hook script that can be easily extended to include as many fields and keywords as you require, and it feels totally native too! Customising/extending this script Feel free to customise this script to you heart's content, whether you want to change how it behaves or extend its functionality. However, please keep in mind that our Technical Support team won't be able to help you troubleshoot any problems that you may encounter should you make any changes. Use at your own risk. Suggestions for other "Tips & Tricks' articles If you'd like to see an example of how we can customise WHMCS in other ways, please do give us your suggestions!1 point
-
1 point
-
delete the line item from the invoice cancel the invoice delete the cancelled invoice change the due-date back 1 day on the product change the due -date to it's original date on the product change the billingperiod and tick the recalc on save on the product and save on the client summary page click generate due invoices (or wait for the cron if doing multiple)1 point
-
there's no equivalent simple hook method with these home page tiles... you can adapt other hook points to change certain aspects of these tiles, but generally to keep things simple, you're looking at either editing the clientareahome.tpl template (which determines which tiles are shown based on the general settings). or you use CSS in a custom CSS file, e.g if you want to adjust styling. for example, in Six, if you wanted to remove the Tickets tile and adjust the width of the other tiles to take up the full width (if you don't adjust, then it will just show three tiles and leave a space), then you could use... .tiles .tile:nth-child(3) {display: none !important; } .tiles .col-sm-3 {width: 33.33% !important; } you could do something similar in 21, but the css would be different... .tiles .col-6:nth-child(3) {display: none !important; } .tiles .col-xl-3 {max-width: 33.33% !important; flex: 33.33% !important;}1 point
-
.tiles .tile:nth-child(1) { background-color: #f0f8ff; } .tiles .tile:nth-child(1) .fa-cube {color: #5bc0de; } .tiles .tile:nth-child(2) { background-color: #d8fcdb; } .tiles .tile:nth-child(2) .fa-globe, .tiles .tile:nth-child(2) .fa-shopping-cart, .tiles .tile:nth-child(2) .fa-file-alt {color: #5cb85c; } .tiles .tile:nth-child(3) { background-color: #ffe7e7; } .tiles .tile:nth-child(3) .fa-comments {color: #d9534f; } .tiles .tile:nth-child(4) { background-color: #fff7e7; } .tiles .tile:nth-child(4) .fa-credit-card {color: #f0ad4e; }1 point
-
Brian. Thanks a lot. It really appears to be the same. I've re-opened my support case with Resellerclub.1 point
-
I personally think post count is enough of a "ranking" system. As for people that are employed, by WHMCS, well.. they just need something to indicate that (as they already do). I give little attention to a rank under a persons name. I give plenty of attention to their meaningful posts. To be blunt, "we" (whoever you may choose to put into that group) help WHMCS a lot more than I think they realize. Reward "us" with better support, or tangible things other than a fancy tagline and you might just be on to something when it comes to encouraging contributions. PS If you want to learn about how to engage people, you'll find much material on the subject online, including plenty of contradictions. I have quite a lot of experience managing a community many times larger than this, but it's a Open Source community.. and the reasons people are there are vastly different from the reasons they are here.1 point
-
the easiest way would be a css entry in templates/six (or custom)/css/custom.css #order-premium_comparison .price-table-container .price-table { width: 250px !important; min-width: 250px !important; } if you wanted 5 columns, you'd change them both to 190px or less..1 point
