summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LibertyContent.php8
-rwxr-xr-xLibertyStructure.php20
-rwxr-xr-xLibertySystem.php16
-rw-r--r--admin/admin_liberty_inc.php8
-rw-r--r--admin/plugins.php14
-rw-r--r--attachment_browser.php6
-rw-r--r--bit_setup_inc.php4
-rw-r--r--comments_inc.php34
-rw-r--r--display_content_inc.php6
-rw-r--r--edit_help_inc.php6
-rw-r--r--edit_storage_inc.php6
-rw-r--r--edit_structure_inc.php24
-rw-r--r--list_content.php20
-rw-r--r--lookup_content_inc.php12
-rw-r--r--modules/mod_last_changes.php12
-rw-r--r--modules/mod_top_authors.php8
-rw-r--r--plugins/data.articles.php12
-rw-r--r--plugins/data.category.php18
-rw-r--r--plugins/data.catorphans.php6
-rw-r--r--plugins/data.catpath.php6
-rw-r--r--plugins/data.comment.php29
-rw-r--r--plugins/data.dropdown.php4
-rw-r--r--plugins/data.example.php4
-rw-r--r--plugins/data.module.php18
-rw-r--r--plugins/data.spytext.php4
-rw-r--r--plugins/format.tikiwiki.php34
-rw-r--r--plugins/storage.lulu.php8
-rw-r--r--templates/admin_plugins.tpl61
28 files changed, 187 insertions, 221 deletions
diff --git a/LibertyContent.php b/LibertyContent.php
index 5093c97..5a3a1ee 100644
--- a/LibertyContent.php
+++ b/LibertyContent.php
@@ -3,7 +3,7 @@
* Management of Liberty content
*
* @author spider <spider@steelsun.com>
-* @version $Revision: 1.4 $
+* @version $Revision: 1.5 $
* @package Liberty
*/
@@ -19,7 +19,7 @@
// | Authors: spider <spider@steelsun.com>
// +----------------------------------------------------------------------+
//
-// $Id: LibertyContent.php,v 1.4 2005/07/25 20:02:12 squareing Exp $
+// $Id: LibertyContent.php,v 1.5 2005/08/01 18:40:46 squareing Exp $
// define( 'CONTENT_TYPE_WIKI', '1' );
// define( 'CONTENT_TYPE_COMMENT', '3' );
@@ -549,7 +549,7 @@ class LibertyContent extends LibertyBase {
* Get a list of all structures this content is a member of
**/
function getContentList( $pContentGuid=NULL, $offset = 0, $maxRecords = -1, $sort_mode = 'title_desc', $find = NULL, $pUserId=NULL ) {
- global $gLibertySystem, $gBitSystem, $gBitUser, $smarty;
+ global $gLibertySystem, $gBitSystem, $gBitUser, $gBitSmarty;
if ($sort_mode == 'size_desc') {
$sort_mode = 'page_size_desc';
}
@@ -667,7 +667,7 @@ class LibertyContent extends LibertyBase {
$aux['user'] = $res['creator_user'];
$aux['real_name'] = (isset( $res['creator_real_name'] ) ? $res['creator_real_name'] : $res['creator_user'] );
$aux['user_id'] = $res['creator_user_id'];
- require_once $smarty->_get_plugin_filepath( 'modifier', 'bit_long_date' );
+ require_once $gBitSmarty->_get_plugin_filepath( 'modifier', 'bit_long_date' );
$aux['display_link'] = $type['content_object']->getDisplayLink( $aux['title'], $aux );
// getDisplayUrl is currently a pure virtual method in LibertyContent, so this cannot be called currently
// $aux['display_url'] = $type['content_object']->getDisplayUrl( $aux['title'], $aux );
diff --git a/LibertyStructure.php b/LibertyStructure.php
index 9b9bc51..c7fb358 100755
--- a/LibertyStructure.php
+++ b/LibertyStructure.php
@@ -3,7 +3,7 @@
* Management of Liberty Content
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
*/
@@ -16,7 +16,7 @@ require_once( LIBERTY_PKG_PATH.'LibertyBase.php' );
* System class for handling the liberty package
*
* @author spider <spider@steelsun.com>
-* @version $Revision: 1.3 $
+* @version $Revision: 1.4 $
* @package Liberty
* @subpackage LibertyStructure
*/
@@ -580,22 +580,22 @@ class LibertyStructure extends LibertyBase {
}
function fetch_toc($structure_tree,$showdesc,$numbering) {
- global $smarty;
+ global $gBitSmarty;
$ret='';
if ($structure_tree != '') {
- $smarty->verifyCompileDir();
- $ret.=$smarty->fetch( "bitpackage:wiki/book_toc_startul.tpl");
+ $gBitSmarty->verifyCompileDir();
+ $ret.=$gBitSmarty->fetch( "bitpackage:wiki/book_toc_startul.tpl");
foreach($structure_tree as $leaf) {
//echo "<br />";print_r($leaf);echo "<br />";
- $smarty->assign_by_ref('structure_tree',$leaf);
- $smarty->assign('showdesc',$showdesc);
- $smarty->assign('numbering',$numbering);
- $ret.=$smarty->fetch( "bitpackage:wiki/book_toc_leaf.tpl");
+ $gBitSmarty->assign_by_ref('structure_tree',$leaf);
+ $gBitSmarty->assign('showdesc',$showdesc);
+ $gBitSmarty->assign('numbering',$numbering);
+ $ret.=$gBitSmarty->fetch( "bitpackage:wiki/book_toc_leaf.tpl");
if(isset($leaf["sub"]) && is_array($leaf["sub"])) {
$ret.=$this->fetch_toc($leaf["sub"],$showdesc,$numbering);
}
}
- $ret.=$smarty->fetch( "bitpackage:wiki/book_toc_endul.tpl");
+ $ret.=$gBitSmarty->fetch( "bitpackage:wiki/book_toc_endul.tpl");
}
return $ret;
}
diff --git a/LibertySystem.php b/LibertySystem.php
index 06febba..2834025 100755
--- a/LibertySystem.php
+++ b/LibertySystem.php
@@ -3,7 +3,7 @@
* System class for handling the liberty package
*
* @author spider <spider@steelsun.com>
-* @version $Revision: 1.3 $
+* @version $Revision: 1.4 $
* @package Liberty
*/
@@ -19,7 +19,7 @@
// | Authors: spider <spider@steelsun.com>
// +----------------------------------------------------------------------+
//
-// $Id: LibertySystem.php,v 1.3 2005/07/25 20:02:13 squareing Exp $
+// $Id: LibertySystem.php,v 1.4 2005/08/01 18:40:47 squareing Exp $
/**
* Local base defines
*/
@@ -40,7 +40,7 @@ require_once( LIBERTY_PKG_PATH.'LibertyBase.php' );
* System class for handling the liberty package
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
* @subpackage LibertySystem
*/
@@ -185,8 +185,8 @@ class LibertySystem extends LibertyBase {
$ret = NULL;
$parts = split('/',$pMimeType);
if (count($parts) > 1) {
- global $smarty;
- require_once $smarty->_get_plugin_filepath('function','biticon');
+ global $gBitSmarty;
+ require_once $gBitSmarty->_get_plugin_filepath('function','biticon');
$ext = $parts[1];
$biticon = array(
@@ -196,9 +196,9 @@ class LibertySystem extends LibertyBase {
'iexplain' => $ext,
'url' => 'only',
);
- if( !$ret = smarty_function_biticon( $biticon,$smarty ) ) {
+ if( !$ret = smarty_function_biticon( $biticon,$gBitSmarty ) ) {
$biticon['iname'] = 'generic';
- $ret = smarty_function_biticon( $biticon,$smarty );
+ $ret = smarty_function_biticon( $biticon,$gBitSmarty );
}
}
return $ret;
@@ -310,6 +310,6 @@ function parse_data_plugins(&$data, &$preparsed, &$noparsed, &$pParser ) {
global $gLibertySystem;
$gLibertySystem = new LibertySystem();
-$smarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
+$gBitSmarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
?>
diff --git a/admin/admin_liberty_inc.php b/admin/admin_liberty_inc.php
index 623852f..a2a7108 100644
--- a/admin/admin_liberty_inc.php
+++ b/admin/admin_liberty_inc.php
@@ -12,7 +12,7 @@ $formLibertyFeatures = array(
),
);
-$smarty->assign( 'formLibertyFeatures', $formLibertyFeatures );
+$gBitSmarty->assign( 'formLibertyFeatures', $formLibertyFeatures );
$formCommentFeatures = array(
"comments_reorganise_page_layout" => array(
@@ -26,7 +26,7 @@ $formCommentFeatures = array(
'page' => '',
),
);
-$smarty->assign( 'formCommentFeatures', $formCommentFeatures );
+$gBitSmarty->assign( 'formCommentFeatures', $formCommentFeatures );
$formValues = array( 'image_processor', 'liberty_attachment_link_format', 'comments_per_page', 'comments_default_ordering', 'comments_default_display_mode' );
@@ -47,7 +47,7 @@ if( !empty( $_REQUEST['change_prefs'] ) ) {
}
$gBitSystem->storePreference('approved_html_tags', $tags , LIBERTY_PKG_NAME );
}
- $smarty->assign_by_ref( 'errors', $errors );
+ $gBitSmarty->assign_by_ref( 'errors', $errors );
foreach( $formValues as $item ) {
simple_set_value( $item );
@@ -56,5 +56,5 @@ if( !empty( $_REQUEST['change_prefs'] ) ) {
$tags = $gBitSystem->getPreference( 'approved_html_tags', DEFAULT_ACCEPTABLE_TAGS );
-$smarty->assign( 'approved_html_tags', $tags );
+$gBitSmarty->assign( 'approved_html_tags', $tags );
?>
diff --git a/admin/plugins.php b/admin/plugins.php
index ca3414c..c137b8d 100644
--- a/admin/plugins.php
+++ b/admin/plugins.php
@@ -1,5 +1,6 @@
<?php
require_once( '../../bit_setup_inc.php' );
+include_once( KERNEL_PKG_PATH.'simple_form_functions_lib.php' );
$gBitSystem->verifyPermission( 'bit_p_admin' );
@@ -7,9 +8,14 @@ if( isset( $_REQUEST['pluginsave'] ) && !empty( $_REQUEST['pluginsave'] ) ) {
if( !empty( $_REQUEST['default_format'] ) && !empty( $_REQUEST['PLUGINS'][$_REQUEST['default_format']][0] ) ) {
$gLibertySystem->setActivePlugins( $_REQUEST['PLUGINS'] );
$gBitSystem->storePreference( 'default_format',$_REQUEST['default_format'] );
- $smarty->assign( 'default_format',$_REQUEST['default_format'] );
+ $gBitSmarty->assign( 'default_format',$_REQUEST['default_format'] );
} else {
- $smarty->assign( 'errorMsg', 'You cannot disable the default format');
+ $gBitSmarty->assign( 'errorMsg', 'You cannot disable the default format');
+ }
+
+ $formToggles = array( 'allow_html' );
+ foreach( $formToggles as $item ) {
+ simple_set_toggle( $item, LIBERTY_PKG_NAME );
}
}
@@ -20,9 +26,9 @@ foreach( $gLibertySystem->mPlugins as $key => $row ) {
$guid[$key] = $row['plugin_guid'];
}
array_multisort( $type, SORT_ASC, $guid, SORT_ASC, $gLibertySystem->mPlugins );
-$smarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
+$gBitSmarty->assign_by_ref( 'gLibertySystem', $gLibertySystem );
ksort( $types );
-$smarty->assign_by_ref( 'pluginTypes', $types );
+$gBitSmarty->assign_by_ref( 'pluginTypes', $types );
//vd( $gLibertySystem->mPlugins );
diff --git a/attachment_browser.php b/attachment_browser.php
index 067895f..ff88558 100644
--- a/attachment_browser.php
+++ b/attachment_browser.php
@@ -3,7 +3,7 @@
* attachment_browser
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage functions
*/
@@ -14,7 +14,7 @@
include("../bit_setup_inc.php");
$userAttachments = $gBitUser->getUserAttachments();
-$smarty->assign('userAttachments', $userAttachments);
+$gBitSmarty->assign('userAttachments', $userAttachments);
if (empty($gBitLoc['styleSheet'])) {
$gBitLoc['styleSheet'] = $gBitSystem->getStyleCss();
}
@@ -22,5 +22,5 @@ $gBitLoc['browserStyleSheet'] = $gBitSystem->getBrowserStyleCss();
$gBitLoc['customStyleSheet'] = $gBitSystem->getCustomStyleCss();
$gBitLoc['THEMES_STYLE_URL'] = $gBitSystem->getStyleUrl();
//vd($userAttachments);
-$smarty->display('bitpackage:liberty/attachment_browser.tpl');
+$gBitSmarty->display('bitpackage:liberty/attachment_browser.tpl');
?>
diff --git a/bit_setup_inc.php b/bit_setup_inc.php
index 01a05f2..79b9178 100644
--- a/bit_setup_inc.php
+++ b/bit_setup_inc.php
@@ -3,12 +3,12 @@
* base package include
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage functions
*/
-global $gBitSystem, $gBitUser, $smarty;
+global $gBitSystem, $gBitUser, $gBitSmarty;
$gBitSystem->registerPackage( 'liberty', dirname( __FILE__).'/' );
diff --git a/comments_inc.php b/comments_inc.php
index b73cad7..bdca186 100644
--- a/comments_inc.php
+++ b/comments_inc.php
@@ -3,12 +3,12 @@
* comment_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
* @subpackage functions
*/
-// $Header: /cvsroot/bitweaver/_bit_liberty/comments_inc.php,v 1.3 2005/07/17 17:36:08 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_liberty/comments_inc.php,v 1.4 2005/08/01 18:40:48 squareing 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.
@@ -30,11 +30,11 @@
*/
require_once (LIBERTY_PKG_PATH.'LibertyComment.php');
-global $commentsLib, $smarty;
+global $commentsLib, $gBitSmarty;
$postComment = array();
$formfeedback = array();
-$smarty->assign_by_ref('formfeedback', $formfeedback);
+$gBitSmarty->assign_by_ref('formfeedback', $formfeedback);
if (!empty($_REQUEST['delete_comment_id']) && $gBitUser->hasPermission( 'bit_p_post_comments' )) {
$deleteComment = new LibertyComment($_REQUEST['delete_comment_id']);
@@ -64,7 +64,7 @@ if (!empty($_REQUEST['post_comment_id']) && $gBitUser->hasPermission( 'bit_p_pos
$post_comment_id = NULL;
$editComment = NULL;
}
-$smarty->assign('post_comment_id', $post_comment_id);
+$gBitSmarty->assign('post_comment_id', $post_comment_id);
// Store comment posts
if (!empty($_REQUEST['post_comment_submit']) && $gBitUser->hasPermission( 'bit_p_post_comments' )) {
@@ -83,14 +83,14 @@ if (empty($_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);
+$gBitSmarty->assign_by_ref('post_comment_request', $post_comment_request);
// $post_comment_preview is a flag indicating that the user wants to preview their comment prior to saving it
if( !empty( $_REQUEST['post_comment_preview'] ) ) {
$postComment['title'] = $_REQUEST['comment_title'];
$postComment['data'] = $_REQUEST['comment_data'];
$postComment['parsed_data'] = LibertyComment::parseData( $_REQUEST['comment_data'], 'bitwiki' );
- $smarty->assign('post_comment_preview', TRUE);
+ $gBitSmarty->assign('post_comment_preview', TRUE);
}
// $post_comment_reply_id is the content_id which a post is replying to
@@ -99,7 +99,7 @@ if (!empty($_REQUEST['post_comment_reply_id'])) {
$tmpComment = new LibertyComment(NULL, $post_comment_reply_id);
//$postComment['data'] = $commentsLib->quoteComment($tmpComment->mInfo['data']); // This is super-ugly, better to just not quote at all, the indented comment indicates what comment it is replying to
$postComment['title'] = tra('Re:')." ".$tmpComment->mInfo['title'];
- $smarty->assign('post_comment_reply_id', $post_comment_reply_id);
+ $gBitSmarty->assign('post_comment_reply_id', $post_comment_reply_id);
}
$maxComments = $gBitSystem->getPreference( 'comments_per_page', 10 );
@@ -134,8 +134,8 @@ if( empty( $commentsParentId ) ) {
$comments = $gComment->getComments( $commentsParentId, $maxComments, $commentOffset, $comments_sort_mode, $comments_display_style );
$numComments = $gComment->getNumComments( $commentsParentId );
}
-$smarty->assign('comments', $comments);
-$smarty->assign('maxComments', $maxComments);
+$gBitSmarty->assign('comments', $comments);
+$gBitSmarty->assign('maxComments', $maxComments);
$numCommentPages = ceil( $numComments / $maxComments );
$currentPage = !empty( $_REQUEST['comment_page'] ) ? $_REQUEST['comment_page'] : 1;
@@ -150,12 +150,12 @@ $commentsPgnHash = array(
'comments_style' => $comments_display_style,
'ianchor' => 'editcomments',
);
-$smarty->assign( 'commentsPgnHash', $commentsPgnHash );
-$smarty->assign('postComment', $postComment);
+$gBitSmarty->assign( 'commentsPgnHash', $commentsPgnHash );
+$gBitSmarty->assign('postComment', $postComment);
-$smarty->assign('currentTimestamp', time());
-$smarty->assign('comments_return_url', $comments_return_url);
-$smarty->assign('comments_at_top_of_page', ( isset( $comments_at_top_of_page ) && $gBitSystem->getPreference( 'comments_reorganise_page_layout', 'n' ) == 'y' ) ? $comments_at_top_of_page : NULL );
-$smarty->assign('comments_style', $comments_display_style);
-$smarty->assign('comments_sort_mode', $comments_sort_mode);
+$gBitSmarty->assign('currentTimestamp', time());
+$gBitSmarty->assign('comments_return_url', $comments_return_url);
+$gBitSmarty->assign('comments_at_top_of_page', ( isset( $comments_at_top_of_page ) && $gBitSystem->getPreference( 'comments_reorganise_page_layout', 'n' ) == 'y' ) ? $comments_at_top_of_page : NULL );
+$gBitSmarty->assign('comments_style', $comments_display_style);
+$gBitSmarty->assign('comments_sort_mode', $comments_sort_mode);
?>
diff --git a/display_content_inc.php b/display_content_inc.php
index 87bb5c4..fbcdd3e 100644
--- a/display_content_inc.php
+++ b/display_content_inc.php
@@ -3,15 +3,15 @@
* display_content_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage functions
*/
- global $smarty, $gBitSystem, $gContent;
+ global $gBitSmarty, $gBitSystem, $gContent;
// vd( $gContent->mInfo );
- $smarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
+ $gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
$gBitSystem->display( 'bitpackage:liberty/display_content.tpl' );
diff --git a/edit_help_inc.php b/edit_help_inc.php
index 89343f9..c02fea3 100644
--- a/edit_help_inc.php
+++ b/edit_help_inc.php
@@ -3,7 +3,7 @@
* edit_help_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage functions
*/
@@ -39,6 +39,6 @@ foreach( array_keys( $gLibertySystem->mPlugins ) as $pluginGuid ) {
}
}
}
-$smarty->assign_by_ref( 'formatplugins', $formatplugins );
-$smarty->assign_by_ref( 'dataplugins', $dataplugins );
+$gBitSmarty->assign_by_ref( 'formatplugins', $formatplugins );
+$gBitSmarty->assign_by_ref( 'dataplugins', $dataplugins );
?>
diff --git a/edit_storage_inc.php b/edit_storage_inc.php
index dd2a32a..78b75d9 100644
--- a/edit_storage_inc.php
+++ b/edit_storage_inc.php
@@ -3,7 +3,7 @@
* edit_storage_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage functions
*
@@ -12,7 +12,7 @@
*
* Calculate a base URL for the attachment deletion/removal icons to use
*/
-global $smarty, $gContent, $gBitUser;
+global $gBitSmarty, $gContent, $gBitUser;
$attachmentActionBaseURL = $_SERVER['PHP_SELF'].'?';
$GETArgs = split('&',$_SERVER['QUERY_STRING']);
@@ -27,7 +27,7 @@ foreach ($GETArgs as $arg) {
$attachmentActionBaseURL .= $arg;
}
}
-$smarty->assign('attachmentActionBaseURL', $attachmentActionBaseURL);
+$gBitSmarty->assign('attachmentActionBaseURL', $attachmentActionBaseURL);
if (!empty($_REQUEST['deleteAttachment'])) {
$attachmentId = $_REQUEST['deleteAttachment'];
diff --git a/edit_structure_inc.php b/edit_structure_inc.php
index 3b21d73..b8dd6fa 100644
--- a/edit_structure_inc.php
+++ b/edit_structure_inc.php
@@ -2,8 +2,8 @@
/**
* edit_structure_inc
*
- * @author Christian Fowler
- * @version $Revision: 1.4 $
+ * @author Christian Fowler>
+ * @version $Revision: 1.5 $
* @package Liberty
* @subpackage functions
*/
@@ -42,8 +42,8 @@ if( empty( $_REQUEST["structure_id"] ) ) {
if( ( $gBitUser->mUserId != $rootStructure->mInfo['user_id'] ) ) {
$gBitSystem->verifyPermission( !empty( $verifyStructurePermission ) ? $verifyStructurePermission : 'bit_p_admin' );
}
- $smarty->assign_by_ref( 'gStructure', $gStructure );
- $smarty->assign('structureInfo', $gStructure->mInfo);
+ $gBitSmarty->assign_by_ref( 'gStructure', $gStructure );
+ $gBitSmarty->assign('structureInfo', $gStructure->mInfo);
// Store the actively stored structure name
$gBitUser->storePreference( 'edit_structure_name', $rootStructure->mInfo['title'] );
@@ -53,17 +53,17 @@ if( empty( $_REQUEST["structure_id"] ) ) {
foreach( $contentList['data'] as $cItem ) {
$cList[$contentTypes[$cItem['content_type_guid']]][$cItem['content_id']] = $cItem['title'].' [id: '.$cItem['content_id'].']';
}
- $smarty->assign( 'contentList', $cList );
- $smarty->assign( 'contentSelect', $contentSelect );
- $smarty->assign( 'contentTypes', $contentTypes );
- $smarty->assign( 'contentTypes', $contentTypes );
+ $gBitSmarty->assign( 'contentList', $cList );
+ $gBitSmarty->assign( 'contentSelect', $contentSelect );
+ $gBitSmarty->assign( 'contentTypes', $contentTypes );
+ $gBitSmarty->assign( 'contentTypes', $contentTypes );
$subpages = $gStructure->s_get_pages($_REQUEST["structure_id"]);
$max = count($subpages);
- $smarty->assign_by_ref('subpages', $subpages);
+ $gBitSmarty->assign_by_ref('subpages', $subpages);
if ($max != 0) {
$last_child = $subpages[$max - 1];
- $smarty->assign('insert_after', $last_child["structure_id"]);
+ $gBitSmarty->assign('insert_after', $last_child["structure_id"]);
}
if( ( isset( $_REQUEST["action"] ) && ( $_REQUEST["action"] == 'remove' ) ) || isset( $_REQUEST["confirm"] ) ) {
@@ -123,8 +123,8 @@ if( empty( $_REQUEST["structure_id"] ) ) {
}
}
- $smarty->assign( (!empty( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : 'body').'TabSelect', 'tdefault' );
- $smarty->assign('subtree', $rootTree = $rootStructure->getSubTree( $rootStructure->mStructureId ));
+ $gBitSmarty->assign( (!empty( $_REQUEST['tab'] ) ? $_REQUEST['tab'] : 'body').'TabSelect', 'tdefault' );
+ $gBitSmarty->assign('subtree', $rootTree = $rootStructure->getSubTree( $rootStructure->mStructureId ));
}
diff --git a/list_content.php b/list_content.php
index a7bff96..9e1d605 100644
--- a/list_content.php
+++ b/list_content.php
@@ -3,7 +3,7 @@
* list_content
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package Liberty
* @subpackage functions
*/
@@ -16,13 +16,13 @@ require_once("../bit_setup_inc.php");
// some content specific offsets and pagination settings
if( !empty( $_REQUEST['sort_mode'] ) ) {
$content_sort_mode = $_REQUEST['sort_mode'];
- $smarty->assign( 'sort_mode', $content_sort_mode );
+ $gBitSmarty->assign( 'sort_mode', $content_sort_mode );
}
$max_content = $gBitSystem->mPrefs['maxRecords'];
$offset_content = !empty( $_REQUEST['offset'] ) ? $_REQUEST['offset'] : 0;
-$smarty->assign( 'user_id', !empty( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL );
-$smarty->assign( 'curPage', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 );
+$gBitSmarty->assign( 'user_id', !empty( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : NULL );
+$gBitSmarty->assign( 'curPage', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 );
$offset_content = ( $page - 1 ) * $gBitSystem->mPrefs['maxRecords'];
// now that we have all the offsets, we can get the content list
@@ -30,13 +30,13 @@ include_once( LIBERTY_PKG_PATH.'get_content_list_inc.php' );
// calculate page number
$numPages = ceil( $contentList['cant'] / $gBitSystem->mPrefs['maxRecords'] );
-$smarty->assign( 'numPages', $numPages );
+$gBitSmarty->assign( 'numPages', $numPages );
-//$smarty->assign_by_ref('offset', $offset);
-$smarty->assign( 'contentSelect', $contentSelect );
-$smarty->assign( 'contentTypes', $contentTypes );
-$smarty->assign( 'contentList', $contentList['data'] );
-$smarty->assign( 'contentCount', $contentList['cant'] );
+//$gBitSmarty->assign_by_ref('offset', $offset);
+$gBitSmarty->assign( 'contentSelect', $contentSelect );
+$gBitSmarty->assign( 'contentTypes', $contentTypes );
+$gBitSmarty->assign( 'contentList', $contentList['data'] );
+$gBitSmarty->assign( 'contentCount', $contentList['cant'] );
$gBitSystem->setBrowserTitle( 'List Content' );
$gBitSystem->display( 'bitpackage:liberty/list_content.tpl' );
diff --git a/lookup_content_inc.php b/lookup_content_inc.php
index 162fdbe..14787c8 100644
--- a/lookup_content_inc.php
+++ b/lookup_content_inc.php
@@ -3,7 +3,7 @@
* lookup_content_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage functions
*/
@@ -19,22 +19,22 @@
// vd( $gStructure->mInfo );
$gStructure->loadNavigation();
$gStructure->loadPath();
- $smarty->assign( 'structureInfo', $gStructure->mInfo );
+ $gBitSmarty->assign( 'structureInfo', $gStructure->mInfo );
// $_REQUEST['page_id'] = $gStructure->mInfo['page_id'];
if( $viewContent = $gStructure->getLibertyObject( $gStructure->mInfo['content_id'], $gStructure->mInfo['content_type']['content_type_guid'] ) ) {
$viewContent->load();
$viewContent->setStructure( $_REQUEST['structure_id'] );
- $smarty->assign_by_ref( 'pageInfo', $viewContent->mInfo );
+ $gBitSmarty->assign_by_ref( 'pageInfo', $viewContent->mInfo );
$gContent = &$viewContent;
- $smarty->assign_by_ref( 'gContent', $gContent );
+ $gBitSmarty->assign_by_ref( 'gContent', $gContent );
}
}
} elseif( !empty( $_REQUEST['content_id'] ) ) {
require_once( LIBERTY_PKG_PATH.'LibertyBase.php');
if( $gContent = LibertyBase::getLibertyObject( $_REQUEST['content_id'] ) ) {
if( $gContent->load() ) {
- $smarty->assign_by_ref( 'gContent', $gContent );
- $smarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
+ $gBitSmarty->assign_by_ref( 'gContent', $gContent );
+ $gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
}
}
}
diff --git a/modules/mod_last_changes.php b/modules/mod_last_changes.php
index 2866506..508771e 100644
--- a/modules/mod_last_changes.php
+++ b/modules/mod_last_changes.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_last_changes.php,v 1.3 2005/07/25 20:02:13 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_last_changes.php,v 1.4 2005/08/01 18:40:50 squareing Exp $
/**
* Params:
* - content_type_guid : if set, show only those content_type_guid's
@@ -20,18 +20,18 @@ if( !empty( $gQueryUser->mUserId ) ) {
if( empty( $module_title ) ) {
if( !empty( $module_params['content_type_guid'] ) && !empty( $gLibertySystem->mContentTypes[$module_params['content_type_guid']] ) ) {
$title = tra( "Last Changes" ).': '.tra( $gLibertySystem->mContentTypes[$module_params['content_type_guid']]['content_description'] );
- $smarty->assign( 'contentType', $module_params['content_type_guid'] );
+ $gBitSmarty->assign( 'contentType', $module_params['content_type_guid'] );
} else {
- $smarty->assign( 'contentType', FALSE );
+ $gBitSmarty->assign( 'contentType', FALSE );
$title = tra( "Last Changes" );
}
- $smarty->assign( 'moduleTitle', $title );
+ $gBitSmarty->assign( 'moduleTitle', $title );
}
if( !empty( $module_params['show_date'] ) ) {
- $smarty->assign( 'showDate' , TRUE );
+ $gBitSmarty->assign( 'showDate' , TRUE );
}
$modLastContent = $gBitUser->getContentList( !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : NULL, 0, $module_rows, 'last_modified_desc', NULL, $userId );
-$smarty->assign_by_ref( 'modLastContent', $modLastContent['data'] );
+$gBitSmarty->assign_by_ref( 'modLastContent', $modLastContent['data'] );
?>
diff --git a/modules/mod_top_authors.php b/modules/mod_top_authors.php
index 223d770..d5ee38f 100644
--- a/modules/mod_top_authors.php
+++ b/modules/mod_top_authors.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_top_authors.php,v 1.2 2005/06/28 07:45:48 spiderr Exp $
+// $Header: /cvsroot/bitweaver/_bit_liberty/modules/mod_top_authors.php,v 1.3 2005/08/01 18:40:50 squareing Exp $
/**
* Params:
* - content_type_guid : if set, show only those content_type_guid's
@@ -15,10 +15,10 @@ if( empty( $module_title ) ) {
if( !empty( $module_params['content_type_guid'] ) && !empty( $gLibertySystem->mContentTypes[$module_params['content_type_guid']] ) ) {
$title = tra( "Top Authors" ).': '.tra( $gLibertySystem->mContentTypes[$module_params['content_type_guid']]['content_description'] );
} else {
- $smarty->assign( 'showContentType', TRUE );
+ $gBitSmarty->assign( 'showContentType', TRUE );
$title = tra( "Top Authors" );
}
- $smarty->assign( 'moduleTitle', $title );
+ $gBitSmarty->assign( 'moduleTitle', $title );
}
@@ -29,5 +29,5 @@ if( !empty( $module_params['content_type_guid'] ) ) {
$listHash['max_request'] = $module_rows;
$modAuthors = $gBitUser->getAuthorList( $listHash );
-$smarty->assign_by_ref( 'modAuthors', $modAuthors );
+$gBitSmarty->assign_by_ref( 'modAuthors', $modAuthors );
?>
diff --git a/plugins/data.articles.php b/plugins/data.articles.php
index 2e3a9b3..0b30589 100644
--- a/plugins/data.articles.php
+++ b/plugins/data.articles.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_articles.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.articles.php,v 1.3 2005/07/17 17:36:09 squareing Exp $
+// $Id: data.articles.php,v 1.4 2005/08/01 18:40:50 squareing Exp $
/**
* definitions
@@ -91,7 +91,7 @@ if( $gBitSystem->isPackageActive( 'articles' ) ) {
include_once( ARTICLES_PKG_PATH . 'art_lib.php' );
function wikiplugin_articles($data,$params) {
- global $smarty;
+ global $gBitSmarty;
global $artlib;
global $feature_articles;
global $bit_p_read_article;
@@ -115,10 +115,10 @@ if( $gBitSystem->isPackageActive( 'articles' ) ) {
//print_r($listpages["data"][$i]['title']);
}
$topics = $artlib->list_topics();
- $smarty->assign_by_ref('topics', $topics);
+ $gBitSmarty->assign_by_ref('topics', $topics);
// If there're more records then assign next_offset
- $smarty->assign_by_ref('listpages', $listpages["data"]);
- return "~np~ ".$smarty->fetch('bitpackage:articles/center_list_articles.tpl')." ~/np~";
+ $gBitSmarty->assign_by_ref('listpages', $listpages["data"]);
+ return "~np~ ".$gBitSmarty->fetch('bitpackage:articles/center_list_articles.tpl')." ~/np~";
}
}
*/
diff --git a/plugins/data.category.php b/plugins/data.category.php
index 3b87e07..52b409b 100644
--- a/plugins/data.category.php
+++ b/plugins/data.category.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_category.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.category.php,v 1.3 2005/07/17 17:36:09 squareing Exp $
+// $Id: data.category.php,v 1.4 2005/08/01 18:41:06 squareing Exp $
/**
* definitions
@@ -111,7 +111,7 @@ function in_multi_array($needle, $haystack) {
return $in_multi_array;
}
function wikiplugin_category($data, $params) {
- global $smarty;
+ global $gBitSmarty;
global $package_categories;
global $categlib;
if (!is_object($categlib)) {
@@ -229,9 +229,9 @@ function wikiplugin_category($data, $params) {
}
// split mode: appending onto $out each time
if ($split == 'y' or $split == 'yes' or $split == 'true') {
- $smarty->assign("title", $title);
- $smarty->assign("listcat", $listcat);
- $out .= $smarty->fetch("bitpackage:wiki/simple_plugin.tpl");
+ $gBitSmarty->assign("title", $title);
+ $gBitSmarty->assign("listcat", $listcat);
+ $out .= $gBitSmarty->fetch("bitpackage:wiki/simple_plugin.tpl");
// reset array for next loop
$listcat = array();
// reset title
@@ -241,9 +241,9 @@ function wikiplugin_category($data, $params) {
}
// non-split mode
if ($split == 'n' or $split == 'no' or $split == 'false') {
- $smarty->assign("title", $title);
- $smarty->assign("listcat", $listcat);
- $out = $smarty->fetch("bitpackage:wiki/simple_plugin.tpl");
+ $gBitSmarty->assign("title", $title);
+ $gBitSmarty->assign("listcat", $listcat);
+ $out = $gBitSmarty->fetch("bitpackage:wiki/simple_plugin.tpl");
}
return '~np~'.$out.'~/np~';
}
diff --git a/plugins/data.catorphans.php b/plugins/data.catorphans.php
index b5db969..d72db88 100644
--- a/plugins/data.catorphans.php
+++ b/plugins/data.catorphans.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_catorphans.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.catorphans.php,v 1.3 2005/07/17 17:36:09 squareing Exp $
+// $Id: data.catorphans.php,v 1.4 2005/08/01 18:41:06 squareing Exp $
/**
* definitions
@@ -78,7 +78,7 @@ Note: I changed the seperator from | to +
require_once( WIKI_PKG_PATH.'BitPage.php' );
function wikiplugin_catorphans($data, $params) {
- global $smarty;
+ global $gBitSmarty;
global $wikilib;
global $package_categories;
global $categlib;
diff --git a/plugins/data.catpath.php b/plugins/data.catpath.php
index b860957..46f4182 100644
--- a/plugins/data.catpath.php
+++ b/plugins/data.catpath.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package Liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_catpath.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.catpath.php,v 1.3 2005/07/17 17:36:09 squareing Exp $
+// $Id: data.catpath.php,v 1.4 2005/08/01 18:41:06 squareing Exp $
/**
* definitions
@@ -79,7 +79,7 @@ function data_catpath($data, $params) { // Pre-Clyde Changes
/******************************************************************************
The code below is from the deprecated CATPATH plugin. All comments and the help routines have been removed. - StarRider
function wikiplugin_catpath($data, $params) {
- global $smarty;
+ global $gBitSmarty;
global $gBitSystem;
global $package_categories;
global $categlib;
diff --git a/plugins/data.comment.php b/plugins/data.comment.php
index 91a2c8d..3fb4f73 100644
--- a/plugins/data.comment.php
+++ b/plugins/data.comment.php
@@ -1,31 +1,20 @@
<?php
-// $Id: data.comment.php,v 1.3 2005/07/17 17:36:09 squareing Exp $
+// $Id: data.comment.php,v 1.4 2005/08/01 18:41:06 squareing Exp $
/**
+ * assigned_modules
+ *
* @author StarRider <starrrider@sourceforge.net>
- * @version $Revision: 1.3 $
- * @package liberty
+ * @version $Revision: 1.4 $
+ * @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: StarRider <starrrider@sourceforge.net>
-// | Wrote it but didn't think of it :-)
-// +----------------------------------------------------------------------+
-// $Id: data.comment.php,v 1.3 2005/07/17 17:36:09 squareing Exp $
-
-/**
- * definitions
+ * @copyright Copyright (c) 2004, bitweaver.org
+ * All Rights Reserved. See copyright.txt for details and a complete list of authors.
+ * @license Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
*/
/******************
* Initialization *
******************/
+global $gLibertySystem;
define( 'PLUGIN_GUID_COMMENT', 'comment' );
global $gLibertySystem;
$pluginParams = array ( 'tag' => 'COMMENT',
diff --git a/plugins/data.dropdown.php b/plugins/data.dropdown.php
index 94f0a7d..ec6d79a 100644
--- a/plugins/data.dropdown.php
+++ b/plugins/data.dropdown.php
@@ -4,8 +4,8 @@
* assigned_modules
*
* @author StarRider <starrrider@sourceforge.net>
- * @version $Revision: 1.2 $
- * @package liberty
+ * @version $Revision: 1.3 $
+ * @package Liberty
* @subpackage plugins_data
*
* @copyright Copyright (c) 2004, bitweaver.org
diff --git a/plugins/data.example.php b/plugins/data.example.php
index e7a6c90..026779c 100644
--- a/plugins/data.example.php
+++ b/plugins/data.example.php
@@ -4,8 +4,8 @@
* assigned_modules
*
* @author StarRider starrrider@sourceforge.net
- * @version $Revision: 1.6 $
- * @package liberty
+ * @version $Revision: 1.7 $
+ * @package Liberty
* @subpackage plugins_data
* @copyright Copyright (c) 2004, bitweaver.org
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
diff --git a/plugins/data.module.php b/plugins/data.module.php
index 571f756..9d3cd0e 100644
--- a/plugins/data.module.php
+++ b/plugins/data.module.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage plugins_data
*/
@@ -16,7 +16,7 @@
// | 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 $
+// $Id: data.module.php,v 1.3 2005/08/01 18:41:07 squareing Exp $
/**
Displays a module inlined in page
@@ -80,7 +80,7 @@ function datamodule_help() {
* data_datamodule
*/
function data_datamodule($data, $params) {
- global $modlib, $cache_time, $smarty, $feature_directory, $ranklib, $feature_trackers, $bitdomain, $user,
+ global $modlib, $cache_time, $gBitSmarty, $feature_directory, $ranklib, $feature_trackers, $bitdomain, $user,
$feature_tasks, $feature_user_bookmarks, $bit_p_tasks, $bit_p_create_bookmarks, $imagegallib;
require_once( KERNEL_PKG_PATH.'mod_lib.php' );
$out = '';
@@ -113,17 +113,17 @@ function data_datamodule($data, $params) {
$args = '';
}
// if ((!file_exists($cachefile)) || (file_exists($nocache)) || ((time() - filemtime($cachefile)) > $cache_time)) {
- $smarty->assign('no_module_controls', 'y');
- if( $out = $smarty->fetch( $module ) ) {
+ $gBitSmarty->assign('no_module_controls', 'y');
+ if( $out = $gBitSmarty->fetch( $module ) ) {
} else {
if ($modlib->is_user_module($module)) {
$info = $modlib->get_user_module($module);
- $smarty->assign_by_ref('user_title', $info["title"]);
- $smarty->assign_by_ref('user_data', $info["data"]);
- $out = $smarty->fetch('modules/user_module.tpl');
+ $gBitSmarty->assign_by_ref('user_title', $info["title"]);
+ $gBitSmarty->assign_by_ref('user_data', $info["data"]);
+ $out = $gBitSmarty->fetch('modules/user_module.tpl');
}
}
- $smarty->clear_assign('no_module_controls');
+ $gBitSmarty->clear_assign('no_module_controls');
// } else {
// $fp = fopen($cachefile, "r");
// $out = fread($fp, filesize($cachefile));
diff --git a/plugins/data.spytext.php b/plugins/data.spytext.php
index 6fd695f..0d1d022 100644
--- a/plugins/data.spytext.php
+++ b/plugins/data.spytext.php
@@ -4,8 +4,8 @@
* assigned_modules
*
* @author StarRider starrrider@sourceforge.net
- * @version $Revision: 1.2 $
- * @package liberty
+ * @version $Revision: 1.3 $
+ * @package Liberty
* @subpackage plugins_data
* @copyright Copyright (c) 2004, bitweaver.org
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php
index c5a9870..00face8 100644
--- a/plugins/format.tikiwiki.php
+++ b/plugins/format.tikiwiki.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @package Liberty
*/
global $gLibertySystem;
@@ -222,9 +222,9 @@ $this->debug(0);
// This recursive function handles pre- and no-parse sections and plugins
function parse_first(&$data, &$preparsed, &$noparsed) {
global $gLibertySystem;
+ $this->parse_pp_np($data, $preparsed, $noparsed);
// Handle pre- and no-parse sections
parse_data_plugins( $data, $preparsed, $noparsed, $this );
- $this->parse_pp_np($data, $preparsed, $noparsed);
}
@@ -348,10 +348,10 @@ $this->debug(0);
function parse_comment_data($data) {
// rel=\"nofollow\" is support fo Google's Preventing comment spam
// http://www.google.com/googleblog/2005/01/preventing-comment-spam.html
- $data = preg_replace("/\[([^\|\]]+)\|([^\]]+)\]/", "<a rel=\"nofollow\" class=\"commentslink\" href=\"$1\">$2</a>", $data);
+ $data = preg_replace("/\[([^\|\]]+)\|([^\]]+)\]/", "<a rel=\"nofollow\" href=\"$1\">$2</a>", $data);
// Segundo intento reemplazar los [link] comunes
- $data = preg_replace("/\[([^\]\|]+)\]/", "<a rel=\"nofollow\" class=\"commentslink\" href=\"$1\">$1</a>", $data);
+ $data = preg_replace("/\[([^\]\|]+)\]/", "<a rel=\"nofollow\" href=\"$1\">$1</a>", $data);
// Llamar aqui a parse smileys
$data = $this->parse_smileys($data);
$data = preg_replace("/---/", "<hr/>", $data);
@@ -500,23 +500,29 @@ $this->debug(0);
function parse_data( $data, &$pCommonObject ) {
global $gBitSystem;
global $gBitUser;
- global $slidemode;
- global $cachepages;
- global $ownurl_father;
global $page;
- global $gStructure;
- global $rsslib;
- global $structlib;
- global $user;
- global $bitdomain;
global $wikilib;
if( empty( $wikilib ) ) {
require_once( WIKI_PKG_PATH.'BitPage.php' );
global $wikilib;
}
- // convert HTML to chars
- $data = htmlspecialchars( $data, ENT_NOQUOTES, 'UTF-8' );
+ if( $gBitSystem->isFeatureActive( 'allow_html' ) ) {
+ // this is copied and pasted from format.bithtml.php - xing
+ // Strip all evil tags that remain
+ // this comes out of gBitSystem->getPreference() set in Liberty Admin
+ $acceptableTags = $gBitSystem->getPreference( 'approved_html_tags', DEFAULT_ACCEPTABLE_TAGS );
+
+ // Destroy all script code "manually" - strip_tags will leave code inline as plain text
+ if( !preg_match( '/\<script\>/', $acceptableTags ) ) {
+ $data = preg_replace( "/(\<script)(.*?)(script\>)/si", '', $data );
+ }
+
+ $data = strip_tags( $data, $acceptableTags );
+ } else {
+ // convert HTML to chars
+ $data = htmlspecialchars( $data, ENT_NOQUOTES, 'UTF-8' );
+ }
// Process pre_handlers here
foreach ($this->pre_handlers as $handler) {
diff --git a/plugins/storage.lulu.php b/plugins/storage.lulu.php
index b7e0ebe..2f49357 100644
--- a/plugins/storage.lulu.php
+++ b/plugins/storage.lulu.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package Liberty
* @subpackage plugins_storage
*/
@@ -58,9 +58,9 @@ $gLibertySystem->registerPlugin( PLUGIN_GUID_LULU, $pluginParams );
if( $pRow['foreign_id'] ) {
$cidGroup = ((int)($pRow['foreign_id'] / 1000)) * 1000;
$ret['source_url'] = 'http://www.lulu.com/content/'.$pRow['foreign_id'];
- $ret['thumbnail_url']['small'] = 'http://www.lulu.com/items/'.$cidGroup.'/'.$pRow['foreign_id'].'/current/preview/detail_'.$pRow['foreign_id'].'.jpg';
- $ret['thumbnail_url']['medium'] = 'http://www.lulu.com/items/'.$cidGroup.'/'.$pRow['foreign_id'].'/current/preview/320_'.$pRow['foreign_id'].'.jpg';
- $ret['thumbnail_url']['large'] = 'http://www.lulu.com/items/'.$cidGroup.'/'.$pRow['foreign_id'].'/current/preview/zoom_'.$pRow['foreign_id'].'.jpg';
+ $ret['thumbnail_url']['small'] = 'http://www.lulu.com/author/display_thumbnail.php?fSize=promo_&fCID='.$pRow['foreign_id'];
+ $ret['thumbnail_url']['medium'] = 'http://www.lulu.com/author/display_thumbnail.php?fSize=detail_&fCID='.$pRow['foreign_id'];
+ $ret['thumbnail_url']['large'] = 'http://www.lulu.com/author/display_thumbnail.php?fSize=320_&fCID='.$pRow['foreign_id'];
$ret['attachment_id'] = $pRow['attachment_id'];
$ret['wiki_plugin_link'] = "{ATTACHMENT(id=>".$ret['attachment_id'].")}{ATTACHMENT}";
}
diff --git a/templates/admin_plugins.tpl b/templates/admin_plugins.tpl
index 02945cd..0fe3818 100644
--- a/templates/admin_plugins.tpl
+++ b/templates/admin_plugins.tpl
@@ -7,7 +7,6 @@
<h1>{tr}Admin Liberty Plugins{/tr}</h1>
</div>
- {debug}
<div class="body">
{form legend="Liberty Plugins"}
{formfeedback error=$errorMsg}
@@ -57,57 +56,23 @@
{/if}
{/foreach}
</table>
- {/jstab}
- {/foreach}
- {/jstabs}
- {*
- {foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
- {if $prev_type ne $plugin.plugin_type and $prev_type ne ''}
- </table><!-- close all but last table -->
- <br />
- {/if}
+ <br />
- {if $prev_type ne $plugin.plugin_type}
- <!-- create new table on plugin_type change -->
- <table class="panel">
- <caption>{tr}Plugin Type: {$plugin.plugin_type}{/tr}</caption>
- <tr>
- <th style="width:70%;">{tr}Plugin{/tr}</th>
- {if $plugin.plugin_type eq 'format'}
- <th style="width:5%;">{tr}Default{/tr}</th>
- {/if}
- <th style="width:20%;">{tr}GUID{/tr}</th>
- <th style="width:5%;">{tr}Active{/tr}</th>
- </tr>
- {/if}
-
- {assign var=prev_type value=$plugin.plugin_type}
- <tr class="{cycle values="odd,even"}">
- <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}
- <td>{$guid}</td>
- <td align="center">
- {if $plugin.is_active=='x'}
- Missing
- {else}
- {html_checkboxes name="PLUGINS[`$guid`]" values="y" checked=`$plugin.is_active` labels=false id=$guid}
+ {if $plugin_type eq 'format'}
+ {formfeedback warning="{tr}This will change the way any wiki page that contains HTML will be displayed{/tr}"}
+ <div class="row">
+ {formlabel label="Allow HTML" for="allow_html"}
+ {forminput}
+ <input type="checkbox" name="allow_html[]" id="allow_html" {if $gBitSystem->isFeatureActive( 'allow_html' ) }checked="checked"{/if} />
+ {formhelp note="Allow the use of HTML in tikiwiki format content."}
+ {/forminput}
+ </div>
{/if}
- </td>
- </tr>
- {/foreach}
+ {/jstab}
+ {/foreach}
+ {/jstabs}
- </table><!-- close last table -->
-*}
<div class="row submit">
<input type="submit" name="pluginsave" value="{tr}Save Plugin Settings{/tr}" />
</div>