vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Avatar and Rank side by side (https://vborg.vbsupport.ru/showthread.php?t=206962)

WildcatDan 03-01-2009 01:45 AM

Avatar and Rank side by side
 
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.

HTML Code:

<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:

HTML Code:

<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 [DATE]1235970871[/DATE] at [TIME]1235970871[/TIME] ---------------

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 [DATE]1236043633[/DATE] at [TIME]1236043633[/TIME] ---------------

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


All times are GMT. The time now is 12:29 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01223 seconds
  • Memory Usage 1,729KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete