[pmwiki-users] How can i change my Skin for different Groups/Pages?
123_dirk at web.de
123_dirk at web.de
Mon May 18 05:58:01 CDT 2015
I thing i'm to stupid or i'm to bad in PHP.
I will just do something like this inside the HG Script:
if ($FmtPV['$g1'] == 'En')
{
$WikiTitle = 'English Page';
$Skin = 'En_Skini';
}
# else .....
but everything what i try isn't working.
How can i do this?
And a second problem inside HG is this:
Inside the Skin i can use:
<img class="logo" alt="Test" src="$UploadUrlFmt$UploadPrefixFmt/logo.png"/>
But i need a default path
if (file_exists("$UploadUrlFmt$UploadPrefixFmt/info.png"))
{
$FmtPV['$Info_Logo'] = "$UploadUrlFmt$UploadPrefixFmt/info.png";
}
else
{
$FmtPV['$Info_Logo'] = "$UploadUrlFmt/info.png";
}
to use this:
<img class="logo" alt="Test" src="$Info_Logo"/>
What is wrong?
Regards, Dirk
> On Fri, May 8, 2015 at 3:43 PM, Petko Yotov <5ko at 5ko.fr> wrote:
>
> Is the information in the documentation relevent?
>
> http://www.pmwiki.org/wiki/PmWiki/GroupCustomizations
>
> I haven't used or reviewed the Hg recipe but in case it does something differently, I'd also check its documentation page.
>
>
> Looking at this code from hg.php:
>
> ===(snip)===
> ####### Set up hierarchical configs, headers, footers, attributes & styles
> $EnablePGCust = 0;
> $hgc = 0; $hgh = 0; $hgf = 0; $hgs = 0; $hgm = 0; $hga = 0;
> if (file_exists("$LocalDir/$hggroup.$hgname.php")) {
> include_once("$LocalDir/$hggroup.$hgname.php");
> $hgc = 1;
> }
> $hggroups = explode($hgseparator, $hggroup);
> while (count($hggroups) != 0) {
> $hg = implode ($hgseparator, $hggroups);
> if ($hgc == 0 && file_exists("$LocalDir/$hg.php")) {
> include_once("$LocalDir/$hg.php");
> $hgc = 1;
> }
> ...
> ===(snip)===
>
> It looks to me like Petko's suggestion with the per-group customizations should work perfectly.
>
> Do be aware that that recipe is somewhat abandon-ware and hasn't been touched in quite a while...
>
> -Peter
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
More information about the pmwiki-users
mailing list