Commit 1af99e83 authored by changi67's avatar changi67

[FIX] Zend Recommendation [wikiplugin]

parent eca14453
......@@ -10,5 +10,3 @@
header ("location: ../index.php");
die;
?>
......@@ -50,5 +50,3 @@ function wikiplugin_agentinfo($data, $params) {
return $asetup;
}
?>
......@@ -82,5 +82,3 @@ function wikiplugin_alink($data, $params)
return "<a href=\"#$aname\">$data</a>";
}
}
?>
......@@ -43,5 +43,3 @@ function wikiplugin_aname($data, $params)
return "<a id=\"$data\"></a>";
}
?>
......@@ -455,5 +455,3 @@ window.onload = function(event) {
~/np~
ANNOTATION;
}
?>
......@@ -63,5 +63,3 @@ function wikiplugin_article($data, $params) {
$article_data = $tikilib->get_article($Id);
return $article_data[$Field].$add;
}
?>
......@@ -150,4 +150,3 @@ function wikiplugin_articles($data,$params) {
}
//return str_replace("\n","",$smarty->fetch('tiki-view_articles.tpl')); // this considers the hour in the header like a link
}
?>
......@@ -319,5 +319,3 @@ function wikiplugin_attach($data, $params) {
return '~np~'.$data.'~/np~';
}
?>
......@@ -54,5 +54,3 @@ function wikiplugin_avatar($data, $params) {
return $avatar;
}
?>
......@@ -39,4 +39,3 @@ function wikiplugin_back($data, $params) {
return $begin . $content . $end;
}
?>
This diff is collapsed.
......@@ -45,7 +45,3 @@ function wikiplugin_banner($data, $params)
}
return '~np~'.$banner.'~/np~';
}
?>
......@@ -94,5 +94,3 @@ function wikiplugin_box($data, $params) {
//$data = $tikilib->parse_data($data);
return $begin . $data . $end;
}
?>
......@@ -103,5 +103,3 @@ function wikiplugin_category($data, $params) {
return "~np~". $categlib->get_categoryobjects($catids,$types,$sort,$split,$sub,$and)."~/np~";
}
?>
......@@ -99,5 +99,3 @@ function wikiplugin_catorphans($data, $params) {
return $orphans;
}
?>
......@@ -92,5 +92,3 @@ function wikiplugin_catpath($data, $params) {
return $catpath;
}
?>
......@@ -28,5 +28,3 @@ function wikiplugin_center($data, $params) {
$data = '<div align="center">' . trim($data). '</div>';
return $data;
}
?>
......@@ -186,5 +186,3 @@ function _wikiplugin_chart_uri( $params, $renderer )
return 'tiki-graph_sheet.php?' . implode( '&', $array );
}
?>
......@@ -158,5 +158,3 @@ function wikiplugin_code($data, $params) {
return $out;
}
?>
......@@ -23,5 +23,3 @@ function wikiplugin_content( $data, $params) {
if( $params['id'] )
return $tikilib->get_actual_content((int) $params['id']);
}
?>
......@@ -21,5 +21,3 @@ function wikiplugin_cookie( $data, $params )
return $cookie;
}
?>
......@@ -57,5 +57,3 @@ function wikiplugin_copyright($data, $params) {
return $result;
}
?>
......@@ -70,5 +70,3 @@ function wikiplugin_countdown($data, $params) {
$ret = "$days ".tra("days").", $hours ".tra("hours").", $mins ".tra("minutes")." ".tra("and")." $secs ".tra("seconds")." $data";
return $ret;
}
?>
......@@ -1606,5 +1606,3 @@ function wikiplugin_dbreport($data, $params) {
// return the result
return $ret;
}
?>
\ No newline at end of file
......@@ -70,4 +70,3 @@ function wikiplugin_div($data, $params) {
$end = "</$t>";
return $begin . $data . $end;
}
?>
......@@ -36,5 +36,3 @@ function wikiplugin_dl($data, $params) {
$result .= '</dl>';
return $result;
}
?>
......@@ -60,5 +60,3 @@ function wikiplugin_draw( $data, $params )
return $repl;
}
?>
......@@ -63,5 +63,3 @@ function wikiplugin_equation($data, $params) {
}
return $html;
}
?>
......@@ -135,5 +135,3 @@ function wikiplugin_events($data,$params) {
$repl .= '</table>';
return $repl;
}
?>
......@@ -37,5 +37,3 @@ function wikiplugin_fade( $body, $params )
$body = $tikilib->parse_data( $body );
return "~np~<a href=\"javascript:toggle('$unique')\">$label</a><div id=\"$unique\" style=\"display:none\">$body</div>~/np~";
}
?>
......@@ -59,5 +59,3 @@ function wikiplugin_fancylist($data, $params) {
}
return $result;
}
?>
......@@ -111,5 +111,3 @@ function wikiplugin_fancytable($data, $params) {
return $wret;
}
?>
......@@ -67,5 +67,3 @@ function wikiplugin_file( $data, $params )
return $tikilib->plugin_execute( 'attach', $middle, $forward );
}
?>
......@@ -293,4 +293,3 @@ function wikiplugin_files($data, $params) {
$smarty->assign_by_ref('show_find', $showfind);
return '~np~'.$smarty->fetch('wiki-plugins/wikiplugin_files.tpl').'~/np~';
}
?>
......@@ -50,5 +50,3 @@ function wikiplugin_flash($data, $params) {
}
return "~np~$code~/np~";
}
?>
......@@ -181,5 +181,3 @@ function wikiplugin_gauge($data, $params) {
$html .= "</table>";
return $html;
}
?>
......@@ -89,5 +89,3 @@ function wikiplugin_group($data, $params) {
return $data;
}
?>
......@@ -44,5 +44,3 @@ function wikiplugin_html($data, $params) {
// return the result
return $ret;
}
?>
......@@ -955,5 +955,3 @@ function wikiplugin_image( $data, $params, $offset, $parseOptions='' ) {
}
return $repl;
}
?>
......@@ -181,5 +181,3 @@ function wikiplugin_img( $data, $params, $offset, $parseOptions )
return $repl;
}
?>
......@@ -147,5 +147,3 @@ function wikiplugin_include($data, $params) {
}
return $text;
}
?>
......@@ -80,4 +80,3 @@ function wikiplugin_jabber($data,$params) {
$result.='</APPLET>';
return $result;
}
?>
......@@ -49,4 +49,3 @@ function wikiplugin_jq($data, $params) {
}
return '';
}
?>
......@@ -37,4 +37,3 @@ function wikiplugin_js($data, $params) {
}
return $ret;
}
?>
......@@ -43,4 +43,3 @@ function wikiplugin_lang($data, $params) {
}
return $data;
}
?>
......@@ -44,5 +44,3 @@ function wikiplugin_lastmod($data, $params) {
return $lastmod;
}
?>
......@@ -190,4 +190,3 @@ function wikiplugin_listpages($data, $params) {
return '~np~'.$ret.'~/np~';
}
?>
......@@ -155,5 +155,3 @@ function wikiplugin_lsdir($data, $params) {
return $ret;
}
?>
......@@ -89,5 +89,3 @@ function wikiplugin_map($data, $params) {
}
return $map;
}
?>
......@@ -164,5 +164,3 @@ function wikiplugin_miniquiz($data, $params) {
}
return $back;
}
?>
......@@ -189,5 +189,3 @@ function wikiplugin_module($data, $params) {
return $data;
}
?>
......@@ -56,5 +56,3 @@ function wikiplugin_mono($data, $params) {
return $data;
}
?>
......@@ -157,4 +157,3 @@ window.addEvent('domready', function() {
return $html;
}
?>
......@@ -367,4 +367,3 @@ function _check_class_attribute(&$attributes,$default_class = "",$add = True) {
$class .= " ".$attributes["class"];
$attributes["class"] = $class;
}
?>
......@@ -49,5 +49,3 @@ function wikiplugin_myspace($data, $params) {
return $data;
}
?>
......@@ -62,5 +62,3 @@ function wikiplugin_objecthits($data, $params) {
return $statslib->object_hits($object,$type,$days);
}
?>
......@@ -39,5 +39,3 @@ function wikiplugin_picture( $data, $params )
return $repl;
}
?>
......@@ -52,5 +52,3 @@ function wikiplugin_poll($data, $params) {
return $smarty->fetch("tiki-plugin_poll.tpl");
}
}
?>
......@@ -74,5 +74,3 @@ function wikiplugin_profile( $data, $params ) {
return '__' . tr('Profile %0/%1 not found', $params['domain'], $params['name']) . '__';
}
}
?>
......@@ -70,5 +70,3 @@ function wikiplugin_proposal($data, $params) {
return "~np~$content~/np~";
}
?>
......@@ -56,5 +56,3 @@ function wikiplugin_quote($data, $params) {
// if (substr($data, 0, 1) != "\n") $data = "\n".$data;
return $begin . $data . $end;
}
?>
......@@ -23,5 +23,3 @@ function wikiplugin_rcontent( $data, $params) {
if( $params['id'] )
return $tikilib->get_random_content((int) $params['id']);
}
?>
......@@ -54,5 +54,3 @@ function wikiplugin_redirect($data, $params) {
return $areturn;
}
?>
......@@ -47,4 +47,3 @@ $data=preg_replace($search,$replace,$data);
$data = trim($data);
return $data;
}
?>
......@@ -64,5 +64,3 @@ function wikiplugin_remarksbox($data, $params) {
$ret = '~np~'.smarty_block_remarksbox($params, '~/np~'.tra($data).'~np~', $smarty).'~/np~';
return $ret;
}
?>
......@@ -139,5 +139,3 @@ function wikiplugin_rss($data,$params) {
$smarty->assign('showauthor', $author > 0);
return '~np~' . $smarty->fetch( 'wiki-plugins/wikiplugin_rss.tpl' ) . '~/np~';
}
?>
......@@ -112,5 +112,3 @@ function wikiplugin_sf($data, $params) {
return $back;
}
?>
......@@ -231,5 +231,3 @@ $result = $sharethiscode;
return $result;
}
?>
......@@ -108,5 +108,3 @@ EOF;
return $ret;
}
?>
......@@ -87,5 +87,3 @@ function wikiplugin_showpages($data, $params) {
return $text;
}
?>
......@@ -68,5 +68,3 @@ $ret2 = "<a href='skype:$data?$action' onclick='return skypeCheck();'>$data?$act
return $ret1.$ret2;
}
?>
......@@ -118,5 +118,3 @@ function wikiplugin_snarf($data, $params)
}
return $ret;
}
?>
......@@ -57,5 +57,3 @@ function wikiplugin_sort($data, $params) {
$data = trim($data);
return $data;
}
?>
......@@ -260,4 +260,3 @@ function wikiplugin_split_cell($data, $pos, $cell) {
}
return array($start, $end - $start);
}
?>
......@@ -143,5 +143,3 @@ function wikiplugin_sql($data, $params) {
return $ret;
}
?>
......@@ -28,5 +28,3 @@ function wikiplugin_sub($data, $params)
extract ($params,EXTR_SKIP);
return "<sub>$data</sub>";
}
?>
......@@ -28,5 +28,3 @@ function wikiplugin_sup($data, $params)
extract ($params,EXTR_SKIP);
return "<sup>$data</sup>";
}
?>
......@@ -49,4 +49,3 @@ function wikiplugin_tag($data, $params) {
}
return "<$tag$style>$data</$tag>";
}
?>
......@@ -167,4 +167,3 @@ function wikiplugin_thumb($data, $params) {
$html.= "<img src='$image' width='$twidth' height='$theight' /></a>";
return $html;
}
?>
<?php
/**
* Include the library {@link PluginsLib}
*/
require_once "lib/wiki/pluginslib.php";
/**
* Title Search Plugin
* Search the titles of all pages in this wiki
* Params
* <ul>
* <li> search: required
* <li> info (allows multiple columns, joined by '|') : hits,lastModif,user,ip,len,comment,
* creator, version, flag, versions,links,backlinks
* <li> exclude (allows multiple pagenames) : HomePage|RecentChanges
* <li> noheader : by default, false
* </ul>
* @package Tikiwiki
* @subpackage TikiPlugins
* @author Claudio Bustos
* @version $Revision: 1.25 $
*/
function wikiplugin_titlesearch_help() {
return tra("Search the titles of all pages in this wiki").":<br />~np~{TITLESEARCH(search=>Admin,info=>hits|user,exclude=>HomePage|SandBox,noheader=>0)}{TITLESEARCH}~/np~";
/**
* Include the library {@link PluginsLib}
*/
require_once "lib/wiki/pluginslib.php";
/**
* Title Search Plugin
* Search the titles of all pages in this wiki
* Params
* <ul>
* <li> search: required
* <li> info (allows multiple columns, joined by '|') : hits,lastModif,user,ip,len,comment,
* creator, version, flag, versions,links,backlinks
* <li> exclude (allows multiple pagenames) : HomePage|RecentChanges
* <li> noheader : by default, false
* </ul>
* @package Tikiwiki
* @subpackage TikiPlugins
* @author Claudio Bustos
* @version $Revision: 1.25 $
*/
function wikiplugin_titlesearch_help() {
return tra("Search the titles of all pages in this wiki").":<br />~np~{TITLESEARCH(search=>Admin,info=>hits|user,exclude=>HomePage|SandBox,noheader=>0)}{TITLESEARCH}~/np~";
}
function wikiplugin_titlesearch_info() {
return array(
'name' => tra('Title Search'),
'documentation' => 'PluginTitleSearch',
'description' => tra('Search wiki page titles.'),
'prefs' => array( 'feature_wiki', 'wikiplugin_titlesearch' ),
'params' => array(
'search' => array(
'required' => true,
'name' => tra('Search Criteria'),
'description' => tra('Portion of a page name.'),
),
'info' => array(
'required' => false,
'name' => tra('Information'),
'description' => tra('hits|user'),
),
'exclude' => array(
'required' => false,
'name' => tra('Exclude'),
'description' => tra('Pipe separated list of page names to exclude from results.'),
),
'noheader' => array(
'required' => false,
'name' => tra('No Header'),
'description' => tra('0|1'),
),
),
);
}
function wikiplugin_titlesearch_info() {
return array(
'name' => tra('Title Search'),
'documentation' => 'PluginTitleSearch',
'description' => tra('Search wiki page titles.'),
'prefs' => array( 'feature_wiki', 'wikiplugin_titlesearch' ),
'params' => array(
'search' => array(
'required' => true,
'name' => tra('Search Criteria'),
'description' => tra('Portion of a page name.'),
),
'info' => array(
'required' => false,
'name' => tra('Information'),
'description' => tra('hits|user'),
),
'exclude' => array(
'required' => false,
'name' => tra('Exclude'),
'description' => tra('Pipe separated list of page names to exclude from results.'),
),
'noheader' => array(
'required' => false,
'name' => tra('No Header'),
'description' => tra('0|1'),
),
),
);
}
class WikiPluginTitleSearch extends PluginsLib {
var $expanded_params = array("exclude", "info");
function getDescription() {
return wikiplugin_titlesearch_help();
}
function getDefaultArguments() {
return array('exclude' => '' ,
'noheader' => 0,
'info' => false,
'search' => false,
'style' => 'table'
);
}
function getName() {
return "TitleSearch";
}
function getVersion() {
return preg_replace("/[Revision: $]/", '',
"\$Revision: 1.25 $");
class WikiPluginTitleSearch extends PluginsLib {
var $expanded_params = array("exclude", "info");
function getDescription() {
return wikiplugin_titlesearch_help();
}
function getDefaultArguments() {
return array('exclude' => '' ,
'noheader' => 0,
'info' => false,
'search' => false,
'style' => 'table'
);
}
function getName() {
return "TitleSearch";
}
function getVersion() {
return preg_replace("/[Revision: $]/", '',
"\$Revision: 1.25 $");
}
function run ($data, $params) {
global $wikilib; include_once('lib/wiki/wikilib.php');
global $tikilib;
$aInfoPreset = array_keys($this->aInfoPresetNames);
$params = $this->getParams($params, true);
extract ($params,EXTR_SKIP);
if (!$search) {
return $this->error("You have to define a search");
}
function run ($data, $params) {
global $wikilib; include_once('lib/wiki/wikilib.php');
global $tikilib;
$aInfoPreset = array_keys($this->aInfoPresetNames);
$params = $this->getParams($params, true);
extract ($params,EXTR_SKIP);
if (!$search) {
return $this->error("You have to define a search");
}
// no additional infos in list output
if ($style == 'list') $info = false;
// no additional infos in list output
if ($style == 'list') $info = false;
//
/////////////////////////////////
// Create a valid list for $info
/////////////////////////////////
//
if ($info) {
$info_temp = array();
foreach($info as $sInfo) {
if (in_array(trim($sInfo), $aInfoPreset)) {
$info_temp[] = trim($sInfo);
}
$info = $info_temp?$info_temp:
false;
//
/////////////////////////////////
// Create a valid list for $info
/////////////////////////////////
//
if ($info) {
$info_temp = array();