vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Show conditional on usergroup (https://vborg.vbsupport.ru/showthread.php?t=150786)

Goatpod 06-27-2007 12:53 PM

Show conditional on usergroup
 
Hi, hopefully this is an easy one :)

When someone subscribes to my forum they're given a little red medal in their postbit. Currently I have to manually input the file name into a field in their profile via the admincp for the medal to show.

I'm sure I should be able to automate the process using an <if> </if> statement in the process but I'm unsure as to the exact syntax to use.

As usual, any help for this bear of little brain would be greatly appreciated.

Thanks

Dave

dyna88 06-27-2007 01:10 PM

You want the medal to show if they are a registered member then???

How about...

HTML Code:

<if condition="$show['member']">
medal code here
</if>


Goatpod 06-27-2007 01:19 PM

Quote:

Originally Posted by dyna88 (Post 1277671)
You want the medal to show if they are a registered member then???

How about...

HTML Code:

<if condition="$show['member']">
medal code here
</if>



Thanks Dyna88 :) The medal should only show if they're a member of the Subsciber usergroup (sorry, I should have mentioned they move usergroup automatically when they sign up to a subscription).

So would....

HTML Code:

<if condition="$show['subscriber']">
medal code here
</if>

do it if 'subscriber' is the name of the user group?

Cheers

Dave

dyna88 06-27-2007 01:24 PM

HTML Code:

<if condition="$show['member']">
medal code here
</if>

Will show for everyone except guests

If you want it to show just for one usergroup you would use

HTML Code:

<if condition="is_member_of($bbuserinfo, X)">
medal code here
</if>

Replace the X with the usergroup ID number

Goatpod 06-27-2007 01:33 PM

Many thanks for your quick responses Dyna88, you're a star :)

Will run off and try it now.

Cheers

Dave

I used:

HTML Code:

<if condition="is_member_of($bbuserinfo, 31)">
<img src="submed.gif">
</if>

31 is the number of the Subscriber usergroup, but the code just gave medals to all the members!

Can anyone spot what I've done wrong?

Thanks

Dave


All times are GMT. The time now is 05:00 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.01205 seconds
  • Memory Usage 1,724KB
  • 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
  • (6)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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