|
Cookbook /
SkinsPmWiki makes it easy to develop and change "skins" for the look and feel of the pages. You can preview available skins in the Skins Gallery in a reduced size or see how a test page looks with some assorted markup. (The old test page is still available, and here's another one.) If you've developed a skin for PmWiki that you'd like to share, feel free to add it to the Cookbook here! After it's uploaded, Pm will generally configure pmwiki.org to display pages in the new skin. Be sure to look at skin guidelines for suggestions about creating skins that others can use.
Other PmWiki skins (some unmaintained):
To find skins for PmWiki v.1a, see Cookbook-V1.Skins. If you'd like to use one of them with PmWiki 2, most of them will probably work fine with a little modification and help from Changes from PmWiki 1. The following part is included from PmWiki.LayoutBasics: Modifying the "pmwiki" skinThe pmwiki skin (i.e., pub/skins/pmwiki/) is part of the PmWiki installation, so any changes you make to these files are likely to be overwritten when you upgrade. Thus, instead of editing the files directly, you should start by making a copy of the files in pub/skins/pmwiki/ into a new skins directory (say, pub/skins/xyzskin/). Once you've made a copy of the skin directory, you can then edit the .tmpl and other files in that directory. You then tell PmWiki to use the skin in pub/skins/xyzskin by setting $Skin = 'xyzskin';
in your local/config.php file. DiscussionSkins don't seem to take effect.I can get the wiki to install fine, but I can't get any skins to change the appearance, and I followed the very simple directions to the letter. Any ideas? Make sure the skin name is exactly the same as the name of the skin directory you installed, paying attention to capitalization. For example the Sinorca skin instructions say to set the config variable to Sinorca but actually it should be sinorca. -a user Also be sure to remove the # character from the beginning of the line, so that it reads $Skin instead of # $Skin . -Joel Styles not included within CSS or PHPI've been trying to optimize the colors on my wiki but these two styles don't seem to be inside any CSS or PHP file.
<p style='background-color: #eee;' ><span class='wikitrail'>
<td style='font-size:12px; font-family:Arial;'
bgcolor='#ffeedd' colspan='2'><p> PmWiki/TextFormattingRules
- PmWiki/TipsForEditing
How do I fix this? Thank you. [ Adraeus? December 07, 2004, at 02:18 AM ] The first one is probably listed in PmWiki.GroupHeader (you'll have to edit the page or view the source to see it). The second one is included in the PmWiki.EditQuickReference page, which is included as part of the edit text form. --Pm Multiple themes for the same wikiAre there any instructions for using multiple themes on the same wiki? For example, the way the Cookbook has demos for several of the different themes. Thanks! [ stormspotter January 18, 2005, at 14:02 ] See Skin Change - Klonk
Make H1 and H2 only available in the skin.In one of the V1 skins I was using I could use $DoubleBrackets['/^!/'] = '!!!'; in my config.php in order to make sure that headings used within the entry do not conflict with headings I am using elsewhere -- my concern here is with having the page index correctly by search engines. I know I need to use the Markup command to emulate this function but I'm not yet that comfortable with regular expressions. Any suggestions? Thanks. JKeim Here is one way: Markup('^!', 'block',
'/^(!{1,2})\\s?(.*)$/e',
"'<:block,1><h'.strlen('$1').PSS('>$2</h').strlen('$1').'>'");
This will limit to <H1> or <H2>. If you change the {1,2} you can adjust this range. For example, if you have {2,6}, you will disable <H1> in the page, which is what I do BenWilson March 06, 2006, at 09:07 AM So how would you slide all of them down so that ! make <h3>, !! made <h4>, etc? Skin for a page.Can i set a skin for a single page or a group of pages, with no usage of ?skin= (set it in page or something like that)? You can try by adding to config.php a custom markup to set the skin from within a wiki page: # Add a (:skin skinname:) markup
Markup('skin', 'fulltext',
'/\\(:skin\\s+([-\\w]+)\\s*:\\)/e',
"PZZ(SetSkin(\$pagename,'$1'))");
Embedded skinAny idea/critics about embeddeding style skin where template page and css could be edited online, at site or at group level? For example, I try having the Site.CSS page as a stylesheet adding the following lines to the header of the .tmpl file:
<link rel='stylesheet' href='$SkinDirUrl/pmwiki.css' type='text/css' />
<link rel='stylesheet' href='{$ScriptUrl}/{$SiteGroup}/CSS/?action=source' type='text/css' />
<link rel='stylesheet' href='{$ScriptUrl}/{$Group}/CSS/?action=source' type='text/css' />
It would cascade stylesheets from skin's stylesheet, then to the CSS page (using source only) at site level and then at group level... Add a scroll bar to the "main window" of a skinJust in case some of you are interested ;) I find it annoying that you have to scroll the whole page down if the text in the main "frame" gets too long. Here is a possible modification. I'm using it with the greyness skin, but it should work with others too. In the file <td id="pagetext" valign="top"> <!--PageText--> </td> This defines the main window. Now you can modify it to: <td id="pagetext" valign="center"> <div id="page_d" style="overflow: auto; padding-top:10px; height:640px"> <!--PageText--> </div> </td> If now your text gets too long you will get a nice scrollbar and still be able to see the menu and the page header while reading the bottom of the page. Have fun. Golo |