[pmwiki-devel] bypassing <!--PageText--> with <!--wiki: {$FullName}-->
Eemeli Aro
eemeli at gmail.com
Tue Apr 14 06:21:30 CDT 2009
Rather than fiddling with stuff in a skin template, you're probably
better off building on the PageStore class in pmwiki.php. The
LoadPageTemplate function in skins.php rather strongly expects to find
<!--PageText--> in a template file and removing it may break skins in
an interesting manner.
2009/4/13 Michael Shanley <mike at upisup.com>:
> I've been toying with the idea of how far PmWiki could be stretched in terms
> of unique project ideas when I came upon this thought.
>
> If you were to replace, in a given skin, <!--PageText--> with <!--wiki:
> {$FullName} {$SiteGroup}.PageNotFound-->, what chunks of PmWiki would be
> bypassed.
In addition to the above, this might not set the return status properly as 404.
> Similarly, what if you replaced <!--PageText--> with <!--file:
> /wiki.d/{$Group}/{$Name}-->?
>
> Could this be the means necessary to run, let's say, an all-html wiki? Could
> using <!--function: mysql_query('{$FullName}')--> turn PmWiki into a
> database driven cms?
If you're looking to change the back end of the wiki, PageStore is the
place to look. If you're looking to extract just parts of the
templating engine, you should probably gut PmWiki much more thoroughly
than just overwriting sking templates. In any case, what's the utility
of linking a skin so strongly to the page storage mechanism?
To take your example specifically, $FullName is resolved from the
requested URL rather late in the process, at which point PmWiki needs
to know quite a few things about the page in question -- such as its
$Title -- which it needs to read from somewhere, eg. the MySQL
database.
For an all-html wiki, you're probably better off disabling
$EnableStdMarkup, including stdconfig.php, unsetting $MarkupRules and
including your own markup replacement.
eemeli
> I can't say that I've got specific plans based around any of these ideas
> right now, though there are some projects I'd like to use PmWiki for that
> this sort of solution might solve. At any rate, it seems like an interesting
> discussion, doesn't it?
>
> Mike
>
> _______________________________________________
> pmwiki-devel mailing list
> pmwiki-devel at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
>
>
More information about the pmwiki-devel
mailing list