View Single Post
  #59  
Old 02-10-2014, 05:20 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 327,514
Hall of Famer is on a distinguished road
Default

A true addon script is a hook/plugin event like script that does not require modification of core script files. This way its very easy to install, all you have to do is to upload the plugin files and install it through ACP(you can manage all plugins/mods through ACP with Mys v1.4.0). It will make lives easier for non-coders, and moreover the plugin is most likely to be effective even after you upgrade to a newer version of the script.

The way it works is that the script keeps track of a list of plugins at a certain location, they are saved as collection of event-like objects(or callback objects) that are executed before or after a certain point in program flow. One example of such 'plugin-point' is before/after loading data from database. A plugin would possibly modify the SQL query so if you add a new column to a database table, this column will be loaded and later saved properly. Without a plugin/hook system, you have to edit the query in the core script file, and this change will not last once you upgrade your site.

It should have a learning curve for those of you not familiar with OOP and how design patterns like observer/event works, but it should not be a massive learning curve. I will provide guidelines for creating plugins once the system is complete, so it will not give you too much headache.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote