[pmwiki-users] (:directive:) in (:mytext: this is a hidden PTV:)

Dominique Faure dominique.faure at gmail.com
Tue Apr 20 04:42:19 CDT 2010


On Tue, Apr 20, 2010 at 11:19, Hans <design5 at softflow.co.uk> wrote:
> Tuesday, April 20, 2010, 1:26:45 AM, ABClf wrote:
>
>> I was in trouble for using (:thumblist:) in a large hidden PTV
>> (:myptv: long text :).
>> Here it is my problematic source:
>
>> (:text: some long text, where I want images (:thumblist:) some more text:)
>
>> doesn't work when showing {$:text} ; I guess it is because of the
>> thumblist's « :) »
>
> you could define a markup expression for thumblist
> and use that inside the PTV:
>
> in config:
>
> $MarkupExpr['thumb'] = $MarkupExpr['thumblist']
>        = 'MXThumbList($pagename, $args, $argp)';
> function MXThumbList($pagename, $args, $argp) {
>  $suffix = (isset($args[0])) ? '' : 'list';
>  unset($argp[''],$argp['#']);
>  foreach($argp as $k => $v)
>    $opt .= " ".$k."=".$v;
>  foreach($args as $v)
>    $opt .= " ".$v;
>  return FmtThumbList($pagename, $opt, $suffix, '');
> }
>
> PTV example in the page:
>  (:text: some long text, where I want images {(thumblist)} some more text:)
> or
>  (:text: some text {(thumb myimage.jpg)} some more text:)
>
> thumblist parameters should work too.
>
>
>  ~Hans
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>

Then why not, the generic:

$MarkupExpr['directive'] = '"(:" . trim(preg_replace($rpat, $rrep,
$params)) . ":)"';

with the wiki page syntax:

(:text: some long text, where I want images {(directive thumblist)}
some more text:)

-- 
Dominique



More information about the pmwiki-users mailing list