[pmwiki-users] Markup question (pleeeease answer!)

Octocias octocias at googlemail.com
Fri Apr 7 16:40:06 CDT 2006


On 07/04/06, Octocias <octocias at googlemail.com> wrote:
>
>
> I wish to create a custom markup which will insert WikiCode.
>
> e.g. For instance, see the documented example:
>
> Markup('example', 'directives',
>         '/\\(:example:\\)/',
>         Keep("<div class='example'><p>Here is a     <a target='_blank'
> href=' http://www.example.com' <http://www.example.com%27>>link</a> to
> <em>example.com</em></p></div>") );
>
> This works fine, but how do I generate that text as wiki code?
>
> e.g. This is my starting code:
>
> Usage: (:test sampletext:)
>
> Markup('test', 'fulltext', '/\\(:test +(.*?):\\)/e',
> "GenerateWikiCode('$1')");
> function GenerateWikiCode($text)
> {
>   $out = "(:table border=5:)";
>   $out .= "(:cellnr:) Hey";
>   $out .= "(:cell:) $text";
>   $out .= "(:tableend:)";
>   return Keep($out);
> }
>
> Is this clear? I want the php function to generate "wiki code to be
> translated later to html".
>
> I can get it to work fine if I put the code into  the markup directive,
> but I'd prefer to use the php function. Is this possible?
>
> --
> Octocias
> http://www.octocias.com
>



--
Octocias
http://www.octocias.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060407/3f774c96/attachment.html 


More information about the pmwiki-users mailing list