Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
DevTracker : Search by usergroup Details »
DevTracker : Search by usergroup
Mod Version: 0.01, by Nxs (Member) Nxs is offline
Developer Last Online: Feb 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 Rating: (2 votes - 5.00 average) Installs: 14
Released: 07 Aug 2006 Last Update: Never Downloads: 2
Not Supported Code Changes Is in Beta Stage  

DevTracker : Search by usergroup


Description:
Allows you to search for threads containing posts by multiple user ids a.k.a DevTracker

This hack requires you to EDIT a base vbulletin php source file
This hack is in BETA and I could use some feedback please

A good friend (wish i could plug your site Jon but I'd get a slap) mentioned this requirement in passing, and checking vb.com and vb.org yielded no existing hack but plenty of requirements for people to have this on their forum.


Installation
1) Create a new user on your forum, (eg devtracker)
2) Make a note of all the userid's you want to be linked to the tracker, yes I know the title of the hack says usergroups this was just to help search terms (and may come later) (eg 1,5,10,43)
3) Edit the file search.php, find the code below and add the section highlighted, remember to use your own values from the first two steps
4) Publish a new link on your navbar or where required with a ahref of search.php?do=process&searchuser=devtracker&showposts=1


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

Change Log:
7-Aug-06 : (0.01) BETA version

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.
Comments
  #2  
Old 07 Aug 2006, 21:26
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
If anyone has some constructive ideas of how to improve this, or can think of a way to make it a plugin please feel free to comment or drop me a PM.

If there is no other way than to edit vbulletin source then I would rather keep this to one or two lines of code over enhanced functionality
Reply With Quote
  #3  
Old 07 Aug 2006, 21:27
Caiman Caiman is offline
 
Join Date: Apr 2004
Real name: Jon
Thanks for attempting this, Alan. I'll give it a whirl now, ++kudos

Edit: So far, so good.
__________________
Administrator @ Star Trek Online .NET

Read helpful articles and get help with your community @ TheAdminZone

Last edited by Caiman; 07 Aug 2006 at 22:05.
Reply With Quote
  #4  
Old 08 Aug 2006, 02:50
KubisForce KubisForce is offline
 
Join Date: May 2006
Wow - Great that you take this project .
But I think the current design sucks. Sorry to say but I would make it like that. So that there is a seperate PHP file for handling those searches.
Reply With Quote
  #5  
Old 08 Aug 2006, 08:19
Nxs's Avatar
Nxs Nxs is offline
 
Join Date: May 2004
Originally Posted by KubisForce
Wow - Great that you take this project .
But I think the current design sucks. Sorry to say but I would make it like that. So that there is a seperate PHP file for handling those searches.
I heard that link cost a little under $200 - this is free and one line of code to change so forum upgrades will be a breeze. If three is enough interest (or enough spare time) i'll look into doing a wrapper later.
Reply With Quote
  #6  
Old 08 Aug 2006, 17:07
KubisForce KubisForce is offline
 
Join Date: May 2006
I hate modifications that cost money. That really sucks.
So I count on you .
Reply With Quote
  #7  
Old 30 Sep 2006, 13:08
KubisForce KubisForce is offline
 
Join Date: May 2006
Anyone who wants to improve this hack? That would be really cool...
Reply With Quote
  #8  
Old 15 Feb 2007, 03:45
Niber Niber is offline
 
Join Date: Sep 2006
Excellent work. Thank you.
Reply With Quote
  #9  
Old 18 Feb 2007, 23:15
jksgvb jksgvb is offline
 
Join Date: Jan 2007
Nxs,

Just what I was looking for. Thanks for taking the time to post this.
Reply With Quote
  #10  
Old 23 Apr 2007, 19:55
Blizzke Blizzke is offline
 
Join Date: Apr 2007
Actually, if you like to search by groups you can do it like this:

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

The green section is what you should add in the search.php file, note that you need to replace the $aDevGroups = Array ( 1, 2, 3 ); with an array containing the id's of the groups you wish to track.

How does it work?
Pretty easy. The query returns all users that either have one of the specified groups as the primary group (usergroupid field) or user with one (or more) of the requested groups as secondary.

Why the concat in the query ?
The secondary grouplist consists of a comma separate list of group id's.
We have to add a comma to the search term because otherwise we could pick up partial groups (ie a user in group 10 will be returned if we are looking for group 1). Solution to that is to always include a comma, so look for "1," instead of simple "1".
This poses a second problem: Should a group be the the last, it will not be detected. (eg "1,2" and we are searching for group "2"). So, the logical thing is to add an extra comma to the end of the membergroupids and then search for the groupid with a comma, which will always return the correct user.

Please note the following:
Obviously this is a "decent query" when used on a large board with a lot of users, so you might want to consider taking the initial query out and caching it's results into a small separate table, that way you would only have to select the rows from that table. You could have a script update that table so that you only have to run that once when you add or remove "devs".
Reply With Quote
  #11  
Old 30 Nov 2007, 01:50
grecostimpy grecostimpy is offline
 
Join Date: Mar 2005
Originally Posted by Blizzke View Post
Actually, if you like to search by groups you can do it like this:

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

The green section is what you should add in the search.php file, note that you need to replace the $aDevGroups = Array ( 1, 2, 3 ); with an array containing the id's of the groups you wish to track.

How does it work?
Pretty easy. The query returns all users that either have one of the specified groups as the primary group (usergroupid field) or user with one (or more) of the requested groups as secondary.

Why the concat in the query ?
The secondary grouplist consists of a comma separate list of group id's.
We have to add a comma to the search term because otherwise we could pick up partial groups (ie a user in group 10 will be returned if we are looking for group 1). Solution to that is to always include a comma, so look for "1," instead of simple "1".
This poses a second problem: Should a group be the the last, it will not be detected. (eg "1,2" and we are searching for group "2"). So, the logical thing is to add an extra comma to the end of the membergroupids and then search for the groupid with a comma, which will always return the correct user.

Please note the following:
Obviously this is a "decent query" when used on a large board with a lot of users, so you might want to consider taking the initial query out and caching it's results into a small separate table, that way you would only have to select the rows from that table. You could have a script update that table so that you only have to run that once when you add or remove "devs".
I know this is extremely old, but can someone expand on this? Where would I enter the usergroup id? I changed the numbers in the line $aDevGroups = Array ( 1, 2, 3 ); to my usergroup id's. But it just ended up with me getting a blank white screen anytimeI did ANY type of search.

Help? Thanks!
Reply With Quote
  #12  
Old 22 Mar 2008, 01:38
LuBi LuBi is offline
 
Join Date: Nov 2001
Since this is such an old thread, has anyone created a formal modification yet?
Reply With Quote
  #13  
Old 26 Mar 2008, 11:56
furnival furnival is offline
 
Join Date: Mar 2008
Returns all users for me, regardless of usergroup. How odd

Last edited by furnival; 26 Mar 2008 at 12:51.
Reply With Quote
  #14  
Old 11 Feb 2010, 10:01
tonjohn tonjohn is offline
 
Join Date: Sep 2008
Wouldn't it be possible to do this via the plugin system without having to edit the actual .php file?

I want some sort of dev tracker but am trying to avoid editing any of the actual files on the server.
Reply With Quote
  #15  
Old 31 Jul 2011, 19:30
gabbariele gabbariele is offline
 
Join Date: Mar 2009
Hi, sorry if I bump up this old topic. Is there a way to do the same thing in vBulletin 4.1.5 ? Thanks
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 04:48.

Layout Options | Width: Wide Color: