[pmwiki-users] <!--function:
Patrick R. Michaud
pmichaud at pobox.com
Sun Dec 11 20:20:48 CST 2005
On Sun, Dec 11, 2005 at 05:50:19PM -0500, DaveG wrote:
> How about if you want to execute, and replace (or not show) the $1 text?
I'm afraid I don't completely understand the question -- perhaps an
example of the markup you want to use and the output you'd like
it to produce?
Pm
> 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