vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Staff Avatar Background (https://vborg.vbsupport.ru/showthread.php?t=120582)

SkyCatcher 07-13-2006 06:42 PM

Ok, try this. It looks pretty good.

I'm not messing with the if statements right now because my paste arrived :D


Code:


<br />
<table class="alt2" cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
</tr>
</table>
<br />


Wired1 07-13-2006 07:16 PM

BTW, there was a small problem with my code (extra bit):

Code:

$vbphrase[xs_avatar]</phrase>" border="0" /></a>
should be

Code:

</a>
still didn't work, but it explains what happened w/ Alan's attempt.

Can you make a whole table a hyperlink though? I think you can.

Allan 07-13-2006 07:19 PM

1 Attachment(s)
Quote:

Originally Posted by SkyCatcher
Ok, try this. It looks pretty good.

I'm not messing with the if statements right now because my paste arrived :D


Code:


<br />
<table class="alt2" cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
</tr>
</table>
<br />


Always not :surprised:

SkyCatcher 07-13-2006 07:22 PM

Quote:

Originally Posted by Allan
Always not :surprised:

LOL! Ok I quit. I'm using postbit_legacy and the code looks ok there... it'll have to be changed for the postbit since the table structure is different.

Mythotical 07-13-2006 07:28 PM

Allan, you need to set the avatar to the far right behind the background, so basically set the background to load after the avatar or set the avatar to load as the background, I don't know, I plan to give it a go once my new server is setup.

Wired1 07-13-2006 07:44 PM

What about this? (don't have the background uploaded to my server yet, just putzing around at work w/ limited access to forum)

I basically just tweaked Sky's code and slapped a basic conditional around it. repositioning the background and the avatar are easy w/ this code, just want to make sure it doesn't interfere w/ vB stuff.

Code:

<!-- START -->

<if condition="$show['avatar']">

<td class="alt2">
  <table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
      <tr>
        <td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
      </tr>
  </table>
</td>

</if>

<!-- END -->

Just tested it, looked ok (remoted home), although I THINK it blew up the avatars that were less than the height / width, but that can be fixed.

Mythotical 07-13-2006 08:07 PM

Code:

<!-- START -->

<if condition="$show['avatar'] AND $vbulletin->userinfo[usergroupid]=6">

<td class="alt2">
  <table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
      <tr>
        <td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
      </tr>
  </table>
</td>
<else />
  <td class="alt2">
      <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>
  </td>
</if>

<!-- END -->

Try that code Wired. I try to avoid using double if conditions as it looks messy imo.

Allan 07-13-2006 08:19 PM

Quote:

Originally Posted by Steve M
Code:

<!-- START -->

<if condition="$show['avatar'] AND $vbulletin->userinfo[usergroupid]=6">

<td class="alt2">
  <table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
      <tr>
        <td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
      </tr>
  </table>
</td>
<else />
  <td class="alt2">
      <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>
  </td>
</if>

<!-- END -->

Try that code Wired. I try to avoid using double if conditions as it looks messy imo.

It work Almost ....

Some group one the background while just the admin should have it.

looking:
  • For me, usergroup Administrator:
http://img413.imageshack.us/img413/6299/17fg.gif
  • For Guest
http://img413.imageshack.us/img413/9738/21ij.gif
  • For moderator
http://img248.imageshack.us/img248/5715/35cj.gif

Wired1 07-13-2006 08:30 PM

small problem with that code is that someone isn't in that group, it won't go through <if condition="$show['avatar']> by itself.

here's what I was messing with:

Code:


<if condition="$show['avatar'] AND $vbulletin->userinfo[usergroupid]=79">

      <td class="alt2">
        <table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
            <tr>
              <td background="./images/test_badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
            </tr>
        </table>
      </td>

</if>

<if condition="$show['avatar'] AND $vbulletin->userinfo[usergroupid]!=79">
  <td class="alt2">
      <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>
  </td>
</if>


peterska2 07-13-2006 09:05 PM

Code:

<if condition="$show['avatar']">
<if condition="$vbulletin->userinfo[usergroupid]=6">
<td class="alt2">
  <table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
      <tr>
        <td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
      </tr>
  </table>
</td>
<else />
  <td class="alt2">
      <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>
  </td>
</if>
</if>



All times are GMT. The time now is 11:12 AM.

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.01300 seconds
  • Memory Usage 1,755KB
  • 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
  • (9)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete