Change logo based on forum and/or usergroup (guests / members)

ArnyVee

Well-known member
I wanted to see how to go about showing separate logos based on the forum and/or usergroups (show a certain logo to guests another to members).

I have seen some for the header or backgrounds, but not the logos.
 
To change the title image edit this template:

Admin CP -> Appearance -> Templates -> logo_block

Replace the red code with your custom conditions:

Rich (BB code):
<div id="logoBlock">
	<div class="pageWidth">
		<div class="pageContent">
			<xen:include template="ad_header" />
			<xen:hook name="header_logo">
			<div id="logo"><a href="{$logoLink}">
				<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
				<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
			</a></div>
			</xen:hook>
			<span class="helper"></span>
		</div>
	</div>
</div>

Here is a condition for the forumid:

Rich (BB code):
				<xen:if is="{$forum.node_id} == 3">
					<img src="path/for/forumlogo.gif" alt="{$xenOptions.boardTitle}" />
				</xen:if>

And for guests vs members:

Rich (BB code):
				<xen:if is="{$visitor.user_id}">
					<img src="path/for/memberlogo.gif" alt="{$xenOptions.boardTitle}" />
				<xen:else />
					<img src="path/for/guestlogo.gif" alt="{$xenOptions.boardTitle}" />
				</xen:if>

For groups:

Rich (BB code):
				<xen:if is="{xen:helper ismemberof, $visitor, 4}">
					<img src="path/for/grouplogo.gif" alt="{$xenOptions.boardTitle}" />
				</xen:if>

You can mix and match.
 
Jake, would it be possible to have the logo image changed to a mapped image and it link correctly?

The reason I ask is because I assume that the entire image would still link to the 'home' link. Thoughts?

You can insert HTML for an image map by editing the logo_block template directly.
 
Top Bottom