Source for file data.copyright.php
Documentation is available at data.copyright.php
* @subpackage plugins_data
// +----------------------------------------------------------------------+
// | Copyright (c) 2004, bitweaver.org
// +----------------------------------------------------------------------+
// | All Rights Reserved. See below for details and a complete list of authors.
// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
// | For comments, please use phpdocu.sourceforge.net documentation standards!!!
// | -> see http://phpdocu.sourceforge.net/
// +----------------------------------------------------------------------+
// | Author (TikiWiki): Ricardo Gladwell <axonrg@users.sourceforge.net>
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
if( ( $gBitSystem->isPackageActive( 'wiki' ) ) && ( $gBitSystem->isFeatureActive( 'wiki_copyrights' ) ) ) { // Do not include this Plugin if this Package and Feature are not active
define( 'PLUGIN_GUID_DATACOPYRIGHT', 'datacopyright' );
'auto_activate' => FALSE,
'requires_pair' => FALSE,
'load_function' => 'data_copyright',
'help_page' => 'DataPluginCopyRight',
'description' => tra("This plugin is used to insert CopyRight notices."),
'help_function' => 'data_copyright_help',
'syntax' => "{COPYRIGHT title= year= authors= }",
'<table class="data help">'
. '<th>' . tra( "Key" ) . '</th>'
. '<th>' . tra( "Type" ) . '</th>'
. '<th>' . tra( "Comments" ) . '</th>'
. '<td>' . tra( "string") . '<br />' . tra( "(optional)") . '</td>'
. '<td>' . tra( "The Title of the Publication. There is no default.") . '</td>'
. '<td>' . tra( "string") . '<br />' . tra( "(optional)") . '</td>'
. '<td>' . tra( "The Year of the Publication. There is no default.") . '</td>'
. '<td>' . tra( "string") . '<br />' . tra( "(optional)") . '</td>'
. '<td>' . tra( "The Authors of the Publication. There is no default.") . '</td>'
. tra("Example: ") . "{COPYRIGHT title='The Tiki Way' year='May 10, 2004' authors='StarRider' }";
// This plugin did not use any parameters - The keywords ~Title~ ~year~ and ~authors~ were inbeded in $data like this
// {COPYRIGHT()}~title~The Tiki Way~year~May 10, 2004~authors~StarRider{COPYRIGHT}
// Changed this to use Parameters instead
// Added testing to maintain Pre-Clyde compatability
// The next 2 lines allow access to the $pluginParams given above and may be removed when no longer needed
// This maintains Pre-Clyde Parameters
if ( !empty( $data) ) { // The problem with this is that $authors HAS to be the last key-word
$title = substr( $data, $pos1, $pos2- $pos1);
$year = substr( $data, $pos1, $pos2- $pos1);
$pos2 = strlen($data) - $pos1;
$authors = substr( $data, $pos1, $pos2);
$title = isset ( $title) ? $title : ' ';
$year = isset ( $year) ? $year : ' ';
$authors = isset ( $authors) ? $authors : ' ';
$ret = 'The plugin <strong>"' . $pluginParams['tag'] . '"</strong> has not been completed as yet. ';
|