Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-02-2003, 12:22 AM
WichitaRacing WichitaRacing is offline
 
Join Date: Sep 2003
Location: Wichita, KS
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to add text in postbit_userinfo based on usergroup?

Somebody over on vB.com suggested that I try some code along the lines of :

<if condition="is_member_of($post, USERGROUPID_OF_THE_GROUP)">whateverIwanttowrite</if>

I'm need to know the exact code that I would use for this, and if I need to do anything else.

What I'm doing, is adding members who donate to a secondary usergroup. I want "donating member" or something like that to be in their info.
Reply With Quote
  #2  
Old 12-02-2003, 02:27 AM
Koutaru's Avatar
Koutaru Koutaru is offline
 
Join Date: Feb 2003
Location: IL
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're using vB2 right now I suggest you use Logician's conditionals hack
Reply With Quote
  #3  
Old 12-02-2003, 06:51 PM
WichitaRacing WichitaRacing is offline
 
Join Date: Sep 2003
Location: Wichita, KS
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Koutaru
If you're using vB2 right now I suggest you use Logician's conditionals hack
vB3 for me. Will those hacks not work w/ 3? Where do I find them?
Reply With Quote
  #4  
Old 12-02-2003, 06:54 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just to note, no vB2 hacks will work with vB3. Also, if you want to show text for a certain usergroup, you would use in your template:

Code:
<if condition="$bbuserinfo[usergroupid]==xx">
some text
<else />
text for noone in that usergroup
</if>
Reply With Quote
  #5  
Old 12-02-2003, 09:42 PM
WichitaRacing WichitaRacing is offline
 
Join Date: Sep 2003
Location: Wichita, KS
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by assassingod
Just to note, no vB2 hacks will work with vB3. Also, if you want to show text for a certain usergroup, you would use in your template:

Code:
<if condition="$bbuserinfo[usergroupid]==xx">
some text
<else />
text for noone in that usergroup
</if>
Hmm, I guess that doesn't work for "additional usergroups." I've added on called "Donating Members," but this code isn't making the text appear for users that have this checked as an additional usergroup.
Reply With Quote
  #6  
Old 12-02-2003, 09:50 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WichitaRacing
Hmm, I guess that doesn't work for "additional usergroups." I've added on called "Donating Members," but this code isn't making the text appear for users that have this checked as an additional usergroup.
yes it does. i told you how to check for that over at vb.com

<if condition="is_member_of($post, USERGROUPID_OF_THE_GROUP)">Supporting Member</if>
Reply With Quote
  #7  
Old 12-03-2003, 01:51 AM
WichitaRacing WichitaRacing is offline
 
Join Date: Sep 2003
Location: Wichita, KS
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
yes it does. i told you how to check for that over at vb.com

<if condition="is_member_of($post, USERGROUPID_OF_THE_GROUP)">Supporting Member</if>
Attached Images
File Type: jpg error.jpg (55.7 KB, 0 views)
Reply With Quote
  #8  
Old 12-03-2003, 01:54 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by WichitaRacing
wheres that second part from?


is_member_of should work perfectly. it was designed to do just what im telling you
Reply With Quote
  #9  
Old 12-03-2003, 01:57 AM
WichitaRacing WichitaRacing is offline
 
Join Date: Sep 2003
Location: Wichita, KS
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Faranth
wheres that second part from?
That's what it told me when I tried to save the template after adding the following:
Code:
<if condition="is_member_of($post, 14)">Supporting Member</if>
14 is the id, from the usergroup manager, of my "Donating Members" usergroup.
Reply With Quote
  #10  
Old 12-03-2003, 02:10 AM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

should work just fine does it?
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 06: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.04337 seconds
  • Memory Usage 2,275KB
  • 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
  • (3)bbcode_code
  • (6)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
  • (1)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
  • (1)postbit_attachment
  • (10)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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete