1. 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)

Discussion in 'Styling and Customization Questions' started by ArnyVee, Mar 25, 2012.

  1. ArnyVee

    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.
    surfsup likes this.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    To change the title image edit this template:

    Admin CP -> Appearance -> Templates -> logo_block

    Replace the red code with your custom conditions:

    <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}" />
    			<span class="helper"></span>
    Here is a condition for the forumid:

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

    				<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}" />
    For groups:

    				<xen:if is="{xen:helper ismemberof, $visitor, 4}">
    					<img src="path/for/grouplogo.gif" alt="{$xenOptions.boardTitle}" />
    You can mix and match.
    erich37, 0xym0r0n, Azula and 4 others like this.
  3. ArnyVee

    ArnyVee Well-Known Member

    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?
  4. Kintaro

    Kintaro Well-Known Member

    For the "based on nodes" there's a resource from jaxel
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

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

Share This Page