Sohowiki Sandbox
From Sohowiki
(Difference between revisions)
(→hook_overwrite) |
(→hook_overwrite) |
||
Line 13: | Line 13: | ||
==hook_overwrite== | ==hook_overwrite== | ||
− | hook_overwrite(source | + | hook_overwrite(source file name, plugin file name) |
'''Example 1 - calling hook_overwrite from your install_manifest.php''' | '''Example 1 - calling hook_overwrite from your install_manifest.php''' | ||
<pre>hook_overwrite("sohoadmin/program/main_menu.php", "main_menu-helloworld.php");</pre> | <pre>hook_overwrite("sohoadmin/program/main_menu.php", "main_menu-helloworld.php");</pre> |
Revision as of 15:39, 18 May 2006
Write now, organize and place later. This is the place to draft content before you know exactly where it should go...also good place for expermimenting with wiki markup.
hook_attach
hook_attach(plugin file, hook id)
Includes (attaches) your custom script (plugin file) at a pre-designated place (hook id) in the Pro Edition source code.
Example 1 - hook from sohoadmin/program/header.php
eval(hook("header.php:top_javascript", basename(__FILE__)));
Example 2 - hook attachement call in install_manifest.php (taken from QuickEdit Dropdown Menu plugin)...
hook_attach("quickedit_js.php", "header.php:top_javascript");
hook_overwrite
hook_overwrite(source file name, plugin file name)
Example 1 - calling hook_overwrite from your install_manifest.php
hook_overwrite("sohoadmin/program/main_menu.php", "main_menu-helloworld.php");