PDA

View Full Version : Edited by usertitle hack


zajako
14 Dec 2002, 18:23
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
14 Dec 2002, 18:30
Thanks for making it good work ;)

The Ghost
14 Dec 2002, 18:30
cool adition.

thx

*installs*

zajako
14 Dec 2002, 18:48
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
14 Dec 2002, 18:57
Thanks for that remove also :) what i needed ^_^

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

flup
14 Dec 2002, 19:28
Doesn't work @ 2.2.9 :/

LOD-squa
14 Dec 2002, 19:28
I have 2.2.9 and it works fine.

Bullet
14 Dec 2002, 19:30
Yeah, it works fine on our forums.

flup
14 Dec 2002, 19:43
What have i done wrong then

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

Chris M
14 Dec 2002, 22:26
Sounds good:)

Satan

Bison
26 Dec 2002, 01:06
Nice addition! :)

FlyingDutchman
03 Apr 2003, 17:30
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 Apr 2003, 01:43
I agree ... and it works!

Kudos FlyingDutchman! :D

FlyingDutchman
04 Apr 2003, 04:53
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)