hostwes Posted February 8, 2009 Share Posted February 8, 2009 I need help.. Where can I find some documentation. Please let me know. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 8, 2009 Share Posted February 8, 2009 In the documentation section!! Look up on this page, there is a menu, Click on Documentation and then you can search for what you need. 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 It just says see actionhooks.php.. How do I call them? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 8, 2009 Share Posted February 8, 2009 You don't call actionhooks at all directly. One example is the actionhook_ClientDetailsEdit($vars) When a client edits their details internally in whmcs the actionhook is called $vars is an array of variables that can be used in that function In this case the only variable sent is the clients id From that you write your code to perform whatever action that you are trying to achieve when a client changes their details. 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 I am wanting to receive an email when a customer registers. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 8, 2009 Share Posted February 8, 2009 then you would add your code to send an email to this actionhook function function actionhook_ClientSignup($vars) { # This function runs when a new client is added # $vars["ClientID"] # $vars["FirstName"] # $vars["LastName"] # $vars["CompanyName"] # $vars["Email"] # $vars["Address1"] # $vars["Address2"] # $vars["City"] # $vars["State"] # $vars["Postcode"] # $vars["Country"] # $vars["PhoneNumber"] # $vars["Password"] } Open the file and look at the functions. They are all pretty well self explanatory. includes/actionhooks.php 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 But where would I add this code? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 8, 2009 Share Posted February 8, 2009 But where would I add this code? You add your code within the function function actionhook_ClientSignup($vars) { # This function runs when a new client is added # $vars["ClientID"] # $vars["FirstName"] # $vars["LastName"] # $vars["CompanyName"] # $vars["Email"] # $vars["Address1"] # $vars["Address2"] # $vars["City"] # $vars["State"] # $vars["Postcode"] # $vars["Country"] # $vars["PhoneNumber"] # $vars["Password"] YOU PUT YOUR CODE HERE } Note the curley bracket at the bottom - means that is the end of the function. 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 How would I get it to email me? Thanks for all the help. 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 I've never messed with Action Hooks before. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted February 8, 2009 Share Posted February 8, 2009 How would I get it to email me? By adding the code to send the email where it has been *clearly* indicated to you to add the code - or just employ someone with clue ... 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 8, 2009 Share Posted February 8, 2009 Thanks Rob 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 I can clearly see where to add it now.. Do I add a mailto, php function, ??? What, I've never done this before? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 8, 2009 Share Posted February 8, 2009 Search and ye shall seek - http://php.net 0 Quote Link to comment Share on other sites More sharing options...
hostwes Posted February 8, 2009 Author Share Posted February 8, 2009 Thanks, this is what I needed.. Somewhere for documentation. Sorry for the troubles. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.