Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 07-13-2006, 08:59 AM
Guest190829
Guest
 
Posts: n/a
Default

Also using the <if><else /></if> structure would make the code less verbose.
Reply With Quote
  #12  
Old 07-13-2006, 05:29 PM
Wired1's Avatar
Wired1 Wired1 is offline
 
Join Date: Nov 2003
Location: Orlando, FL, USA
Posts: 1,361
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 -->
Reply With Quote
  #13  
Old 07-13-2006, 05:32 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #14  
Old 07-13-2006, 05:37 PM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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">
Reply With Quote
  #15  
Old 07-13-2006, 05:40 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dont' work

Quote:
Parse error: syntax error, unexpected '{', expecting ')' in /home/**********/www/forum/includes/adminfunctions_template.php(3563) : eval()'d code on line 36
Reply With Quote
  #16  
Old 07-13-2006, 05:42 PM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Allan
Dont' work
See my post above :tired:
Reply With Quote
  #17  
Old 07-13-2006, 05:48 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #18  
Old 07-13-2006, 05:52 PM
SkyCatcher's Avatar
SkyCatcher SkyCatcher is offline
 
Join Date: Feb 2003
Location: Germany
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #19  
Old 07-13-2006, 05:59 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Reply With Quote
  #20  
Old 07-13-2006, 06:16 PM
Allan's Avatar
Allan Allan is offline
 
Join Date: Jun 2003
Location: France
Posts: 1,513
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tested and don't work
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:45 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.11876 seconds
  • Memory Usage 2,292KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (9)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (9)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete