PDA

View Full Version : Edited by usertitle hack


zajako
12-13-2002, 10:00 PM
This hack was made by request for Gohanssj2
you can view it on his board of http://forum.lod-squared.com

it makes your edited by script look like this:

Last edited by zajako(Administrator) on 12-14-2002 at 07:01 PM


hoep you like it, i know its very simple, but it looks nice anywyas :)

LOD-squa
12-14-2002, 05:30 PM
Thanks for making it good work ;)

The Ghost
12-14-2002, 05:30 PM
cool adition.

thx

*installs*

zajako
12-14-2002, 05:48 PM
to remove registered users from it (like if they edit their own) use this:
$groupid = "$edituser[usergroupid]";
$groupname = $DB_site->query_first("SELECT * FROM usergroup WHERE usergroupid='$groupid'");
If ($groupid != 2)
$rank = "($groupname[usertitle])";

Instead of this:

$groupid = "$edituser[usergroupid]";
$groupname = $DB_site->query_first("SELECT * FROM usergroup WHERE usergroupid='$groupid'");
$rank = "($groupname[usertitle])";

LOD-squa
12-14-2002, 05:57 PM
Thanks for that remove also :) what i needed ^_^

Bullet
12-14-2002, 06:17 PM
Yeah thanks, now me and Gohan can do evil things on LOD-Squared, muwahaha!

flup
12-14-2002, 06:28 PM
Doesn't work @ 2.2.9 :/

LOD-squa
12-14-2002, 06:28 PM
I have 2.2.9 and it works fine.

Bullet
12-14-2002, 06:30 PM
Yeah, it works fine on our forums.

flup
12-14-2002, 06:43 PM
What have i done wrong then

LOD-squa
12-14-2002, 06:44 PM
If you can pm me your function.php I'll see whats wrong.

Chris M
12-14-2002, 09:26 PM
Sounds good:)

Satan

Bison
12-26-2002, 12:06 AM
Nice addition! :)

FlyingDutchman
04-03-2003, 04:30 PM
wouldn't this code (in functions.php) be better?
(also includes the no registered users fix - in fact, only Admins & (Super) Mods)
NO EXTRA QUERIES - prevent them in any way possible :D
and forget about the global $DB_Site too!!! :D


if ($edituser[usergroupid]==6) {
$rank=" (Administrator)";
} elseif ($edituser[usergroupid]==5) {
$rank=" (Super Moderator)";
} elseif ($edituser[usergroupid]==7) {
$rank=" (Moderator)";
} else {
$rank="";
}

Bison
04-04-2003, 12:43 AM
I agree ... and it works!

Kudos FlyingDutchman! :D

FlyingDutchman
04-04-2003, 03:53 AM
i just thought of this last night, thought it was pretty neat so i made it this morning :D
this piece of code will show the user's custom title (if not set, the default user group title):

$temp = array("5", "6", "7");
if (in_array("$edituser[usergroupid]", $temp)) {
$rank=" ($edituser[usertitle])";
} else {
$rank="";
}



you can add as much usergroups to the $temp variable as you want, seperate them with a , and put them in "-s, see the code for example ;) (5, 6 and 7 are Admins & (Super) Mods)