vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Show Mutiple Ranks in postbit (https://vborg.vbsupport.ru/showthread.php?t=90966)

tomshawk 06-24-2005 03:11 AM

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

tomshawk 06-25-2005 02:15 PM

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?

Marco van Herwaarden 06-27-2005 01:08 PM

PHP Code:

$staffgroups = array(or or 7); 

should be
PHP Code:

$staffgroups = array(567); 


Princeton 06-27-2005 05:29 PM

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>


Marco van Herwaarden 06-27-2005 07:10 PM

I think you can also use an array as parameter oof is_member_of

tomshawk 06-27-2005 08:26 PM

To bad you guys dont have multiquote installed here :p

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
;)

Princeton 06-27-2005 08:36 PM

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

tomshawk 06-27-2005 09:11 PM

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

Princeton 06-27-2005 10:56 PM

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

KevinL 06-27-2005 11:01 PM

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.


All times are GMT. The time now is 03:53 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.01070 seconds
  • Memory Usage 1,749KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete