vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   whats the IF code for this? (https://vborg.vbsupport.ru/showthread.php?t=118047)

Evil X 06-08-2006 06:30 PM

whats the IF code for this?
 
to only display something for a couple groups? I want to do something so a certain image only is in certain usergroups posts...

carpzone 06-08-2006 08:25 PM

And where do u want to display the image ?

Evil X 06-09-2006 12:13 AM

actually... I want it to be like this

for regular members and mods and smods I want it to show thier rep power in thier post... but for the admins I just want it to say SUPER POWER or some shit... na mean

Ntfu2 06-09-2006 03:50 PM

Try something like this postbit_legacy (assuming you are using the legacy layout like you see here)
Code:

<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div>
Change to
Code:

<if condition="$show['reputation']"><div>
 <if condition="$bbuserinfo[usergroupid] == XX">
$vbphrase[reppower]: SUPER POWER
</if>
<if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div>

Change XX to your admin group ;)

thats probably not perfect as i didnt test it, but that should be close ;)

Evil X 06-09-2006 04:59 PM

thanks^...

Ntfu2 06-09-2006 05:17 PM

If that doesnt work, It may need a else in there

Code:

<if condition="$show['reputation']"><div>
 <if condition="$bbuserinfo[usergroupid] == XX">
$vbphrase[reppower]: SUPER POWER
<else>
<if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div>
</if>


Evil X 06-09-2006 06:44 PM

how could I make it work for several user groups?
<if condition="$bbuserinfo[usergroupid] == 1,2,3,4,5,7">

didnt work...,,,

Ntfu2 06-09-2006 06:56 PM

Replace the IF statement

<if condition="!is_member_of($bbuserinfo, x, y, z)

Evil X 06-09-2006 07:10 PM

ThankS


All times are GMT. The time now is 08:14 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.00990 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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