Helix:Site

From HelixCore

Jump to: navigation, search

The site engine is a site-based script that allows a site to define it's own functions and initialisation. The script is located in core/site/siteEngine.php.

The deployment version of the siteEngine.php file includes a list of function definitions all commented out. Uncomment any of these to enable the 'event' functions. These functions are all called in certain places throughout Helix execution if the function exists.

Site Declarations

Site function declarations follow. Define any of these functions to enabled them.

site_processMsg()
Allows you to override the default processMsg() function to enable your own msg system.
No return value.
function site_processMsg();
site_onLoad()
Executes just before the template is loaded.
All site and page data is present.
No return value.
function site_onLoad();
site_onError()
Allows you to override the error handling in the event of 404 or similar errors. This function should set the content, component, parent, etc, variables and call an error document OR set appropriate page variables
No return value.
function site_onError();
site_newBill()
Called when a new bill is created.
No return value.
function site_newBill($billID, $userID);
site_billPaid()
Called when a new bill is successfully paid.
No return value.
function site_billPaid($billID, $userID);
site_paymentNotify()
Called when a carrier successfully hits the payment processor.
Return true if handled.
function site_paymentNotify($carrier);
site_onAlert()
Called when a level 8 or higher log entry is made.
No return value.
function site_onAlert($level, $task, $details);
site_onLoginBegin()
Called BEFORE a login is processed.
Return true to continue the login, false to abort with a -3 (denied) response.
function site_onLoginBegin($username, $password, $remember);
site_onLogin()
Called AFTER a successful login (but before it is reported back).
No return value.
function site_onLogin($username, $password, $remember, $newPage);
site_onGSitemaps()
Called during Google Sitemaps build. Implement this function to add to the sitemap.
Returns string data to go in the sitemap.
function site_onGSitemaps();
site_maintenance()
Called after the maintenance component has run.
No return value.
function site_maintenance();
site_deletingUser()
Called before the user editor deletes a user.
$user is the user id.
No return value.
function site_deletingUser($user);
site_searchBox()
May be used to override the default search prompt.
$search is the current query (if a results page), null for main page.
No return value.
function site_searchBox($search);
site_formatBlog()
Called when a non-standard blog display type is encountered. This funciton should use the blogRow data to format a block which is an entry for the blog.
$displayType is an integer, the unknown display type encountered.
$blogRow is an array, containing 'title', 'multiText', 'details', 'createTime', 'author' and 'showPublished'.
$fullURL is the full URL to the archived blog entry.
Returns a string, the formatted blog entry.
function site_formatBlog($displayType, $blogRow, $fullURL);
site_ajax()
Called when an unknown AJAX resquest is made via the std.ajax component.
$action is the action code passed to the URI via the GET/URL query line.
Returns a string response for AJAX call.
function site_ajax($action);

See Also

Helix

Personal tools