[pmwiki-users] Embedding php in a wiki page

Hans design5 at softflow.co.uk
Fri Feb 1 03:43:26 CST 2008


Friday, February 1, 2008, 2:26:29 AM, Steven Benmosh wrote:

> 1. Is there a way to embed php in a wiki page, just like html tags? My goal
> is to provide some dynamic content on the web page, such as current time and
> date, using php functions.

Wiki pages are dynamic php generated pages. To include time and dates
use Markup Expression {(ftime..)} (PmWiki 2.2.beta) See
http://www.pmwiki.org/wiki/Cookbook/MarkupExpressions

For security reasons you don't want a custom markup allowing insertion
of arbitrary php code in the page content.

> 2. If yes, could it interact with pmwiki directives (for example, I can do
> (:pagelist:), capture the output and convert it to a normal wikitag (i.e.
ThisIsMyPageName -->>[[ThisIsMyPageName|| This is My Page Name]]

You can use MarkupExpressios inside the (:pagelist ... :) directive.
But I am not sure what you try to achieve regards the links.
Please read up about various link markup formats.
http://www.pmwiki.org/wiki/PmWiki/Links

you can just use  [[This is My Page Name]] and it will appear as you
written and point to page 'ThisIsMyPageName' in the current group.


  ~Hans




More information about the pmwiki-users mailing list