[pmwiki-users] Print skin override

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


On Tue, Apr 10, 2007 at 11:13:37AM -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).

> The reason I care is that I'm using the print skin to create a 
> PDA version of my wiki, and I need to be able to navigate from 
> the print skin. 

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.

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 .

Pm



More information about the pmwiki-users mailing list