Jump to content

steven-one

Member
  • Posts

    30
  • Joined

  • Last visited

About steven-one

steven-one's Achievements

Member

Member (2/3)

0

Reputation

  1. In the documentation it says: The file isn't there. And if I get it out /modules/servers/licensing/ then it doesn't work.. Edit: received email Those files aren't there. Only two folders: - addons - servers And a readme file that says I have to look at the documentation that isn't right.
  2. I meant about InvoicePaymentReminder actionhook
  3. Well.. it works when I change the actionhook to ClientEdit. I´ve version 5.0.2. Couldn´t find any bugfixes about ClientEdit actionhook..
  4. function send_reminder($vars) { require("includes/class.mollie.php"); $invoiceid = $vars['invoiceid']; $type = $vars['type']; logActivity('sendReminder:'.$invoiceid.' '.$type); if($type=="reminder"){ $title="Betalingsherinnering:"; } elseif($type=="firstoverdue"){ $title="2e Betalingsherinnering:"; } elseif($type=="secondoverdue"){ $title="3e Betalingsherinnering:"; } elseif($type=="thirdoverdue"){ $title="Laatste herinnering!"; } else{ $title="Betalingsherinnering:"; } $_query = " SELECT i.total, c.value AS number FROM tblinvoices i, tblcustomfieldsvalues c WHERE i.id=$invoiceid AND fieldid=11 AND relid=i.userid AND (SELECT value FROM tblcustomfieldsvalues WHERE fieldid=12 AND relid=i.userid) ='Ja'"; $data = full_query($_query); $result = mysql_fetch_array($data); if(is_numeric(str_replace(".","",$result[0])) && is_numeric($result[1])) { $bedrag = $result[0]; $nummer = $result[1]; $txt = $title." Factuur: #" . $invoiceid . " Bedrag: " . $bedrag . " EUR"; $sms = new mollie(); // Choose SMS gateway $sms->setGateway(2); // Set Mollie.nl username and password $sms->setLogin('........', '........'); // Set originator $sms->setOriginator('......'); // Add recipient(s) $sms->addRecipients($nummer); // Send the SMS Message $sms->sendSMS($txt); if ($sms->getSuccess()) { logActivity('<b>SMS bericht verzonden naar: '. $nummer .'</b><br />SMS text:<br/>'.$txt); } else { logActivity('<b>SMS verzenden is mislukt!</b><br> Errorcode: ' . $sms->getResultCode() . '<br> Error: ' . $sms->getResultMessage()); } } } add_hook("InvoicePaymentReminder",1,"send_reminder"); ?> Thanks for your help!
  5. InvoicePaymentReminder Action Hook doesn't work and I don't know why. When I use ContactEdit the script works, but when I use the InvoicePaymentReminder it doesn't. How is that possible? Today the cronjob sent a reminder mail but the activitylog doesn't show anything. Is it possible to have more action hooks in one file or is that the reason why it doesn't work?
  6. I found it. Source should be includes/class.php you need the full path, not the related path to the file
  7. include("../class.mollie.php"); logActivity("test1"); $sms = new mollie(); logActivity("test2"); In the activity log I get only test1. Not test2. Same problem if I use require() and put logActivity() in front of it. So my conclusion is that the action hook does work, but there goes something wrong with the include/require. If I use require().. the problem starts there. If I use include() the problem start when I want to use the class. :roll:So it has to be the class. I put the class in the includes directory.
  8. Thank you. The API didn't work for me but the SQL did. But now I'm facing another problem. I can't include an api class. I get a blank page.
  9. Thank you! Where do I find information about these functions? I can't find this one in the API or action hook documentation..
  10. Is there a function to write in the log files in an action hook? So I can log the actions of my action hooks?
  11. Hello, I'm want to make an action hook when an invoice is created. The only variable I can use is invoiceid. How do I get also the client details and invoice details in that action hook? Do I need to use the API or is there a better way of getting those variables? Thanks!
  12. I don't think that would help. I use only 1GB of the 2GB. More RAM would mean I have more RAM not being used. Am I right?
  13. I found the solution: <Directory **ROOT PATH WHMCS**> RewriteEngine On RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ /announcements.php?id=$1 [L,NC] RewriteRule ^announcements$ /announcements.php [L,NC] RewriteRule ^downloads/([0-9]+)/([^/]*)$ /downloads.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^downloads$ /downloads.php [L,NC] RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ /knowledgebase.php?action=displayarticle&id=$1 [L,NC] RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ /knowledgebase.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^knowledgebase$ /knowledgebase.php [L,NC] </Directory> Works for me. For those that don't know what this means: Every time a page is visited, the server has to check .htaccess for rewrite rules. This causes more work for the server. When you put this code in the httpd file, it is only loaded once. This will give you more performance and maybe WHMCS even loads faster. Don't forget to remove the .htaccess file.
  14. Nobody knows how to put the htaccess content in the httpd file for performance?
  15. I'm trying to remove the htaccess file and at the content to the virtualhost file for performance. But so far with no succes. Does someone know how to do this? Do I have to make any changes to this for it to work in the virtualhost file? RewriteEngine On # Announcements RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC] RewriteRule ^announcements$ ./announcements.php [L,NC] # Downloads RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^downloads$ ./downloads.php [L,NC] # Knowledgebase RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC] RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC] RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]
×
×
  • 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