XF 1.5 Logo based on User Group?

ScratchMang

Member
Question about the possibility of changing up the Site (Forum) Logo based upon User group.

So My forums are for and about Motorcycles, a rather large community. With Sport, Off Road, Adventure bikes etc.. all frequenting the place. I was asked by a member if there would (is) the possibility of changing up the Forums Logo (the one at the top left) with one based on a group membership? So the Sport Bike guys would see a Sport Bike Forum logo, the Off road guys would see an off road one etc... It's all on the same URL/Domain Name so I'm not planning on running four or five different instances of Xenforo, just change up the logo.. Something like this....

Main Logo, for anyone not a member of a Specific Group...

Main.png

And when someone joins the "Off Road Group the Logo would then appear like this....

OffRoad.png

Same for the Sport Bike and Adventure Riders groups....

Super-Sport.png

ADV.png

The "Main" bulk of the Forum Logo would remain the same just an "addendum" as it were for specific "Sub Groups" within the community?

Is this even possible?

Thanks...
 

S Thomas

Well-known member
Sure. In logo_block find <img src="@headerLogoPath" class="desktopLogo" alt="{$xenOptions.boardTitle}" /> and replace that piece of code with

Code:
<xen:if is="{xen:helper ismemberof, $visitor, x}">
   <img src="PathToLogoX" class="desktopLogo" alt="{$xenOptions.boardTitle}" />
<xen:elseif is="{xen:helper ismemberof, $visitor, y}" />
   <img src="PathToLogoY" class="desktopLogo" alt="{$xenOptions.boardTitle}" />
<xen:else />
   <img src="@headerLogoPath" class="desktopLogo" alt="{$xenOptions.boardTitle}" /> //thats the default one
</xen:if>
Replace x, y and the paths with the member group id. And copy paste the elseif block as often as you need (and then again change the ids).
You might want to do that aswell for the mobile logo.
 
Top