Announcement

Collapse
No announcement yet.

Image in posts but not 'whos online'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Image in posts but not 'whos online'

    Is it possible to assign an image to appear next to the users name on posts and profile but not on the whos online list?
    Thanks.

  • #2
    "A user" or "a usergroup"? Because you can do this for a usergroups by entering the image code into the username markup:

    Admin CP -> Usergroups -> Usergroup Manager -> Edit Usergroup -> Username HTML Markup

    In the second field, enter an img tag, like this:

    Code:
    <img src="URL OR PATH TO IMAGE" alt="" border="0" />
    This will add the image after user's names in posts, profiles, and in the online list. Then you can make it so the online list doesn't use the username markup by editing this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> forumhome_loggedinuser

    Remove the m:

    Code:
    <a href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]
    Admin CP -> Styles & Templates -> Style Manager -> « » -> Who's Online Templates -> whosonlinebit

    Remove the m:

    Code:
    <tr>
    
    	<td class="alt1" width="35%">
    		<span class="smallfont" style="float:$stylevar[right]"><span class="time">$userinfo[time]</span></span>
    		<if condition="$show['loggedinuser']">
    			<a href="member.php?$session[sessionurl]u=$userinfo[userid]" target="_blank">$userinfo[musername]</a>$userinfo[hidden]<if condition="$show['buddy']">+</if>
    		<else />
    			<if condition="$show['spider']"><phrase 1="$userinfo[spider]">$vbphrase[x_spider]</phrase><else />$userinfo[musername]</if>
    		</if>
    	</td>

    Comment


    • #3
      Thanks Jake. Will this also do away with the different colours Ive selected for different usergroups on the 'Whos online' section? Ideally Id want to keep those, and have the image displayed next to the users name on messages.
      Thanks.

      Comment


      • #4
        Originally posted by Wattie
        Thanks Jake. Will this also do away with the different colours Ive selected for different usergroups on the 'Whos online' section?
        Yes it would.

        You can try using template conditionals to display the image. In the postbit template:

        Code:
        <if condition="$post[usergroupid] == X">
        	IMAGE CODE HERE
        </if>
        In the MEMBERINFO and whosonlinebit templates:

        Code:
        <if condition="$userinfo[usergroupid] == X">
        	IMAGE CODE HERE
        </if>
        Where X is the usergroupid of the usergroup that gets the image.

        Comment


        • #5
          Is it possible to show the avatar in here?

          Or even making a new user profile Field so people can select what team they support and then this image can be shown before their username?
          My Football Forum

          Comment


          • #6
            Please start a new thread with your question in the relevant forum for your version.
            Kerry-Anne :)

            Twitter Blog

            www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X