[pmwiki-users] PHP on a Wiki page?

Dave Brockman daveb at oz.net
Mon Dec 3 14:58:32 CST 2007


Thanks! I'll give it a try. The markup is abit scary tho.

Dave

Eemeli Aro wrote:
> Take a look at <http://www.pmwiki.org/wiki/PmWiki/PerGroupCustomizations>.
> 
> Probably easiest if you add a PHP file
> 
> <wikidir>/local/YourGroup.YourPage.php
> 
> where you have the PHP as a function that returns the HTML string, as
> well as a command to map a custom wikimarkup directive to call your
> function, as follows:
> 
> Markup('yourfunction', 'directives',
>   '/\\(:yourfunction\\s+(\\S.*?):\\)/ei',
>   "Keep(YourFunction(\$pagename, PSS('$1')))");
> 
> That'll pass two variables to the function YourFunction: the page name
> and whatever you put as a parameter to (:yourfunction:) in the wiki
> markup. It'll then replace that directive with the HTML output of
> YourFunction.
> 
> eemeli
> 
> On Nov 30, 2007 10:45 PM, Dave Brockman <daveb at oz.net> wrote:
> 
>>I have some PHP code that accesses a database. Can this be put on a Wiki
>>page somehow? The code outputs HTML but I can see that could be easily
>>changed. It's getting it to run that I don't understand. Thanks for any
>>help.
>>
>>Dave
>>
>>
>>_______________________________________________
>>pmwiki-users mailing list
>>pmwiki-users at pmichaud.com
>>http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>




More information about the pmwiki-users mailing list