Wiki: Hello World Plugin


A simple example plugin.

Hello,: WikiUser?!

From the source of this page:

<?plugin HelloWorld salutation="Hello," name="WikiUser" ?>

PhpWiki's plugin architecture allows you to add custom page elements to your wiki. All you have to do is extend (subclass) the WikiPlugin class and create your output via the run() method, dependend on the Wiki- or Request arguments,

/**
 * A simple demonstration WikiPlugin.
 *
 * Usage:
 * <?plugin HelloWorld?&gt;
 * <?plugin HelloWorld
 *          salutation="Greetings, "
 *          name=Wikimeister
 * ? >
 * <?plugin HelloWorld salutation=Hi ? >
 * <?plugin HelloWorld name=WabiSabi ? >
 */

// Constants are defined before the class.
if (!defined('THE_END'))
    
define('THE_END'"!");

class 
WikiPlugin_HelloWorld
extends WikiPlugin
{
    
// Five required functions in a WikiPlugin.

    
function getName () {
        return 
_("HelloWorld");
    }

    function 
getDescription () {
        return 
_("Simple Sample Plugin");

    }

    function 
getVersion() {
        return 
preg_replace("/[Revision: $]/"'',
                            
"\$Revision: 1.3 $");
    }

    
// Establish default values for each of this plugin's arguments.
    
function getDefaultArguments() {
        return array(
'salutation' => "Hello,",
                     
'name'       => "World");
    }

    function 
run($dbi$argstr$request) {
        
extract($this->getArgs($argstr$request));

        
// Any text that is returned will not be further transformed,
        // so use html where necessary.
        
$html HTML::tt(fmt('%s: %s'$salutationWikiLink($name'auto')),
                         
THE_END);
        return 
$html;
    }
};

<small>P? cistelle incestsex incestverhalen familyincest inceste inceste

teen sluts teen teen challenge teens in trouble exploited teens teen sex movies

rough sex rough rape rude photos rough sex videos rough sex teen rough anal

spank lesbian caning dvd otk sex spanking spanking drawings caning girl

ebony india ebony facials ebony india ebony pantyhose ebony asses ebony hardcore porn

pissen piss ant pissen pee sites pissing mpeg pee picture

girls with big tits breasts tits boobs nipple piercing big puffy nipples evenflo nipples nipples breasts

brutal rape com brutal sex torture brutal pics brutal porno fotos de sexo brutal penetracion brutal

fetish personals female feet fetish schoolgirl fetish smother fetish free tit fucking movie foot fetish pictures

</small>


Copyright © 2007 RobertMelton.com