[pmwiki-users] <!--function:
DaveG
pmwiki at solidgone.com
Sun Dec 11 16:50:19 CST 2005
How about if you want to execute, and replace (or not show) the $1 text?
Patrick R. Michaud wrote:
> On Sun, Dec 11, 2005 at 04:44:48PM +0100, Tomas Pihl wrote:
>
>>I've created the markup:
>>
>>Markup("count", "inline", "/\.\.(.*?)\.\./", "<!--
>>function:DisplayCommentsCount($1)-->");
>>
>>When using this on a page sunch as "This is some text ..Blog.Today..
>>and so on", the resulting HTML has the HTML-comment in there but I
>>thought Pmwiki would replace it with the result of the functioncall.
>>I might have misunderstood this completly or?
>
>
> The HTML comments only work in skin template files, not in markup.
>
>
>>How would one do to have a function called from any page, sending in
>>the pagename as argument?
>
>
> Markup("count", "inline",
> "/\\.\\.(.*?)\\.\\./e",
> "DisplayCommentsCount(PSS('$1'))");
>
> The "/e" says to execute the replacement rule rather than substitute
> text. The PSS function gets rid of the funny backslash quoting that PHP
> likes to put into captured values (if you know the capture value won't
> contain quotes or backslashes, then you can just use '$1' instead).
>
> Pm
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users
>
More information about the pmwiki-users
mailing list