PDA

View Full Version : Moderators and Administrators are exempt from censorship


Zzed
03-24-2002, 10:00 PM
This hack disables the censor feature for moderators and administrators and
allows them to candidly spit out profanity. :)

It is a very simple hack, and I am embarassed to call it one. But it had been requested by another member. So here it is. :)

Here is how to apply this hack.

In functions.php:

look for:

function censortext($text) {
global $enablecensor,$censorwords,$censorword,$censorchar ;




replace with:

function censortext($text) {
global $enablecensor,$censorwords,$censorword,$censorchar ,$bbuserinfo;
if(($bbuserinfo[usergroupid] == 5) or ($bbuserinfo[usergroupid] == 6) or ($bbuserinfo[usergroupid] == 7)){
$enablecensor = 0;
}


look for:

$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts

return censortext($bbcode);


Replace with:

$bbcode=str_replace("{", "{", $bbcode); // stop people posting replacements in their posts

return $bbcode;


Hope you guys like it.

ExcErr
03-25-2002, 04:33 PM
cool!:)

Marshalus
03-25-2002, 04:44 PM
Exactly what I was needing!

snyx
03-25-2002, 05:54 PM
ditto, thanks!

Remi
03-26-2002, 09:31 AM
OK Zzed

It is working for me (finally) :D

I think there is a problem with this hack.

This hack deos not exempt censored text if posted by admins to registered.

All wahat it does it to reveal censored text to admins

Zzed
03-26-2002, 04:35 PM
Oops. :eek: Sowwy. :(

Ok, I fixed it. It was another one liner. :)

DemiNeo0101
03-26-2002, 07:00 PM
ohhhhhhhhh.... Now i can curse at my baby users.

Remi
03-26-2002, 07:36 PM
Thanks Zzed

It is working perfictly now :D

Zzed
03-26-2002, 07:47 PM
Very cool. :)

Thanks for the feedback.

Mithan
04-27-2002, 11:56 AM
I did this and it didn't work. Im using VB 2.2.5... :(

Boofo
02-22-2003, 08:55 AM
Great hack, sir, but you might want to update the text file in your first post. ;)