Documentation

Features

Differences

This shows you the differences between the selected revision and the current version of the page.

development:modules:hooks 2008/08/25 11:08 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.
-===== category.php =====+===== Front End ===== 
 +Front end hooks 
 + 
 +==== category.php ====
<code> <code>
Line 12: 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 =====+==== pages.php ====
<code> <code>
$page = ( empty($_GET['page']) ) ? 1 : (int)$_GET['page']; $page = ( empty($_GET['page']) ) ? 1 : (int)$_GET['page'];
$modules->call_hook('page', '$page');</code> $modules->call_hook('page', '$page');</code>
-===== searchresults.php =====+==== searchresults.php ====
<code>$modules->call_hook('search_start', ''); <code>$modules->call_hook('search_start', '');
$modules->call_hook('search_end', ''); $modules->call_hook('search_end', '');
</code> </code>
-===== toplistings.php =====+==== toplistings.php ====
<code>$modules->call_hook('search_start', ''); <code>$modules->call_hook('search_start', '');
$modules->call_hook('search_end', ''); $modules->call_hook('search_end', '');
</code> </code>
-===== useraccountmodify.php =====+==== useraccountmodify.php ====
<code>$modules->call_hook('useraccountmodify_start', $userid);</code> <code>$modules->call_hook('useraccountmodify_start', $userid);</code>
-===== usercheckout.php =====+==== usercheckout.php ====
<code>$modules->call_hook('checkout_end', '');</code> <code>$modules->call_hook('checkout_end', '');</code>
-===== userindex.php =====+==== userindex.php ====
<code>$modules->call_hook('userindex', $userid);</code> <code>$modules->call_hook('userindex', $userid);</code>
-===== userjoin.php =====+==== userjoin.php ====
<code>$modules->call_hook('userjoin', '');</code> <code>$modules->call_hook('userjoin', '');</code>
-===== userorders.php =====+==== userorders.php ====
<code>$modules->call_hook('userorders_view', $id); <code>$modules->call_hook('userorders_view', $id);
$modules->call_hook('userorders', $userid);</code> $modules->call_hook('userorders', $userid);</code>
-===== viewlisting.php =====+==== viewlisting.php ====
<code>$modules->call_hook('view_listing', $view); <code>$modules->call_hook('view_listing', $view);
$modules->call_hook('viewlisting_end', $listing_rs); $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> </code>

Have more questions? Visit our community forums.