[pmwiki-users] Changing $PageLogoUrl variable based on Group
adam overton
a at plus1plus1plus.org
Thu Oct 15 19:02:09 CDT 2009
hi Graham
i've just started using the following method in my own skin and it's
been working splendidly -
it allows users to set the PageLogoUrl via a 'groupLogo' PTV on the
DefaultPage for each group:
# default logo, & per group logos via config.php
$logo = "defaultLogo.gif"; # the defaultLogo
if($group=="ILuvU") $logo = "blackheart.gif"; # assign a different
logo for different groups
# allow users to specify a logo using (:groupLogo: grouplogo-
filename.gif:) placed on their default page
$groupLogo = PageTextVar("$group.$DefaultName",'groupLogo'); # get
PTV for logo address
if($groupLogo) $PageLogoUrl = "$PmWikiDir/uploads/$group/
$groupLogo"; # get logo from uploads folder
else $PageLogoUrl = "$SkinDirUrl/logos/$logo"; # otherwise, use
default logos, located somwhere in pub folder
best,
adam
> Message: 7
> Date: Thu, 15 Oct 2009 14:19:42 +0100
> From: Graham Archer <Graham.Archer at Sun.COM>
> Subject: [pmwiki-users] Changing $PageLogoUrl variable based on Group
> To: pmwiki-users at pmichaud.com
> Message-ID: <4AD7216E.4010302 at sun.com>
> Content-Type: text/plain; CHARSET=US-ASCII; format=flowed
>
> Hi,
>
> I would like to change the Wiki logo ( top left hand corner) ,
> $PageLogoUrl, variable depending on the Group. I am using the
> monobook skin.
> I guess I should be able to do this in config.php - but my php
> knowledge
> isn't up to knowing how to write.....
>
> " if group = xxxx then logo Urlxxx, else logo Urlyyy"
>
> Can anyone assist me with this - or perhaps point out the better/
> proper way?
>
> Thanks
>
> Graham
>
>
More information about the pmwiki-users
mailing list