[pmwiki-users] Print skin override

DaveG pmwiki at solidgone.com
Tue Apr 10 12:51:28 CDT 2007




>> 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...


> Are you using the print skin as a skin for whenver the site is
> being accessed by a PDA?  If yes, then a better solution might
> be to set your configuration to automatically detect when it's
> being accessed from a PDA, and to switch skins accordingly.
Kind of. I have a PC utility that spiders a URL, and converts the wiki into a PDA readable format.


> 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 avoids the need to
> try to do anything with ?action=print .
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?





More information about the pmwiki-users mailing list