Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php on line 560

Warning: Cannot modify header information - headers already sent by (output started at /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php:560) in /home/sfoyston/public_html/TextStorm/Wiki/inc/auth.php on line 495

Warning: Cannot modify header information - headers already sent by (output started at /home/sfoyston/public_html/TextStorm/Wiki/inc/init.php:560) in /home/sfoyston/public_html/TextStorm/Wiki/inc/actions.php on line 210
plugin_development - TextStorm Wiki

The Wiki is still in development, please bare with us while we add and update content.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
plugin_development [2016/12/05 21:25]
textstorm
plugin_development [2016/12/05 21:33] (current)
textstorm
Line 4: Line 4:
 If you are developing a plugin, please start with the following structure to ensure compatibility. If you are developing a plugin, please start with the following structure to ensure compatibility.
  
-Create a new PHP file - YourPlugin.php - and insert the following ​code:+Download the PHP file, rename it, and put your code beneath the foreach block! Be sure to change the plugin installation SQL too!
  
 +<file php PluginStructure.php>​
 <?php <?php
 /* Block used for the SQL for plugin installation !!!!!!!! ​ IT IS IMPORTANT THE INSERT STATEMENT IS ON LINE 3 FOR THE PLUGIN INSTALLER TO WORK!!! MODIFY THE BELOW TO YOUR DEFAULT VALUES!!! /* Block used for the SQL for plugin installation !!!!!!!! ​ IT IS IMPORTANT THE INSERT STATEMENT IS ON LINE 3 FOR THE PLUGIN INSTALLER TO WORK!!! MODIFY THE BELOW TO YOUR DEFAULT VALUES!!!
Line 11: Line 12:
 */ */
 //$db = database object, $user = user class to access functions - $user->​ModCoins();​ //$db = database object, $user = user class to access functions - $user->​ModCoins();​
-function ​**YourFunctionName**($db, $user) {+function YourFunctionName($db,​ $user) {
  
     //This simple block below means users can modify your plugin, rather than using a specific term such as "​Pirate"​     //This simple block below means users can modify your plugin, rather than using a specific term such as "​Pirate"​
Line 25: Line 26:
     }     }
 } }
- 
 ?> ?>
 +</​file>​

QR Code
QR Code plugin_development (generated for current page)