Hook overwrite (deprecated)

From Sohowiki
(Difference between revisions)
Jump to: navigation, search
m
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
<br>
 +
<font color=red>
 +
;'''IMPORTANT: This function is deprecated and should not be used. Newly submitted plugins that use hook_overwrite will not be accepted.
 +
'''
 +
</font>
 +
----
 +
<br>
 
;Syntax : hook_overwrite(source file name, plugin file name)
 
;Syntax : hook_overwrite(source file name, plugin file name)
 
  
 
;Description  
 
;Description  
Line 17: Line 23:
  
 
[[Category:Plugins]]
 
[[Category:Plugins]]
 
 
 
[http://www.online-casino-wiki.com/index.php/online_casino_tips online casino tips]
 
[http://www.casino-games-wiki.com/index.php/play_casino_games_games_online play casino games games online]
 
[http://www.gambling-online-theory.com/casinos/strategy-casinos.html strategy casinos]
 
[http://www.casinos-go.com/online-casino-tips/index.html online casino tips]
 
[http://www.slots-wiki.com/index.php/slots slots]
 
[http://www.magical-casino.com/choosing_casino.html Online Casino - Choosing the best casinos.]
 
[http://www.casinos-go.com/online-casino-tips/online-casino-on-the-net.html online casino on the net]
 
[http://www.magical-casino.com/casino_rules.html Casino rules.]
 
[http://www.magical-casino.com/casino_risk.html Gambling Online - Risks.]
 
[http://www.slots-wiki.com/index.php/slots slots]
 

Latest revision as of 17:34, 11 October 2013


IMPORTANT: This function is deprecated and should not be used. Newly submitted plugins that use hook_overwrite will not be accepted.



Syntax 
hook_overwrite(source file name, plugin file name)
Description
Completely overwrites a source file with the file you specify.
Original source file is renamed to filename.php-[plugin_folder_name] so it can be restored if plugin is uninstalled.


Example 1 - calling hook_overwrite from your install_manifest.php
hook_overwrite("sohoadmin/program/main_menu.php", "your_modded_main_menu.php");


Notes/Tips

  • The hook_overwrite method is utilized in the article "Creating a basic plugin"
  • Try to avoid using this method if possible, because it makes your plugin more succeptable to conflicts with other plug-ins, especially on central files that many other plugins might be touching. hook_overwrite is meant to be a "last resort", "bazooka", and/or "club over the head" method for cases where modifications to the original source file are so extensive (or so numerous) using hook_replace() would require you to spend the next 48 hours of your life chronicalling all of the individual changes in your replacement manifest.
Personal tools