[Pmwiki-users] Injecting markup via replacements ?
Ciaran
ciaranj
Sun Aug 1 04:40:34 CDT 2004
Hmm, That would explain why nothign was working for me if I was using
BrowseReplacements! However BrowseDirectives appears to spin out for
me : (
Is the following line meaningful ?
$BrowseDirectives['/\\[\\[\\$Testing(?:(?:\\s)+((?:.)*))*\\]\\]/e'] =
"Testing('$1');";
Where Testing is a function that returns a markup string ?
Thanks,
- Ciaran
On Sat, 31 Jul 2004 11:35:40 -0600, Patrick R. Michaud
<pmichaud at pobox.com> wrote:
>
>
> On Sat, Jul 31, 2004 at 10:46:26AM +0100, Ciaran wrote:
> > Hi,
> > Is there anyway I can 'inject' markup into the wiki rendering process,
> > through one of the replacements, I've tried :
> > $InlineReplacements
> > $BrowseReplacements
> > and
> > $DoubleBrackets (which is the one I was expoecting/hoping would work)
> >
> > I've tried 'print' and returning the string in all of these cases,
> > but they all end up with the markup being written out to the html :(
>
> > Alternatively is there a method I can call that I can pass 'raw'
> > markup and get the correct HTML back. I Want to do this so I can
> > avoid checking a user's input, so I can allow all the Wiki markup etc
> > :)
>
> $BrowseDirectives (note: not $BrowseReplacements) is likely what you want.
> It takes place before any markup is processed, but after includes and
> groupheaders are done.
>
> BTW, This sort of thing becomes massively easier in PmWiki 2.0, because
> it's possible to say "I want to do this before step 'X'".
>
> Pm
>
--
- Ciaran
http://www.wombatinvasion.com/ (Share the love)
More information about the pmwiki-users
mailing list