diff options
67 files changed, 1173 insertions, 820 deletions
diff --git a/LibertyAttachable.php b/LibertyAttachable.php index 0760268..9bb83dc 100644 --- a/LibertyAttachable.php +++ b/LibertyAttachable.php @@ -1,4 +1,11 @@ <?php +/** + * Management of Liberty Content + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -11,22 +18,22 @@ // | Authors: spider <spider@steelsun.com> // +----------------------------------------------------------------------+ // -// $Id: LibertyAttachable.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ +// $Id: LibertyAttachable.php,v 1.2 2005/06/28 07:45:47 spiderr Exp $ /** -* Virtual base class (as much as one can have such things in PHP) for all -* derived tikiwiki classes that require database access. -* -* @abstract -* @author spider <spider@steelsun.com> -* @version $Revision: 1.1 $ -* @package BitBase -*/ - - + * required setup + */ require_once( LIBERTY_PKG_PATH.'LibertyContent.php' ); require_once( LIBERTY_PKG_PATH.'LibertySystem.php' ); +/** + * LibertyAttachable classes. + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage LibertyAttachable + */ class LibertyAttachable extends LibertyContent { var $mContentId; var $mStorage; diff --git a/LibertyBase.php b/LibertyBase.php index d526ff1..2fe7440 100644 --- a/LibertyBase.php +++ b/LibertyBase.php @@ -1,4 +1,11 @@ <?php +/** + * Management of Liberty Content + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -11,20 +18,23 @@ // | Authors: spider <spider@steelsun.com> // +----------------------------------------------------------------------+ // -// $Id: LibertyBase.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ +// $Id: LibertyBase.php,v 1.2 2005/06/28 07:45:47 spiderr Exp $ /** -* Virtual base class (as much as one can have such things in PHP) for all -* derived tikiwiki classes that require database access. -* -* @abstract -* @author spider <spider@steelsun.com> -* @version $Revision: 1.1 $ -* @package BitBase -*/ - + * required setup + */ require_once( KERNEL_PKG_PATH.'BitBase.php' ); +/** + * Virtual base class (as much as one can have such things in PHP) for all + * derived bitweaver classes that manage content. + * + * @abstract + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage LibertyBase + */ class LibertyBase extends BitBase { function LibertyBase () { diff --git a/LibertyComment.php b/LibertyComment.php index e17917f..45db3e7 100644 --- a/LibertyComment.php +++ b/LibertyComment.php @@ -1,8 +1,27 @@ <?php +/** + * Management of Liberty Content + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.3 $ + * @package Liberty + */ + +/** + * required setup + */ require_once( LIBERTY_PKG_PATH.'LibertyContent.php' ); define( 'BITCOMMENT_CONTENT_TYPE_GUID', 'bitcomment' ); +/** +* Virtual base class (as much as one can have such things in PHP) for all +* derived tikiwiki classes that require database access. +* +* @author spider <spider@steelsun.com> +* @package Liberty +* @subpackage LibertyComment +*/ class LibertyComment extends LibertyContent { var $mCommentId; @@ -180,7 +199,7 @@ class LibertyComment extends LibertyContent { $commentCount = 0; if ($contentId) { $sql = "SELECT tcm.*, tcmc.`parent_id` AS `child_content_id` - FROM `tiki_comments` tcm LEFT OUTER JOIN `tiki_comments` tcmc ON (tcm.`content_id`=tcmc.`parent_id`) + FROM `".BIT_DB_PREFIX."tiki_comments` tcm LEFT OUTER JOIN `".BIT_DB_PREFIX."tiki_comments` tcmc ON (tcm.`content_id`=tcmc.`parent_id`) WHERE tcm.`parent_id` = ?"; $rows = $this->GetAssoc($sql, array($contentId)); $commentCount += count($rows); diff --git a/LibertyContent.php b/LibertyContent.php index 0636eb3..207e14f 100644 --- a/LibertyContent.php +++ b/LibertyContent.php @@ -1,4 +1,12 @@ <?php +/** +* Management of Liberty content +* +* @author spider <spider@steelsun.com> +* @version $Revision: 1.3 $ +* @package Liberty +*/ + // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -11,30 +19,33 @@ // | Authors: spider <spider@steelsun.com> // +----------------------------------------------------------------------+ // -// $Id: LibertyContent.php,v 1.2 2005/06/20 04:56:53 spiderr Exp $ - -/** -* Virtual base class (as much as one can have such things in PHP) for all -* derived tikiwiki classes that require database access. -* -* @abstract -* @author spider <spider@steelsun.com> -* @version $Revision: 1.2 $ -* @package BitBase -*/ +// $Id: LibertyContent.php,v 1.3 2005/06/28 07:45:47 spiderr Exp $ // define( 'CONTENT_TYPE_WIKI', '1' ); // define( 'CONTENT_TYPE_COMMENT', '3' ); // define( 'CONTENT_TYPE_USER', '4' ); -// Maximum lengths for database fields +/** + * Maximum lengths for database fields + */ define( 'BIT_CONTENT_MAX_TITLE_LEN', 160); define( 'BIT_CONTENT_MAX_LANGUAGE_LEN', 4); define( 'BIT_CONTENT_MAX_IP_LEN', 39); define( 'BIT_CONTENT_MAX_FORMAT_GUID_LEN', 16); +/** + * required setup + */ require_once( LIBERTY_PKG_PATH.'LibertyBase.php' ); +/** +* Virtual base class (as much as one can have such things in PHP) for all +* derived tikiwiki classes that require database access. +* +* @author spider <spider@steelsun.com> +* @package Liberty +* @subpackage LibertyContent +*/ class LibertyContent extends LibertyBase { var $mContentId; /** @@ -98,6 +109,8 @@ class LibertyContent extends LibertyBase { // check some lengths, if too long, then truncate if( !empty( $pParamHash['title'] ) ) { $pParamHash['content_store']['title'] = substr( $pParamHash['title'], 0, 160 ); + } elseif( isset( $pParamHash['title'] ) ) { + $pParamHash['content_store']['title'] = NULL; } $pParamHash['content_store']['last_modified'] = !empty( $pParamHash['last_modified'] ) ? $pParamHash['last_modified'] : date("U"); @@ -144,6 +157,12 @@ class LibertyContent extends LibertyBase { } } + if( empty( $pParamHash['edit'] ) && !empty( $this->mInfo['data'] ) ) { + // someone has deleted the data entirely - common for fisheye + $pParamHash['content_store']['data'] = NULL; + } + $pParamHash['content_store']['format_guid'] = $pParamHash['format_guid']; + return( count( $this->mErrors ) == 0 ); } diff --git a/LibertyStructure.php b/LibertyStructure.php index d329000..4690b14 100755 --- a/LibertyStructure.php +++ b/LibertyStructure.php @@ -1,5 +1,25 @@ <?php +/** + * Management of Liberty Content + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + */ + +/** + * required setup + */ require_once( LIBERTY_PKG_PATH.'LibertyBase.php' ); + +/** +* System class for handling the liberty package +* +* @author spider <spider@steelsun.com> +* @version $Revision: 1.2 $ +* @package Liberty +* @subpackage LibertyStructure +*/ class LibertyStructure extends LibertyBase { var $mStructureId; diff --git a/LibertySystem.php b/LibertySystem.php index 3ebe3a4..64cd8f6 100755 --- a/LibertySystem.php +++ b/LibertySystem.php @@ -1,4 +1,12 @@ <?php +/** +* System class for handling the liberty package +* +* @author spider <spider@steelsun.com> +* @version $Revision: 1.2 $ +* @package Liberty +*/ + // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -11,17 +19,10 @@ // | Authors: spider <spider@steelsun.com> // +----------------------------------------------------------------------+ // -// $Id: LibertySystem.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ - +// $Id: LibertySystem.php,v 1.2 2005/06/28 07:45:47 spiderr Exp $ /** -* System class for handling the common package -* -* @abstract -* @author spider <spider@steelsun.com> -* @version $Revision: 1.1 $ -* @package Common -*/ - + * Local base defines + */ define( 'STORAGE_PLUGIN', 'storage' ); define( 'FORMAT_PLUGIN', 'format' ); define( 'DATA_PLUGIN', 'data' ); @@ -30,8 +31,19 @@ define( 'DEFAULT_ACCEPTABLE_TAGS', '<a><br><b><blockquote><cite><code><div><dd>< .' <i><it><img><li><ol><p><pre><span><strong><table><tbody><div><tr><td><th><u><ul>' .' <button><fieldset><form><label><input><option><select><textarea>' ); +/** + * Link to base class + */ require_once( LIBERTY_PKG_PATH.'LibertyBase.php' ); +/** + * System class for handling the liberty package + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage LibertySystem + */ class LibertySystem extends LibertyBase { var $mPlugins; @@ -78,9 +90,9 @@ class LibertySystem extends LibertyBase { $handler['is_active'] = 'y'; } elseif( empty( $handler['verified'] ) && !isset( $handler['is_active'] ) ) { //We found a missing plugin - insert it - $sql = "INSERT INTO `".BIT_DB_PREFIX."tiki_plugins` ( `plugin_guid`, `plugin_type`, `plugin_description`, `is_active` ) VALUES ( ?, ?, ?, 'y' )"; - $this->query( $sql, array( $guid, $handler['plugin_type'], $handler['description'] ) ); - $handler['is_active'] = 'y'; + $handler['is_active'] = ( ( isset( $handler['auto_activate'] ) && $handler['auto_activate'] == FALSE ) ? 'n' : 'y' ); + $sql = "INSERT INTO `".BIT_DB_PREFIX."tiki_plugins` ( `plugin_guid`, `plugin_type`, `plugin_description`, `is_active` ) VALUES ( ?, ?, ?, ? )"; + $this->query( $sql, array( $guid, $handler['plugin_type'], $handler['description'], $handler['is_active'] ) ); } } asort( $this->mPlugins ); diff --git a/attachment_browser.php b/attachment_browser.php index 0ada330..067895f 100644 --- a/attachment_browser.php +++ b/attachment_browser.php @@ -1,4 +1,16 @@ <?php +/** + * attachment_browser + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ + +/** + * bit setup + */ include("../bit_setup_inc.php"); $userAttachments = $gBitUser->getUserAttachments(); diff --git a/bit_setup_inc.php b/bit_setup_inc.php index d1fe3cb..01a05f2 100644 --- a/bit_setup_inc.php +++ b/bit_setup_inc.php @@ -1,4 +1,13 @@ <?php +/** + * base package include + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ + global $gBitSystem, $gBitUser, $smarty; $gBitSystem->registerPackage( 'liberty', dirname( __FILE__).'/' ); diff --git a/comments_inc.php b/comments_inc.php index 48506b2..3d5ebc5 100644 --- a/comments_inc.php +++ b/comments_inc.php @@ -1,6 +1,14 @@ <?php +/** + * comment_inc + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ -// $Header: /cvsroot/bitweaver/_bit_liberty/comments_inc.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ +// $Header: /cvsroot/bitweaver/_bit_liberty/comments_inc.php,v 1.2 2005/06/28 07:45:47 spiderr Exp $ // Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. @@ -12,27 +20,30 @@ // using this information // Setup URLS for the Comments next and prev buttons and use variables that -// cannot be aliased by normal tiki variables. +// cannot be aliased by normal Bit variables. // Traverse each _REQUEST data adn put them in an array -//this script may only be included - so its better to die if called directly. +// this script may only be included - so its better to die if called directly. + +/** + * required setup + */ require_once (LIBERTY_PKG_PATH.'LibertyComment.php'); -global $commentsLib; -global $smarty; +global $commentsLib, $smarty; $postComment = array(); $formfeedback = array(); $smarty->assign_by_ref('formfeedback', $formfeedback); -if (!empty($_REQUEST['delete_comment_id'])) { +if (!empty($_REQUEST['delete_comment_id']) && $gBitUser->hasPermission( 'bit_p_post_comments' )) { $deleteComment = new LibertyComment($_REQUEST['delete_comment_id']); if (!empty ($deleteComment->mInfo['content_id'])) { $deleteComment->deleteComment(); } } -if (!empty($_REQUEST['post_comment_id'])) { +if (!empty($_REQUEST['post_comment_id']) && $gBitUser->hasPermission( 'bit_p_post_comments' )) { $post_comment_id = $_REQUEST['post_comment_id']; $editComment = new LibertyComment($post_comment_id); if ($editComment->mInfo['content_id']) { @@ -56,7 +67,7 @@ if (!empty($_REQUEST['post_comment_id'])) { $smarty->assign('post_comment_id', $post_comment_id); // Store comment posts -if (!empty($_REQUEST['post_comment_submit'])) { +if (!empty($_REQUEST['post_comment_submit']) && $gBitUser->hasPermission( 'bit_p_post_comments' )) { $storeComment = new LibertyComment(!empty($editComment->mCommentId) ? $editComment->mCommentId : NULL); $storeRow = array(); $storeRow['title'] = $_REQUEST['comment_title']; @@ -69,7 +80,7 @@ if (!empty($_REQUEST['post_comment_submit'])) { // $post_comment_request is a flag indicating whether or not to display the comment input form if (empty($_REQUEST['post_comment_request'])) { $post_comment_request = NULL; -} elseif ($_REQUEST['post_comment_request']) { +} elseif( $gBitUser->hasPermission( 'bit_p_post_comments' ) ) { $post_comment_request = TRUE; } $smarty->assign_by_ref('post_comment_request', $post_comment_request); @@ -78,7 +89,7 @@ $smarty->assign_by_ref('post_comment_request', $post_comment_request); if( !empty( $_REQUEST['post_comment_preview'] ) ) { $postComment['title'] = $_REQUEST['comment_title']; $postComment['data'] = $_REQUEST['comment_data']; - $postComment['parsed_data'] = LibertyComment::parseData( $_REQUEST['comment_data'], 'tikiwiki' ); + $postComment['parsed_data'] = LibertyComment::parseData( $_REQUEST['comment_data'], 'bitwiki' ); $smarty->assign('post_comment_preview', TRUE); } diff --git a/display_content_inc.php b/display_content_inc.php index ee1a635..87bb5c4 100644 --- a/display_content_inc.php +++ b/display_content_inc.php @@ -1,4 +1,12 @@ <?php +/** + * display_content_inc + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ global $smarty, $gBitSystem, $gContent; diff --git a/display_structure_inc.php b/display_structure_inc.php index cc48f3e..0bb2f83 100644 --- a/display_structure_inc.php +++ b/display_structure_inc.php @@ -1,4 +1,16 @@ <?php +/** + * display_structure_inc + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ + +/** + * required setup + */ global $gContent; include_once( LIBERTY_PKG_PATH.'lookup_content_inc.php' ); if( is_object( $gContent ) && $gContent->isValid() ) { diff --git a/edit_help_inc.php b/edit_help_inc.php new file mode 100644 index 0000000..89343f9 --- /dev/null +++ b/edit_help_inc.php @@ -0,0 +1,44 @@ +<?php +/** + * edit_help_inc + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ + +global $gLibertySystem; + +$dataplugins = array(); +// Request help string from each plugin module +foreach( array_keys( $gLibertySystem->mPlugins ) as $pluginGuid ) { + if( $gLibertySystem->mPlugins[$pluginGuid]['plugin_type'] == FORMAT_PLUGIN ) { + if( isset( $gLibertySystem->mPlugins[$pluginGuid]['description'] ) ) { + $pinfo["is_active"] = $gLibertySystem->mPlugins[$pluginGuid]['is_active']; + $pinfo["guid"] = $pluginGuid; + $pinfo["name"] = $gLibertySystem->mPlugins[$pluginGuid]['edit_label']; + $pinfo["description"] = $gLibertySystem->mPlugins[$pluginGuid]['description']; + $pinfo["help_page"] = ( !empty( $gLibertySystem->mPlugins[$pluginGuid]['help_page'] ) ? $gLibertySystem->mPlugins[$pluginGuid]['help_page'] : NULL ); + $formatplugins[] = $pinfo; + } + } + + if( $gLibertySystem->mPlugins[$pluginGuid]['plugin_type'] == DATA_PLUGIN ) { + if( isset( $gLibertySystem->mPlugins[$pluginGuid]['description'] ) ) { + $pinfo["is_active"] = $gLibertySystem->mPlugins[$pluginGuid]['is_active']; + $pinfo["guid"] = preg_replace( "/^data/", "", $pluginGuid ); + $pinfo["name"] = !empty( $gLibertySystem->mPlugins[$pluginGuid]['title'] ) ? $gLibertySystem->mPlugins[$pluginGuid]['title'] : $pluginGuid; + $pinfo["description"] = $gLibertySystem->mPlugins[$pluginGuid]['description']; + $pinfo["help_page"] = !empty( $gLibertySystem->mPlugins[$pluginGuid]['help_page'] ) ? $gLibertySystem->mPlugins[$pluginGuid]['help_page'] : NULL; + $pinfo["syntax"] = $gLibertySystem->mPlugins[$pluginGuid]['syntax']; + if( !empty( $gLibertySystem->mPlugins[$pluginGuid]['help_function'] ) && function_exists( $gLibertySystem->mPlugins[$pluginGuid]['help_function'] ) ) { + $pinfo["exthelp"] = $gLibertySystem->mPlugins[$pluginGuid]['help_function'](); + } + $dataplugins[] = $pinfo; + } + } +} +$smarty->assign_by_ref( 'formatplugins', $formatplugins ); +$smarty->assign_by_ref( 'dataplugins', $dataplugins ); +?> diff --git a/edit_storage_inc.php b/edit_storage_inc.php index d4ae02c..dd2a32a 100644 --- a/edit_storage_inc.php +++ b/edit_storage_inc.php @@ -1,9 +1,17 @@ <?php -/* This file is automatically included by edit_storage.tpl - All you need to do is include edit_storage.tpl - from your template file. -*/ - -// Calculate a base URL for the attachment deletion/removal icons to use +/** + * edit_storage_inc + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + * + * This file is automatically included by edit_storage.tpl - All you need to do is include edit_storage.tpl + * from your template file. + * + * Calculate a base URL for the attachment deletion/removal icons to use + */ global $smarty, $gContent, $gBitUser; $attachmentActionBaseURL = $_SERVER['PHP_SELF'].'?'; $GETArgs = split('&',$_SERVER['QUERY_STRING']); diff --git a/edit_structure_inc.php b/edit_structure_inc.php index 45ff16b..39b72d3 100644 --- a/edit_structure_inc.php +++ b/edit_structure_inc.php @@ -1,11 +1,20 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_liberty/edit_structure_inc.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ +/** + * edit_structure_inc + * + * @author Christian Fowler> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ // Copyright (c) 2004, Christian Fowler, et. al. // All Rights Reserved. See copyright.txt for details and a complete list of authors. // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. -// Initialization +/** + * required setup + */ require_once( '../bit_setup_inc.php' ); include_once( LIBERTY_PKG_PATH.'LibertyStructure.php'); diff --git a/get_content_list_inc.php b/get_content_list_inc.php index 8e087d6..1ecb259 100644 --- a/get_content_list_inc.php +++ b/get_content_list_inc.php @@ -1,4 +1,16 @@ <?php +/** + * get_content_list + * + * @author Christian Fowler> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ + +/** + * required setup + */ require_once( LIBERTY_PKG_PATH."LibertyContent.php" ); global $gContent; global $gLibertySystem; diff --git a/list_content.php b/list_content.php index 5678aba..7895147 100644 --- a/list_content.php +++ b/list_content.php @@ -1,4 +1,16 @@ <?php +/** + * list_content + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ + +/** + * required setup + */ require_once("../bit_setup_inc.php"); // some content specific offsets and pagination settings diff --git a/lookup_content_inc.php b/lookup_content_inc.php index 02d4840..162fdbe 100644 --- a/lookup_content_inc.php +++ b/lookup_content_inc.php @@ -1,7 +1,18 @@ <?php +/** + * lookup_content_inc + * + * @author spider <spider@steelsun.com> + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage functions + */ global $gContent; if( !empty( $_REQUEST['structure_id'] ) ) { + /** + * required setup + */ require_once( LIBERTY_PKG_PATH.'LibertyStructure.php'); $gStructure = new LibertyStructure( $_REQUEST['structure_id'] ); if( $gStructure->load() ) { diff --git a/modules/mod_last_changes.php b/modules/mod_last_changes.php index 679103f..b3f3050 100644 --- a/modules/mod_last_changes.php +++ b/modules/mod_last_changes.php @@ -1,10 +1,12 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_last_changes.php,v 1.1 2005/06/19 04:55:51 bitweaver Exp $ +// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_last_changes.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ /** -* Params: -* - content_type_guid : if set, show only those content_type_guid's -* - show_date : if set, show date of last modification -*/ + * Params: + * - content_type_guid : if set, show only those content_type_guid's + * - show_date : if set, show date of last modification + * @package Liberty + * @subpackage modules + */ global $gQueryUser, $gBitUser, $module_rows, $module_params, $gLibertySystem, $module_title; diff --git a/modules/mod_structure_navigation.php b/modules/mod_structure_navigation.php index 67c94a5..9ec15e7 100644 --- a/modules/mod_structure_navigation.php +++ b/modules/mod_structure_navigation.php @@ -1,2 +1,6 @@ <?php +/** + * @package Liberty + * @subpackage modules + */ ?>
\ No newline at end of file diff --git a/modules/mod_top_authors.php b/modules/mod_top_authors.php index f1c1d94..223d770 100644 --- a/modules/mod_top_authors.php +++ b/modules/mod_top_authors.php @@ -1,9 +1,11 @@ <?php -// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_top_authors.php,v 1.1 2005/06/19 04:55:51 bitweaver Exp $ +// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_top_authors.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ /** -* Params: -* - content_type_guid : if set, show only those content_type_guid's -*/ + * Params: + * - content_type_guid : if set, show only those content_type_guid's + * @package Liberty + * @subpackage modules + */ global $gQueryUser, $gBitUser, $module_rows, $module_params, $module_title, $gLibertySystem; diff --git a/plugins/data.addtabs.php b/plugins/data.addtabs.php index ee73185..0a64b74 100644 --- a/plugins/data.addtabs.php +++ b/plugins/data.addtabs.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,29 +13,33 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_include.php - see deprecated code below +// | Author: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.addtabs.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.addtabs.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAADDTABS', 'dataaddtabs' ); global $gLibertySystem; global $gContent; $pluginParams = array ( 'tag' => 'ADDTABS', - 'auto_activate' => FALSE, + 'auto_activate' => TRUE, 'requires_pair' => FALSE, 'load_function' => 'data_addtabs', 'title' => 'AddTabs', + 'help_page' => 'DataPluginAddTabs', 'description' => tra("Will join the contents from several sources in a Tabbed Interface."), 'help_function' => 'data_addtabs_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/DataPluginAddtabs", 'syntax' => "{addtabs tab1= tab2= tab3= . . . tab99= }", 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAADDTABS, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAADDTABS ); -// Help Function +/** + * Help Function + */ function data_addtabs_help() { $help = '<table class="data help">' @@ -42,7 +51,10 @@ function data_addtabs_help() { .'<tr class="odd">' .'<td>tab1 - tab99</td>' .'<td>' . tra( "numeric") . '<br />' . tra("(optional)") . '</td>' - .'<td>' . tra( 'Will create a Tab interface on a page. The name on each tab is the name given to the imported page.The value sent with the TabX parameter is a bitweaver Numeric Content Id. This allows blog posts, images, wiki pages...and more to be added<br /><strong>Note:</strong> The order used when the tabs are specified does not matter. The Tabname does - Tab1 is always first and Tab99 will always be last. Avaliable content can be viewed ') . '<a href="'.LIBERTY_PKG_URL.'list_content.php" title="Opens content browser in new window" onkeypress="popUpWin(this.href,\'standard\',600,400);" onclick="popUpWin(this.href,\'standard\',600,400);return false;">' . tra( "here" ) . '</a></td>' + .'<td>' . tra( "Will create a Tab interface on a page. The name on each tab is the name given to the imported page.The value sent with the TabX parameter is a Numeric Content Id. This allows blog posts, images, wiki pages . . . (and more) to be added.") + . tra("<br /><strong>Note 1:</strong> A listing of Content Id's can be found ") + . '<a href="'.LIBERTY_PKG_URL.'list_content.php" title="Launch BitWeaver Content Browser in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "Here" ) . '</a>' + . tra("<br /><strong>Note 2:</strong> The order used when the tabs are specified does not matter. The Tabname does - Tab1 is always first and Tab99 will always be last.</td>") .'</tr>' .'</table>' . tra("Example: ") . '{addtabs tab1=15 tab2=12 tab3=11}'; diff --git a/plugins/data.agentinfo.php b/plugins/data.agentinfo.php index 17d1ff3..13beb2c 100644 --- a/plugins/data.agentinfo.php +++ b/plugins/data.agentinfo.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,15 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_agentinfo.php - see deprecated code below +// | Author (TikiWiki): Damian Parker <damosoft@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.agentinfo.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.agentinfo.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAAGENTINFO', 'dataagentinfo' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'AGENTINFO', @@ -20,16 +29,18 @@ $pluginParams = array ( 'tag' => 'AGENTINFO', 'requires_pair' => FALSE, 'load_function' => 'data_agentinfo', 'title' => 'AgentInfo', + 'help_page' => 'DataPluginAgentInfo', 'description' => tra("This plugin will display the viewer's IP address, the Browser they are using, or the info about the site's Server software."), 'help_function' => 'data_agentinfo_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{agentinfo info= }", 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAAGENTINFO, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAAGENTINFO ); -// Help Function +/** + * Help Function + */ function data_agentinfo_help() { $help = '<table class="data help">' @@ -69,27 +80,4 @@ function data_agentinfo($data, $params) { } } -/****************************************************************************** -The code below is from the deprecated AGENTINFO plugin. All comments and the help routines have been removed. - StarRider -// Wiki plugin to display a browser client information -// damian aka damosoft May 2004 - -function wikiplugin_agentinfo($data, $params) { - extract ($params); - $ret = ''; - if (!isset($info)) { - $info = 'IP'; - } - if ($info == 'IP') { - $ret = $_SERVER["REMOTE_ADDR"]; - } - if ($info == 'SVRSW') { - $ret = $_SERVER["SERVER_SOFTWARE"]; - } - if ($info == 'BROWSER') { - $ret = $_SERVER["HTTP_USER_AGENT"]; - } - return $ret; -} -*/ ?> diff --git a/plugins/data.article.php b/plugins/data.article.php index 8c8f268..8d8aa07 100644 --- a/plugins/data.article.php +++ b/plugins/data.article.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): dheltzel +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_article.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.article.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.article.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'articles' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATAARTICLE', 'dataarticle' ); @@ -23,9 +33,9 @@ $pluginParams = array ( 'tag' => 'ARTICLE', 'load_function' => 'data_article', 'title' => 'Article<strong> - This plugin is not yet functional.</strong>', // 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', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{article id= field=}", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.articles.php b/plugins/data.articles.php index 2118b96..f0bb224 100644 --- a/plugins/data.articles.php +++ b/plugins/data.articles.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Gustavo Muslera <gmuslera@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_articles.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.articles.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.articles.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'articles' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATAARTICLES', 'dataarticles' ); @@ -23,9 +33,9 @@ $pluginParams = array ( 'tag' => 'ARTICLES', 'load_function' => 'data_articles', 'title' => 'Articles<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'Articles', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginArticles', 'description' => tra("This plugin will display several Articles."), 'help_function' => 'data_articles_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{articles max= topic= type= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.attachment.php b/plugins/data.attachment.php index 1641977..aa3cfd4 100644 --- a/plugins/data.attachment.php +++ b/plugins/data.attachment.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -10,8 +15,11 @@ // +----------------------------------------------------------------------+ // | Authors: drewslater <andrew@andrewslater.com> // +----------------------------------------------------------------------+ -// $Id: data.attachment.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.attachment.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; define( 'PLUGIN_GUID_DATAATTACHMENT', 'dataattachment' ); @@ -21,9 +29,9 @@ $pluginParams = array ( 'tag' => 'ATTACHMENT', 'requires_pair' => FALSE, 'load_function' => 'data_attachment', 'title' => 'Attachment', + 'help_page' => 'DataPluginAttachment', 'description' => tra("Display attachment in content"), 'help_function' => 'data_attachment_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => '{attachment id= size= align= }', 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.avatar.php b/plugins/data.avatar.php index 0ed1f3e..deb8757 100644 --- a/plugins/data.avatar.php +++ b/plugins/data.avatar.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,24 +13,29 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Luis Argerich <lrargerich@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_avatar.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.avatar.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.avatar.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'wiki' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATAAVATAR', 'dataavatar' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'AVATAR', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_avatar', 'title' => 'Avatar<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'Avatar', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginAvatar', 'description' => tra("This plugin will display a User's Avatar as a Link to a page."), 'help_function' => 'data_avatar_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{avatar user= page= float= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.backlinks.php b/plugins/data.backlinks.php index cccdd97..e058b34 100644 --- a/plugins/data.backlinks.php +++ b/plugins/data.backlinks.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Claudio Bustos <cdx@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_backlinks.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.backlinks.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.backlinks.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( ( $gBitSystem->isPackageActive( 'wiki' ) ) && ( $gBitSystem->isFeatureActive('feature_backlinks') ) ) { // Do not include this Plugin if the Package or the Feature is not active define( 'PLUGIN_GUID_DATABACKLINKS', 'databacklinks' ); @@ -23,9 +33,9 @@ $pluginParams = array ( 'tag' => 'BACKLINKS', 'load_function' => 'data_backlinks', 'title' => 'BackLinks<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'BackLinks', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginBackLinks', 'description' => tra("This plugin will list all Wiki pages which contains a link to the specified page."), 'help_function' => 'data_backlinks_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{backlinks page= info= exclude= self= header= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.category.php b/plugins/data.category.php index 9e3dc77..0ea8c33 100644 --- a/plugins/data.category.php +++ b/plugins/data.category.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Oliver Hertel <ohertel@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_category.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.category.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.category.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'categories' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATACATEGORY', 'datacategory' ); @@ -23,9 +33,9 @@ $pluginParams = array ( 'tag' => 'CATEGORY', 'load_function' => 'data_category', 'title' => 'Category<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'Category', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginCategory', 'description' => tra("This plugin insert a list of items for the current category or a given category."), 'help_function' => 'data_category_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{category id= types= sort= sub= split= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.catorphans.php b/plugins/data.catorphans.php index 0bfa9fd..a422610 100644 --- a/plugins/data.catorphans.php +++ b/plugins/data.catorphans.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): TeeDog <teedog@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_catorphans.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.catorphans.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.catorphans.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'categories' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATACATORPHANS', 'datacatorphans' ); @@ -23,9 +33,9 @@ $pluginParams = array ( 'tag' => 'CATORPHANS', 'load_function' => 'data_catorphans', 'title' => 'CatOrphans<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'CatOrphans', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginCatOrphans', 'description' => tra("Creates a listing of bitweaver objects that have not been categorized."), 'help_function' => 'data_catorphans_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{catorphans objects= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.catpath.php b/plugins/data.catpath.php index b12bdc0..f82cd80 100644 --- a/plugins/data.catpath.php +++ b/plugins/data.catpath.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): TeeDog <teedog@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_catpath.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.catpath.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.catpath.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'categories' ) ) { // Do not include this Plugin if the Package is not active define( 'PLUGIN_GUID_DATACATPATH', 'datacatpath' ); @@ -23,9 +33,9 @@ $pluginParams = array ( 'tag' => 'CATPATH', 'load_function' => 'data_catpath', 'title' => 'CatPath<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'CatPath', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginCatPath', 'description' => tra("This plugin insert the full category path for each category that the page belongs to."), 'help_function' => 'data_catpath_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{CATPATH divider= top= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.code.php b/plugins/data.code.php index 31c2fd1..85d04d7 100644 --- a/plugins/data.code.php +++ b/plugins/data.code.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,15 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_code.php - see deprecated code below +// | Author (TikiWiki): Luis Argerich <lrargerich@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.code.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.code.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATACODE', 'datacode' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'CODE', @@ -20,9 +29,9 @@ $pluginParams = array ( 'tag' => 'CODE', 'requires_pair' => TRUE, 'load_function' => 'data_code', 'title' => 'Code', + 'help_page' => 'DataPluginCode', 'description' => tra("Displays the Source Code Snippet between {Code} blocks."), 'help_function' => 'data_code_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => " {code source= num= }". tra("Sorce Code Snippet") . "{code}", 'plugin_type' => DATA_PLUGIN ); @@ -65,6 +74,7 @@ function data_code( $data, $params ) { // Pre-Clyde Changes // Parameters were $In & $Colors // Added testing to maintain Pre-Clyde compatability $num = NULL; + $add_tags = false; extract ($params); // This maintains Pre-Clyde Parameters if (isset($colors) and ($colors == 'php') ) $source = 'HTML'; @@ -125,18 +135,6 @@ function data_code( $data, $params ) { // Pre-Clyde Changes break; case 'PHP': $code = highlight_string($code, true); - /* - SPIDERKILL this code was not properly checking and doing the right stuff. just removed for now - if (substr($code, 0, 6) == '<code>') // Remove the first <code>" tags - $code = substr($code, 6, (strlen($code) - 13)); - if ($add_tags) { //strip the PHP tags if they were added by the script - if ($num) { // Line Numbering has been added - $code = substr($code, 50, (strlen($code) -125)); - } else { - $code = substr($code, 63, (strlen($code) -125)); - } - } - */ $convmap = array( // Replacement-map to replace Colors '#000000">' => '#004A4A">', // The Default Color '#006600">' => '#2020FF">', // Color for Functions/Variables/Numbers/&/Constants @@ -161,40 +159,4 @@ function unhtmlentities($string) { $trans_tbl = array_flip($trans_tbl); return strtr($string, $trans_tbl); } - -/****************************************************************************** -The code below is from the deprecated CODE plugin. All comments and the help routines have been removed. - StarRider - -function wikiplugin_code($data, $params) { - $code = $data; - extract ($params); - if (isset($colors) and ($colors == 'php')) { - $data = "<div class='codelisting'><pre>".highlight_string(decodeHTML($code),1)."</pre></div>"; - } else { - if (isset($in) && $in == 1) { - $lines = explode("\n", $code); - $i = 1; // The current line number - $code = ''; - // This will skip leading and trailing empty lines to make snippet look better :) - $fl = 0; // first code line printed' flag - $ae = ''; - foreach ($lines as $line) { - $len = strlen($line); - if (!($len || $fl)) continue; // skip leading empty lines - if ($len) { // OK len >0 - $code .= $ae . ($fl ? "\n" : '') . sprintf("%3d", $i). ': ' . $line; - $fl = 1; // first line already printed - $ae = ''; - } else { - $ae .= "\n" . sprintf("%3d", $i). ': ' . $line; - } - $i++; - } - $code = rtrim($code); - } - $data = "<div class='codelisting'><pre>" . $code . "</pre></div>"; - } - return $data; -} -*/ ?> diff --git a/plugins/data.copyright.php b/plugins/data.copyright.php index 6a25e2c..86e50ba 100644 --- a/plugins/data.copyright.php +++ b/plugins/data.copyright.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,24 +13,28 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_copyright.php - see deprecated code below +// | Author (TikiWiki): Ricardo Gladwell <axonrg@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.copyright.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.copyright.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( ( $gBitSystem->isPackageActive( 'wiki' ) ) && ( $gBitSystem->isFeatureActive( 'wiki_feature_copyrights' ) ) ) { // Do not include this Plugin if this Package and Feature are not active define( 'PLUGIN_GUID_DATACOPYRIGHT', 'datacopyright' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'COPYRIGHT', - 'auto_activate' => FALSE, + 'auto_activate' => TRUE, 'requires_pair' => FALSE, 'load_function' => 'data_copyright', 'title' => 'CopyRight', + 'help_page' => 'DataPluginCopyRight', 'description' => tra("This plugin is used to insert CopyRight notices."), 'help_function' => 'data_copyright_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{COPYRIGHT title= year= authors= }", 'plugin_type' => DATA_PLUGIN ); @@ -91,32 +100,4 @@ function data_copyright($data, $params) { // Pre-Clyde Changes return $ret; } } -/****************************************************************************** -The code below is from the deprecated COPYRIGHT plugin. All comments and the help routines have been removed. - StarRider - -require_once( KERNEL_PKG_PATH.'BitBase.php' ); -require_once( WIKI_PKG_PATH.'copyrights_lib.php' ); - - -function wikiplugin_copyright($data, $params) { - $copyrightslib = new CopyrightsLib(); - if (!isset($_REQUEST['copyrightpage'])) { - return ''; - } - //extract($params); - $result = ''; - $copyrights = $copyrightslib->list_copyrights($_REQUEST['copyrightpage']); - for ($i = 0; $i < $copyrights['cant']; $i++) { - $notice = str_replace("~title~", $copyrights['data'][$i]['title'], $data); - $notice = str_replace("~year~", $copyrights['data'][$i]['year'], $notice); - $notice = str_replace("~authors~", $copyrights['data'][$i]['authors'], $notice); - $result = $result . $notice; - } - global $bit_p_edit_copyrights; - if ((isset($bit_p_edit_copyrights)) && ($gBitUser->hasPermission( 'bit_p_edit_copyrights' ))) { - $result = $result . "\n<a href=\"copyrights.php?page=" . $_REQUEST['copyrightpage'] . "\">Edit copyrights</a> for ((" . $_REQUEST['copyrightpage'] . "))\n"; - } - return $result; -} -*/ ?> diff --git a/plugins/data.countdown.php b/plugins/data.countdown.php index c142973..4c41f1d 100644 --- a/plugins/data.countdown.php +++ b/plugins/data.countdown.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,15 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_countdown.php - see deprecated code below +// | Author (TikiWiki): Stephan Borg <wolff_borg@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.countdown.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.countdown.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATACOUNTDOWN', 'datacountdown' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'COUNTDOWN', @@ -20,9 +29,9 @@ $pluginParams = array ( 'tag' => 'COUNTDOWN', 'requires_pair' => TRUE, 'load_function' => 'data_countdown', 'title' => 'CountDown', + 'help_page' => 'DataPluginCountDown', 'description' => tra("Displays a Count-Down until a date:time is reached - then - negative numbers indicate how long it has been since that date. The Count-Down is displayed in the format of (X days, X hours, X minutes and X seconds)."), 'help_function' => 'data_countdown_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{countdown enddate= localtime= }" . tra("Text") . "{countdown}", 'plugin_type' => DATA_PLUGIN ); @@ -88,30 +97,4 @@ function data_countdown($data, $params) { $ret = "$days ".tra("days").", $hours ".tra("hours").", $mins ".tra("minutes")." ".tra("and")." $secs ".tra("seconds")." $data"; return $ret; } -/****************************************************************************** -The code below is from the deprecated COUNTDOWN plugin. All comments and the help routines have been removed. - StarRider -function wikiplugin_countdown($data, $params) { - extract ($params); - if (!isset($enddate)) { - return ("<b>COUNTDOWN: Missing 'enddate' parameter for plugin</b><br/>"); - } - if (isset($localtime) && $localtime == 'on') - $tz = $_COOKIE['tz_offset']; - else - $tz = 0; - $now = strtotime ("now") + $tz; - $then = strtotime ($enddate); - $difference = $then - $now; - $num = $difference/86400; - $days = intval($num); - $num2 = ($num - $days)*24; - $hours = intval($num2); - $num3 = ($num2 - $hours)*60; - $mins = intval($num3); - $num4 = ($num3 - $mins)*60; - $secs = intval($num4); - $ret = "$days ".tra("days").", $hours ".tra("hours").", $mins ".tra("minutes")." ".tra("and")." $secs ".tra("seconds")." $data"; - return $ret; -} -*/ ?> diff --git a/plugins/data.example.php b/plugins/data.example.php index 603a92c..d7f210b 100644 --- a/plugins/data.example.php +++ b/plugins/data.example.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.5 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,26 +13,46 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author: StarRider <starrrider@users.sourceforge.net> +// | Note: A plugin with this name did exist as a TikiWiki Plugin +// | This is not that plugin. // +----------------------------------------------------------------------+ -// $Id: data.example.php,v 1.4 2005/06/20 07:27:12 lsces Exp $ -// Initialization +// $Id: data.example.php,v 1.5 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAEXAMPLE', 'dataexample' ); +// NOTE: The GUID is used as a link to a help page on bitweaver.org +// Please be sure to create this page when the plugin is created. +// In this case - the pagename should be "DataPluginExample" + global $gLibertySystem; $pluginParams = array ( 'tag' => 'EXAMPLE', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => FALSE, // Make this TRUE if the plugin needs to operate on free form text 'load_function' => 'data_example', // Points to the Load Function 'title' => 'Example', // Name of the Plugin + 'help_page' => 'DataPluginExample', // Name of Help Page on Bitweaver.org 'description' => tra("This plugin is an example to show how plugins operate. It can also function as a template for the creation of new plugins since it contains a lot of spare code and explanations about how - and when - they should be used."), // What it does 'help_function' => 'data_example_help', // Points to the Help Function - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // This is a URL to a page on bitweaver.Org for additional information about the plugin - if it exists 'syntax' => "{EXAMPLE p1= p2= }", // A listing of parameters 'plugin_type' => DATA_PLUGIN // Don't Touch ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAEXAMPLE, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAEXAMPLE ); +/**************** Lets talk about what all of this means. +The GUID ----> define( 'PLUGIN_GUID_DATAEXAMPLE', 'dataexample' ); <------- Line 17 +The GUID does several thing. First - it identifies the plugin to the Liberty System so that it can be found +Second - The GUID (in this case 'dataexample') is used as a link to a help page on bitweaver.org +The pagename should be "DataPluginExample" +// Please be sure to create this page when the plugin is created. +*/ + + + + // Help Function function data_example_help() { // Specified by $pluginParams['help_function'] $help = @@ -46,19 +71,32 @@ function data_example_help() { // Specified by $pluginParams['help_function'] .'<td>p2</td>' .'<td>' . tra( "anything") . '<br />' . tra("(optional)") . '</td>' .'<td>' . tra( "The second parameter. There is no Default") . '</td>' -// At times there is more reference data available than the Help Function should display -// When this happens - provide a link in the Help Function as shown below -// This adds a link (in a new window - so the user is not taken from his work) to a listing of ISO Country Codes + +// At times there is more reference data available than the Help Function can readilly display +// When this happens - we provide a link in the Help Function. Each of the following snippets +// Creates a link that opens a new window (so the user is not taken from his work) - HTML Compliant + +// This creates a link for ISO Country Codes /* . tra("<br /><strong>Note:</strong> 2-Digit ISO Country Codes are available from ") - . "<a class='wiki' target=" . '"_blank"' . " href=http://www.bcpl.net/~j1m5path/isocodes-table.html>" . tra("ISO Country Codes</a> ") + . '<a href="http://www.bcpl.net/~j1m5path/isocodes-table.html" title="Launch BCPL.net in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "ISO Country Codes" ) . '</a>' */ -// This adds 2 links (in a new window - so the user is not taken from his work) to a bitweaver.org Page or to PageTutor.com's Color Picker II -/* . tra("<strong>Note:</strong> Browser Safe Colornames are available on the ") - . "<a class='wiki' target=" . '"_blank"' . " href=http://www.bitweaver.org/wiki/index.php?page=Web-Safe+HTML+Colors>" . tra("bitweaver Web Site</a> ") - . tra("Another useful site for obtaining HTML colors is ") . "<a class='wiki' target=" . '"_blank"' . " href='http://www.pagetutor.com/pagetutor/makapage/picker/'>" - . tra("The Color Picker II</a>"); + +// This creates 2 links / 1- to a BitWeaver.org Page 2- to PageTutor.com's Color Picker II +/* + . tra("<strong>Note:</strong> Browser Safe Colornames are available on the ") + . '<a href="http://www.bitweaver.org/wiki/index.php?page=Web-Safe+HTML+Colors" title="Launch BitWeaver.Org in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "BitWeaver Web Site" ) . '</a>' + . tra(" Another useful site for obtaining HTML colors is ") + . '<a href="http://www.pagetutor.com/pagetutor/makapage/picker" title="Launch PageTutor.com in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "The Color Picker II" ) . '</a>'; +*/ + +// This creates a link to the user's site to get BitWeaver's Content ID Numbers +/* + . tra("This a Numeric Content Id. This allows blog posts, images, wiki pages . . . (and more) to be added.") + . tra("<br /><strong>Note 1:</strong> A listing of Content Id's can be found ") + . '<a href="'.LIBERTY_PKG_URL.'list_content.php" title="Launch BitWeaver Content Browser in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "Here" ) . '</a>' */ + .'</tr>' .'</table>' . tra("Example: ") . "{EXAMPLE p1='7' p2='8' }<br />" @@ -68,18 +106,22 @@ function data_example_help() { // Specified by $pluginParams['help_function'] // Load Function function data_example($data, $params) { // Specified by $pluginParams['load_function'] - extract ($params); -// Use this if you have a Manditory Parameter + extract ($params); // This extracts any parameter and creates a variable with the same name + +// Use this if you need to a Manditory Parameter if (!isset($p1) ) { // The Manditory Parameter is missing $ret = tra("The parameter ") . "__p1__" . tra(" was missing from the plugin ") . "__~np~{EXAMPLE}~/np~__."; $ret.= data_example_help(); return $ret; } + // Of course - any Manditory Parameter needs to be tested to see if it is valid - and provide an error message if it isn't if( $p1 == 5) { - $ret = tra("__Error__ - The plugin ") . "__~np~{EXAMPLE}~/np~__" . tra(" was given the parameter ") . "p1=$p1" . tra(" which is not valid."); + $ret = '<strong>Error</strong> ' . tra("- The plugin ") . '<strong>~np~{EXAMPLE}~/np~</strong>' . tra(" was given the parameter ") . '<strong>p1=' . $p1 . '</strong> ' . tra("which is not valid."); return $ret; } + +// Some plugin are designed to opperate with a lot of text. To do this the 'requires_pair' should be set to TRUE // Use this if the plugin needs to operate on text - the 'requires_pair' should be set to TRUE - so the text will be between {plugin()} Blocks {plugin} if (!isset($data)) { // There is no data between the Plugin Blocks $ret = tra("__Error__ - There was no data between the ") . "__~np~{EXAMPLE}~/np~__" . tra(" blocks for the plugin to operate on."); diff --git a/plugins/data.flash.php b/plugins/data.flash.php index 28a46d1..d8a0dc3 100644 --- a/plugins/data.flash.php +++ b/plugins/data.flash.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,15 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_flash.php - see deprecated code below +// | Author (TikiWiki): Damian Parker <damosoft@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.flash.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.flash.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gBitSystem; if( $gBitSystem->isPackageActive( 'wiki' ) ) { // Do not include this Plugin if the Package is not active @@ -23,9 +32,9 @@ $pluginParams = array ( 'tag' => 'FLASH', 'requires_pair' => FALSE, 'load_function' => 'data_flash', 'title' => 'Flash', + 'help_page' => 'DataPluginFlash', 'description' => tra("This plugin allows a Flash SWF file to be displayed."), 'help_function' => 'data_flash_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{FLASH movie= width= height= quality= }", 'plugin_type' => DATA_PLUGIN ); @@ -83,23 +92,4 @@ function data_flash($data, $params) { return $asetup; } } -/****************************************************************************** -The code below is from the deprecated FLASH plugin. All comments and the help routines have been removed. - StarRider -// Wiki plugin to display a SWF file - by damian aka damosoft 30 March 2004 - -function wikiplugin_flash($data, $params) { - - extract ($params); - $w = (isset($width)) ? $width : ""; - $h = (isset($height)) ? $height : ""; - $q = (isset($quality)) ? $quality : "high"; - - $asetup = "<OBJECT CLASSID=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" WIDTH=\"$w\" HEIGHT=\"$h\">"; - $asetup .= "<PARAM NAME=\"movie\" VALUE=\"$movie\">"; - $asetup .= "<PARAM NAME=\"quality\" VALUE=\$q\">"; - $asetup .= "<embed src=\"$movie\" quality=\"$q\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"$w\" height=\"$h\"></embed></object>"; - - return $asetup; -} -*/ ?> diff --git a/plugins/data.freemind.php b/plugins/data.freemind.php index b685556..d03c718 100644 --- a/plugins/data.freemind.php +++ b/plugins/data.freemind.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,8 +13,12 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: Spiderr +// | Author: Southpaw <southpawz@users.sourceforge.net> // +----------------------------------------------------------------------+ + +/** + * definitions + */ global $gLibertySystem; define( 'PLUGIN_GUID_FREEMIND', 'datafreemind' ); @@ -18,10 +27,10 @@ $pluginParams = array ( 'tag' => 'MM', 'auto_activate' => TRUE, 'requires_pair' => FALSE, 'load_function' => 'data_freemind', - 'title' => 'FreeMind', + 'title' => 'FreeMind (MM)', + 'help_page' => 'DataPluginFreeMind', 'description' => tra("Displays a Freemind mindmap"), 'help_function' => 'data_freemind_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/DataPluginFreeMind", 'syntax' => "{MM src= height= width= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.gauge.php b/plugins/data.gauge.php index bba427a..f2614fc 100644 --- a/plugins/data.gauge.php +++ b/plugins/data.gauge.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.5 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,15 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_gauge.php - see deprecated code below +// | Author (TikiWiki): Luis Argerich <lrargerich@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.gauge.php,v 1.4 2005/06/20 07:27:12 lsces Exp $ -// Initialization +// $Id: data.gauge.php,v 1.5 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAGAUGE', 'datagauge' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'GAUGE', @@ -20,9 +29,9 @@ $pluginParams = array ( 'tag' => 'GAUGE', 'requires_pair' => TRUE, 'load_function' => 'data_gauge', 'title' => 'Gauge', + 'help_page' => 'DataPluginGauge', 'description' => tra("This plugin displays a graphical GAUGE."), 'help_function' => 'data_gauge_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on bitweaver.org exists 'syntax' => "{GAUGE color= bgcolor= max= value= size= perc= height= }" . tra("Description") . "{GAUGE}", 'plugin_type' => DATA_PLUGIN ); @@ -81,9 +90,9 @@ function data_gauge_help() { .'</table>' . tra("Example: ") . "{GAUGE color='red' bgcolor='blue' value='25' perc='True' }A Simple Gauge{GAUGE}" . '<br />' . tra("<strong>Note:</strong> Browser Safe Colornames are available on the ") - . "<a class='wiki' target=" . '"_blank"' . " href=http://www.bitweaver.org/wiki/index.php?page=Web-Safe+HTML+Colors>" . tra("bitweaver Web Site</a> ") - . tra("Another useful site for obtaining HTML colors is ") . "<a class='wiki' target=" . '"_blank"' . " href='http://www.pagetutor.com/pagetutor/makapage/picker/'>" - . tra("The Color Picker II</a>"); + . '<a href="http://www.bitweaver.org/wiki/index.php?page=Web-Safe+HTML+Colors" title="Launch BitWeaver.Org in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "BitWeaver Web Site" ) . '</a>' + . tra(" Another useful site for obtaining HTML colors is ") + . '<a href="http://www.pagetutor.com/pagetutor/makapage/picker" title="Launch PageTutor.com in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "The Color Picker II" ) . '</a>'; return $help; } @@ -125,45 +134,4 @@ function data_gauge($data, $params) { $html .= "</table>"; return $html; } -/****************************************************************************** -The code below is from the deprecated GAUGE plugin. All comments and the help routines have been removed. - StarRider - -function wikiplugin_gauge($data, $params) { - extract ($params); - if (!isset($max)) { - $max = 100; - } - if (!isset($value)) { - return tra("<b>ERROR</b> - Missing parameter. The ") . "__Gauge__" . tra(" plugin requires a value in the parameter ") . "__value__."; - } - if (!isset($size)) { - $size = 150; - } - if (!isset($bgcolor)) { - $bgcolor = '#0000FF'; - } - if (!isset($color)) { - $color = '#FF0000'; - } - if (!isset($perc)) { - $perc = false; - } - if ($perc) { - $perc = number_format($value / $max * 100, 2); - $perc = ' ' . $perc . '%'; - } else { - $perc = ''; - } - $h_size = floor($value / $max * $size); - if (!isset($height)) { - $height = 14; - } - $html = "<table border='0' cellpadding='0' cellspacing='0'><tr><td><table border='0' height='$height' cellpadding='0' cellspacing='0' width='$size' style='background-color:$bgcolor;'><tr><td style='background-color:$color;' width='$h_size'> </td><td> </td></tr></table></td><td>$perc</td></tr>"; - if (!empty($data)) { - $html .= "<tr><td colspan='2'><small>$data</small></td></tr>"; - } - $html .= "</table>"; - return $html; -} -*/ ?> diff --git a/plugins/data.include.php b/plugins/data.include.php index 8cd3dd5..e0ca907 100644 --- a/plugins/data.include.php +++ b/plugins/data.include.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,21 +13,25 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_include.php - see deprecated code below +// | Author (TikiWiki): Marc Laporte <marclaporte@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.include.php,v 1.2 2005/06/20 07:27:12 lsces Exp $ -// Initialization +// $Id: data.include.php,v 1.3 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAINCLUDE', 'datainclude' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'INCLUDE', - 'auto_activate' => FALSE, + 'auto_activate' => TRUE, 'requires_pair' => FALSE, 'load_function' => 'data_include', 'title' => 'Include', + 'help_page' => 'DataPluginInclude', 'description' => tra("This plugin is used to include the contents of one Wiki page in another Wiki page."), 'help_function' => 'data_include_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{INCLUDE content_id= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.lang.php b/plugins/data.lang.php index a8d36a4..4b6a219 100644 --- a/plugins/data.lang.php +++ b/plugins/data.lang.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,22 +13,27 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Sylvie Greverend <sylvieg@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_lang.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.lang.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.lang.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATALANG', 'datalang' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'LANG', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => TRUE, 'load_function' => 'data_lang', 'title' => 'Lang<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'Lang', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginLang', 'description' => tra("This plugin will attempt to translate the text between the ") . "{LANG}" . tra(" blocks to the current language. If the translation fails - nothing is displayed."), 'help_function' => 'data__lang_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{LANG lang= }" . tra("Text to be translated") . "{LANG}", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.maketoc.php b/plugins/data.maketoc.php index 912ac5b..1d07efe 100644 --- a/plugins/data.maketoc.php +++ b/plugins/data.maketoc.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -10,19 +15,23 @@ // +----------------------------------------------------------------------+ // | Author: xing <xing@synapse.plus.com> // +----------------------------------------------------------------------+ -// $Id: data.maketoc.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.maketoc.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAMAKETOC', 'datamaketoc' ); global $gLibertySystem; global $gContent; $pluginParams = array ( 'tag' => 'MAKETOC', - 'auto_activate' => FALSE, + 'auto_activate' => TRUE, 'requires_pair' => FALSE, 'load_function' => '', 'title' => 'MakeTOC', + 'help_page' => 'DataPluginMakeTOC', 'description' => tra("Will create a table of contents of the WikiPage based on the headings below."), 'help_function' => 'data_maketoc_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/DataPluginMaketoc", + 'syntax' => "{maketoc}", 'plugin_type' => DATA_PLUGIN ); @@ -195,7 +204,7 @@ function maketoc_create_list( $pTocHash, $pParams ) { $toplink = ''; } - $list = '<div class="tikitoc"><h3>'.( !empty( $pParams['title'] ) ? $pParams['title'] : tra( 'Page Contents' ) ).'</h3>'.$list.$toplink.'</div>'; + $list = '<div class="maketoc"><h3>'.( !empty( $pParams['title'] ) ? $pParams['title'] : tra( 'Page Contents' ) ).'</h3>'.$list.$toplink.'</div>'; return $list; } diff --git a/plugins/data.mapquest.php b/plugins/data.mapquest.php index dbde144..a6e5d1c 100644 --- a/plugins/data.mapquest.php +++ b/plugins/data.mapquest.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,13 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | New Code +// | Author: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.mapquest.php,v 1.2 2005/06/20 07:34:17 lsces Exp $ -// Initialization +// $Id: data.mapquest.php,v 1.3 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAMAPQUEST', 'datamapquest' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'MAPQUEST', @@ -20,9 +27,9 @@ $pluginParams = array ( 'tag' => 'MAPQUEST', 'requires_pair' => FALSE, 'load_function' => 'data_mapquest', 'title' => 'MapQuest', + 'help_page' => 'DataPluginMapQuest', 'description' => tra("Creates an Icon link to MapQuest and/or a link to a Specific Map based on an Address."), 'help_function' => 'data_mapquest_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on bitweaver.org exists 'syntax' => "{MAPQUEST icon= myicon= text= address= city= state= zip= country= title= style= }", 'plugin_type' => DATA_PLUGIN ); @@ -93,7 +100,7 @@ function data_mapquest_help() { .'<td>' . tra( "The Country (Uses 2-digit ISO Codes)") . tra("<br />The Default = ") . '<strong>US</strong>' . tra("<br /><strong>Note:</strong> 2-Digit ISO Country Codes are available from ") - . "<a class='wiki' target=" . '"_blank"' . " href=http://www.bcpl.net/~j1m5path/isocodes-table.html>" . tra("ISO Country Codes</a> ") + . '<a href="http://www.bcpl.net/~j1m5path/isocodes-table.html" title="Launch BCPL.net in New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">' . tra( "ISO Country Codes" ) . '</a>' .'</tr>' .'<tr class="odd">' .'<td>title</td>' @@ -113,7 +120,7 @@ function data_mapquest_help() { .'</td>' .'</tr>' .'</table>' - . tra("Example: ") . "{code source='php' num='on' }" . tra("Sorce Code Snippet") . "{code}"; + . tra("Example: ") . "{MAPQUEST icon=sm address='1730 Blake St' city=Denver state=CO zip=80202 }"; return $help; } @@ -121,32 +128,36 @@ function data_mapquest_help() { function data_mapquest( $data, $params ) { extract ($params); + $ret = '<a href="http://www.mapquest.com" title="Launch Map Quest in a New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">'; + + $text = isset($text) ? $text : 'Get Map'; // Set the Link Text $icon = isset($icon) ? $icon : "SM"; // Test for the MapQuest Icon switch(strtoupper($icon)) { case 'SM': - $ret = '<a class="wiki" target=' . '"_blank"' . ' href="http://www.mapquest.com/?cid=lfhplink"><img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_sm" alt="MapQuest"></a>'; + $ret = $ret . '<img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_sm" alt="MapQuest"></a><br/>'; break; case 'MED': - $ret = '<a class="wiki" target=' . '"_blank"' . ' href="http://www.mapquest.com/?cid=lfhplink"><img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_md" alt="MapQuest"></a>'; + $ret = $ret . '<img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_md" alt="MapQuest"></a><br/>'; break; case 'LG': - $ret = '<a class="wiki" target=' . '"_blank"' . ' href="http://www.mapquest.com/?cid=lfhplink"><img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_lg" alt="MapQuest"></a>'; + $ret = $ret . '<img border="0" src="http://cdn.mapquest.com/mqstyleguide/ws_wt_lg" alt="MapQuest"></a><br/>'; break; case 'NONE': $ret = ' '; break; } - $text = isset($text) ? $text : 'Get Map'; // Set the Link Text - - $map = '<a class="wiki" target=' . '"_blank"' . ' href="http://www.mapquest.com/maps/map.adp?cid=lfmaplink" alt="' . $text . '"'; // Set up Link to a Specific Map + $map = 'http://www.mapquest.com/maps/map.adp?'; $map = isset($address) ? $map . '&address=' . implode('+', explode(' ',$address)) : $map; $map = isset($city) ? $map . '&city=' . implode('+', explode(' ',$city)) : $map; $map = isset($state) ? $map . '&state=' . $state : $map; $map = isset($zip) ? $map . '&zipcode=' . $zip : $map; $map = isset($country) ? $map . '&country=' . $country : $map . '&country=US'; $map = isset($style) ? $map . '&style=' . $style : $map; - $map = isset($title) ? $map . '&title=' . implode('+', explode(' ',$title)) . '">' : $map . '">'; - + $map = isset($title) ? $map . '&title=' . implode('+', explode(' ',$title)) : $map; + $map = '"' . $map . '&cid=lfmaplink"'; + + $map = '<a href=' . $map . ' title="Launch Map Quest in a New Window" onkeypress="popUpWin(this.href,\'standard\',800,800);" onclick="popUpWin(this.href,\'standard\',800,800);return false;">'; + if (isset($myicon)) { // Test for the existance of MyIcon $ret = $map . '<img border="0" src="' . $myicon . '"></a>'; } else { diff --git a/plugins/data.module.php b/plugins/data.module.php index c3d1cb4..571f756 100644 --- a/plugins/data.module.php +++ b/plugins/data.module.php @@ -1,5 +1,24 @@ <?php -/* $Id: data.module.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ +// +----------------------------------------------------------------------+ +// | Copyright (c) 2004, bitweaver.org +// +----------------------------------------------------------------------+ +// | All Rights Reserved. See copyright.txt for details and a complete list of authors. +// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details +// | +// | For comments, please use phpdocu.sourceforge.net documentation standards!!! +// | -> see http://phpdocu.sourceforge.net/ +// +----------------------------------------------------------------------+ +// | Author (TikiWiki): Mose <mose@users.sourceforge.net> +// | Reworked for Bitweaver by: Christian Fowler <spiderr@users.sourceforge.net> +// +----------------------------------------------------------------------+ +// $Id: data.module.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** Displays a module inlined in page Parameters module name : module=>lambda @@ -21,23 +40,29 @@ like the tracker_id in the above example. * 'till another solution will be implemented :) */ +/** + * definitions + */ define( 'PLUGIN_GUID_DATAMODULE', 'datamodule' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'MODULE', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_datamodule', 'title' => 'Module', + 'help_page' => 'DataPluginModule', 'description' => tra("Display a module block in content"), 'help_function' => 'datamodule_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => '{MODULE module= align="right"}', 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATAMODULE, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATAMODULE ); +/** + * datamodule_help + */ function datamodule_help() { $back = tra("^__Parameter Syntax:__ ") . "~np~{MODULE" . tra("(key=>value)}~/np~\n"); $back.= tra("||__::key::__ | __::value::__ | __::Comments::__\n"); @@ -51,6 +76,9 @@ function datamodule_help() { return $back; } +/** + * data_datamodule + */ function data_datamodule($data, $params) { global $modlib, $cache_time, $smarty, $feature_directory, $ranklib, $feature_trackers, $bitdomain, $user, $feature_tasks, $feature_user_bookmarks, $bit_p_tasks, $bit_p_create_bookmarks, $imagegallib; diff --git a/plugins/data.mqdirections.php b/plugins/data.mqdirections.php index 23dd77a..aef0f7e 100644 --- a/plugins/data.mqdirections.php +++ b/plugins/data.mqdirections.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,13 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | New Code +// | Author: StarRider <starrrider@users.sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.mqdirections.php,v 1.2 2005/06/20 16:00:47 spiderr Exp $ -// Initialization +// $Id: data.mqdirections.php,v 1.3 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAMQDIR', 'datamqdir' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'MQDIR', @@ -20,9 +27,9 @@ $pluginParams = array ( 'tag' => 'MQDIR', 'requires_pair' => FALSE, 'load_function' => 'data_mqdir', 'title' => 'MapQuest Directions', + 'help_page' => 'DataPluginMapQuestDirections', 'description' => tra("Creates an Icon link to MapQuest with a form to get Directions from MapQuest based on a Destination Address."), 'help_function' => 'data_mqdir_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on BitWeaver.Org exists 'syntax' => "{MQDIR icon= myicon= text= address= city= state= zip= country= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.pluginhelp.php b/plugins/data.pluginhelp.php index c4a8cce..db138bb 100644 --- a/plugins/data.pluginhelp.php +++ b/plugins/data.pluginhelp.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,22 +13,26 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_pluginhelp.php - see deprecated code below +// | Author: StarRider <starrrider@sbcglobal.net> +// | Rewritten for bitweaver by Author +// | wikiplugin_pluginhelp.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.pluginhelp.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.pluginhelp.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAPLUGINHELP', 'datapluginhelp' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'PLUGINHELP', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_pluginhelp', 'title' => 'PluginHelp<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'PluginHelp', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginPluginHelp', 'description' => tra("This plugin will display the plugin's Help."), 'help_function' => 'data__pluginhelp_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{PLUGINHELP plugin= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.rss.php b/plugins/data.rss.php index 11368a5..1ab7d1c 100644 --- a/plugins/data.rss.php +++ b/plugins/data.rss.php @@ -1,4 +1,27 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ +// +----------------------------------------------------------------------+ +// | Copyright (c) 2004, bitweaver.org +// +----------------------------------------------------------------------+ +// | All Rights Reserved. See copyright.txt for details and a complete list of authors. +// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details +// | +// | For comments, please use phpdocu.sourceforge.net documentation standards!!! +// | -> see http://phpdocu.sourceforge.net/ +// +----------------------------------------------------------------------+ +// | Author (TikiWiki): Oliver Hertel <ohertel@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> +// +----------------------------------------------------------------------+ +// $Id: data.rss.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gLibertySystem; define( 'PLUGIN_GUID_RSS', 'datarss' ); @@ -9,9 +32,9 @@ $pluginParams = array ( 'tag' => 'RSS', 'requires_pair' => FALSE, 'load_function' => 'rss_parse_data', 'title' => 'RSS Feed', + 'help_page' => 'DataPluginRSS', 'description' => tra("Display RSS Feeds"), 'help_function' => 'rss_extended_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{RSS id= max= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.sf.php b/plugins/data.sf.php index 3a66eb8..2eb5a4a 100644 --- a/plugins/data.sf.php +++ b/plugins/data.sf.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,24 +13,28 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_sf.php - see deprecated code below +// | Author (TikiWiki): Mose <mose@sourceforge.net> +// | Reworked & Undoubtedly Screwed-Up for (Bitweaver) +// | by: StarRider <starrrider@sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.sf.php,v 1.2 2005/06/20 15:06:25 lsces Exp $ -// Initialization +// $Id: data.sf.php,v 1.3 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATASF', 'datasf' ); define('SF_CACHE',48); # in hours -define('DEFAULT_TAG','bugs'); +define('DEF_TAG','bugs'); global $gLibertySystem; $pluginParams = array ( 'tag' => 'SF', 'auto_activate' => TRUE, 'requires_pair' => FALSE, 'load_function' => 'data_sf', - 'title' => 'Sf', - 'description' => tra("This plugin automatically creates a link to the appropriate ))SourceForge(( object for ))bitweaver((."), + 'title' => 'SourceForge (SF)', + 'help_page' => 'DataPluginSourceForge', + 'description' => tra("Creates a link to SourceForge. Can be to the Bugs / RFEs / Patches / Support pages. Can also be to individual item.."), 'help_function' => 'data__sf_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists - 'syntax' => "{SF groupid= adit= aid= tag= }", + 'syntax' => "{SF tag= aid= groupid= atid= }", 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATASF, $pluginParams ); @@ -33,143 +42,84 @@ $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATASF ); // Help Function function data_sf_help() { - $back = tra("^__Parameter Syntax:__ ") . "~np~{SF" . tra("(key=>value)}~/np~\n"); - $back.= tra("||__::key::__ | __::value::__ | __::Comments::__\n"); - $back.= "::groupid::" . tra(" | ::number:: | every ))SourceForge(( project has one. This identifies the project and can be found in the URL.\n"); - $back.= "::adit::" . tra(" | ::number:: | is number identifies the section to be looked at. The choices are Bugs, Support, Patches & RFE's and are unique for each project.\n"); - $back.= "::aid::" . tra(" | ::number:: | is the Tracker in question. For a bug report labled ~034~__~091~ 123456 ~093~ I'm a bug!__~034~ - the ") . "aid" . tra(" number is 123456\n"); - $back.= "::tag::" . tra(" | ::name:: | is a short cut that allows the plugin to work automatically. The ") . "groupid & adit" . tra(" are supplied if these ") . "tags" . tra(" are used: ") . "__bugs / rfe / patches / support__" . tra(" are for ))bitweaver(( - ") . "__twbugs / twrfe / twpatches / twsupport__" . tra(" are for ))TikiWiki(( - ") . "__jgbugs / jgsupport / jgrfe__" . tra(" are for JGraph.||^"); - $back.= tra("^__Example:__ ") . "~np~{SF(groupid=>141359,adit=>749177,aid=>928215)}~/np~\n"; - $back.= tra("This is a ))bitweaver(( bug report named ~034~Lost in Space - errrr - bitweaver~034~^"); - return $back; -} - -function get_artifact_label($gid,$atid,$aid,$reload=false) { - $agent = $_SERVER['HTTP_USER_AGENT']; - $cachefile = TEMP_PKG_PATH."cache/".$bitdomain."sftrackers.cache.$gid.$atid.$aid"; - $cachelimit = time() - 60*60*SF_CACHE; - $url = "http://sourceforge.net/tracker/index.php?func=detail&aid=$aid&group_id=$gid&atid=$atid"; - if (!is_file($cachefile)) $reload = true; - $back = false; - if ($reload or (filemtime($cachefile) < $cachelimit)) { - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_USERAGENT, $agent); - curl_setopt($ch, CURLOPT_REFERER, $url); - $buffer = curl_exec ($ch); - curl_close ($ch); - if (preg_match("/<title>[^-]*-([^<]*)<\/title>/i",$buffer,$match)) { - $fp = fopen($cachefile,"wb"); - fputs($fp,$match[1]); - fclose($fp); - } elseif (is_file($cachefile)) { - $fp = fopen($cachefile,"rb"); - $back = fgets($fp); - fclose($fp); - } - } else { - $fp = fopen($cachefile,"rb"); - $back = fgets($fp,4096); - fclose($fp); - } - return $back; + $help = + '<table class="data help">' + .'<tr>' + .'<th>' . tra( "Key" ) . '</th>' + .'<th>' . tra( "Type" ) . '</th>' + .'<th>' . tra( "Comments" ) . '</th>' + .'</tr>' + .'<tr class="odd">' + .'<td>tag</td>' + .'<td>' . tra( "string") . '<br />' . tra("(optional)") . '</td>' + .'<td>' . tra( "The") . ' <strong>tag</strong> ' . tra("is a short-cut that allows you to use this plugin without having to look up the SourceForge") + .' <strong>groupid or adit</strong> ' . tra("numbers for specific projects.") + .'</br>' . tra("Possible values for BitWeaver are:") . '<strong>bugs / rfe / patches / support</strong>' + .'</br>' . tra("Possible values for TikiWiki are:") . '<strong>twbugs / twrfe / twpatches / twsupport</strong>' + .'</br>' . tra("Possible values for JGraph are:") . '<strong>jgbugs / jgrfe / jgsupport</strong>' + .'</br>' . tra("Possible values for PhpBB are:") . '<strong>pbbrfe</strong></td>' + .'</tr>' + .'<tr class="even">' + .'<td>aid</td>' + .'<td>' . tra( "string") . '<br />' . tra("(optional)") . '</td>' + .'<td>' . tra( "By supplying an") . ' <strong>aid</strong> ' . tra("value - the link will be to a specific Bug/RFE/Patch/ or /Support item.") + .tra(" If not given - the link will be to the index page for the project in question.") . '</td>' + .'</tr>' + .'<tr class="odd">' + .'<td>groupid</td>' + .'<td>' . tra( "string") . '<br />' . tra("(optional)") . '</td>' + .'<td>' . tra( "Every SourceForge project has an") . ' <strong>groupid</strong> ' . tra(". This number can be aquired by looking at the URLwhen looking at the project.") . '</td>' + .'</tr>' + .'<tr class="even">' + .'<td>atid</td>' + .'<td>' . tra( "string") . '<br />' . tra("(optional)") . '</td>' + .'<td>' . tra( "Only") . ' <strong>Tracker</strong> ' . tra("pages on SourceForge used a") . ' <strong>adit</strong> ' + .tra("number. These pages are: Bugs / RFE / Patches / and ") . '<strong>3</strong></td>' + .'</tr>' + .'</table>' + . tra("Example: ") . "{SF tag=bugs } - Link to BitWeaver's Bug Index Page<br />" + . tra("Example: ") . "{SF tag=bugs aid=1226624 } - Link to a BitWeaver Bug<br />" + . tra("Example: ") . "{SF groupid=141358 atid=749176 aid=1226624 } - Same as Last Example only done the hard way"; + return $help; } // Load Function function data_sf($data, $params) { # customize that (or extract it in a db) - $sftags['bugs'] = array('101599','630083'); - $sftags['rfe'] = array('101599','630086'); - $sftags['patches'] = array('101599','630085'); - $sftags['support'] = array('101599','630084'); - $sftags['twbugs'] = array('64258','506846'); - $sftags['twrfe'] = array('64258','506849'); - $sftags['twpatches'] = array('64258','506848'); - $sftags['twsupport'] = array('64258','506847'); - $sftags['jgbugs'] = array('43118','435210'); - $sftags['jgsupport'] = array('43118','435211'); - $sftags['jgrfe'] = array('43118','435213'); + // [tag] = array( groupid , atid , ProjectName , TrackerName , IndexName ) +// BitWeaver ****************************************************** + $sftags['bugs'] = array('141358','749176','BitWeaver',' Bug #',' Bug Index'); + $sftags['rfe'] = array('141358','749179','BitWeaver',' RFE #',' RFE Index'); + $sftags['patches'] = array('141358','749178','BitWeaver',' Patch #',' Patch Index'); + $sftags['support'] = array('141358','749177','BitWeaver',' Support #',' Support Index'); +// TikiWiki ****************************************************** + $sftags['twbugs'] = array('64258','506846','TikiWiki',' Bug #',' Bug Index'); + $sftags['twrfe'] = array('64258','506849','TikiWiki',' RFE #',' RFE Index'); + $sftags['twpatches'] = array('64258','506848','TikiWiki',' Patch #',' Patch Index'); + $sftags['twsupport'] = array('64258','506847','TikiWiki',' Support #',' Support Index'); +// JGraph ****************************************************** + $sftags['jgbugs'] = array('43118','435210','JGraph',' Bug #',' Bug Index'); + $sftags['jgrfe'] = array('43118','435213','JGraph',' RFE #',' RFE Index'); + $sftags['jgsupport'] = array('43118','435211','JGraph',' Support #',' Support Index'); +// JGraph ****************************************************** + $sftags['pbbrfe'] = array('7885','58021','PhpBB',' Bug #',' Bug Index'); + extract ($params); - if (isset($tag) and isset($sftags["$tag"]) and is_array($sftags["$tag"])) { - list($sf_group_id,$sf_atid) = $sftags["$tag"]; - } else { - $sf_group_id = (isset($groupid)) ? "$groupid" : $sftags[DEFAULT_TAG][0]; - $sf_atid = (isset($atid)) ? "$atid" : $sftags[DEFAULT_TAG][1]; - $tag = DEFAULT_TAG; - } - if (!isset($aid)) { - //return "__please use (aid=>xxx) as parameters__"; - return "<b>please use (aid=>xxx) as parameters</b>"; - } - $label = get_artifact_label($sf_group_id,$sf_atid,$aid); - //$back = "[http://sf.net/tracker/index.php?func=detail&aid=$aid&group_id=$sf_group_id&atid=$sf_atid|$tag:#$aid: $label|nocache]"; - $back = "<a href='http://sf.net/tracker/index.php?func=detail&aid=$aid&group_id=$sf_group_id&atid=$sf_atid' target='_blank' title='$tag:#$aid' class='wiki'>$label</a>"; - return $back; -} -/****************************************************************************** -The code below is from the deprecated SF plugin. All comments and the help routines have been removed. - StarRider -define('SF_CACHE',48); # in hours -define('DEFAULT_TAG','bugs'); + $tag = (isset($tag)) ? strtolower($tag) : ' '; // Just to be sure no caps + if (isset($sftags["$tag"]) and (is_array($sftags["$tag"])) ) { // is $tag in the array + list($groupid,$atid,$proj,$tag1,$tag2) = $sftags["$tag"]; + $tag = (isset($aid)) ? $proj . $tag1 . $aid : $proj . $tag2; + } else { // So their must be doing it the hard way + if ((!isset($groupid)) or (!isset($atid))) { // If not given set $group_id & $atid to default + list($groupid,$atid,$proj,$tag1,$tag2) = $sftags[DEF_TAG]; + $tag = (isset($aid)) ? $proj . $tag1 . $aid : $proj . $tag2; + } else { // Both groupid & atid are present / but project is unknown - so + $tag = (isset($aid)) ? 'Unknown Project / ID #' . $aid : 'Unknown Project Index Page'; + } } + $url = (isset($aid)) ? 'http://sourceforge.net/tracker/index.php?func=detail&aid=' . $aid . '&' : 'http://sourceforge.net/tracker/?'; + $url = $url . 'group_id=' . $groupid . '&atid=' . $atid; -function get_artifact_label($gid,$atid,$aid,$reload=false) { - $agent = $_SERVER['HTTP_USER_AGENT']; - $cachefile = TEMP_PKG_PATH."cache/".$bitdomain."sftrackers.cache.$gid.$atid.$aid"; - $cachelimit = time() - 60*60*SF_CACHE; - $url = "http://sourceforge.net/tracker/index.php?func=detail&aid=$aid&group_id=$gid&atid=$atid"; - if (!is_file($cachefile)) $reload = true; - $back = false; - if ($reload or (filemtime($cachefile) < $cachelimit)) { - $ch = curl_init($url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_USERAGENT, $agent); - curl_setopt($ch, CURLOPT_REFERER, $url); - $buffer = curl_exec ($ch); - curl_close ($ch); - if (preg_match("/<title>[^-]*-([^<]*)<\/title>/i",$buffer,$match)) { - $fp = fopen($cachefile,"wb"); - fputs($fp,$match[1]); - fclose($fp); - } elseif (is_file($cachefile)) { - $fp = fopen($cachefile,"rb"); - $back = fgets($fp); - fclose($fp); - } - } else { - $fp = fopen($cachefile,"rb"); - $back = fgets($fp,4096); - fclose($fp); - } - return $back; -} -function wikiplugin_sf($data, $params) { - # customize that (or extract it in a db) - $sftags['bugs'] = array('101599','630083'); - $sftags['rfe'] = array('101599','630086'); - $sftags['patches'] = array('101599','630085'); - $sftags['support'] = array('101599','630084'); - $sftags['twbugs'] = array('64258','506846'); - $sftags['twrfe'] = array('64258','506849'); - $sftags['twpatches'] = array('64258','506848'); - $sftags['twsupport'] = array('64258','506847'); - $sftags['jgbugs'] = array('43118','435210'); - $sftags['jgsupport'] = array('43118','435211'); - $sftags['jgrfe'] = array('43118','435213'); - extract ($params); - if (isset($tag) and isset($sftags["$tag"]) and is_array($sftags["$tag"])) { - list($sf_group_id,$sf_atid) = $sftags["$tag"]; - } else { - $sf_group_id = (isset($groupid)) ? "$groupid" : $sftags[DEFAULT_TAG][0]; - $sf_atid = (isset($atid)) ? "$atid" : $sftags[DEFAULT_TAG][1]; - $tag = DEFAULT_TAG; - } - if (!isset($aid)) { - //return "__please use (aid=>xxx) as parameters__"; - return "<b>please use (aid=>xxx) as parameters</b>"; - } - $label = get_artifact_label($sf_group_id,$sf_atid,$aid); - //$back = "[http://sf.net/tracker/index.php?func=detail&aid=$aid&group_id=$sf_group_id&atid=$sf_atid|$tag:#$aid: $label|nocache]"; - $back = "<a href='http://sf.net/tracker/index.php?func=detail&aid=$aid&group_id=$sf_group_id&atid=$sf_atid' target='_blank' title='$tag:#$aid' class='wiki'>$label</a>"; - return $back; + $ret = '<a href="' . $url . '" title="Launch Source Forge.net in a New Window" onkeypress="popUpWin(this.href,\'full\',800,800);" onclick="popUpWin(this.href,\'full\',800,800);return false;">' . $tag . '</a>'; + + return $ret; } -*/ -?> diff --git a/plugins/data.sort.php b/plugins/data.sort.php index e5fc279..59da6a4 100644 --- a/plugins/data.sort.php +++ b/plugins/data.sort.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,28 +13,34 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// | Reworked from: wikiplugin_sort.php - see deprecated code below +// | Author (TikiWiki): Oliver Hertel <ohertel@users.sourceforge.net> +// | Reworked & Undoubtedly Screwed-Up for (Bitweaver) +// | by: StarRider <starrrider@sourceforge.net> // +----------------------------------------------------------------------+ -// $Id: data.sort.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.sort.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATASORT', 'datasort' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'SORT', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => TRUE, 'load_function' => 'data_sort', 'title' => 'Sort', + 'help_page' => 'DataPluginSort', 'description' => tra("This plugin sorts operates on lines of text - not the text in the lines. Every line between the ") . "~np~{SORT}~/np~" . tra(" blocks - including the lines the blocks are on - is sorted."), 'help_function' => 'data__sort_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{SORT sort= }" . tra("Lines to be sorted") . "{SORT}", 'plugin_type' => DATA_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_DATASORT, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATASORT ); -// Help Function +/** + * Help Function + */ function data_sort_help() { $back = tra("^__Parameter Syntax:__ ") . "~np~{SORT" . tra("(key=>value)}~/np~\n"); $back.= tra("||__::key::__ | __::value::__ | __::Comments::__\n"); @@ -39,7 +50,9 @@ function data_sort_help() { return $back; } -// Load Function +/** + * Load Function + */ function data_sort($data, $params) { extract ($params); $sort = (isset($sort)) ? $sort : "asc"; @@ -62,30 +75,4 @@ function data_sort($data, $params) { $data = trim($data); return $data; } -/****************************************************************************** -The code below is from the deprecated SORT plugin. All comments and the help routines have been removed. - StarRider - -function wikiplugin_sort($data, $params) { - extract ($params); - $sort = (isset($sort)) ? $sort : "asc"; - $lines = explode("\n", $data); // separate lines into array - // $lines = array_filter( $lines, "chop" ); // remove \n - srand ((float)microtime() * 1000000); // needed for shuffle; - if ($sort == "asc") { - sort ($lines); - } else if ($sort == "desc") { - rsort ($lines); - } else if ($sort == "reverse") { - $lines = array_reverse($lines); - } else if ($sort == "shuffle") { - shuffle ($lines); - } - reset ($lines); - if (is_array($lines)) { - $data = implode("\n", $lines); - } - $data = trim($data); - return $data; -} -*/ ?> diff --git a/plugins/data.split.php b/plugins/data.split.php index 3c40ad7..5e8d55d 100644 --- a/plugins/data.split.php +++ b/plugins/data.split.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,22 +13,27 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Luis Argerich <lrargerich@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_split.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.split.php,v 1.1 2005/06/19 04:55:48 bitweaver Exp $ -// Initialization +// $Id: data.split.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATASPLIT', 'datasplit' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'SPLIT', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => TRUE, 'load_function' => 'data_split', 'title' => 'Split<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'Split', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginSplit', 'description' => tra("This plugin is used to split a page in two or more columns using __-~045~-__ as a seperator."), 'help_function' => 'data__split_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{SPLIT joincols= fixedsize= }{SPLIT}", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.titlesearch.php b/plugins/data.titlesearch.php index 45fc07f..0aa7e42 100644 --- a/plugins/data.titlesearch.php +++ b/plugins/data.titlesearch.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,22 +13,27 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Claudio Bustos <cdx@users.sourceforge.net> +// | Reworked for Bitweaver (& Undoubtedly Screwed-Up) +// | by: StarRider <starrrider@users.sourceforge.net> // | Reworked from: wikiplugin_titlesearch.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.titlesearch.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.titlesearch.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATATITLESEARCH', 'datatitlesearch' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'TITLESEARCH', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_titlesearch', 'title' => 'TitleSearch<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'TitleSearch', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginTitleSearch', 'description' => tra("This plugin search the titles of all pages in this wiki."), 'help_function' => 'data__titlesearch_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{TITLESEARCH search= info= exclude= noheader= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.toc.php b/plugins/data.toc.php index d6cee24..9afdcb9 100644 --- a/plugins/data.toc.php +++ b/plugins/data.toc.php @@ -1,4 +1,25 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ +// +----------------------------------------------------------------------+ +// | Copyright (c) 2004, bitweaver.org +// +----------------------------------------------------------------------+ +// | All Rights Reserved. See copyright.txt for details and a complete list of authors. +// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details +// | +// | For comments, please use phpdocu.sourceforge.net documentation standards!!! +// | -> see http://phpdocu.sourceforge.net/ +// +----------------------------------------------------------------------+ +// | Author: Christian Fowler <spiderr@users.sourceforge.net> +// +----------------------------------------------------------------------+ +// $Id: data.toc.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ global $gLibertySystem; define( 'PLUGIN_GUID_TOC', 'datatoc' ); @@ -9,9 +30,9 @@ $pluginParams = array ( 'tag' => 'toc', 'requires_pair' => FALSE, 'load_function' => 'toc_parse_data', 'title' => 'Table Of Contents', + 'help_page' => 'DataPluginTOC', 'description' => tra("Display a Table Of Contents for Structures"), 'help_function' => 'toc_extended_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => '{TOC sturcture_id= }', 'plugin_type' => DATA_PLUGIN ); @@ -46,5 +67,4 @@ function toc_parse_data( $data, $params ) { return $repl; } - ?> diff --git a/plugins/data.tp.php b/plugins/data.tp.php deleted file mode 100644 index f268c4f..0000000 --- a/plugins/data.tp.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -// +----------------------------------------------------------------------+ -// | Copyright (c) 2004, bitweaver.org -// +----------------------------------------------------------------------+ -// | All Rights Reserved. See copyright.txt for details and a complete list of authors. -// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details -// | -// | For comments, please use phpdocu.sourceforge.net documentation standards!!! -// | -> see http://phpdocu.sourceforge.net/ -// +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> -// +----------------------------------------------------------------------+ -// -// $Id: data.tp.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization -global $gBitSystem; - -define( 'PLUGIN_GUID_DATATP', 'datatp' ); - -global $gLibertySystem; -$pluginParams = array ( 'tag' => 'TP', - 'auto_activate' => TRUE, - 'requires_pair' => FALSE, - 'load_function' => 'datatp', - 'title' => 'TestParms', - 'description' => tra("This plugin will display the parameters passed to it."), - 'help_function' => 'datatp_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists - 'syntax' => "~np~{TP(p1= ,p2= ,p3= )}~/np~", - 'plugin_type' => DATA_PLUGIN - ); -$gLibertySystem->registerPlugin( PLUGIN_GUID_DATATP, $pluginParams ); -$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATATP ); - -function datatp_help() { - $back = tra("^__Parameter Syntax:__ ") . "~np~{TP(Key=value)}~/np~\n"; - $back.= tra("||__::key::__ | __::value::__ | __::Comments::__\n"); - $back.= "::p1::" . tra(" | ::Anything:: | Any parameter. \n"); - $back.= "::p2::" . tra(" | ::Anything:: | Any parameter. \n"); - $back.= "::p3::" . tra(" | ::Anything:: | Any parameter. \n"); - $back.= tra("^__Example:__ ") . "~np~{TP(p1=AAAA, p2=BBBB, p3=CCCC)}~/np~^"; - return $back; -} - -function datatp($data, $params) { - $p1=''; - $p2=''; - $p3=''; - extract ($params); - $ret = "))TestParms Reporting:<br/> P1=" . $p1 . "<br/> P2=" . $p2 . "<br/> P3=" . $p3 . "\n(("; - return $ret; -} -?> diff --git a/plugins/data.translated.php b/plugins/data.translated.php index 1755b8a..a05cec4 100644 --- a/plugins/data.translated.php +++ b/plugins/data.translated.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,22 +13,27 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Mose <mose@users.sourceforge.net> +// | Reworked & Undoubtedly Screwed-Up for (Bitweaver) +// | by: StarRider <starrrider@sourceforge.net> // | Reworked from: wikiplugin_translated.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.translated.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.translated.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATATRANSLATED', 'datatranslated' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'TRANSLATED', - 'auto_activate' => TRUE, + 'auto_activate' => FALSE, 'requires_pair' => FALSE, 'load_function' => 'data_translated', 'title' => 'Translated<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'Translated', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginTranslated', 'description' => tra("This plugin is used to create a link to a page that contains a translation. The link can be shown as an Icon for the country or as an abreviation for the language."), 'help_function' => 'data__translated_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{TRANSLATED page= lang= flag= }", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.usercount.php b/plugins/data.usercount.php index 6703fa3..341be35 100644 --- a/plugins/data.usercount.php +++ b/plugins/data.usercount.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Damian Parker <damosoft@users.sourceforge.net> +// | Reworked & Undoubtedly Screwed-Up for (Bitweaver) +// | by: StarRider <starrrider@sourceforge.net> // | Reworked from: wikiplugin_usercount.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.usercount.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.usercount.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAUSERCOUNT', 'datausercount' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'USERCOUNT', @@ -21,9 +31,9 @@ $pluginParams = array ( 'tag' => 'USERCOUNT', 'load_function' => 'data_usercount', 'title' => 'UserCount<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'UserCount', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginUserCount', 'description' => tra("Will show the number of users. If a Group Name can be included to filter the Groups."), 'help_function' => 'data__usercount_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{USERCOUNT}Group Name{USERCOUNT}", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.userlist.php b/plugins/data.userlist.php index 3129df4..80a83f7 100644 --- a/plugins/data.userlist.php +++ b/plugins/data.userlist.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): sQuare +// | Reworked & Undoubtedly Screwed-Up for (Bitweaver) +// | by: StarRider <starrrider@sourceforge.net> // | Reworked from: wikiplugin_userlist.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.userlist.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.userlist.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAUSERLIST', 'datauserlist' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'USERLIST', @@ -21,9 +31,9 @@ $pluginParams = array ( 'tag' => 'USERLIST', 'load_function' => 'data_userlist', 'title' => 'UserList<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'UserList',, // and Remove the comment from the start of this line + 'help_page' => 'DataPluginUserList', 'description' => tra("This plugin will displays an alphabetically sorted list of registered users. A Group Name can be included to filter Groups to be listed."), 'help_function' => 'data__userlist_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{USERLIST num= userspage= alpha= total= email= }GroupName{USERLIST}", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/data.wikilist.php b/plugins/data.wikilist.php index fe32843..177fa37 100644 --- a/plugins/data.wikilist.php +++ b/plugins/data.wikilist.php @@ -1,4 +1,9 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_data + */ // +----------------------------------------------------------------------+ // | Copyright (c) 2004, bitweaver.org // +----------------------------------------------------------------------+ @@ -8,11 +13,16 @@ // | For comments, please use phpdocu.sourceforge.net documentation standards!!! // | -> see http://phpdocu.sourceforge.net/ // +----------------------------------------------------------------------+ -// | Author: StarRider <starrrider@sbcglobal.net> +// | Author (TikiWiki): Unknown +// | Reworked & Undoubtedly Screwed-Up for (Bitweaver) +// | by: StarRider <starrrider@sourceforge.net> // | Reworked from: wikiplugin_wikilist.php - see deprecated code below // +----------------------------------------------------------------------+ -// $Id: data.wikilist.php,v 1.1 2005/06/19 04:55:47 bitweaver Exp $ -// Initialization +// $Id: data.wikilist.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $ + +/** + * definitions + */ define( 'PLUGIN_GUID_DATAWIKILIST', 'datawikilist' ); global $gLibertySystem; $pluginParams = array ( 'tag' => 'WIKILIST', @@ -21,9 +31,9 @@ $pluginParams = array ( 'tag' => 'WIKILIST', 'load_function' => 'data_wikilist', 'title' => 'WikiList<strong> - This plugin is not yet functional.</strong>', // Remove this line when the plugin becomes operational // 'title' => 'WikiList', // and Remove the comment from the start of this line + 'help_page' => 'DataPluginWikiList', 'description' => tra("Displays an alphabetically sorted list of WikiPages"), 'help_function' => 'data__wikilist_help', - 'tp_helppage' => "http://www.bitweaver.org/wiki/index.php", // Update this URL when a page on TP.O exists 'syntax' => "{WIKILIST num= alpha= total= list= }Group Name{WIKILIST} ", 'plugin_type' => DATA_PLUGIN ); diff --git a/plugins/format.pearwiki.php b/plugins/format.pearwiki.php index 66f7889..e9d2fd8 100644 --- a/plugins/format.pearwiki.php +++ b/plugins/format.pearwiki.php @@ -1,4 +1,13 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_format + */ + +/** + * definitions + */ if( @include_once( 'Text/Wiki.php' ) ) { global $gLibertySystem; @@ -7,10 +16,11 @@ if( @include_once( 'Text/Wiki.php' ) ) { $pluginParams = array ( 'store_function' => 'pearwiki_save_data', 'load_function' => 'pearwiki_parse_data', 'verify_function' => 'pearwiki_verify_data', - 'auto_activate' => FALSE, + 'auto_activate' => TRUE, 'description' => 'Pear Wiki Syntax Format Parser. Requires Text_Wiki Pear extension. If you are running linux you can try running: su -c \'pear install Text_Wiki\'. More info <a href="http://wiki.ciaweb.net/yawiki/index.php?area=Text_Wiki&page=SamplePage">here</a>', 'edit_label' => 'Pear Text_Wiki Syntax', 'edit_field' => '<input type="radio" name="format_guid" value="'.PLUGIN_GUID_PEARWIKI.'"', + 'help_page' => 'PearWikiSyntax', 'plugin_type' => FORMAT_PLUGIN ); diff --git a/plugins/format.pearwiki_tiki.php b/plugins/format.pearwiki_tiki.php index b0ca442..294fcf8 100644 --- a/plugins/format.pearwiki_tiki.php +++ b/plugins/format.pearwiki_tiki.php @@ -1,4 +1,14 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_format + */ + + +/** + * definitions + */ if( @include_once( 'Text/Wiki.php' ) ) { global $gLibertySystem; @@ -7,10 +17,11 @@ if( @include_once( 'Text/Wiki.php' ) ) { $pluginParams = array ( 'store_function' => 'pearwiki_tiki_save_data', 'load_function' => 'pearwiki_tiki_parse_data', 'verify_function' => 'pearwiki_tiki_verify_data', - 'auto_activate' => FALSE, + 'auto_activate' => TRUE, 'description' => 'Pear Wiki Parser for TikiWiki Syntax. Requires Text_Wiki Pear extension. More info <a href="http://wiki.ciaweb.net/yawiki/index.php?area=Text_Wiki&page=SamplePage">here</a>', 'edit_label' => 'Tiki Wiki Syntax, parsed by Pear::Text_Wiki', 'edit_field' => '<input type="radio" name="format_guid" value="'.PLUGIN_GUID_PEARWIKI_TIKI.'"', + 'help_page' => 'TikiWikiSyntax', 'plugin_type' => FORMAT_PLUGIN ); diff --git a/plugins/format.tikihtml.php b/plugins/format.tikihtml.php index e25a079..2d11104 100644 --- a/plugins/format.tikihtml.php +++ b/plugins/format.tikihtml.php @@ -1,6 +1,14 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_format + */ global $gLibertySystem; +/** + * definitions + */ define( 'PLUGIN_GUID_BITHTML', 'bithtml' ); $pluginParams = array ( 'store_function' => 'bithtml_save_data', @@ -74,8 +82,13 @@ function bithtml_save_data( &$pParamHash ) { } function bithtml_parse_data( &$pData, &$pCommonObject ) { - parse_data_plugins( $pData, $foo, $bar, $empty ); + global $gLibertySystem; // eventually we should strip tags, maybe tikilink, or other things. + parse_data_plugins( $pData, $foo, $bar, $empty ); + // this function is called manually, since it processes the HTML code + if( preg_match( "/\{maketoc.*?\}/", $pData ) && @$gLibertySystem->mPlugins['datamaketoc']['is_active'] == 'y' ) { + $pData = data_maketoc( $pData ); + } return $pData; } diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php index 115b429..48eda85 100644 --- a/plugins/format.tikiwiki.php +++ b/plugins/format.tikiwiki.php @@ -1,10 +1,20 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + */ global $gLibertySystem; +/** + * definitions + */ define( 'PLUGIN_GUID_TIKIWIKI', 'tikiwiki' ); define( 'WIKI_WORDS_REGEX', '[A-z0-9]{2}[\w\d_\-]+[A-Z_][\w\d_\-]+[A-z0-9]+' ); - +/** + * @package Liberty + * @subpackage plugins_format + */ $pluginParams = array ( 'store_function' => 'tikiwiki_save_data', 'load_function' => 'tikiwiki_parse_data', 'verify_function' => 'tikiwiki_verify_data', @@ -13,11 +23,15 @@ $pluginParams = array ( 'store_function' => 'tikiwiki_save_data', 'description' => 'TikiWiki Syntax Format Parser', 'edit_label' => 'Tiki Wiki Syntax', 'edit_field' => '<input type="radio" name="format_guid" value="'.PLUGIN_GUID_TIKIWIKI.'"', + 'help_page' => 'TikiWikiSyntax', 'plugin_type' => FORMAT_PLUGIN ); $gLibertySystem->registerPlugin( PLUGIN_GUID_TIKIWIKI, $pluginParams ); +/** + * tikiwiki_save_data + */ function tikiwiki_save_data( &$pParamHash ) { static $parser; if( empty( $parser ) ) { @@ -66,6 +80,10 @@ function tikiwiki_parse_data( &$pData, &$pCommonObject ) { return $parser->parse_data( $pData, $pCommonObject ); } +/** + * @package Liberty + * @subpackage TikiWikiParser + */ class TikiWikiParser extends BitBase { var $mWikiWordRegex; var $mUseWikiWords; @@ -337,18 +355,18 @@ $this->debug(0); } function get_language($user = false) { - static $tikiLanguage = false; + static $bitLanguage = false; global $gBitUser, $gBitSystem; - if( empty( $tikiLanguage ) ) { + if( empty( $bitLanguage ) ) { if( $gBitUser->isValid() ) { - $tikiLanguage = $gBitUser->getPreference('tikiLanguage', 'en'); + $bitLanguage = $gBitUser->getPreference('bitLanguage', 'en'); } else { - $tikiLanguage = $this->getPreference('tikiLanguage', 'en'); + $bitLanguage = $this->getPreference('bitLanguage', 'en'); } } - return $tikiLanguage; + return $bitLanguage; } function get_locale($user = false) { @@ -653,7 +671,7 @@ $this->debug(0); } // Replace boxes - $data = preg_replace("/\^([^\^]+)\^/", "<div class=\"tikibox\">$1</div>", $data); + $data = preg_replace("/\^([^\^]+)\^/", "<div class=\"bitbox\">$1</div>", $data); // Replace colors ~~color:text~~ $data = preg_replace("/\~\~([^\:]+):([^\~]+)\~\~/", "<span style=\"color:$1;\">$2</span>", $data); // Replace background colors ++color:text++ @@ -895,7 +913,7 @@ $this->debug(0); if( $gBitSystem->isFeatureActive( 'cachepages') && $pCommonObject->isCached( $link ) ) { //use of urlencode for using cached versions of dynamic sites - $cosa = "<a class=\"tikicache\" href=\"".KERNEL_PKG_URL."view_cache.php?url=".urlencode($link)."\">(cache)</a>"; + $cosa = "<a class=\"bitcache\" href=\"".KERNEL_PKG_URL."view_cache.php?url=".urlencode($link)."\">(cache)</a>"; //$link2 = str_replace("/","\/",$link); //$link2 = str_replace("?","\?",$link2); @@ -944,7 +962,7 @@ $this->debug(0); } for ($i = 0; $i < count($tables[0]); $i++) { - $repl = '<table class="tikitable">'; + $repl = '<table class="bittable">'; for ($j = 0; $j < count($cols[$i]); $j++) { $ncols = count($cols[$i][$j]); @@ -991,7 +1009,7 @@ $this->debug(0); } for ($i = 0; $i < count($tables[0]); $i++) { - $repl = '<table class="tikitable">'; + $repl = '<table class="bittable">'; for ($j = 0; $j < count($cols[$i]); $j++) { $ncols = count($cols[$i][$j]); @@ -1078,7 +1096,7 @@ $this->debug(0); } // $line = trim($line); - $line = '<div class="tikibar"' . $align . '>' . substr($line, 2, strlen($line) - 4). '</div>'; + $line = '<div class="bitbar"' . $align . '>' . substr($line, 2, strlen($line) - 4). '</div>'; $data .= $line; // TODO: Case is handled ... no need to check other conditions // (it is apriory known all they false, moreover sometimes @@ -1089,7 +1107,7 @@ $this->debug(0); } // Replace old styled titlebars - if (strlen($line) != strlen($line = preg_replace("/-=(.+?)=-/", "<div class='tikibar'>$1</div>", $line))) { + if (strlen($line) != strlen($line = preg_replace("/-=(.+?)=-/", "<div class='bitbar'>$1</div>", $line))) { $data .= $line; continue; } @@ -1129,7 +1147,7 @@ $this->debug(0); // Segundo intento reemplazar los [link] comunes $line = preg_replace("/\[([^\]]+)\]/", "<a $class href='$1'>$1</a>", $line); - $line = preg_replace("/\-\=([^=]+)\=\-/", "<div class='tikibar'>$1</div>", $line); + $line = preg_replace("/\-\=([^=]+)\=\-/", "<div class='bitbar'>$1</div>", $line); } // This line is parseable then we have to see what we have diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php index fe9a0ec..99bc875 100644 --- a/plugins/storage.bitfile.php +++ b/plugins/storage.bitfile.php @@ -1,6 +1,14 @@ <?php +/** + * @version $Revision: 1.3 $ + * @package Liberty + * @subpackage plugins_storage + */ global $gLibertySystem; +/** + * definitions + */ define( 'PLUGIN_GUID_BIT_FILES', 'bitfile' ); $pluginParams = array ( @@ -10,6 +18,7 @@ $pluginParams = array ( 'expunge_function' => 'bit_files_expunge', 'description' => 'Upload File To Server', 'plugin_type' => STORAGE_PLUGIN, + 'auto_activate' => TRUE, 'edit_label' => 'Upload File', 'edit_field' => '<input type="file" name="upload" size="40" />', 'edit_help' => 'This file will be uploaded to your personal storage area.<br />After selecting the file you want to upload, please return to the edit area and click the save button.' diff --git a/plugins/storage.lulu.php b/plugins/storage.lulu.php index 3e2ff02..b7e0ebe 100644 --- a/plugins/storage.lulu.php +++ b/plugins/storage.lulu.php @@ -1,6 +1,14 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_storage + */ global $gLibertySystem; +/** + * definitions + */ define( 'PLUGIN_GUID_LULU', 'lulu' ); $pluginParams = array ( @@ -10,6 +18,7 @@ $pluginParams = array ( 'verify_function' => 'lulu_verify', 'description' => 'Lulu Content ID', 'plugin_type' => STORAGE_PLUGIN, + 'auto_activate' => FALSE, 'edit_label' => 'Enter <a href="http://www.lulu.com">Lulu</a> Content ID', 'edit_field' => '<input type="text" name="STORAGE['.PLUGIN_GUID_LULU.']" size="40" /> <a href="http://www.lulu.com">{biticon ipackage=liberty iname=lulu iexplain=lulu}</a>', diff --git a/plugins/storage.pbase.php b/plugins/storage.pbase.php index cfa5672..6c70cdb 100644 --- a/plugins/storage.pbase.php +++ b/plugins/storage.pbase.php @@ -1,6 +1,14 @@ <?php +/** + * @version $Revision: 1.2 $ + * @package Liberty + * @subpackage plugins_storage + */ global $gLibertySystem; +/** + * definitions + */ define( 'PLUGIN_GUID_PBASE', 'pbase' ); $pluginParams = array ( @@ -10,6 +18,7 @@ $pluginParams = array ( 'expunge_function' => 'pbase_expunge', 'description' => 'PBase Image ID', 'plugin_type' => STORAGE_PLUGIN, + 'auto_activate' => FALSE, 'edit_label' => 'Enter <a href="http://www.pbase.com">PBase</a> Image ID', 'edit_field' => '<input type="text" name="STORAGE['.PLUGIN_GUID_PBASE.']" size="40" /> <a href="http://www.pbase.com">{biticon ipackage=liberty iname=pbase iexplain=pbase}</a>', diff --git a/templates/admin_plugins.tpl b/templates/admin_plugins.tpl index ed0b884..b395ca4 100644 --- a/templates/admin_plugins.tpl +++ b/templates/admin_plugins.tpl @@ -33,7 +33,14 @@ {assign var=prev_type value=$plugin.plugin_type} <tr class="{cycle values="odd,even"}"> - <td><label for="{$guid}">{$plugin.plugin_description}</label></td> + <td> + {if $plugin.plugin_type eq 'data'} + <h3>{$plugin.title}</h3> + {/if} + <label for="{$guid}"> + {$plugin.plugin_description} + </label> + </td> {if $plugin.plugin_type eq 'format'} <td align="center">{if $plugin.is_active == 'y'}{html_radios values=$guid name="default_format" checked=$default_format}{/if}</td> {/if} diff --git a/templates/comments.tpl b/templates/comments.tpl index 7880f6f..fba694b 100644 --- a/templates/comments.tpl +++ b/templates/comments.tpl @@ -4,11 +4,24 @@ <div class="display comment"> <div class="header"> {if !( $post_comment_request || $post_comment_preview )} - <a name="bitcomments"></a> + <a name="editcomments"></a> {/if} - <h2>{tr}Comments{/tr}</h2> + <h2> + <a onclick="icntoggle('bitcomments');"> + {biticon ipackage=liberty iname="collapsed" id="bitcommentsimg" iexplain="folder"} {tr}Comments{/tr} + </a> + </h2> </div> +{/strip} + <script type="text/javascript"> + //<![CDATA[ + setfoldericonstate('bitcomments'); + document.write('<div id="bitcomments" style="display:{if $smarty.cookies.bitcomments eq 'o'}block{else}none{/if};">'); + //]]> + </script> +{strip} + <div class="body"> {formfeedback hash=$formfeedback} @@ -25,9 +38,9 @@ </div><!-- end .preview --> {/if} - {form action="`$comments_return_url`#bitcomments"} + {form action="`$comments_return_url`#editcomments"} {if $post_comment_request || $post_comment_preview} - <a name="bitcomments"></a> + <a name="editcomments"></a> {legend legend="Post Comment"} <input type="hidden" name="post_comment_reply_id" value="{$post_comment_reply_id}" /> <input type="hidden" name="post_comment_id" value="{$post_comment_id}" /> @@ -62,12 +75,18 @@ <input type="submit" name="post_comment_submit" value="{tr}post{/tr}"/> </div> {/legend} - {else} + {elseif $gBitUser->hasPermission( 'bit_p_post_comments' )} <div class="row"> <input type="submit" name="post_comment_request" value="{tr}Add Comment{/tr}" /> </div> {/if} {/form} </div><!-- end .body --> -</div><!-- end .comment --> + {/strip} + <script type="text/javascript"> + //<![CDATA[ + document.write('<\/div>'); + //]]> + </script> +</div><!-- end .comment --> diff --git a/templates/display_comment.tpl b/templates/display_comment.tpl index 468c2ad..1bf4d5c 100644 --- a/templates/display_comment.tpl +++ b/templates/display_comment.tpl @@ -1,18 +1,16 @@ {strip} <div style="margin-left: {math equation="level * marginIncrement" level=$comment.level marginIncrement=20}px"> - <div class="post"> + <div class="floaticon"> + {if $gBitUser->hasPermission( 'bit_p_post_comment' )}<a href="{$comments_return_url}&post_comment_reply_id={$comment.content_id}&post_comment_request=1" rel="nofollow">{biticon ipackage="liberty" iname="reply" iexplain="Reply to this comment"}</a>{/if} + {if $gBitUser->isAdmin() || ($gBitUser && $comment.user_id == $gBitUser->mInfo.user_id)}<a href="{$comments_return_url}&post_comment_id={$comment.comment_id}&post_comment_request=1" rel="nofollow">{biticon ipackage="liberty" iname="edit" iexplain="Edit"}</a>{/if} + {if $gBitUser->isAdmin()}<a href="{$comments_return_url}&delete_comment_id={$comment.comment_id}" rel="nofollow">{biticon ipackage="liberty" iname="delete" iexplain="Remove"}</a> {/if} + </div> <h3>{$comment.title}</h3> <div class="date">{tr}by{/tr} {displayname hash=$comment} {tr}on{/tr} {$comment.last_modified|bit_long_datetime}</div> <div class="content"> {$comment.parsed_data} </div> - <div class="footer"> - <a href="{$comments_return_url}&post_comment_reply_id={$comment.content_id}&post_comment_request=1" rel="nofollow">{biticon ipackage="liberty" iname="reply" iexplain="Reply to this comment"}</a> - {if $gBitUser->isAdmin() || ($gBitUser && $comment.user_id == $gBitUser->mInfo.user_id)}<a href="{$comments_return_url}&post_comment_id={$comment.comment_id}&post_comment_request=1" rel="nofollow">{biticon ipackage="liberty" iname="edit" iexplain="Edit"}</a>{/if} - {if $gBitUser->isAdmin()}<a href="{$comments_return_url}&delete_comment_id={$comment.comment_id}" rel="nofollow">{biticon ipackage="liberty" iname="delete" iexplain="Remove"}</a> {/if} - </div> </div><!-- end .commentpost --> - </div><!-- end .left margin --> {/strip} diff --git a/templates/edit_help.tpl b/templates/edit_help.tpl deleted file mode 100644 index 12381d8..0000000 --- a/templates/edit_help.tpl +++ /dev/null @@ -1,134 +0,0 @@ -{* $Header: /cvsroot/bitweaver/_bit_liberty/templates/Attic/edit_help.tpl,v 1.2 2005/06/20 07:27:12 lsces Exp $ *} -{* Show wiki syntax and plugins help *} -{* TODO: Add links to add samples to edit form *} - -{if $gBitSystem->isFeatureActive( 'feature_wikihelp' )} - -{jstabs} - {jstab title="Help"} - {box title="Wiki Help" class="help box"} - For more information, please see <a href="http://www.bitweaver.org/wiki/WikiSyntax">WikiSyntax</a> on <a href="http://www.bitweaver.org">bitweaver.org</a>. - {/box} - {/jstab} - - {if $gBitSystemPrefs.feature_drawings eq 'y'} - {jstab title="Drawings"} - {box title="Drawings" class="help box"} - {literal}{{/literal}draw name=foo} creates the editable drawing foo - {/box} - {/jstab} - {/if} - - {jstab title="Format"} - {box title="Text Color" class="help box"} - {tr}Changing the color of text is easy. Before the text you want colored - insert 2 tildie (~) characters with the colors name followed by a colon. 2 additional tildie characters need to be added at the end of the colored text.{/tr}<br /> - {tr}Example: ~~blue:Text to be colored~~ will produce <font color="blue">Text to be colored</font>{/tr}<br /> - {tr}HTML Colors can also be specified by placing a # character with the HTML Color where the color name should be.{/tr}<br /> - {tr}Example: ~~#FF0060:Text to be colored~~ will produce <font color="#FF0060">Text to be colored</font>.{/tr}<br /> - {tr}For Web-Safe Color Names see <a class='wiki' target=_blank href='http://www.bitweaver.org/wiki/Browser+ColorNames'>bitweaver</a> or for HTML Color numbers see <a class='wiki' target=_blank href='http://www.pagetutor.com/pagetutor/makapage/picker/'>The Color Picker II</a>{/tr} - {/box} - - {box title="Italics" class="help box"} - {tr}To <i>italicize</i> a word or phrase using Wiki syntax, simply surround it with two single quotes (apostrophes), like{/tr} ''<i>{tr}this{/tr}</i>''. {tr}If you wish to italicize an entire phrase, just{/tr} ''<i>{tr}surround the entire phrase{/tr}</i>''. - {tr}Note: insert note about italics not carrying over line breaks.{/tr}<br /> - {tr}Syntax: ''italics''{/tr}<br /> - {tr}Example: "My friend Jane was ''very'' excited to get her new car."{/tr}<br /> - {tr}Displayed: "My friend Jane was <i>very</i> excited to get her new car."{/tr} - {/box} - - {box title="Underlining" class="help box"} - <u>{tr}Underlining{/tr}</u> {tr}text is similar to{/tr} <i>{tr}italicizing{/tr}</i> text. - {tr}You can underline an entire phrase by{/tr} ===<u>{tr}surrounding it with three equals signs on either side{/tr}</u>===, - {tr}or just a single{/tr} ===<u>{tr}word{/tr}</u>===.<br /> - {tr}Syntax: ===underlined==={/tr}<br /> - {tr}Example: "My friend Scott is ===very=== nervous about his date on Friday."{/tr}<br /> - Displayed: "My friend Scott is <u>very</u> nervous about his date on Friday." - {/box} - - {box title="Bold" class="help box"} - {tr}<b>Bolding</b> text is very similiar to <i>italicizing</i> & <u>underlining</u>. To make text bold, surround the __<b>word</b>__ or phrase with __<b>two underscores on either side</b>__.{/tr} - {tr}Syntax: __bold__{/tr}<br /> - {tr}Example: "__When__ are we going to the movies?"{/tr}<br /> - {tr}Displayed: "<b>When</b> are we going to the movies?"{/tr} - {/box} - - {box title="Combinations of Tags" class="help box"} - {tr}bitweaver gives you even more choices by allowing you to simply combine tags to form different formatting combinations. For example, ''__<i><b>this text is both italicized & bold</b></i>__''. __===<b><u>This text is both bold & underlined</u></b>===__. ''__<i><u>This text is both italicized & underlined</u></i>__''.{/tr} - {/box} - {/jstab} - - {jstab title="Images"} - {box title="Images" class="help box"} - "img src=http://example.com/foo.jpg width=200 height=100 align=center link=http://www.yahoo.com desc=foo" - displays an image. height, width, desc, link, and alignment are optional - {/box} - - {box title="Non-cacheable images" class="help box"} - img src=http://example.com/foo.jpg?nocache=1 width=200 height=100 align=center link=http://www.yahoo.com desc=foo - displays an image. height, width, desc, link, and align are optional - {/box} - {/jstab} - - {jstab title="Links"} - {box title="WikiLinks" class="help box"} - (({tr}WikiPageName{/tr})) would automatically link to the wiki page called "WikiPageName" with the text of the link displayed as, "WikiPageName" - (({tr}WikiPageName|description{/tr})) would automatically create the link for the page called "WikiPageName"for wiki references - )){tr}SomeName{/tr}(( prevents referencing - {/box} - - {box title="External links" class="help box"} - {tr}use square brackets for an external link{/tr}: [URL] - [URL|{tr}link_description{/tr}] - [URL|{tr}description{/tr}|nocache] - {/box} - {/jstab} - - {jstab title="Miscellaneous"} - {box title="Lists" class="help box"} - * {tr}for bullet lists{/tr},<br /> - # {tr}for numbered lists{/tr},<br /> - ;{tr}term{/tr}:{tr}definition{/tr} {tr}for definiton lists{/tr} - {/box} - - {box title="Tables" class="help box"} - {if $gBitSystemPrefs.feature_wiki_tables eq 'new'} - "||row1-col1|row1-col2|row1-col3<br />row2-col1|row2-col2col3||" creates a table - {else} - "||row1-col1|row1-col2|row1-col3||row2-col1|row2-col2col3||" {tr}creates a table{/tr} - {/if} - {/box} - - {box title="Simple box" class="help box"} - ^{tr}Box content{/tr}^ Creates a box - {/box} - - {box title="Other" class="help box"} - "!", "!!", "!!!" makes headings<br /> - "---" makes a horizontal rule<br /> - "-={tr}title{/tr}=-" creates a title bar<br /> - use ...page... to separate pages<br /> - Non parsed sections: "~np~ {tr}data{/tr} ~/np~" Prevents parsing data - {/box} - - {box title="Dynamic Tags" class="help box"} - RSS feeds: rss id=n max=m displays rss feed with id=n maximum=m items<br /> - Dynamic variables: "%{tr}name{/tr}%" Inserts an editable variable<br /> - Dynamic content: content id=n Will be replaced by the actual value of the dynamic content block with id=n - {/box} - {/jstab} - - {if count($plugins) ne 0} - {jstab title="Plugins"} - {foreach from=$plugins item=p} - {box title=`$p.name` class="help box"} - {if $p.help eq ''}{tr}No description available{/tr}{else}{$p.help}{/if} - {if $p.syntax}<br/><strong>{tr}Example Syntax{/tr}:</strong>{$p.syntax}<br/>{/if} - {if $p.exthelp ne ''}<a title="{tr}More Details{/tr}" href="javascript:flip('help-{$p.name}');">{tr}More Details{/tr}</a> - {if $p.tpopg}<br/>{tr}For additional information about this plugin - see bitweaver.Org or click <a class='wiki' target=_blank href='{$p.tpopg}'><strong>Here</strong></a> to visit.{/tr}<br/>{/if} - <div id="help-{$p.name}" style="display: none;">{tr}{$p.exthelp}{/tr}</div>{/if} - {/box} - {/foreach} - {/jstab} - {/if} -{/jstabs} -{/if} diff --git a/templates/edit_help_inc.tpl b/templates/edit_help_inc.tpl new file mode 100644 index 0000000..911aec3 --- /dev/null +++ b/templates/edit_help_inc.tpl @@ -0,0 +1,58 @@ +{* $Header: /cvsroot/bitweaver/_bit_liberty/templates/edit_help_inc.tpl,v 1.2 2005/06/28 07:45:52 spiderr Exp $ *} + +{strip} +{if $gBitSystem->isFeatureActive( 'feature_wikihelp' )} + {jstabs} + {jstab title="Help"} + {foreach from=$formatplugins item=p} + {if $p.is_active eq 'y'} + {box title=`$p.name` class="help box"} + {if $p.help eq ''} + {tr}No description available{/tr} + {else} + {$p.help} + {/if} + + {if $p.help_page} + <br />{tr}To view syntax help, please visit <a onkeypress="popUpWin(this.href,'standard',600,400);" onclick="popUpWin(this.href,'standard',600,400);return false;" class="external" href="http://www.bitweaver.org/wiki/index.php?page={$p.help_page}">{$p.help_page}</a>.{/tr} + {/if} + {/box} + {/if} + {/foreach} + + {box title="Syntax Help" class="help box"} + {tr}For more information, please visit <a class="external" href="http://www.bitweaver.org">bitweaver.org</a>{/tr} + {/box} + {/jstab} + + {if count($dataplugins) ne 0} + {jstab title="Plugin Help"} + {foreach from=$dataplugins item=p} + {if $p.is_active eq 'y'} + {box title=`$p.name` class="help box"} + {if $p.help eq ''} + {tr}no description available{/tr} + {else} + {$p.help} + {/if} + + {if $p.syntax} + <br/>{tr}Syntax{/tr}: {$p.syntax}<br/> + {/if} + + {if $p.exthelp ne ''} + <a title="{tr}Extended Help{/tr}" href="javascript:flip('help-{$p.name}');">{tr}Display Extended Help{/tr}</a> + <div id="help-{$p.name}" style="display: none;">{$p.exthelp}</div> + {/if} + + {if $p.help_page} + <br />{tr}for additional information about this plugin, see <a class="external" href="http://www.bitweaver.org/wiki/index.php?page={$p.help_page}">{$p.help_page}</a>.{/tr}<br/> + {/if} + {/box} + {/if} + {/foreach} + {/jstab} + {/if} + {/jstabs} +{/if} +{/strip} |
