http://www.fsf.org/ or write * to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * */ /* Valorized variables $basedir -- The plugins base directory, use it for your custom plugin include $plugin_genuine -- Should be this file name */ /* cmsdAm Genuine Plugin definition */ /** * This class is needed by cmsdAm to know all details about plugins. * This is a very well known class to the cms. * Class instance: $cms->plugins * @author dAm2K (Dino Ciuffetti) <dam2k@users.sourceforge.net> */ Class skel_cmsdAm_Genuine_Plugin /* This class is needed for plugin instance */ { var $plugin_name; // mmmhh... what kinda could it ever be... var $plugin_author; // mmmhh... creazy people... var $plugin_version; // mmmhh... it seems there's many work at this... var $plugin_cmsdam_atleast; // mmmhh... may be you have to use at least cmsdam x.x.x var $plugin_mainfile; // mmmhh... this is the file that cmsdam includes for your plugin! function skel_cmsdAm_Genuine_Plugin() { // Constructor $this->plugin_name = "skel"; $this->plugin_author = "Dino Ciuffetti - dAm2K@users.sourceforge.net"; $this->plugin_version = "1.0"; $this->plugin_cmsdam_atleast = "0.9"; $this->plugin_mainfile = "index.php"; } function show_plugin_name() { // Return the plugin name return $this->plugin_name; } function show_plugin_author() { // Return the plugin author return $this->plugin_author; } function show_plugin_version() { // Return the plugin version return $this->plugin_version; } function show_plugin_cmsdam_atleast() { // Return the plugin cmsdam atleast version return $this->plugin_cmsdam_atleast; } } /* Begin of the included plugin */ // So you can use $cms->plugins->included->yourplugin->yourmethods!!! Cool, right!?!? $this->included->skel = new skel_cmsdAm_Genuine_Plugin; // Include the plugin main file include ($basedir . "/" . $plugin_name . "/" . $this->included->skel->plugin_mainfile); // TODO: remember to put @ before include when you don't need debug // Ok. Now go to one of your sections and try to $cms->plugins->plugin_include(yourplugin) // Then try to $cms->plugins->included->yourplugin->show_plugin_author() that should return // your name. Cool??!? ?>