PDA

View Full Version : Avatar and Rank side by side


WildcatDan
03-01-2009, 01:45 AM
This is probably a simple fix if someone knows what they are doing, but I am adding a graphic as a rank and I would like it to show up to the right of the username/title/avatar. Or even just to the right of the Avatar so that it does not take up so much space vertically. I cannot figure out how to get it to show up there and I am sure it is just because I am a novice at editing templates.

Here is the graphic that I am going to use...
http://www.wildcatnation.net/forum/images/wcnrank.jpg

Thanks!

vbplusme
03-01-2009, 03:06 AM
Are you using the vBulletin rank system ? You would need to rearrange the code slightly in the postbit to get it to display correctly. You didn't specify which postbit you are using, default or legacy?

WildcatDan
03-01-2009, 03:33 AM
Yes... sorry... I am using the vBulletin rank system and the Legacy postbit

vbplusme
03-01-2009, 04:48 AM
Here is the code in legacy that displays the avatar and the rank. In the default they are separate conditions that are tested and the Avatar is usually first the rank underneath it.

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>

To do what you want, you need to combine the two conditions into one. For example:

<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a><span class="smallfont">$post[rank] </span>
</div>
</if>


This should display them side by side but you might have to tweak it some.

I haven't tested it because you have the rank images but it should work and it assumes that the rank condition is part of the avatar conditional.

WildcatDan
03-02-2009, 02:39 AM
Thanks!

--------------- Added 1235970871 at 1235970871 ---------------

That worked perfectly but it came out making the postbit box looking a bit cluttered.

Is there any way to move the rank to the top right corner of the postbit box (next to the user name but alligned far right)?

Since the graphic is designed to look like a banner it would then look like it was hanging...

Thanks!

--------------- Added 1236043633 at 1236043633 ---------------

Anybody know how to make that happen? Thanks!

mmoore5553
03-05-2009, 02:47 PM
do you have a screenshot of what you want it to look like