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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2005, 03:11 AM
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Location: California
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Show Mutiple Ranks in postbit

Hello Everyone,

Got a quick question.

I have multiple usergroups setup and many of them have ranks

Even Mods and up can join the opther groups

Mods and up also have rank images

I have it working but basically doing an if statement show image
Here is an example:
Code:
<if condition="is_member_of($userinfo, 24)">
<img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member">
</if>
This works fine for mods who are have there own rank image already

but, if a regular user subscribes to a group with this rank image, it is going to show up twice in there postbit, once in the normal rank place and once whre I added this code.

so, I am thinking, and this is what I would like your help with.

if usergroup 5 or 6 or 7 and 24
show the image
/if

Any ideas on how to do this
Reply With Quote
  #2  
Old 06-25-2005, 02:15 PM
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Location: California
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tomshawk
Hello Everyone,

Got a quick question.

I have multiple usergroups setup and many of them have ranks

Even Mods and up can join the opther groups

Mods and up also have rank images

I have it working but basically doing an if statement show image
Here is an example:
Code:
<if condition="is_member_of($userinfo, 24)">
<img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member">
</if>
This works fine for mods who are have there own rank image already

but, if a regular user subscribes to a group with this rank image, it is going to show up twice in there postbit, once in the normal rank place and once whre I added this code.

so, I am thinking, and this is what I would like your help with.

if usergroup 5 or 6 or 7 and 24
show the image
/if

Any ideas on how to do this
OK, I tryed to set up an array in phpinclude_start, Like this

$staffgroups = array(5 or 6 or 7);

Then changed the postbit code to this

<center>
<if condition="is_member_of($userinfo, 24, $staffgroups)">
<img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member">
</if>
</center>

But still no glory.

Can anyone help me with this?
Reply With Quote
  #3  
Old 06-27-2005, 01:08 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
$staffgroups = array(or or 7); 
should be
PHP Code:
$staffgroups = array(567); 
Reply With Quote
  #4  
Old 06-27-2005, 05:29 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe you will have to use something in the line of...

Code:
<if condition="is_member_of($userinfo, 5) OR is_member_of($userinfo, 6)">
<img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member">
</if>
Reply With Quote
  #5  
Old 06-27-2005, 07:10 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think you can also use an array as parameter oof is_member_of
Reply With Quote
  #6  
Old 06-27-2005, 08:26 PM
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Location: California
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To bad you guys dont have multiquote installed here

Anyway, I've tryed this

Code:
<if condition="is_member_of($userinfo, 5) OR is_member_of($userinfo, 6)">
<img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" ALT="Premium Member">
</if>
and this

[code]$staffgroups = array(5 or 6 or 7);[/code]

as well as this

Code:
$staffgroups = array(5, 6, 7);
None of them work the way I am trying to do it.

Someone posted this

Code:
<if condition="is_member_of($post, 24) AND $post['usergroupid'] != 24">
 
Your code here... </if>


at vbulletin.com I'll try it next and see what happens.

I cant believe this is that hard.

LOL

Thanks for the thoughts

Reply With Quote
  #7  
Old 06-27-2005, 08:36 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Unless I'm mistaken you can't use an array in is_member_of unless you have merk's 'is_member_of' modification.

I'm under the impression this is not the case.

tomshawk,
What exactly are you trying to achieve?
Write the function out in a sentence. eg. if user is in group 5 do not include etc, etc
Reply With Quote
  #8  
Old 06-27-2005, 09:11 PM
tomshawk's Avatar
tomshawk tomshawk is offline
 
Join Date: Jul 2003
Location: California
Posts: 392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by princeton
tomshawk,
What exactly are you trying to achieve?
Write the function out in a sentence. eg. if user is in group 5 do not include etc, etc
This is the code I'm looking for

If user is in group 5 or 6 or 7 and group 24 (show image)

Explanation:
I have a seperate group for premium members
If a regular user pays the premium charge, they get a rank image.
That works great.
but, I have a staff image for mods and above.
I want this image to show up in there postbit as a second image, but, right now, with the codes above, the regular users in the premium users group have 2 images.

I'm trying to avoid the premium members from seeing the image twice, but only mods that have paid actually have the second image.

Maybe this would be easier for everyone to understand

if secondary group is premium group number (24)
show image
/if

but, only secondary group, if the primary group is 24, I dont want it to display the image
Reply With Quote
  #9  
Old 06-27-2005, 10:56 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know if this will work but try...
Code:
<if condition="is_member_of($userinfo, 10)">
<if condition="is_member_of($userinfo, 5) OR is_member_of($userinfo, 6) OR is_member_of($userinfo, 7)"><img src="http://www.tech-unity.com/forums/images/ranks/premium.jpg" alt="Premium Member" /></if>
</if>
another alternative would be to create another usergroup for Staff members who have 'premium' status
Reply With Quote
  #10  
Old 06-27-2005, 11:01 PM
KevinL KevinL is offline
 
Join Date: Apr 2005
Posts: 1,287
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by princeton

another alternative would be to create another usergroup for Staff members who have 'premium' status
I was just going to say that...like the adminzone.
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 05:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08622 seconds
  • Memory Usage 2,268KB
  • Queries Executed 11 (?)
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
  • (7)bbcode_code
  • (2)bbcode_php
  • (3)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
  • (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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete