[Pmwiki-users] Re: PmWiki2 - beta - skins error.

Patrick R. Michaud pmichaud
Sun Nov 28 20:24:21 CST 2004


On Sun, Nov 28, 2004 at 07:45:25PM -0600, John Feezell wrote:
> I upgraded my site <http://cbfa-cos.org/wiki/> that was running
> under devel27 and encountered the following errors.
> 
> Warning: Missing argument 2 for loadpagetemplate() in  
> /home/cbfacos/public_html/pmwiki2/scripts/skins.php on line 75

Sorry about that, error on my part.  Fixed in pmwiki-2.0.beta2, just
released.  This section of code uses the traditional $PageTemplateFmt
variable, which should probably be replaced by the new $Skin variable.
I haven't publicly explained $Skin yet, but essentially it just identifies
the skin directory (in pub/skins/ or $FarmD/pub/skins/) to be used
for controlling the layout.

Thus, if you were previously doing  
    $PageTemplateFmt='pub/skin/myskin/myskin.tmpl';
you now probably want
    $Skin = 'myskin';

The $Skin variable will automatically use whatever .tmpl file it
finds in the skin directory if there's only one; otherwise it uses
"$Skin.tmpl", "skin.tmpl", or generates an error.

> The errors came about because of line 22 in skins.php
> 
> if (isset($PageTemplateFmt)) LoadPageTemplate($PageTemplateFmt);
> 
> The LoadPageTemplate() requires two arguments so I modified
> the line to read
> 
> if (isset($PageTemplateFmt)) LoadPageTemplate($PageTemplateFmt,  
> "$SkinsDir/$Skin.tmpl");

It is supposed to have been  

    if (isset($PageTemplateFmt)) LoadPageTemplate($pagename, $PageTemplateFmt);

Pm



More information about the pmwiki-users mailing list