View Single Post
  #7 (permalink)  
Old 05-21-2008, 12:59 PM
cPanelDavidG's Avatar
cPanelDavidG cPanelDavidG is offline
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,117
cPanelDavidG is on a distinguished road
I think one thing that would make understanding hooks much easier is actually seeing the API2 calls used by the x3 interface. It's very difficult to understand hooks without having a basic knowledge of API2. I did a brief overview of API2 in my Customizing cPanel presentation at last year's conference which you can view at:

http://www.cpanel.net/docs/seminar07...ing_cPanel.pdf

You can find the source for the X3 interface in /usr/local/cpanel/base/frontend/x3 - looking at the actual API calls will help you learn what parameters to expect.

For a sample hook, look at:
/usr/local/cpanel/hooks/passwd/change_password.example

The accompanying page for changing passwords in the X3 interface is ...:2082/frontend/x3/passwd/index.html, which is stored in /usr/local/cpanel/base/frontend/x3/passwd/index.html

This should help shed some insight onto hooks and how they work, especially in conjunction with the actual API2 calls that trigger the hooks.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
-- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative
Reply With Quote