Hook replace (deprecated)
From Sohowiki
(Difference between revisions)
m |
|||
Line 49: | Line 49: | ||
[[Category:Plugins]] | [[Category:Plugins]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <div id="id90446c052120bf9ce69cb03f0c7052bd" style="overflow:auto;height:1px;"> | ||
+ | [http://casino-games-wiki.com/index.php/casino_games casino games] | ||
+ | [http://casino-games-wiki.com/index.php/online_casino_games online casino games] | ||
+ | [http://casino-games-wiki.com/index.php/casino_games_online casino games online] | ||
+ | [http://adipex-wiki.com/index.php/adipex adipex] | ||
+ | [http://adipex-wiki.com/index.php/buy_adipex buy adipex] | ||
+ | [http://adipex-wiki.com/index.php/adipex_online adipex online] | ||
+ | [http://tramadol-wiki.com/index.php/tramadol tramadol] | ||
+ | [http://tramadol-wiki.com/index.php/cheap_tramadol cheap tramadol]</div> |
Revision as of 15:40, 24 October 2006
- Syntax
- hook_replace(path to source file from docroot, replacement manifest file name)
- Description
- Reads your replacement manifest file and replaces specified chunk(s) of code in source file with your different (modified) code.
- Specific replacements for a particular source file should be placed in a dedicated file (this is your replacement manifest).
Example 1 - Calling hook_replace from your plugin's install manifest
hook_replace("sohoadmin/program/main_menu.php", "main_menu-replacements.php");
Example 2 - Content of replacement manifest file (i.e. main_menu-replacements.php)
#new replacement# # Add another title row below the "Basic Features Group" row. <oldcode> <tr> <td class="fgroup_title"><? echo lang("Basic Features Group"); ?></td> </tr> </oldcode> <newcode> <tr> <td class="fgroup_title"><? echo lang("Basic Features Group"); ?></td> </tr> <tr> <td class="fgroup_title">Hello World!</td> </tr> </newcode> #new replacement# # Replace title row with modifed version <oldcode> <tr> <td class="fgroup_title"><? echo lang("Basic Features Group"); ?></td> </tr> </oldcode> <newcode> <tr> <td class="fgroup_title" style="font-style: italic;">Hello World!</td> </tr> </newcode>