PDA

View Full Version : Exclude certain users from Forum Leaders


Jolten
03-23-2005, 10:00 PM
What's this do?
This mini-hack allows you to prevent certain users from showing up on the Forum leaders page.

This was a requested Hack.

Time to install = Less than 5 minutes.
Files to edit = 1
templates to edit = 0
Queriest to run = 0
Database alterations = 0


installation
Open showgroups.php and find:

if ($user['userid'])


replace with:

if (($user['userid']) && (!in_array($user['userid'], array(X,X))))


Replace X, X with the user ids you wish to exclude from the forum leaders. Separate id numbers with a comma
Save, Upload and you're done.

There shouldn't be a need for much support, but if it's required I'll handle it exclusively in this thread.

TCattitude
03-24-2005, 05:46 PM
Nice :D

Allan
03-24-2005, 05:51 PM
not badly, thank you :)

alwafi
03-25-2005, 01:10 AM
plz can i see the example

thanx

jugo
03-25-2005, 02:13 AM
plz can i see the example

thanx


LOL.....Sorry...I had to laugh don't mean to laugh AT you...just the whole range of posts.

Jolten
03-25-2005, 03:19 AM
plz can i see the example

thanx

There's no example to show. This removes a given user from your Forum Leaders page. Look at your page, imagine a user not showing up there, that's your example.

wrongful
03-26-2005, 01:32 PM
Maybe someone can help me out here.

I was trying to make this an admin control panel option as such


if (($user['userid']) && (!in_array($user['userid'], array($vboptions['disallowedonshowgroups']))))


It works whn I just type in one userid, but when I enter more than one userid into the vboption box I created such as (272,654,12) it doesn't work at all. Does anyone have any ideas?

Deaths
03-26-2005, 01:45 PM
That's a typical copypaste error ;)

Use this code:


$dmembers = $vboptions['disallowedonshowgroups'];
$pusers = explode(",", $dmembers);

if (($user['userid']) && (!in_array($user['userid'], $pusers)))

;)

wrongful
03-26-2005, 02:01 PM
That's a typical copypaste error ;)

Thanks, that did the trick.

Deaths
03-26-2005, 02:06 PM
No problem :)

Jolten
03-26-2005, 03:31 PM
Hey Wrongful, if you'd like to include your modifications I'll add them and give you full credit.

Deaths
03-26-2005, 04:02 PM
Adding his code isn't such a good idea, as it doesn't work :p.

Jolten
03-26-2005, 04:04 PM
I realize you deserve credit too, Deaths. And you'd get it. I might just write this up as well.

7ABD
03-27-2005, 03:57 AM
plz can i see the example

thanx
:banana: :banana: :banana: :cool:

Deaths
03-27-2005, 06:58 AM
I realize you deserve credit too, Deaths. And you'd get it. I might just write this up as well.
Heh, it was more of a joke :p.

If you want, you can add my code.

:banana: :banana: :banana: :cool:
There's nothing to show...
Just imagine your "View Forum Leaders" list, and imagine one of your mods NOT there, because you removed him with this hack.

we_are_borg
05-06-2005, 09:29 AM
Thanks for this hack

Vevina
05-18-2005, 05:57 PM
sweet installed :)

sadecosefo
10-14-2006, 11:48 PM
Very nice, been looking for something like this for a while. I tried Death's mod, but couldn't figure out where to apply the information in the ACP.

The-Ensemble
09-08-2007, 02:36 PM
Perfect! Just What I Was After! Thank You!

Awjvail
11-09-2007, 03:00 AM
Does this work in 3.6.8?