Loading...
 
Skip to main content

Development


Autolink page

posts: 15 Switzerland

Hi
I did start to write a wikiplugin for the following. I wont to have a Linkbar to other wikisite , related to the current page.
Example:

ThisPage - ThisPage_Summary - ThisPage_Basics - ThisPage_Recources


so i write the following:

<?php

function wikiplugin_multiply_help() {
return tra("Insert wikilinks to merged of params and data.").":<br />{MULTIPLY(pagename1=)}".tra("Your Content")."{MULTIPLY}";
}

function wikiplugin_multiply($data, $params) {
global $tikilib;
extract ($params);

/* GENERAL PROPERTIES */
if (!isset($pagename1)) {
$pagename1='';
}

$merged = $data."_".$pagename1;

return "$merged" ;
}
?>

So my question: I would like to give a list as params like "Summary, Basics, Recources" and if is no $data it takes the pagename, if is $data set it takes the $data and merge the names to a wikilink.

I dont understand how to handle a list with the $params how to return the arbitrary number of listitms.

Could somebody please giving me a hand in this?

thanks nos


posts: 15 Switzerland

think this sould work, but i guess a solution with the use of db would be beter

Image
Copy to clipboard