summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-11-22 07:27:19 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-11-22 07:27:19 +0000
commit065390ab852a58a14c6339e90dfb0d7eced2afba (patch)
treed112df21749dc050030bf4b665da4e3755a3a9f4 /plugins
parent300a03c554874c55d3a6861450a7c780e19c89f4 (diff)
downloadliberty-065390ab852a58a14c6339e90dfb0d7eced2afba.tar.gz
liberty-065390ab852a58a14c6339e90dfb0d7eced2afba.tar.bz2
liberty-065390ab852a58a14c6339e90dfb0d7eced2afba.zip
merge recent changes into HEAD
Diffstat (limited to 'plugins')
-rw-r--r--plugins/data.addtabs.php6
-rw-r--r--plugins/data.agentinfo.php6
-rw-r--r--plugins/data.article.php6
-rw-r--r--plugins/data.avatar.php6
-rw-r--r--plugins/data.backlinks.php8
-rw-r--r--plugins/data.category.php6
-rw-r--r--plugins/data.catorphans.php6
-rw-r--r--plugins/data.catpath.php6
-rw-r--r--plugins/data.code.php6
-rw-r--r--plugins/data.copyright.php6
-rw-r--r--plugins/data.countdown.php6
-rw-r--r--plugins/data.dropdown.php4
-rw-r--r--plugins/data.example.php4
-rw-r--r--plugins/data.flash.php6
-rw-r--r--plugins/data.gauge.php6
-rw-r--r--plugins/data.lang.php8
-rw-r--r--plugins/data.ledgertable.php148
-rw-r--r--plugins/data.maketoc.php8
-rw-r--r--plugins/data.mapquest.php6
-rw-r--r--plugins/data.module.php16
-rw-r--r--plugins/data.mqdirections.php6
-rw-r--r--plugins/data.pluginhelp.php6
-rw-r--r--plugins/data.sf.php6
-rw-r--r--plugins/data.sort.php6
-rw-r--r--plugins/data.split.php6
-rw-r--r--plugins/data.spytext.php4
-rw-r--r--plugins/data.titlesearch.php6
-rw-r--r--plugins/data.translated.php8
-rw-r--r--plugins/data.usercount.php6
-rwxr-xr-xplugins/data.userlink.php6
-rw-r--r--plugins/data.userlist.php6
-rw-r--r--plugins/data.wikigraph.php6
-rw-r--r--plugins/data.wikilist.php6
-rw-r--r--plugins/format.markdown.php16
-rw-r--r--plugins/format.tikiwiki.php4
-rw-r--r--plugins/storage.bitfile.php13
36 files changed, 280 insertions, 105 deletions
diff --git a/plugins/data.addtabs.php b/plugins/data.addtabs.php
index 889daa0..53119d5 100644
--- a/plugins/data.addtabs.php
+++ b/plugins/data.addtabs.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @package liberty
* @subpackage plugins_data
*/
@@ -15,7 +15,7 @@
// +----------------------------------------------------------------------+
// | Author: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.addtabs.php,v 1.5 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.addtabs.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -62,7 +62,7 @@ function data_addtabs_help() {
}
function data_addtabs($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$ret = '<div class="tabpane">';
for ($i = 1; $i <= 99; $i++) {
if( isset( ${'tab'.$i} ) && is_numeric( ${'tab'.$i} ) ) {
diff --git a/plugins/data.agentinfo.php b/plugins/data.agentinfo.php
index 9071162..3b44bea 100644
--- a/plugins/data.agentinfo.php
+++ b/plugins/data.agentinfo.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.agentinfo.php,v 1.5 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.agentinfo.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -65,7 +65,7 @@ function data_agentinfo_help() {
// Load Function
function data_agentinfo($data, $params) {
$info = 'IP';
- extract ($params);
+ extract ($params, EXTR_SKIP);
switch (strtoupper ($info)) {
case 'SVRSW': // To maintain Pre-Clyde Parameters
case 'SERVER':
diff --git a/plugins/data.article.php b/plugins/data.article.php
index ef5ec6c..e0b2b7c 100644
--- a/plugins/data.article.php
+++ b/plugins/data.article.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_article.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.article.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.article.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -85,7 +85,7 @@ if( $gBitSystem->isPackageActive( 'articles' ) ) {
function wikiplugin_article($data, $params) {
global $artlib;
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($id)) {
return ("<b>The plugin Article needs an article ID to function.</b><br/>");
}
diff --git a/plugins/data.avatar.php b/plugins/data.avatar.php
index bfc8ea3..460ee91 100644
--- a/plugins/data.avatar.php
+++ b/plugins/data.avatar.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_avatar.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.avatar.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.avatar.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -90,7 +90,7 @@ require_once( KERNEL_PKG_PATH.'BitBase.php' );
function wikiplugin_avatar($data, $params) {
global $gBitSystem;
global $gBitUser;
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (isset($float))
$avatar = $gBitSystem->get_user_avatar($data, $float);
else
diff --git a/plugins/data.backlinks.php b/plugins/data.backlinks.php
index 1a09e8c..5073138 100644
--- a/plugins/data.backlinks.php
+++ b/plugins/data.backlinks.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_backlinks.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.backlinks.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.backlinks.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -89,7 +89,7 @@ function data_backlinks($data, $params) { // Pre-Clyde Changes
// Renamed Parameters $include_self to $self & $noheader to $header
// Changed $header so that any value passed to it makes it True
// Added testing to Maintain Pre-Clyde compatability
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (isset ($include_self) && ($include_self) ) // Maintain Pre-Clyde compatability
$self = TRUE;
$self = isset($self) ? TRUE : FALSE; // Any value passed in this parameter makes it True
@@ -111,7 +111,7 @@ The code below is from the deprecated BACKLINKS plugin. All comments and the hel
global $wikilib;
$params = $this->getParams($params, true);
$aInfoPreset = array_keys($this->aInfoPresetNames);
- extract ($params);
+ extract ($params, EXTR_SKIP);
/////////////////////////////////
// Create a valid list for $info
/////////////////////////////////
diff --git a/plugins/data.category.php b/plugins/data.category.php
index e0c1101..1c4325f 100644
--- a/plugins/data.category.php
+++ b/plugins/data.category.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @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.5 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.category.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -120,7 +120,7 @@ function wikiplugin_category($data, $params) {
if ($package_categories != 'y') {
return "<span class='warn'>" . tra("Categories are disabled"). "</span>";
}
- extract ($params);
+ extract ($params, EXTR_SKIP);
// array for converting long type names (as in database) to short names (as used in plugin)
$typetokens = array(
"article" => "article",
diff --git a/plugins/data.catorphans.php b/plugins/data.catorphans.php
index d200549..8a8a22c 100644
--- a/plugins/data.catorphans.php
+++ b/plugins/data.catorphans.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @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.5 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.catorphans.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -88,7 +88,7 @@ function wikiplugin_catorphans($data, $params) {
if ($package_categories != 'y') {
return "<span class='warn'>" . tra("Categories are disabled"). "</span>";
}
- extract ($params);
+ extract ($params, EXTR_SKIP);
// array for converting long type names (as in database) to short names (as used in plugin)
$typetokens = array(
"article" => "article",
diff --git a/plugins/data.catpath.php b/plugins/data.catpath.php
index af4fbfb..f1998b0 100644
--- a/plugins/data.catpath.php
+++ b/plugins/data.catpath.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @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.5 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.catpath.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -89,7 +89,7 @@ function wikiplugin_catpath($data, $params) {
if ($package_categories != 'y') {
return "<span class='warn'>" . tra("Categories are disabled"). "</span>";
}
- extract ($params);
+ extract ($params, EXTR_SKIP);
// default divider is '>'
if (!(isset($divider))) {
$divider = '>';
diff --git a/plugins/data.code.php b/plugins/data.code.php
index 665e041..75cb53b 100644
--- a/plugins/data.code.php
+++ b/plugins/data.code.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.code.php,v 1.6 2005/10/29 17:54:23 squareing Exp $
+// $Id: data.code.php,v 1.7 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -91,7 +91,7 @@ function data_code( $data, $params ) { // Pre-Clyde Changes
// Added testing to maintain Pre-Clyde compatability
// $num = NULL;
$add_tags = false;
- extract ($params);
+ extract ($params, EXTR_SKIP);
// This maintains Pre-Clyde Parameters
if (isset($colors) and ($colors == 'php') ) $source = 'php';
if (isset($in) ) $source = $in;
diff --git a/plugins/data.copyright.php b/plugins/data.copyright.php
index 809ed13..f903d9e 100644
--- a/plugins/data.copyright.php
+++ b/plugins/data.copyright.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.copyright.php,v 1.3 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.copyright.php,v 1.4 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -79,7 +79,7 @@ function data_copyright($data, $params) { // Pre-Clyde Changes
// The next 2 lines allow access to the $pluginParams given above and may be removed when no longer needed
global $gLibertySystem;
$pluginParams = $gLibertySystem->mPlugins[PLUGIN_GUID_DATACOPYRIGHT];
- extract ($params);
+ extract ($params, EXTR_SKIP);
// This maintains Pre-Clyde Parameters
if ( !empty( $data) ) { // The problem with this is that $authors HAS to be the last key-word
$pos1 = strpos( strtolower($data), '~title~') + 7;
diff --git a/plugins/data.countdown.php b/plugins/data.countdown.php
index 5f15782..c17d172 100644
--- a/plugins/data.countdown.php
+++ b/plugins/data.countdown.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.countdown.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.countdown.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -68,7 +68,7 @@ function data_countdown($data, $params) {
// The next 2 lines allow access to the $pluginParams given above
global $gLibertySystem;
$pluginParams = $gLibertySystem->mPlugins[PLUGIN_GUID_DATACOUNTDOWN];
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($enddate) ) { // The Manditory Parameter is missing
$ret = tra("The required parameter ") . "<strong>enddate</strong>" . tra(" was missing from the plugin ") . '<strong>"' . $pluginParams['tag'] . '"</strong>';
$ret.= data_countdown_help();
diff --git a/plugins/data.dropdown.php b/plugins/data.dropdown.php
index b04e6c6..2e43da7 100644
--- a/plugins/data.dropdown.php
+++ b/plugins/data.dropdown.php
@@ -4,7 +4,7 @@
* assigned_modules
*
* @author StarRider <starrrider@sourceforge.net>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @package liberty
* @subpackage plugins_data
*
@@ -63,7 +63,7 @@ function data_dropdown_help() {
* Load Function
*/
function data_dropdown($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$title = (isset($title)) ? $title : 'For More Information';
$width = (isset($width)) ? $width : '20';
$width = ((100 - $width) / 2) . '%';
diff --git a/plugins/data.example.php b/plugins/data.example.php
index ba36530..3b5c54a 100644
--- a/plugins/data.example.php
+++ b/plugins/data.example.php
@@ -4,7 +4,7 @@
* assigned_modules
*
* @author StarRider starrrider@sourceforge.net
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
* @package liberty
* @subpackage plugins_data
* @copyright Copyright (c) 2004, bitweaver.org
@@ -63,7 +63,7 @@ function data_example_help() {
* Load Function *
****************/
function data_example($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$ret = ' ';
return $ret;
diff --git a/plugins/data.flash.php b/plugins/data.flash.php
index 652d9f2..f7ab0c8 100644
--- a/plugins/data.flash.php
+++ b/plugins/data.flash.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.flash.php,v 1.4 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.flash.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -79,7 +79,7 @@ function data_flash_help() {
// Load Function
function data_flash($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$w = (isset($width)) ? $width : "";
$h = (isset($height)) ? $height : "";
$q = (isset($quality)) ? $quality : "high";
diff --git a/plugins/data.gauge.php b/plugins/data.gauge.php
index f3f57a5..cdaf1e4 100644
--- a/plugins/data.gauge.php
+++ b/plugins/data.gauge.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
// | by: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.gauge.php,v 1.7 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.gauge.php,v 1.8 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -98,7 +98,7 @@ function data_gauge_help() {
// Load Function
function data_gauge($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($max)) {
$max = 100;
}
diff --git a/plugins/data.lang.php b/plugins/data.lang.php
index 85e5edd..d85af5e 100644
--- a/plugins/data.lang.php
+++ b/plugins/data.lang.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_lang.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.lang.php,v 1.3 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.lang.php,v 1.4 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -53,7 +53,7 @@ function data_lang_help() {
// Load Function
function data_lang($data, $params) {
global $gBitLanguage;
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($lang) || $lang == $gBitLanguage->mLanguage)
return $data;
else
@@ -64,7 +64,7 @@ The code below is from the deprecated LANG plugin. All comments and the help rou
function wikiplugin_lang($data, $params) {
global $gBitLanguage;
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($lang) || $lang == $gBitLanguage->mLanguage)
return $data;
else
diff --git a/plugins/data.ledgertable.php b/plugins/data.ledgertable.php
new file mode 100644
index 0000000..ee68af4
--- /dev/null
+++ b/plugins/data.ledgertable.php
@@ -0,0 +1,148 @@
+<?php
+// $Id: data.ledgertable.php,v 1.2 2005/11/22 07:27:18 squareing Exp $
+/**
+ * assigned_modules
+ *
+ * @author KainX <mej@kainx.org>
+ * @version $Revision: 1.2 $
+ * @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.
+ * @license Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
+ */
+/******************
+ * Initialization *
+ ******************/
+define( 'PLUGIN_GUID_DATALEDGERTABLE', 'dataledgertable' );
+global $gLibertySystem;
+$pluginParams = array ( 'tag' => 'LEDGERTABLE',
+ 'auto_activate' => FALSE,
+ 'requires_pair' => TRUE,
+ 'load_function' => 'data_ledgertable',
+ 'title' => 'Ledger Table (LEDGERTABLE)',
+ 'help_page' => 'DataPluginLedgertable',
+ 'description' => tra("This Plugin creates a ledger-like table with even/odd row colors, optional top- or left-placed headers, and support for row/column spans."),
+ 'help_function' => 'data_ledgertable_help',
+ 'syntax' => "{LEDGERTABLE loc= head= }",
+ 'plugin_type' => DATA_PLUGIN
+);
+$gLibertySystem->registerPlugin( PLUGIN_GUID_DATALEDGERTABLE, $pluginParams );
+$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATALEDGERTABLE );
+/*****************
+ * Help Function *
+ *****************/
+function data_ledgertable_help() {
+ $help =
+ '<table class="data help">'
+ .'<tr>'
+ .'<th>' . tra( "Key" ) . '</th>'
+ .'<th>' . tra( "Type" ) . '</th>'
+ .'<th>' . tra( "Comments" ) . '</th>'
+ .'</tr>'
+ .'<tr class="odd">'
+ .'<td>loc</td>'
+ .'<td>' . tra( "string") . '<br />' . tra("(optional)") . '</td>'
+ .'<td>' . tra( "Where to display row/column headers (\"left\" or \"top\", default <strong>top</strong>).")
+ .'</td>'
+ .'</tr>'
+ .'<tr class="even">'
+ .'<td>head</td>'
+ .'<td>' . tra( "string") . '<br />' . tra("(optional)") . '</td>'
+ .'<td>' . tra( "Header(s) separated by \"~|~\", default <strong>none</strong>")
+ .'</td>'
+ .'</tr>'
+ .'</table>'
+ . tra("LedgerTable: ") . "{LEDGERTABLE loc=>left head=>Row1~|~Row2~|~Row3}<br />"
+ . tra("This will display")
+ . data_ledgertable('Example', array('loc' => 'left', 'head' => 'Row1~|~Row2~|~Row3'));
+ return $help;
+}
+/****************
+* Load Function *
+ ****************/
+function data_ledgertable($data, $params) {
+ global $gBitSystem;
+
+ if (empty($data)) {
+ return "<!-- Error: No data passed to LEDGERTABLE plugin. -->";
+ }
+ if (substr($data, 0, 1) == "\n") {
+ $data = substr($data, 1);
+ }
+
+ $ret = '';
+ if (isset($params['loc'])) {
+ $ret .= "<!-- Header row set to $params[loc]. -->";
+ $plugdata_loc = $params['loc'];
+ } else {
+ $ret .= "<!-- Defaulting header row to top. -->";
+ $plugdata_loc = 'top';
+ }
+ if (isset($params['head'])) {
+ $ret .= "<!-- Got headers. -->";
+ $plugdata_head = $params['head'];
+ } else {
+ $ret .= "<!-- No headers specified. -->";
+ }
+ if (isset($params['width'])) {
+ $ret .= "<!-- Got width $params[width]. -->";
+ $plugdata_width = " style=\"width: " . $params['width'] . '"';
+ } else {
+ $plugdata_width = "";
+ }
+
+ $ret .= "<table class=\"ledgertable\"$plugdata_width>";
+
+ if (isset($plugdata_head)) {
+ $headers = explode('~|~', $plugdata_head);
+ if ($plugdata_loc == 'top') {
+ $ret .= " <!-- Placing header row on top. -->";
+ $ret .= " <tr class=\"ledgertable header row\">";
+ foreach ($headers as $hdr) {
+ $ret .= " <th class=\"header highlight\">$hdr</td>";
+ }
+ $ret .= " </tr>";
+ }
+ }
+
+ $lines = split("\n", $data);
+ $line_count = 0;
+ foreach ($lines as $line) {
+ $line = trim($line);
+ if (strlen($line) <= 0) {
+ continue;
+ }
+ $line_count++;
+
+ $ret .= " <!-- Displaying row $line_count. -->";
+ $ret .= " <tr class=\"" . (($line_count % 2) ? ("odd") : ("even")) . "\">";
+ if (isset($plugdata_head) && ($plugdata_loc == "left")) {
+ $ret .= " <!-- Placing header on left. -->";
+ $ret .= " <th class=\"header highlight\"";
+ $header = array_shift($headers);
+ if (preg_match("/^~(row|col)span:(\d+)~(.*)$/", $header, $matches)) {
+ $ret .= " $matches[1]span=\"$matches[2]\"";
+ $header = $matches[3];
+ }
+ $ret .= ">$header</td>";
+ }
+ $cells = explode("~|~", $line);
+ foreach ($cells as $col) {
+ $ret .= " <td class=\"" . (($line_count % 2) ? ("odd") : ("even")) . "\"";
+ $col = trim($col);
+ if (!strcmp($col, "~blank~")) {
+ $col = "&nbsp;";
+ } else if (preg_match("/^~(row|col)span:(\d+)~(.*)$/", $col, $matches)) {
+ $ret .= " $matches[1]span=\"$matches[2]\"";
+ $col = $matches[3];
+ }
+ $ret .= ">$col</td>";
+ }
+ $ret .= " </tr>";
+ }
+ $ret .= "</table>";
+
+ return $ret;
+}
+?>
diff --git a/plugins/data.maketoc.php b/plugins/data.maketoc.php
index 45baabd..58760e3 100644
--- a/plugins/data.maketoc.php
+++ b/plugins/data.maketoc.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -15,7 +15,7 @@
// +----------------------------------------------------------------------+
// | Author: xing <xing@synapse.plus.com>
// +----------------------------------------------------------------------+
-// $Id: data.maketoc.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.maketoc.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -80,7 +80,7 @@ function data_maketoc( $data ) {
// remove any html tags from the output text and generate link ids
foreach( $headers[2] as $output ) {
$outputs[] = preg_replace( "/<.*?>/", "", $output );
- $anchor = preg_replace( "/[^\w|\d]*/", "", $output );
+ $anchor = preg_replace( "/<.*?>|[^\w|\d]*/", "", $output );
$anchors[] = !empty( $anchor) ? $anchor : 'id'.microtime() * 1000000;
}
@@ -115,7 +115,7 @@ function data_maketoc( $data ) {
}
function maketoc_create_list( $pTocHash, $pParams ) {
- extract( $pTocHash );
+ extract( $pTocHash , EXTR_SKIP);
// previous level
$prev = 0;
diff --git a/plugins/data.mapquest.php b/plugins/data.mapquest.php
index da8f7a9..418704c 100644
--- a/plugins/data.mapquest.php
+++ b/plugins/data.mapquest.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @package liberty
* @subpackage plugins_data
*/
@@ -15,7 +15,7 @@
// +----------------------------------------------------------------------+
// | Author: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.mapquest.php,v 1.5 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.mapquest.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -126,7 +126,7 @@ function data_mapquest_help() {
// Load Function
function data_mapquest( $data, $params ) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$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;">';
diff --git a/plugins/data.module.php b/plugins/data.module.php
index a760fd5..4428f9f 100644
--- a/plugins/data.module.php
+++ b/plugins/data.module.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @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.5 2005/10/23 14:40:49 squareing Exp $
+// $Id: data.module.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -56,6 +56,11 @@ function datamodule_help() {
.'<td>' . tra( "string" ) . '<br />' . tra( "(required)" ) . '</td>'
.'<td>' . tra( "Package the module is part of.")
.'</tr>'
+ .'<tr class="even">'
+ .'<td>rows</td>'
+ .'<td>' . tra( "numeric" ) . '<br />' . tra( "(optional)" ) . '</td>'
+ .'<td>' . tra( "Number of rows you wish to show.")
+ .'</tr>'
.'<tr class="odd">'
.'<td colspan="3">' . tra( "Additional arguments and values depend on the selected module." )
.'</tr>'
@@ -69,10 +74,12 @@ function data_datamodule( $data, $params ) {
require_once( KERNEL_PKG_PATH.'mod_lib.php' );
$out = '';
- extract( $params );
+ extract( $params , EXTR_SKIP);
if( !empty( $module ) && !empty( $package ) ) {
// not sure if we can use the php file, since it sets everything to NULL when passed in - xing
+ global $module_rows;
+ $module_rows = !empty( $rows ) ? $rows : 10;
$php = constant( strtoupper( $package ).'_PKG_PATH' ).'modules/mod_'.$module.'.php';
// TODO: assigning variables to template doesn't work since they are replaced by module paramaters set in the php file - even when it's not in use! - xing
$tpl = 'bitpackage:'.$package.'/mod_'.$module.'.tpl';
@@ -89,6 +96,7 @@ function data_datamodule( $data, $params ) {
}
}
$out = eregi_replace( "\n", "", $out );
+ //vd($out);
// deal with custom styling
$style = '';
@@ -132,7 +140,7 @@ function data_datamodule($data, $params) {
$feature_tasks, $feature_user_bookmarks, $bit_p_tasks, $bit_p_create_bookmarks, $imagegallib;
require_once( KERNEL_PKG_PATH.'mod_lib.php' );
$out = '';
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($align)) {
$align = 'left';
}
diff --git a/plugins/data.mqdirections.php b/plugins/data.mqdirections.php
index 6bb384b..ac0e393 100644
--- a/plugins/data.mqdirections.php
+++ b/plugins/data.mqdirections.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @package liberty
* @subpackage plugins_data
*/
@@ -15,7 +15,7 @@
// +----------------------------------------------------------------------+
// | Author: StarRider <starrrider@users.sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.mqdirections.php,v 1.5 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.mqdirections.php,v 1.6 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -94,7 +94,7 @@ function data_mqdir_help() {
// Load Function
function data_mqdir( $data, $params ) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$a2a = isset($address) ? $address : ' ';
$a2c = isset($city) ? $city : ' ';
diff --git a/plugins/data.pluginhelp.php b/plugins/data.pluginhelp.php
index 486e818..9f4ee6e 100644
--- a/plugins/data.pluginhelp.php
+++ b/plugins/data.pluginhelp.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Rewritten for bitweaver by Author
// | wikiplugin_pluginhelp.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.pluginhelp.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.pluginhelp.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -58,7 +58,7 @@ The code below is from the deprecated PLUGINHELP plugin. All comments and the he
include_once( WIKI_PKG_PATH.'BitPage.php');
function wikiplugin_pluginhelp($data, $params) {
global $wikilib;
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($plugin)) {
return tra("The plugin <b>PluginHelp</b> needs the name of a plugin to function. Please seek Help.<br/>");
}
diff --git a/plugins/data.sf.php b/plugins/data.sf.php
index c52ef3b..e3b667a 100644
--- a/plugins/data.sf.php
+++ b/plugins/data.sf.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked & Undoubtedly Screwed-Up for (Bitweaver)
// | by: StarRider <starrrider@sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.sf.php,v 1.6 2005/08/24 20:55:17 squareing Exp $
+// $Id: data.sf.php,v 1.7 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -104,7 +104,7 @@ function data_sf($data, $params) {
// JGraph ******************************************************
$sftags['pbbrfe'] = array('7885','58021','PhpBB',' Bug #',' Bug Index');
- extract ($params);
+ extract ($params, EXTR_SKIP);
$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"];
diff --git a/plugins/data.sort.php b/plugins/data.sort.php
index bf46993..5fbab75 100644
--- a/plugins/data.sort.php
+++ b/plugins/data.sort.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -17,7 +17,7 @@
// | Reworked & Undoubtedly Screwed-Up for (Bitweaver)
// | by: StarRider <starrrider@sourceforge.net>
// +----------------------------------------------------------------------+
-// $Id: data.sort.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.sort.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -54,7 +54,7 @@ function data_sort_help() {
* Load Function
*/
function data_sort($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$sort = (isset($sort)) ? $sort : "asc";
$lines = explode("\n", $data); // separate lines into array
// $lines = array_filter( $lines, "chop" ); // remove \n
diff --git a/plugins/data.split.php b/plugins/data.split.php
index 8567431..66cb3d5 100644
--- a/plugins/data.split.php
+++ b/plugins/data.split.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_split.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.split.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.split.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -64,7 +64,7 @@ function wikiplugin_split($data, $params) {
// Remove first <ENTER> if exists...
// it may be here if present after {SPLIT()} in original text
if (substr($data, 0, 1) == "\n") $data = substr($data, 1);
- extract ($params);
+ extract ($params, EXTR_SKIP);
$fixedsize = (!isset($fixedsize) ? true : false);
$joincols = (!isset($joincols) ? true : false);
// Split data by rows and cells
diff --git a/plugins/data.spytext.php b/plugins/data.spytext.php
index e46c1dd..fdf6f46 100644
--- a/plugins/data.spytext.php
+++ b/plugins/data.spytext.php
@@ -4,7 +4,7 @@
* assigned_modules
*
* @author StarRider starrrider@sourceforge.net
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
* @package liberty
* @subpackage plugins_data
* @copyright Copyright (c) 2004, bitweaver.org
@@ -153,7 +153,7 @@ function data_spytext_help() {
function data_spytext($data, $params) {
global $gLibertySystem;
global $gBitUser;
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (empty($data)) { // If there is NO data to display - why do anything - get out of here
return " ";
diff --git a/plugins/data.titlesearch.php b/plugins/data.titlesearch.php
index 06170d5..35e8281 100644
--- a/plugins/data.titlesearch.php
+++ b/plugins/data.titlesearch.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@users.sourceforge.net>
// | Reworked from: wikiplugin_titlesearch.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.titlesearch.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.titlesearch.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -65,7 +65,7 @@ The code below is from the deprecated TITLESEARCH plugin. All comments and the h
global $WikiLib;
$aInfoPreset = array_keys($this->aInfoPresetNames);
$params = $this->getParams($params, true);
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!$search) {
return $this->error("You have to define a search");
}
diff --git a/plugins/data.translated.php b/plugins/data.translated.php
index 57897fd..b7533b1 100644
--- a/plugins/data.translated.php
+++ b/plugins/data.translated.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@sourceforge.net>
// | Reworked from: wikiplugin_translated.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.translated.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.translated.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -55,7 +55,7 @@ function data_translated_help() {
// Load Function
function data_translated($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (!isset($page) ) { // A Manditory Parameter is missing
$ret = 'The __page__ parameter was missing from the __~np~{TRANSLATED}~/np~__ plugin.';
$ret.= data_translated_help();
@@ -88,7 +88,7 @@ function data_translated($data, $params) {
/******************************************************************************
The code below is from the deprecated TRANSLATED plugin. All comments and the help routines have been removed. - StarRider
function wikiplugin_translated($data, $params) {
- extract ($params);
+ extract ($params, EXTR_SKIP);
$img = '';
$h = opendir(USERS_PKG_URL . "icons/flags/");
while ($file = readdir($h)) {
diff --git a/plugins/data.usercount.php b/plugins/data.usercount.php
index b6d3fff..ba2d4fe 100644
--- a/plugins/data.usercount.php
+++ b/plugins/data.usercount.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@sourceforge.net>
// | Reworked from: wikiplugin_usercount.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.usercount.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.usercount.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -59,7 +59,7 @@ The code below is from the deprecated USERCOUNT plugin. All comments and the hel
function wikiplugin_usercount($data, $params) {
global $gBitUser;
- extract ($params);
+ extract ($params, EXTR_SKIP);
$numusers = $gBitUser->count_users($data);
return $numusers;
}
diff --git a/plugins/data.userlink.php b/plugins/data.userlink.php
index 804a2f2..4b2b972 100755
--- a/plugins/data.userlink.php
+++ b/plugins/data.userlink.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
* @package liberty
* @subpackage plugins_data
* @author bigwasp bigwasp@sourceforge.net
@@ -19,7 +19,7 @@
// | by: StarRider <starrrider@sourceforge.net>
// | Reworked from: wikiplugin_usercount.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.userlink.php,v 1.2 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.userlink.php,v 1.3 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -71,7 +71,7 @@ function data_userlink($data, $params) {
$nFlag = 0;
$myHash = array();
$ret = '';
- extract ($params);
+ extract ($params, EXTR_SKIP);
if (isset($login)) {
$myHash['login'] = $login;
$nFlag++;
diff --git a/plugins/data.userlist.php b/plugins/data.userlist.php
index 8ed651a..c063360 100644
--- a/plugins/data.userlist.php
+++ b/plugins/data.userlist.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@sourceforge.net>
// | Reworked from: wikiplugin_userlist.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.userlist.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.userlist.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -124,7 +124,7 @@ function wikiplugin_compare_users($a, $b) {
function wikiplugin_userlist($data, $params) {
global $gBitUser, $gBitSystem;
- extract ($params);
+ extract ($params, EXTR_SKIP);
$num = (isset($num)) ? True : False; // Default = False
$userspage = (!isset($userspage)) ? True : False; // Default = True
$alpha = (!isset($alpha)) ? True : False; // Default = True
diff --git a/plugins/data.wikigraph.php b/plugins/data.wikigraph.php
index 9f4e9d2..f6cfa88 100644
--- a/plugins/data.wikigraph.php
+++ b/plugins/data.wikigraph.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: wolff_borg <wolff_borg@yahoo.com.au>
// | Reworked from: wikiplugin_wikigraph.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.wikigraph.php,v 1.3 2005/08/30 22:25:07 squareing Exp $
+// $Id: data.wikigraph.php,v 1.4 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
*/
@@ -73,7 +73,7 @@ include_once( UTIL_PKG_PATH.'GraphViz.php' );
function data_wikigraph($data, $params) {
global $gContent, $wikilib;
$add = "";
- extract ($params);
+ extract ($params, EXTR_SKIP);
if(!isset($level)) $level = 0;
if(!isset($title)) $title = "Wiki-Graph";
if(isset($nodesep)) $add.="&amp;nodesep=$nodesep";
diff --git a/plugins/data.wikilist.php b/plugins/data.wikilist.php
index 7e66663..8f2a5e9 100644
--- a/plugins/data.wikilist.php
+++ b/plugins/data.wikilist.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
* @package liberty
* @subpackage plugins_data
*/
@@ -18,7 +18,7 @@
// | by: StarRider <starrrider@sourceforge.net>
// | Reworked from: wikiplugin_wikilist.php - see deprecated code below
// +----------------------------------------------------------------------+
-// $Id: data.wikilist.php,v 1.4 2005/08/07 17:40:31 squareing Exp $
+// $Id: data.wikilist.php,v 1.5 2005/11/22 07:27:18 squareing Exp $
/**
* definitions
@@ -85,7 +85,7 @@ function wikiplugin_wikilist($data, $params) {
// turn off $feature_hotwords to avoid conflicts
$feature_hotwords = 'n';
- extract ($params);
+ extract ($params, EXTR_SKIP);
if(!isset($alpha)) { $alpha = 1; }
if(!isset($userpages)) { $userpages = "all"; }
if(!isset($num)) { $num = 0; }
diff --git a/plugins/format.markdown.php b/plugins/format.markdown.php
index 432cb74..adea9f2 100644
--- a/plugins/format.markdown.php
+++ b/plugins/format.markdown.php
@@ -1,9 +1,14 @@
<?php
+/**
+ * @version $Revision: 1.3 $
+ * @package liberty
+ * @subpackage plugins_format
+ */
-//===================================================//
-//=========== start bitweaver configuration =========//
-//===================================================//
+/**
+ * Initialization
+ */
global $gLibertySystem;
/**
@@ -183,7 +188,10 @@ function smarty_modifier_markdown($text) {
if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) {
# Try to include PHP SmartyPants. Should be in the same directory.
@include_once 'smartypants.php';
- # Fake Textile class. It calls Markdown instead.
+ /**
+ * @package liberty
+ * Fake Textile class. It calls Markdown instead.
+ */
class Textile {
function TextileThis($text, $lite='', $encode='', $noimage='', $strict='') {
if ($lite == '' && $encode == '') $text = Markdown($text);
diff --git a/plugins/format.tikiwiki.php b/plugins/format.tikiwiki.php
index 4f6964a..2c1928a 100644
--- a/plugins/format.tikiwiki.php
+++ b/plugins/format.tikiwiki.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
* @package liberty
*/
global $gLibertySystem;
@@ -693,6 +693,8 @@ $this->debug(0);
$data = preg_replace("/===([^\=]+)===/", "<span style=\"text-decoration:underline;\">$1</span>", $data);
// Center text
$data = preg_replace("/::(.+?)::/", "<div style=\"text-align:center;\">$1</div>", $data);
+ // Line breaks
+ $data = preg_replace('/%%%/', '<br />', $data);
// New syntax for wiki pages ((name|desc)) Where desc can be anything
preg_match_all("/\(\(($this->mWikiWordRegex)\|(.+?)\)\)/", $data, $pages);
diff --git a/plugins/storage.bitfile.php b/plugins/storage.bitfile.php
index be15c1f..595608e 100644
--- a/plugins/storage.bitfile.php
+++ b/plugins/storage.bitfile.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
* @package liberty
* @subpackage plugins_storage
*/
@@ -69,11 +69,17 @@ function bit_files_load( $pRow ) {
WHERE ta.`foreign_id` = ? AND ta.`content_id` = ?";
if( $rs = $gBitSystem->mDb->query($query, array( $pRow['foreign_id'], $pRow['content_id'] )) ) {
$ret = $rs->fields;
- if (preg_match ( '/image\//', $ret['mime_type'] )) {
+ $canThumbFunc = liberty_get_function( 'can_thumbnail' );
+ if ( file_exists( BIT_ROOT_PATH.dirname( $ret['storage_path'] ).'/medium.jpg' ) ) {
$ret['thumbnail_url']['avatar'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/avatar.jpg';
$ret['thumbnail_url']['small'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/small.jpg';
$ret['thumbnail_url']['medium'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/medium.jpg';
$ret['thumbnail_url']['large'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/large.jpg';
+ } elseif( $canThumbFunc( $ret['mime_type'] ) ) {
+ $ret['thumbnail_url']['avatar'] = LIBERTY_PKG_URL.'icons/generating_thumbnails.png';
+ $ret['thumbnail_url']['small'] = LIBERTY_PKG_URL.'icons/generating_thumbnails.png';
+ $ret['thumbnail_url']['medium'] = LIBERTY_PKG_URL.'icons/generating_thumbnails.png';
+ $ret['thumbnail_url']['large'] = LIBERTY_PKG_URL.'icons/generating_thumbnails.png';
} else {
$mime_thumbnail = $gLibertySystem->getMimeThumbnailURL($ret['mime_type']);
$ret['thumbnail_url']['avatar'] = $mime_thumbnail;
@@ -81,6 +87,9 @@ function bit_files_load( $pRow ) {
$ret['thumbnail_url']['medium'] = $mime_thumbnail;
$ret['thumbnail_url']['large'] = $mime_thumbnail;
}
+// if ( file_exists( BIT_ROOT_PATH.dirname( $ret['storage_path'] ).'/original.jpg' ) ) {
+// $ret['thumbnail_url']['original'] = BIT_ROOT_URL.dirname( $ret['storage_path'] ).'/original.jpg';
+// }
$ret['filename'] = substr( $ret['storage_path'], strrpos($ret['storage_path'], '/')+1);
$ret['source_url'] = BIT_ROOT_URL.str_replace( '+', '%20', str_replace( '%2F', '/', urlencode( $ret['storage_path'] ) ) );
$ret['wiki_plugin_link'] = "{attachment id=".$ret['attachment_id']."}";