Differences
This shows you the differences between the selected revision and the current version of the page.
development:modules:hooks 2008/08/25 11:03 | development:modules:hooks 2008/08/25 11:21 current | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Module Hooks ====== | ====== Module Hooks ====== | ||
- | Module Hooks allow your modules to interact with specific parts of 68 Classifieds internal coding. Below is a list of each individual file and the hooks that are available in it. | + | Module Hooks allow your modules to interact with specific parts of 68 Classifieds internal coding. Below is a list of each individual file and the hooks that are available in it. Keep in mind this is not a full list but should contain the majority of hooks. It is recommended to do a file search to find all the hooks. |
+ | |||
+ | ===== Front End ===== | ||
+ | Front end hooks | ||
+ | |||
+ | ==== category.php ==== | ||
- | ==== category.php ==== | ||
<code> | <code> | ||
$template = $modules->call_hook('category', $cat['id']); | $template = $modules->call_hook('category', $cat['id']); | ||
Line 11: | Line 15: | ||
</code> | </code> | ||
- | == contact.php == | + | ==== contact.php ==== |
<code> | <code> | ||
$modules->call_hook('contact', ''); | $modules->call_hook('contact', ''); | ||
</code> | </code> | ||
- | == index.php == | + | ==== index.php ==== |
<code> | <code> | ||
$modules->call_hook('index', ''); | $modules->call_hook('index', ''); | ||
</code> | </code> | ||
- | == login.php == | + | ==== login.php ==== |
<code>$params=array ('username'=>$_POST['username'],'password'=>$_POST['password']); | <code>$params=array ('username'=>$_POST['username'],'password'=>$_POST['password']); | ||
modules->call_hook('user_login_invalid', '$params');</code> | modules->call_hook('user_login_invalid', '$params');</code> | ||
+ | |||
+ | ==== pages.php ==== | ||
+ | <code> | ||
+ | $page = ( empty($_GET['page']) ) ? 1 : (int)$_GET['page']; | ||
+ | $modules->call_hook('page', '$page');</code> | ||
+ | |||
+ | ==== searchresults.php ==== | ||
+ | <code>$modules->call_hook('search_start', ''); | ||
+ | $modules->call_hook('search_end', ''); | ||
+ | </code> | ||
+ | |||
+ | ==== toplistings.php ==== | ||
+ | <code>$modules->call_hook('search_start', ''); | ||
+ | $modules->call_hook('search_end', ''); | ||
+ | </code> | ||
+ | |||
+ | ==== useraccountmodify.php ==== | ||
+ | <code>$modules->call_hook('useraccountmodify_start', $userid);</code> | ||
+ | |||
+ | ==== usercheckout.php ==== | ||
+ | <code>$modules->call_hook('checkout_end', '');</code> | ||
+ | |||
+ | ==== userindex.php ==== | ||
+ | <code>$modules->call_hook('userindex', $userid);</code> | ||
+ | |||
+ | ==== userjoin.php ==== | ||
+ | <code>$modules->call_hook('userjoin', '');</code> | ||
+ | |||
+ | ==== userorders.php ==== | ||
+ | <code>$modules->call_hook('userorders_view', $id); | ||
+ | $modules->call_hook('userorders', $userid);</code> | ||
+ | |||
+ | ==== viewlisting.php ==== | ||
+ | <code>$modules->call_hook('view_listing', $view); | ||
+ | $modules->call_hook('viewlisting_end', $listing_rs); | ||
+ | </code> | ||
+ | |||
+ | ===== Administration ===== | ||
+ | Administration hooks | ||
+ | |||
+ | ==== administration/includes/init.php ==== | ||
+ | <code> | ||
+ | $modules->call_hook('post_admin_init', ''); | ||
+ | </code> | ||
+ | |||
+ | ==== administration/pages.php ==== | ||
+ | <code> | ||
+ | $modules->call_hook('add_page', ''); | ||
+ | $modules->call_hook('edit_page', $pageID); | ||
+ | </code> | ||
+ | |||
+ | ==== administration/users.php ==== | ||
+ | <code> | ||
+ | $modules->call_hook('admin_users_add', ''); | ||
+ | $modules->call_hook('admin_users_modify', ''); | ||
+ | $modules->call_hook('admin_users_view', ''); | ||
+ | </code> | ||
+ | |||
+ | ===== Includes ===== | ||
+ | Includes directory hooks. | ||
+ | |||
+ | ==== includes/init.php ==== | ||
+ | <code> | ||
+ | $modules->call_hook('start', ''); | ||
+ | </code> |
Have more questions? Visit our community forums.