Skip to content

Instantly share code, notes, and snippets.

Avatar

javiereduardo paradigmaweb

View GitHub Profile
@paradigmaweb
paradigmaweb / hooks.php
Created Dec 22, 2021 — forked from tripflex/hooks.php
Require Company Name for WHMCS User
View hooks.php
<?php
add_hook( 'ClientDetailsValidation', 1, function( $vars ){
if( ! isset( $_POST['companyname'] ) || empty( $_POST['companyname'] ) ){
return 'You did not enter a Company Name. If you do not have a company name, please just enter your name.';
}
});
add_hook( "ClientAreaFooterOutput", 1, function( $vars ){
@paradigmaweb
paradigmaweb / 2011-08-18_whmscripts_disabling_invoice_emails.md WHMScripts: Disabling invoice creation emails in WHMCS on a per-client basis
View 2011-08-18_whmscripts_disabling_invoice_emails.md

If you’re using WHMCS to manage your cPanel shared servers, this is probably a request that you’ve received a few times. You have clients that are set up to pay invoices automatically from their credit cards, and they’d rather not receive the “Invoice Created” or “Invoice Payment Reminder” emails every month.

Normally WHMCS only allows you to disable these emails globally but, by making use of the EmailPreSend action hook, we can set up a list of clients not to receive these.

To get started just download the following script, change the file extension to .php, edit it to set up the $client_ids and place it in your WHMCS /includes/hooks/ directory

Please note, this script doesn’t disable only the automatically sent invoice notification emails, but also blocks manual sending of these for the selected clients.

(originally posted at http://whmscripts.net/whmcs/2011/disabling-invoice-creation-emails-in-whmcs-on-a-per-client-basis/)

@paradigmaweb
paradigmaweb / LogFile.udl.xml
Created May 31, 2020 — forked from mmdemirbas/LogFile.udl.xml
Custom log file syntax highlighting for Notepad++
View LogFile.udl.xml
<NotepadPlus>
<UserLang name="LogFile" ext="log">
<Settings>
<Global caseIgnored="yes" />
<TreatAsSymbol comment="no" commentLine="no" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">[(0])0</Keywords>
<Keywords name="Folder+"></Keywords>