• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

ArnyVee

Well-known member
#1
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.
 

Jake Bunce

XenForo moderator
Staff member
#2
To change the title image edit this template:

Admin CP -> Appearance -> Templates -> logo_block

Replace the red code with your custom conditions:

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:

Code:
				<xen:if is="{$forum.node_id} == 3">
					<img src="path/for/forumlogo.gif" alt="{$xenOptions.boardTitle}" />
				</xen:if>
And for guests vs members:

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:

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.
 

Kintaro

Well-known member
#4
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.
For the "based on nodes" there's a resource from jaxel
 

Jake Bunce

XenForo moderator
Staff member
#5
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.