[pmwiki-users] custom markup - call of method (not function) possible

Patrick Ogay lists at basel-inside.ch
Mon Feb 7 16:15:04 CST 2005


I work with a counter object: 
(http://www.pmwiki.org/pmwiki/uploads/Cookbook/counter-dba.php)


1a)Works:  (:$PageCount :) -> 25
Markup('{$PageCount}','>{$var}','/\\(:\$PageCount:\\)/e',@$PageCount);     

1b)doesn't work:
$SiteStats =  "<table><td><tr>.... </table>"
Markup('{$SiteStats}','>{$var}','/\\(:\$SiteStats:\\)/e',@$SiteStats);

For the whole stats I'd like to return a string, like this.
How does the markup statment look like?

-----------------------

2a) Works:
Markup('PageCount', 'directives', '/\\(:$PageCount:\\)/e',"ftest()");
2b) doesn't work:
Markup('PageCount', 'directives', '/\\(:\$PageCount:\\)/e',"$po->ftest1");
doesn't work
Markup('PageCount', 'directives', '/\\(:\$PageCount:\\)/e',"\$po->ftest1");
does nothing
Markup('PageCount', 'directives', 
'/\\(:\$PageCount:\\)/e',"\\{$po->ftest1\}");
says that it looses object

It's no problem to call a function, but I like to call a method.

-----------------------

Is it possible to call methods in the skin, I didn't try yet.

kind regards
Patrick Ogay




More information about the pmwiki-users mailing list