punbb/plugins/AMP_Example.php
changeset 2 a8a21e1c7afa
parent 0 f9ffdbd96607
equal deleted inserted replaced
1:8f6143115bf5 2:a8a21e1c7afa
    31 ##
    31 ##
    32 ##  2. Plugins are loaded by admin_loader.php and must not be
    32 ##  2. Plugins are loaded by admin_loader.php and must not be
    33 ##     terminated (e.g. by calling exit()). After the plugin script has
    33 ##     terminated (e.g. by calling exit()). After the plugin script has
    34 ##     finished, the loader script displays the footer, so don't worry
    34 ##     finished, the loader script displays the footer, so don't worry
    35 ##     about that. Please note that terminating a plugin by calling
    35 ##     about that. Please note that terminating a plugin by calling
    36 ##     message() or redirect() is fine though.
    36 ##     message() or pun_redirect() is fine though.
    37 ##
    37 ##
    38 ##  3. The action attribute of any and all <form> tags and the target
    38 ##  3. The action attribute of any and all <form> tags and the target
    39 ##     URL for the redirect() function must be set to the value of
    39 ##     URL for the pun_redirect() function must be set to the value of
    40 ##     $_SERVER['REQUEST_URI']. This URL can however be extended to
    40 ##     $_SERVER['REQUEST_URI']. This URL can however be extended to
    41 ##     include extra variables (like the addition of &amp;foo=bar in
    41 ##     include extra variables (like the addition of &amp;foo=bar in
    42 ##     the form of this example plugin).
    42 ##     the form of this example plugin).
    43 ##
    43 ##
    44 ##  4. If your plugin is for administrators only, the filename must
    44 ##  4. If your plugin is for administrators only, the filename must
    49 ##
    49 ##
    50 ##  5. Use _ instead of spaces in the file name.
    50 ##  5. Use _ instead of spaces in the file name.
    51 ##
    51 ##
    52 ##  6. Since plugin scripts are included from the PunBB script
    52 ##  6. Since plugin scripts are included from the PunBB script
    53 ##     admin_loader.php, you have access to all PunBB functions and
    53 ##     admin_loader.php, you have access to all PunBB functions and
    54 ##     global variables (e.g. $db, $pun_config, $pun_user etc).
    54 ##     global variables (e.g. $pun_db, $pun_config, $pun_user etc).
    55 ##
    55 ##
    56 ##  7. Do your best to keep the look and feel of your plugins' user
    56 ##  7. Do your best to keep the look and feel of your plugins' user
    57 ##     interface similar to the rest of the admin scripts. Feel free to
    57 ##     interface similar to the rest of the admin scripts. Feel free to
    58 ##     borrow markup and code from the admin scripts to use in your
    58 ##     borrow markup and code from the admin scripts to use in your
    59 ##     plugins. If you create your own styles they need to be added to
    59 ##     plugins. If you create your own styles they need to be added to