[pmwiki-users] Print skin override

Patrick R. Michaud pmichaud at pobox.com
Tue Apr 10 13:17:44 CDT 2007


On Tue, Apr 10, 2007 at 01:51:28PM -0400, DaveG wrote:
> >> I'm using $ActionSkin['print'] = 'my_print_skin'; in config.php to
> >> override the default print skin. However doing this appears to
> >> remove the "?action=print" from url's in the page.
> > 
> > Your print skin needs to set the value of $LinkPageExistsFmt
> > to include the ?action=print.  You could probably copy print.php
> > directly from PmWiki's print skin (and rename it to my_print_skin.php
> > or skin.php).
> Actually, it is set. In my test I simply copied the entire standard 
> print skin into a new directory, with no changes, and used 
> $ActionSkin. The suffix is not appended correctly, so it looks 
> like something is going wrong...

Did you rename 'print.php' to be 'my_print_skin.php'?  Unlike
the *.tmpl files, PmWiki only looks for *.php skin files that 
_exactly_ match the name of the skin or that are named 'skin.php'.
So, if 'print.php' wasn't renamed, then PmWiki would never load it.

> > For example, I once did something like
> > 
> >     if (preg_match('/Windows CE/', $_SERVER['HTTP_USER_AGENT']))
> >       $Skin = 'handheld';
> > 
> > to switch to a 'handheld' skin whenever someone accessed the
> > site using a Windows CE based browser.  
> >
> This is an excellent idea, and works great. Thanks. Any preference 
> on where I document this? Possibly under Cookbook/SkinChange, or 
> create a new page?

Wherever you think best.  If on a separate page, then it at least
deserves a mention on Cookbook.SkinChange .

Thanks!

Pm



More information about the pmwiki-users mailing list