Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
is_member_of improvement. Details »
is_member_of improvement.
Mod Version: 1.00, by merk (Member) merk is offline
Developer Last Online: Mar 2012 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.0 Rating: (0 vote - 0 average) Installs: 9
Released: 04 Feb 2004 Last Update: Never Downloads: 1
Not Supported  

Requested by Boofo

Some people want to check for multiple groups at once, instead of having to slam OR is_member_of(anothercheck) together for each group, if you apply this hack it will be simple to check for multiple groups.

The format for the function is now,


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Just seperate each group by a comma, no need for extra quotes or anything.

Find the function in includes/functions.php ~line 190 and replace it with the following.

This should not affect any current is_member_of conditionals you're using.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
[Improvement] vBStats -> Top Posters list PHP-code improvement (much less queries) KuraFire vBulletin 2.x Full Releases 10 15 Feb 2003 14:53
[Improvement] vBStats -> Member Referrer list PHP-code improvement (much less queries KuraFire vBulletin 2.x Full Releases 23 15 Feb 2003 10:31

Comments
  #2  
Old 04 Feb 2004, 09:14
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You have once again proven yourself the "Master"! Thank you, very much, sir.

/me skulks away having proven to not be a good Grasshopper to Master.

Last edited by Boofo; 04 Feb 2004 at 09:18.
Reply With Quote
  #3  
Old 04 Feb 2004, 15:00
Floris's Avatar
Floris Floris is offline
 
Join Date: Jan 2002
Originally Posted by Boofo
You have once again proven yourself the "Master"! Thank you, very much, sir.

* Boofo skulks away having proven to not be a good Grasshopper to Master.
Great work, and thank you for sharing. You are a good and kind person.
__________________
My community; https://omgboards.com
Reply With Quote
  #4  
Old 04 Feb 2004, 16:39
LeeCHeSSS's Avatar
LeeCHeSSS LeeCHeSSS is offline
 
Join Date: Dec 2001
Wouldn't it be easier to allow the second argument to be an array with usergroup id's?

ie.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That way using is_member_of is easier to use in "dynamic" situations...
Reply With Quote
  #5  
Old 11 Feb 2004, 09:46
merk merk is offline
 
Join Date: Nov 2001
Real name: Tim
MY initial use of array() in the conditionals didnt work, maybe because of the way it is evaluated.

If you can work out if array() works in conditionals it would be an easy modification to the code
Reply With Quote
  #6  
Old 11 Feb 2004, 10:51
LeeCHeSSS's Avatar
LeeCHeSSS LeeCHeSSS is offline
 
Join Date: Dec 2001
Try this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #7  
Old 10 Mar 2004, 23:47
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Interesting hack, should be useful to many
Reply With Quote
  #8  
Old 12 Dec 2004, 18:21
mcyates mcyates is offline
 
Join Date: Jan 2003
Real name: Michael C Yates
What exactly do i raplace????


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
MY FOOTBALL FORUM
World Wide Football Discussion Forum
Reply With Quote
  #9  
Old 12 Dec 2004, 18:31
chris2707 chris2707 is offline
 
Join Date: Feb 2002
Replace all of it unless you've previously hacked that function.
Reply With Quote
  #10  
Old 12 Dec 2004, 18:37
mcyates mcyates is offline
 
Join Date: Jan 2003
Real name: Michael C Yates
replaced it all and i got this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
MY FOOTBALL FORUM
World Wide Football Discussion Forum
Reply With Quote
  #11  
Old 12 Dec 2004, 18:44
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
Originally Posted by mcyates
replaced it all and i got this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Then you didn't replace it all. Go back and make sure you got the whole function.
Reply With Quote
  #12  
Old 12 Dec 2004, 18:54
mcyates mcyates is offline
 
Join Date: Jan 2003
Real name: Michael C Yates
Originally Posted by amykhar
Then you didn't replace it all. Go back and make sure you got the whole function.

LeeCHeSSS script worked, but the orignal one didn't. I'll try your hack now. Thanks for the support.
__________________
MY FOOTBALL FORUM
World Wide Football Discussion Forum
Reply With Quote
  #13  
Old 28 Dec 2004, 00:54
noppid noppid is offline
 
Join Date: Mar 2003
A template only mod to do this is available here if you would like to avoid editing php files.

http://www.vbulletintemplates.com/mo...ead.php?t=7570
__________________
Add a photo gallery garage to your auto forum and get noticed by your members. Find out how at the vBulletin Computer Help Forum.
An informed rider makes their first destination the motorcycle forum at rider info.

Last edited by noppid; 05 Jan 2005 at 03:46.
Reply With Quote
  #14  
Old 30 Jul 2005, 04:28
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Has this been added to 3.5 RC 1?
Reply With Quote
  #15  
Old 30 Jul 2005, 05:06
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Real name: Amy
It's built in. Go read the code and you'll see that Jelsoft was wise and merciful and no hack is needed any more.
__________________
amykhar.com
----------------------------------------
I do not respond to PM requests for coding assistance.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 18:49.

Layout Options | Width: Wide Color: