see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ // | Author (TikiWiki): dheltzel // | Reworked for Bitweaver (& Undoubtedly Screwed-Up) // | by: StarRider // | Reworked from: wikiplugin_article.php - see deprecated code below // +----------------------------------------------------------------------+ // $Id: data.article.php,v 1.6 2006/01/31 20:18:26 bitweaver Exp $ /** * definitions */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'articles' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATAARTICLE', 'dataarticle' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'ARTICLE', 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_article', 'title' => 'Article - This plugin is not yet functional.', // Remove this line when the plugin // 'title' => 'Article', // and Remove the comment from the start of this line 'help_page' => 'DataPluginArticle', 'description' => tra("This plugin will display the data from a single field in the specified Article."), 'help_function' => 'data_article_help', 'syntax' => "{ARTICLE id= field=}", 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAARTICLE, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAARTICLE ); // Help Routine function data_article_help() { $help = '' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'' .'
' . tra( "Key" ) . '' . tra( "Type" ) . '' . tra( "Comments" ) . '
id' . tra( "numeric") . '
' . tra("(required)") . '
' . tra( "The Id number of the Article. This value can easily be found in the URL when the Article is displayed.") . '
field' . tra( "string") . '
' . tra("(optional)") . '
' . tra( "This can be any field found in the") . ' articles ' . tra("table.") . '
' . tra("This includes (in order of usefulnes):") . 'title, heading, body, author, size, reads, votes, points, type and rating' . '
' . tra("Example: ") . "{ARTICLE id=14 field='heading'}"; return $help; } // Executable Routine function data_article($data, $params) { // No change in the parameters with Clyde // The next 2 lines allow access to the $pluginParams given above and may be removed when no longer needed global $gLibertySystem; $pluginParams = $gLibertySystem->mPlugins[PLUGIN_GUID_DATAARTICLE]; $ret = 'The plugin "' . $pluginParams['tag'] . '" has not been completed as yet. '; return $ret; } } /****************************************************************************** The code below is from the deprecated ARTICLE plugin. All comments and the help routines have been removed. - StarRider global $gBitSystem; if( $gBitSystem->isPackageActive( 'articles' ) ) { include_once( ARTICLES_PKG_PATH . 'art_lib.php' ); function wikiplugin_article($data, $params) { global $artlib; extract ($params, EXTR_SKIP); if (!isset($id)) { return ("The plugin Article needs an article ID to function.
"); } if (!isset($field)) { $field = 'heading'; } $article_data = $artlib->get_article($id); return $article_data[$field]; } } */ ?>