[pmwiki-users] Skins and themes in PmWiki 1

Patrick R. Michaud pmichaud at pobox.com
Wed Apr 27 17:40:06 CDT 2005


On Thu, Apr 28, 2005 at 10:11:13AM +1200, John Rankin wrote:
> I have had a request for an author to be able to specify
> 
> 1. a page skin via a [[skin skinname]] (or equivalent) directive
> 
> 2. a colour theme via a [[theme themename]] (or equivalent) directive
> 
> These would typically go into a GroupHeader page.
> 
> Is this possible and if so, how would I achieve it?

I've done (:skin skinname:) before -- it generally goes something like:

# Add a (:skin skinname:) markup
Markup('skin', 'fulltext',
  '/\\(:skin\\s+([-\\w]+)\\s*:\\)/e',
  "PZZ(SetSkin(\$pagename,'$1'))");

For a theme (assuming we're talking CSS), the easy thing to do is
something like:

# Add a (:theme themename:) markup
Markup('theme', 'fulltext',
  '/\\(:theme\\s+([-\\w]+)\\s*:\\)/e',
  "PZZ($HTMLHeadersFmt[] = 
    '<link rel=\"stylesheet\" href=\"$SkinDirUrl/$1.css\" />')");

or something like that.

Pm



More information about the pmwiki-users mailing list