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)

Guest190829 07-13-2006 08:59 AM

Also using the <if><else /></if> structure would make the code less verbose.

Wired1 07-13-2006 05:29 PM

Didn't work either, but it's a but more concise:

Code:

<!-- START - TEST FOR AVATAR HACK -->

<if condition="$show['avatar']">
  <if condition="is_member_of({$vbulletin->userinfo[usergroupid]}, 79)">
      <td class="alt2">
        <a href="member.php?$session[sessionurl]u=$post[userid]">
        <table border="0" cellpadding="0" cellspacing="0" width="200" height="200">
            <tr>
              <td width="200" background="badge.png" height="200">
                <table border="0" cellpadding="0" cellspacing="0" width="100%" height="125">
                  <tr>
                    <td width="25%">&nbsp;</td>
                    <td width="50%"><img src="$post[avatarurl]" width="125" height="125" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></td>
                    <td width="25%">&nbsp;</td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
          $vbphrase[xs_avatar]</phrase>" border="0" /></a>
      </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>

<!-- END - TEST FOR AVATAR HACK -->


Allan 07-13-2006 05:32 PM

Quote:

Originally Posted by peterska2
Code:

<if condition="$show['avatar'] AND is_member_of({$vbulletin->userinfo}, 79)">
should be
Code:

<if condition="$show['avatar'] AND is_member_of({$vbulletin->userinfo[usergroupid]}, 79)">

and

Quote:

Originally Posted by Danny.VBT
Code:

Also using the <if><else /></if> structure would make the code less verbose.

- Result:

Code:

<!-- START - TEST FOR AVATAR HACK -->

<if condition="$show['avatar'] AND is_member_of({$vbulletin->userinfo}, 79)">

  <td class="alt2">
      <a href="member.php?$session[sessionurl]u=$post[userid]">
      <table border="0" cellpadding="0" cellspacing="0" width="200" height="200">
        <tr>
          <td width="200" background="badge.png" height="200">
              <table border="0" cellpadding="0" cellspacing="0" width="100%" height="125">
                <tr>
                  <td width="25%">&nbsp;</td>
                  <td width="50%"><img src="$post[avatarurl]" width="125" height="125" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></td>
                  <td width="25%">&nbsp;</td>
                </tr>
              </table>
          </td>
        </tr>
      </table>
      $vbphrase[xs_avatar]</phrase>" border="0" /></a>
  </td>

</if>

<else />
<if condition="$show['avatar'] AND is_member_of({$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>

<!-- END - TEST FOR AVATAR HACK -->

it's ok for you ?

SkyCatcher 07-13-2006 05:37 PM

[QUOTE=Allan]

You've still got
Code:

AND is_member_of({$vbulletin->userinfo}, 79)">
In your results code window.

Why not just do something like

<if condition="$vbulletin->userinfo[usergroupid]=6">
bla bla


<if condition="$vbulletin->userinfo[usergroupid]=2">
etc


and make a plugin to hold the code so the template doesn't get cluttered

I'm sure you could use something like

<if condition="$vbulletin->userinfo[usergroupid]=6 || $vbulletin->userinfo[usergroupid]=7 || $vbulletin->userinfo[usergroupid]=11">

Allan 07-13-2006 05:40 PM

Dont' work :(

Quote:

Parse error: syntax error, unexpected '{', expecting ')' in /home/**********/www/forum/includes/adminfunctions_template.php(3563) : eval()'d code on line 36

SkyCatcher 07-13-2006 05:42 PM

Quote:

Originally Posted by Allan
Dont' work :(

See my post above :tired:

Allan 07-13-2006 05:48 PM

With this code:
Code:

<!-- START - TEST FOR AVATAR HACK -->

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


  <td class="alt2">
      <a href="member.php?$session[sessionurl]u=$post[userid]">
      <table border="0" cellpadding="0" cellspacing="0" width="122" height="80">
        <tr>
          <td width="122" background="$stylevar[imgdir_misc]/badge.png" height="80">
              <table border="0" cellpadding="0" cellspacing="0" width="100%" height="60">
                <tr>
                  <td width="25%">&nbsp;</td>
                  <td width="50%"><img src="$post[avatarurl]" width="60" height="60" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></td>
                  <td width="25%">&nbsp;</td>
                </tr>
              </table>
          </td>
        </tr>
      </table>
      $vbphrase[xs_avatar]</phrase>" border="0" /></a>
  </td>

</if>

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

  <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 - TEST FOR AVATAR HACK -->

Result: (lol)
http://img180.imageshack.us/img180/5270/result2hp.gif

SkyCatcher 07-13-2006 05:52 PM

Code:



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

<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="122" height="80" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><center><img src="$post[avatarurl]" height="60" width="60"</center></td>
</tr>
</table>
<br />

</if>

Try that. I don't know where all the extra crap came from.

Allan 07-13-2006 05:59 PM

Quote:

Originally Posted by SkyCatcher
Code:



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

<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="122" height="80" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><center><img src="$post[avatarurl]" height="60" width="60"</center></td>
</tr>
</table>
<br />

</if>

Try that. I don't know where all the extra crap came from.

Nop ..

http://img401.imageshack.us/img401/6864/yep0kc.gif

Allan 07-13-2006 06:16 PM

Tested and don't work :(


All times are GMT. The time now is 02:44 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.01190 seconds
  • Memory Usage 1,759KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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