PDA

View Full Version : Mods can edit Users


Xenon
08-08-2002, 10:00 PM
With this Hack your Mods can edit really everything of a user account, nearly as much as an Admin can! (Changing usergroups....)

But it is very customizable, too. If you don't want em to change usergroups, then they can't. Or you can define which usergroups they can move the users into..

Also if you add if-clauses in the front section to the hack, you can customize it to which of your mod can modify which fields..

this block in front of the hack code defines nearly everything you need to customize the hack:

$canedit[profilefields]=1;
$canedit[timefields]=0;
$canedit[options]=1;
$canedit[addresses]=1; // HP, Email, ICQ, AIM ...
$canedit[signature]=1;
$canedit[title]=0;
$canedit[name]=1;
$canedit[avatars]=1; // 0 Cant edit, 1 Can edit, 2 Can upload custom avatars
$canedit[changegroups]=0; // Mods can move users from one group to another (just groups included in $canedit[usergroupids])
$canedit[usergroupids]="1 2 3 4 10 11"; // Which usergroups can be edited

Screenshots in following Posts

Xenon
08-09-2002, 03:51 PM
nearly an admin panel:

Xenon
08-09-2002, 03:52 PM
old style:

Xenon
08-09-2002, 03:53 PM
usergroup changer (to which a mod is allowed) :)

assassingod
08-09-2002, 04:25 PM
Very nice, I might install it:) My forums are a bit new and I havent got very many mods =/

ladyfyre
08-09-2002, 05:38 PM
I like it :)

as usual...i have one question *blush*

Is there a way to set this so that different mod usergroups have a different set of usergroups they can move users to?

We have in essence, two totally different userlevel systems on my site...one for ladies, one for gentlemen. Thus, lady mods handle female stuff, male mods handle male stuff. I would prefer not to have lady mods accessing male stuff and vice versa.

Or......now that i think about this....
could i set up a separate mod panel for women and men, and then have the two configured differently?

okrogius
08-09-2002, 08:22 PM
Good job :).

NTLDR
08-09-2002, 10:11 PM
Very nice hack Xenon, particulary usefull for large boards.

Xenon
08-09-2002, 11:39 PM
a ladyfire:

very easy, instead of this line$canedit[usergroupids]="1 2 3 4"; add an if-clause like this:

if($bbuserinfo[usergroupid]==ladymodgroupid) {
$canedit[usergroupids]="2 3 4"; //groups your femal mods can edit
} else {
$canedit[usergroupids]="2 8 9"; //groups your male mods can edit
}

seperate modpanel would also be possible, you have to alter global.php in the new folder to just allow male/female mods go into it ;)

[D]Vincent
08-10-2002, 05:30 AM
Looks nice. I'll probably disable being able to change the username but I might install this later ^^

dxb
08-10-2002, 08:31 PM
man it looks like you are reading my mind :) ... i was looking for these things for my mods

but one thing I tried changing the title for one of my users and it gave Record updated

but when I re-checked the user account the title was not changed " and yes I choose "yes" to give a custom title "

and also I have this option

$canedit[title]=1;

set at 1

anyway thank you very very very much for this useful hack :)

MrLister
08-10-2002, 10:10 PM
great job!

i was looking for getting me one of these. saved me time :)

thanks!

ladyfyre
08-11-2002, 05:46 PM
Nope Xenon, the above didn't work for me :(

This is the exact code I put in...it is giving a parse error.

if($bbuserinfo[usergroupid]==26)_{
$canedit[usergroupids]="2 3 9 25";_
}_else_{
$canedit[usergroupids]="2 9 12 17 19 22 23 ";_
}

g-force2k2
08-11-2002, 05:56 PM
Originally posted by ladyfyre
Nope Xenon, the above didn't work for me :(

This is the exact code I put in...it is giving a parse error.

if($bbuserinfo[usergroupid]==26)_{
$canedit[usergroupids]="2 3 9 25";_
}_else_{
$canedit[usergroupids]="2 9 12 17 19 22 23 ";_
}


ladyfyre just use this code:


if($bbuserinfo[usergroupid] == 26) {
$canedit[usergroupids] = "2 3 9 25";
} else {
$canedit[usergroupids] = "2 9 12 17 19 22 23 ";
}

don't have the "_" included ;)

g-force2k2

Xenon
08-12-2002, 12:24 AM
@lady: see what g-force said ^^

@dxb: really? hmm, it worked in my last test, so i think it should work.
i've checked the file and all seems fine, but i'll test it again later, k?

Xenon
08-12-2002, 01:07 AM
Ok
dxb, you were right, there was a little bug in my file i posted here.

i have uploaded a new one, now it should work perfect!

changes: doupdate section

dxb
08-12-2002, 05:45 AM
waaaw now it works like a charm

great work

thanks alot Xenon :)

BorgGanon
09-15-2002, 08:00 PM
Works fine.
here is a little change, so that you can easy choose, wich MOD can edit an wich not

Do the following Query:
ALTER TABLE `moderator` ADD `canedituser` SMALLINT( 6 ) DEFAULT '0' NOT NULL ;

In /admin/forum.php:
FIND
makeyesnocode("Can can view whole user profile (but not edit)","canviewprofile",0);

AFTER ADD
makeyesnocode("Can edit User","canedituser",0);

FIND
makeyesnocode("Can can view whole user profile (but not edit)","canviewprofile",$moderator[canviewprofile]);

AFTER ADD
makeyesnocode("Can edit User","canedituser",$moderator[canedituser]);

FIND
$DB_site->query("INSERT INTO moderator (moderatorid,forumid,userid,newpostemail,newthread email,caneditposts,candeleteposts,canviewips,canma nagethreads,canopenclose,caneditthreads,caneditsty les,canbanusers,canviewprofile,canannounce,canmass move,canmassprune,canmoderateposts,canmoderateatta chments) VALUES (NULL,'$parentid','$userid','$newpostemail','$newt hreademail','$caneditposts','$candeleteposts','$ca nviewips','$canmanagethreads','$canopenclose','$ca neditthreads','$caneditstyles','$canbanusers','$ca nviewprofile','$canannounce','$canmassmove','$canm assprune','$canmoderateposts','$canmoderateattachm ents')");
REPLACE WITH
$DB_site->query("INSERT INTO moderator (moderatorid,forumid,userid,newpostemail,newthread email,caneditposts,candeleteposts,canviewips,canma nagethreads,canopenclose,caneditthreads,caneditsty les,canbanusers,canviewprofile,canedituser,cananno unce,canmassmove,canmassprune,canmoderateposts,can moderateattachments) VALUES (NULL,'$parentid','$userid','$newpostemail','$newt hreademail','$caneditposts','$candeleteposts','$ca nviewips','$canmanagethreads','$canopenclose','$ca neditthreads','$caneditstyles','$canbanusers','$ca nviewprofile','$canedituser','$canannounce','$canm assmove','$canmassprune','$canmoderateposts','$can moderateattachments')");

FIND
$moderator=$DB_site->query_first("SELECT forumid,userid,newpostemail,newthreademail,canedit posts,candeleteposts,canviewips,canmanagethreads,c anopenclose,caneditthreads,caneditstyles,canbanuse rs,canviewprofile,canannounce,canmassmove,canmassp rune,canmoderateposts,canmoderateattachments FROM moderator WHERE moderatorid=$moderatorid");
REPLACE WITH
$moderator=$DB_site->query_first("SELECT forumid,userid,newpostemail,newthreademail,canedit posts,candeleteposts,canviewips,canmanagethreads,c anopenclose,caneditthreads,caneditstyles,canbanuse rs,canviewprofile,canedituser,canannounce,canmassm ove,canmassprune,canmoderateposts,canmoderateattac hments FROM moderator WHERE moderatorid=$moderatorid");
FIND
$DB_site->query("UPDATE moderator SET forumid='$parentid',userid='$userid',newpostemail= '$newpostemail',newthreademail='$newthreademail',c aneditposts='$caneditposts',candeleteposts='$cande leteposts',canviewips='$canviewips',canmanagethrea ds='$canmanagethreads',canopenclose='$canopenclose ',caneditthreads='$caneditthreads',caneditstyles=' $caneditstyles',canbanusers='$canbanusers',canview profile='$canviewprofile',canannounce='$canannounc e',canmassmove='$canmassmove',canmassprune='$canma ssprune',canmoderateposts='$canmoderateposts',canm oderateattachments='$canmoderateattachments' WHERE moderatorid='$moderatorid'");
REPLACE WITH
$DB_site->query("UPDATE moderator SET forumid='$parentid',userid='$userid',newpostemail= '$newpostemail',newthreademail='$newthreademail',c aneditposts='$caneditposts',candeleteposts='$cande leteposts',canviewips='$canviewips',canmanagethrea ds='$canmanagethreads',canopenclose='$canopenclose ',caneditthreads='$caneditthreads',caneditstyles=' $caneditstyles',canbanusers='$canbanusers',canview profile='$canviewprofile',canedituser='$canedituse r',canannounce='$canannounce',canmassmove='$canmas smove',canmassprune='$canmassprune',canmoderatepos ts='$canmoderateposts',canmoderateattachments='$ca nmoderateattachments' WHERE moderatorid='$moderatorid'");

in mod/index.php:
FIND
makenavoption("View","user.php?action=find");
REPLACE WITH
makenavoption("View","user.php?action=find","|");
makenavoption("Edit","user.php?action=find");

in mod/user.php:
FIND
if ($action=="edit") {
AFTER ADD
$perms=getpermissions();
if (!$perms[ismoderator] and !$ismod=$DB_site->query_first("SELECT * FROM moderator WHERE userid=$bbuserinfo[userid] AND canedituser=1")) {
echo "<p>You do not have permission to do this!</p>";
exit;
}
FIND
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=edit&userid=$user[userid]\"><p>[edit user]</p></a></td>", "")."</tr>\n";
REPLACE WITH
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canedituser']==1, "<td nowrap><a href=\"user.php?action=edit&userid=$user[userid]\"><p>[edit user]</p></a></td>", "")."</tr>\n";

Xenon
09-16-2002, 12:08 PM
thanks, i have planned such a thing since a long time, was just to lazy to do ;)

then after i heard about the new permission system in vb3 i decided to wait ^^

Rapdis
09-24-2002, 12:01 PM
u added it, where can the mod access that cp?

Rapdis
09-24-2002, 12:41 PM
I have attached a screen shot of the cp they see, the save button is still not there.

Rapdis
09-24-2002, 12:42 PM
I have also attached the mod/user after i installed the hack

Xenon
09-24-2002, 01:21 PM
in the quick userfinder, if you enter an username then you'll come up with 3 options: [ban] [view] [edit]...
i think you should try the edit link ;)

supersimon
09-29-2002, 10:45 PM
this hack doesnt work for me ?
i did everything rite ?
iam using 2.2.7

Xenon
09-30-2002, 10:15 AM
the hack works perfect with vb227 and also 228

perhaps you have forgotten to manually set the right permissions in the mod/user.php

Erwin
09-30-2002, 10:23 AM
Xenon, I've been running your original version of this hack for most of the year now, and it is working fine with 2.2.8. :) Thanks for the great hack.

Xenon
09-30-2002, 10:26 AM
:)
thanks for the nice words :)

but you should upgrade to the newest version, it's much more customizable than the original one

Sengir
10-09-2002, 11:41 AM
This hack doesn't allow mods to change admin members does it?

Xenon
10-09-2002, 11:48 AM
no you can specify which usergroups are affacted by this hack.
if you want you can allow to change admin members, but i think you don't want do you? ^^

bobbydavro
10-21-2002, 12:12 PM
will this work with 2.2.1?

looks great by the way!

Xenon
10-21-2002, 04:50 PM
normally it should, because it's just an addition to a file no important changes on original lines...

so i'd say try it, i think it'll work

Axel Foley
11-03-2002, 01:39 AM
First of all thanks for your work Xenon...it's helpful.

One of my moderators reported me this problem:

Everything works fine, except that when he edits himself (his own profile), instead of giving an error because I didn't include his groupid in the permissions, vB gives him a db error, I can confirm because an email is sent to me with the error as soon as he does this operation. Here's the mail:

Database error in vBulletin Mod Control Panel 2.2.5:

Invalid SQL: SELECT usertitle FROM usergroup WHERE usergroupid=
mysql error: You have an error in your SQL syntax near '' at line 1

mysql error number: 1064

Date: Saturday 02nd of November 2002 07:55:47 PM
Script: http://forum.xxxxxx.org/mod/user.php
Referer: http://forum.xxxxxx.org/mod/user.php?action=edit&userid=32

This only happens when he tries to edit his own profile, if he tries to edit another moderator's profile, a permission error correctly shows up.

Could you check on this one please?

Thanks again...

Xenon
11-03-2002, 07:40 PM
ahh, i see.

well it's always hard to test such things, because there are so many combinations of possibilities.....

i think it should work now, download the newest version, i've added a small if-clause within the update part, which should fix this bug..

Axel Foley
11-06-2002, 07:03 PM
Sorry for the delay Xenon...just wanted to let you know that the fix worked...and thank you very much for your work...really appreciated...:)

John
11-06-2002, 07:52 PM
Good work Xenon! ;)

Xenon
11-07-2002, 02:08 PM
Thanks :)

wolfman
11-07-2002, 05:43 PM
Yes I love this hack since its a pain to have only admin make minor changes the users request sometimes. Well on my forum it seems the users do not want to PM me but they want to ask a mod to do this for them. This does help out alot and is far less work to install than the lesser admin panel. Not saying it not any good but this is just so much easier to install.

Ice Man_00
11-10-2002, 03:25 PM
Hi m8.

Great hack.... but got a error, have any clues ??

Fatal error: Cannot redeclare usergroupchooser() (previously declared in /home/www/forum/mod/user.php:199) in /home/www/forum/mod/user.php on line 456

???

Cheers, ICe Man_00

Xenon
11-10-2002, 03:29 PM
hmm, maybe you've made something wrong while installing the hack.

reinstall it on a fresh user.php

Ice Man_00
11-10-2002, 03:40 PM
Hmm.. i did a fresh copy, then the edit user link din`t work, but the view user work... strange.. but no buttons at the bottom...

hehe.. confused..

Ice Man_00
11-10-2002, 03:45 PM
Never mind that one... still edit who dosen`t work.. hehe.. just me who dosen`t read it..

But still notthing... :(

Xenon
11-10-2002, 03:46 PM
well, we know it works, so you must made a little mistake...

i cannot help more, just try it again to implement the hack ;)

Ice Man_00
11-10-2002, 03:49 PM
Never mind it all !!... LOL

This hack worked... pressed installed on this one.. thank you a lot !!!!

Cheers.

Xenon
11-10-2002, 04:02 PM
:)
glad to hear :)

you're welcome

assassingod
11-10-2002, 06:18 PM
Now I can install this one;)

Thanks Xenon

Dynamic One
11-15-2002, 09:06 AM
Great Job. A Mod already asked me for this. Going to use this :D.

iblis
11-15-2002, 03:15 PM
i have a special usergroup called crew
they are kindoff supermoderators.. they help me out :)

they are usergroup 14, how do i modify the hack so that it will apply for this usergroup

cheers

Xenon
11-15-2002, 08:00 PM
after this:if ($action=="edit") {

and after this: if ($HTTP_POST_VARS['action']=="doupdate") {

just add this:
if($bbuserinfo[usergroupid]!=14) {
echo "You cannot edit users!!";
exit;
}

350Chevy
11-17-2002, 10:03 PM
Doesn't work for me in 2.2.8... My moderators cannot even view the user panel and the Super Moderators do not have a Submit or Apply or any type of button to apply changes done to the users profiles. I've triple checked the code and it's entered correctly.

Any suggestions?

Xenon
11-18-2002, 03:58 PM
it works correctly on vb228, i use it there ;)

check your moderator permissions, they must be allowed to view userprofiles, to be able to edit them.

also be sure you click on the editlink of a user, not the viewlink, or your supermods cannot change anything ;)

iblis
11-18-2002, 05:34 PM
thanx a mill xenon, will test it at once

[edit] yarr yarr m8, it works like a charm, yarr yarr

350Chevy
11-18-2002, 11:17 PM
Originally posted by Xenon
it works correctly on vb228, i use it there ;)

check your moderator permissions, they must be allowed to view userprofiles, to be able to edit them.


Hmm, All options are checked for the Super Moderator except access to the control panel. I don't want the moderators to edit users only super moderators. Do I have to have the Moderators option checked to view user profile in order for the Super Moderators to be able to edit them? That wouldn't seem right. :)

Originally posted by Xenon
also be sure you click on the editlink of a user, not the viewlink, or your supermods cannot change anything ;)

This would be the link that says "Administrative Options: User Options" located under a users profile while viewing them correct?

The moderators cannot click on that (which is what I want). The Super Moderators CAN click on it and can edit everything in there but there is no option that says Save Changes or Reset so there is no way for them to save the changes. Is there a template that needs to be edited?

Xenon
11-19-2002, 05:20 PM
@iblis: fine to hear that ;)

@Chevy: "Administrative Options: User Options" that link automatically leads to the Standart viewpage.
if you want to link to the editpage, you have to edit the getinfo-template and change the "action=view" in the link into "action=edit"

350Chevy
11-19-2002, 07:56 PM
Originally posted by Xenon
@iblis: fine to hear that ;)

@Chevy: "Administrative Options: User Options" that link automatically leads to the Standart viewpage.
if you want to link to the editpage, you have to edit the getinfo-template and change the "action=view" in the link into "action=edit"

Ahhhh... sorry.. lol.. :hurt:

Sadie Frost
12-14-2002, 10:26 PM
Thank you so much for this :)

Is there a way to make it so that mods can edit forum access as well? Is it as easy as copying the "# Start Edit Access #" bit from admin/user insto mod/user?

Thanks! :)

Xenon
12-15-2002, 12:00 PM
hmm, no it's not that easy, because this method would give them acces to all forums, also adminforums....

you have to include the permissions of the mod to let them edit user accesmasks...

i'd say it would be a seperate hack...
isn't there such a hack out? i thought so

Cloud Strife
12-27-2002, 01:56 PM
I have a group called Co-admin, I also have Supermoderators and Moderators. How do I get this hack to work for just the Co-admins and the supermoderators and moderators have the regular modcp.

Xenon
12-28-2002, 09:03 PM
you can use this solution:
https://vborg.vbsupport.ru/showthread.php?postid=299550#post299550
extra permissions is the optimalst way

or you could simply addif($bbuserinfo[usergroupid]!=xx) { echo "No Permission!; exit;}
into the hacksections so just users of usergroup xx has access

Elentari
01-16-2003, 12:48 PM
I have super mods, and mods, but also a group called senior staff, (id = 11) with super mod permissions. I want to make it so that only the senior staff group can access the mod controls, not the supermods - is there any way to do that? :)

I did try using the coding a couple of posts above - but I wasnt sure exactly where to insert it, and though I played around a bit, it just kept giving me parse errors.

The hack is working fine, i just wanted to limit who I give access to :)

Thanks

Xenon
01-16-2003, 02:22 PM
well where you have this block:
$canedit[profilefields]=0;
$canedit[timefields]=0;
$canedit[options]=0;
$canedit[addresses]=0; // HP, Email, ICQ, AIM ...
$canedit[signature]=0;
$canedit[title]=0;
$canedit[name]=1;
$canedit[changegroups]=1; // Mods can move users from one group to another (just groups included in $canedit[usergroupids])
$canedit[usergroupids]="1 2 3 4"; // Which usergroups can be edited

change it to:

if($bbuserinfo[usergroupid]==11) {
$canedit[profilefields]=1;
$canedit[timefields]=1;
$canedit[options]=1;
$canedit[addresses]=1; // HP, Email, ICQ, AIM ...
$canedit[signature]=1;
$canedit[title]=1;
$canedit[name]=1;
$canedit[changegroups]=1; // Mods can move users from one group to another (just groups included in $canedit[usergroupids])
$canedit[usergroupids]="1 2 3 4"; // Which usergroups can be edited
} else {
$canedit[profilefields]=0;
$canedit[timefields]=0;
$canedit[options]=0;
$canedit[addresses]=0; // HP, Email, ICQ, AIM ...
$canedit[signature]=0;
$canedit[title]=0;
$canedit[name]=0;
$canedit[changegroups]=0; // Mods can move users from one group to another (just groups included in $canedit[usergroupids])
$canedit[usergroupids]=""; // Which usergroups can be edited
}

Elentari
01-16-2003, 02:52 PM
This still is giving access to the supermods, for some reason :(
The supermods cant edit the user - but they can access the panel, and they can post announcements and mass move threads etc. Is there anyway to allow them access only to ban members?

Xenon
01-16-2003, 03:01 PM
impossible, a least they can't change anything so..

Elentari
01-16-2003, 03:08 PM
didnt see ya post before i edited my post above ;)


The supermods cant edit the user - but they can access the panel, and they can post announcements and mass move threads etc. Is there anyway to allow them access only to ban members?

Xenon
01-16-2003, 04:38 PM
that has nothing to do with my hack then....

that's why they are supermods, just make em normal mods which can't move... and so on..

Elentari
01-17-2003, 09:56 PM
I cant do that unfortuntely, lol. But thanks :D

geniuscrew
01-28-2003, 09:55 PM
Nice hack Xenon! Can mods edit people's avatars too? That's what I really want the most.

Thanks in advance

Xenon
01-30-2003, 12:57 PM
@geniuscrew: sorry, not in this version, but it's on my todolist for the next version when i got free time again :)

Sweet Cheeks
01-31-2003, 09:51 AM
:paranoid: I'm getting a fatal error down at the bottom of the persons profile where the Submit button usually would be

Fatal error: Cannot redeclare usergroupchooser() in /home/virtual/site19/fst/var/www/html/boards/mod/user.php on line 470

any ideas?

Sweet Cheeks
01-31-2003, 12:58 PM
I think I have it fixed now ;)

Xenon
02-10-2003, 02:26 PM
Ok, Version 2.4 released :)

Now mods can edit Users' Avatars also if you want, and there is an important security fix in it.
(Mods could become real Admins in some constelations of permissions..)
I recommend to Upgrade ASAP if you gave your Mods the permission to edit options (showemail aso) and your Mods are skilled with vb ;)

Arabian
02-19-2003, 11:55 AM
Thanks Xenon !

Perfect Hack!!!!

exactly what i really need !

what about editing users Passwords????

is it possible?

Xenon
02-19-2003, 12:00 PM
well, yes it's possible, but i don't know why mods should be able to edit users passwords...

Arabian
02-19-2003, 02:39 PM
only supermods in my board can edit users informations,

and i want them to be able to make any changes that admin can do with users informations, but not with logging in to cp!

and that including changing thier passwords, well, if needed!

Sweet Cheeks
02-19-2003, 03:00 PM
Thanks Xenon :D

Xenon
02-19-2003, 04:50 PM
@Arabian: ok, download the newest version, have included a canedit[password].

it's not tested but it must work :)

Arabian
02-19-2003, 07:29 PM
Xenon it works ;)

Thanks for the great work :)

Xenon
02-19-2003, 09:19 PM
you're welcome :)

geniuscrew
03-10-2003, 02:19 PM
Nice one Xenon! Love it :)

350Chevy
03-10-2003, 02:34 PM
Anyway to make it so Mods can edit post counts? :)

Great hack btw.. :D

Xenon
03-10-2003, 03:08 PM
@chevy: yep, also possible :)

maybe next version, k?

or if you want, you can yourself manually copy that part out of admin/user.php

msimplay
03-12-2003, 04:14 PM
i really would have liked this hack but it doesn;t work on Vbulletin

2.3 release candidate 1 :disappointed:

Xenon
03-12-2003, 04:22 PM
hmm it does work on vb2.3.0 RC3.

msimplay
03-12-2003, 04:36 PM
i do have hacks on my board but none that have disturbed
modcp

when i press view users it
gives me this error

Parse error: parse error, unexpected ':' in /home/wambam/public_html/Vbulletin/mod/user.php on line 71

Xenon
03-12-2003, 04:38 PM
you must have made an mistake while installing then, i know it works, i use it on my board :)

msimplay
03-12-2003, 04:48 PM
oops ur right i got it working now :o

Xenon
03-12-2003, 04:50 PM
good to hear :)

msimplay
03-12-2003, 04:59 PM
just a lil suggestion would be good if the moderator had a search user function like in the admin panel weird that it isn;t there by default

Xenon
03-12-2003, 05:02 PM
AFAIK there is already a hack out which does that.

msimplay
03-12-2003, 10:33 PM
can i have a link please

Xenon
03-12-2003, 10:36 PM
you have to search, it's the same as what i had to do..

Gutspiller
03-15-2003, 04:43 PM
nm

Kars10
03-17-2003, 07:46 AM
Great hack Stefan!!
Installed without any Problems... :)

Thanks
Kars

gameplanetz
03-17-2003, 09:53 AM
I second that, this is very useful. Thx Xenon :)

petey20
03-19-2003, 10:36 AM
Where do I find the download at?

The one on the hack section is a dead link. This is just what I need, but the download link is not working

Petey

petey20
03-19-2003, 10:53 AM
Never mind...I found it at the beginning...Works great on v2.3.0! thanks

Boofo
04-08-2003, 05:19 AM
Stefan, in the code from this message for the addon

https://vborg.vbsupport.ru/showthread.php?postid=299550#post299550

if you have the same moderator on different forums and you change it so they can edit users on one forum, when you go to another forum they are a moderator of, the checkbox is set to no for that forum but set to yes from the previous forum you changed it at. Shouldn't the boxes be all checked yes no matter what forum that person is a moderator of once you have given them permission to edit users? Is there a way to do that?

Xenon
04-08-2003, 09:26 AM
well it's the standart way the vb-devs did it.
i don't know why they descided to do so, but they did and this post you are reffering to, just does it like vb-devs did (look into can vie user profile)

Boofo
04-08-2003, 09:29 AM
Is there any way around it to get it to say the same thing without having to do them each individually? I'm not sure what would happen if you did it for one forum and not in any others. Would they still be able to edit the user?

Xenon
04-08-2003, 09:39 AM
it's enough to have it enabled in one forum, because vb just checks if it's there at least one row in the db where you have the permissions ;)

it would be a bit complicated to rewrite those predifeined things.
we have to wait for vb3 to see how they made it there.

JeffyJoe
04-15-2003, 08:21 AM
is there a way to get it to log all changes a mod does, to a log file, or send an email to admin or something like that... after the mod changes user fields...
This way they have god like powers, but traceable... so they could be reversed later if admin choose to.
(basically so the admin can monitor mods)

Xenon
04-15-2003, 11:52 AM
you can call the adminlog() function like admin/user.php does it.

you won't get specific infos, but you can then see in your admin log who edited which user.

To become more specific you have to rewrite the hack nearly completely..

soccerclue
04-26-2003, 02:48 PM
hi,

before installing, i want to make sure if it works for version 2.3? And is the default hack will make mods having the same interface as in admin CP? I wish it is the same, but I just don't want them to degrade or promote admin or specific usergroups only?

Xenon
04-26-2003, 03:33 PM
yes it works with 2.3.0

the interface is nearly the same if you enable all features to edit, i'd say about 95% equally, but not 100% as there are several links in ACP which are not in this hack (remove users...)

ddausch
04-28-2003, 05:42 PM
Hab nach einbau ein problem:

der hack funzt
jedoch kann man jetzt nicht mehr die Forenberechtigungen vergeben als mod da der link fehlt... wie bekomm ich es hin das ich sowohl den user editieren kann und die forenberechtigung?

Xenon
04-29-2003, 04:36 PM
sh antwort auf vbg.

ich würde beim anderen hack anfragen wenn der andere nicht mehr funzt, schliesslich kenne ich den andren hack nicht und das da ist kein problem mit meienm hack selbst

ddausch
04-29-2003, 06:05 PM
ne an deinem liegts nich :)

der funzt ja wunderbar..leider ben?tige ich auch den anderen damit die mods ihre boards selber freigeben k?nnen.... is bei fast 1000 Boards sonst nich mehr zu schaffen als admin alleine*g*

hab dir auf dem ger board geantwortet denke das wir da mal weiter machen :) vieleicht finden wir ja ne l?sung

Frozen Dreams
05-01-2003, 03:18 PM
installed on 2.2.9 - which has a fairly big RPG ... so thins will come in very handy - thanks a lot ;)

ddausch
05-02-2003, 09:06 PM
Hat jemand den Hack schon bei 2.3.0 getestet?

Xenon
05-03-2003, 01:33 PM
ja ich, und er geht einwandfrei :)

xs1
05-11-2003, 01:17 PM
how to let mods to edit users post counts ?

does this hack allows mods to change the admins to some other usergroup ?

Cheerz

Xenon
05-11-2003, 01:27 PM
you have to add an inputfield for the postcount and edit the updating sql query if you want your mods to be able to edit users posts counts.

If you want your mods to change admins into some other groups you can enable that feature?? but if you use the standart usergroups in the canedit variable it isn't possible for them

xs1
05-11-2003, 02:51 PM
Xenon : "you have to add an inputfield for the postcount and edit the updating sql query if you want your mods to be able to edit users posts counts"


can u plz tell me wat are the stpes i have to do ? beacuse iam a noobie :D

marcel-ea
05-20-2003, 11:10 PM
Xenon: I installed the hack and change to following

$canedit[profilefields]=1;
$canedit[timefields]=0;
$canedit[options]=1;
$canedit[password]=0;
$canedit[addresses]=1; // HP, Email, ICQ, AIM ...
$canedit[signature]=1;
$canedit[title]=0;
$canedit[name]=1;
$canedit[avatars]=1; // 0 Cant edit, 1 Can edit, 2 Can upload custom avatars
$canedit[changegroups]=1; // Mods can move users from one group to another (just groups included in $canedit[usergroupids])
$canedit[usergroupids]="5 6 7 8"; // Which usergroups can be edited

I get following as Supermod

Fatal error: Cannot redeclare usergroupchooser() (previously declared in

and

You cannot edit this user

Can you help me please
thx

Xenon
05-21-2003, 10:47 AM
that error most of the time means you'Ve made an mistake while installing the hack, you have forgotten a } or something like.
Nothing wrong with the hack itself, just try to install it correctly and it'll work

marcel-ea
05-22-2003, 02:03 AM
ok i reinstalled the hack but the same problems

Fatal error: Cannot redeclare usergroupchooser() (previously declared in /home/virtual/site3/fst/var/www/html/final/mod/user.php:204) in /home/virtual/site3/fst/var/www/html/final/mod/user.php on line 750

Fatal error: Cannot redeclare usergroupchooser() (previously declared in /home/virtual/site3/fst/var/www/html/final/mod/user.php:204) in /home/virtual/site3/fst/var/www/html/final/mod/user.php on line 750

Here are my user.php
Hope you can help me.
Thx

Xenon
05-22-2003, 05:02 AM
any special reason, why you installed the code twice????
remove one!

also vb file attachment is not allowed

marcel-ea
05-22-2003, 07:10 AM
Great Thx doublesorry

2 x STRG + V :angry:

Sorry for attachment

xs1
05-27-2003, 10:02 AM
05-11-03 at 03:27 PM Xenon said this in Post #111 (https://vborg.vbsupport.ru/showthread.php?postid=393715#post393715)
you have to add an inputfield for the postcount and edit the updating sql query if you want your mods to be able to edit users posts counts.


could u plz explaine me more abt it ? :ermm:

Christine
05-31-2003, 09:08 PM
Just upgraded to 2.3.0 and this is going strong as ever.

Cheers!

Moreliator
07-12-2003, 12:26 PM
IS there anyway I can do this hack for a specified user group (not mods). I want just my supermod group to be able to do these options.

-Moreliator

Xenon
07-12-2003, 04:42 PM
read through this thread, the solution has been posted already

4thgenresource
08-02-2003, 07:25 PM
Xenon, i haven't seen my question answered here yet:

Hoping you can help me out :)

I did the Miserable and Starved user hacks from Zzed, and I want the specified user groups for this hack to be able to edit users as miserable or starved....

I tried hte miserable out on my own, and i got the field into the table so they could click yes or no, but whenever I would have a supermod (for instance) click the YES circle, and save the changes, it would revert back to NO circle and not make them miserable users..

You have any ideas on what I need to do? :(

Thanks in advance :)

4thgenresource
08-03-2003, 05:32 AM
Neverf mind......i figured it out :cool:

Xenon
08-03-2003, 07:42 PM
:)
glad to hear :)

midnightz
08-26-2003, 08:50 PM
08-02-03 at 03:25 PM 4thgenresource said this in Post #122 (https://vborg.vbsupport.ru/showthread.php?postid=422696#post422696)
Xenon, i haven't seen my question answered here yet:

Hoping you can help me out :)

I did the Miserable and Starved user hacks from Zzed, and I want the specified user groups for this hack to be able to edit users as miserable or starved....

I tried hte miserable out on my own, and i got the field into the table so they could click yes or no, but whenever I would have a supermod (for instance) click the YES circle, and save the changes, it would revert back to NO circle and not make them miserable users..

You have any ideas on what I need to do? :(

Thanks in advance :)

Hi - How did you achieve it?

gmarik
08-27-2003, 06:34 AM
Can Username changes to?

MaDCaT75
08-27-2003, 07:15 AM
hehe whoops forgot to click install :p

Xenon
08-28-2003, 12:46 PM
@MdCat: :)

@gmarik, yes, as seen in the permission section in the first post.

MaDCaT75
09-04-2003, 02:10 AM
08-28-03 at 02:46 PM Xenon said this in Post #128 (https://vborg.vbsupport.ru/showthread.php?postid=429230#post429230)
@MdCat: :)


But I only have one moderator on my board and he doesnt really do all that much moderating - my forum is pretty much dead :cry:

Xenon
09-04-2003, 02:07 PM
Kristina, my own forums aren't that active, but i coded it though ;)
Well it's also a reason why i'm here that often ;)

@Me!: Well as you have to add code to user.php it will work, maybe you have to change one or two things where you add the edit user link, but nothing else normaly.

midnightz
09-11-2003, 09:00 PM
Ok I added this hack, But have a few questions, I also added the info code by BorgGanon.

I am having trouble on 3 things (it might be because of a major sinus headache)

confiquiring the script to have only my mods and or supermods I choose have access?

I wish to deny all off them the ability to mass prune or move, only myself I wish to have that control?

I would like them to be able to make the users miserbale if needed, but dont know what to add and where for that to happen? (the miserable users hack is installed)

Thanks,

midz

Xenon
09-11-2003, 11:43 PM
a) my hack has nothing to do with massmoving permissions. you'll have to ask on vb.com or read the manual on how to do that, as it's not part of my hack

b) i don't know the miserable users hack, so i cannot help you here, maybe start a new support thread for that?

midnightz
09-11-2003, 11:58 PM
Ok, thanks,

I thought there might be way to comment out the ability to do that, maybe I will just delete that option from the index.php in the mod / and I think I do a

makeyesnocode("Show Avatars","showavatars",$user[showavatars]);

but cater it too match what the miserable users creates in that hack, it might be ok, since it seems your hack will aknowledge the field if it is an option.

Hope I'm on the right track,

thanks

Ch33chy
09-15-2003, 05:13 PM
Does this work for 2.3.2? I can't seem to find the first bit of coding it asks to find.

I could really really really do with this hack for 2.3.2 !!!!
Im a total newbie when it comes to coding though, and the instructions appear to be mega different for this version.

If i beg nicely, whats the chances of someone making this work/ providing instructions for 2.3.2 ?

Xenon
09-16-2003, 05:16 PM
you are calling one line slightly changed a "mega difference"????

what is changing one letter? big difference?

/me has edited the attachment

Ch33chy
09-16-2003, 08:12 PM
If there was a slight change then i'd probably be ok with it :)

However as a noob to coding, I read your instructions which start off
Open mod/user.php:
------------------
find:
echo "<tr><td nowrap><p>$user[username]</p></td>".iif($perms[ismoderator] or $ismod['canbanusers']==1, "<td nowrap><a href=\"user.php?action=ban&userid=$user[userid]\"><p>[ban]</p></a></td>", "").iif($perms[ismoderator] or $ismod['canviewprofile']==1, "<td nowrap><a href=\"user.php?action=viewuser&userid=$user[userid]\"><p>[view user]</p></a></td>", "")."</tr>\n";

I searched for several bits of that in user.php and Im afraid I couldn't see anything too similiar. Despite searching for several bits of the above line I couldnt find so presumed the code had changed a lot for the version I using.

It may in fact be a slight difference, but just didnt want to break a spangly new working forum :)

Thanks in advance for any advice, and apologies if I appear to be too noobish ;)
Only added 1 other hack to date, and that was more straight forward with what needed changing.

Xenon
09-16-2003, 09:42 PM
all that changed in that line was that the devs use &amp; instead of & in urls now.

as said i'Ve updated the attachment already

Ch33chy
09-16-2003, 10:29 PM
many thanks for the quick reply and great work.
Apologies for screwing up the thread scrolly style.

Ian Cunningham
09-19-2003, 03:35 PM
I get :
Parse error: parse error in /home/pcreview/public_html/mod/user.php on line 69

when installing this

Yes... It is installed correctly ;)

Xenon
09-19-2003, 03:42 PM
Yes... It is installed correctly ;)

nope it's not, as if it would be installed correctly it would work :p

also you should read the rule about parse errors:
post 5 lines ahead and below, because we're not omniscient and don'T know what the heck is on line xy of your files

zsmom
10-06-2003, 11:47 PM
I installed it on 2.3.2 with no problems...works like a charm!

you have to add an inputfield for the postcount and edit the updating sql query if you want your mods to be able to edit users posts counts.

Oh how I wish I understood this language! I guess I'll have to wait until the next version to get the option for mods to change post counts. :(

Many thanks for the great hack!

Xenon
10-07-2003, 03:31 PM
:)
it's just a copy&paste job, if you look into admin/user.php and copy the part you need for postcounts ;)

i won't add anymore features into the vb2 version of this hack, new features would be added to the vb3 version, once this will be written by me :)

zsmom
10-07-2003, 03:42 PM
:)
it's just a copy&paste job, if you look into admin/user.php and copy the part you need for postcounts ;)

i won't add anymore features into the vb2 version of this hack, new features would be added to the vb3 version, once this will be written by me :)

I looked in the admin/user.php file to see if I could find the part that I needed to copy & paste and didn't see anything jump out at me, but I'm a total n00b so that's to be expected! :)

amairiya
12-28-2003, 04:26 PM
Is there a portion of a code I could add into this to allow my moderators to change the access masks of a user?

stark427
02-05-2004, 12:24 AM
Brilliant hack :)

Thanx a lot!

stark427
02-10-2004, 12:14 AM
With this Hack your Mods can edit really everything of a user account, nearly as much as an Admin can! (Changing usergroups....)

But it is very customizable, too. If you don't want em to change usergroups, then they can't. Or you can define which usergroups they can move the users into..

Also if you add if-clauses in the front section to the hack, you can customize it to which of your mod can modify which fields..

this block in front of the hack code defines nearly everything you need to customize the hack:

$canedit[profilefields]=1;
$canedit[timefields]=0;
$canedit[options]=1;
$canedit[addresses]=1; // HP, Email, ICQ, AIM ...
$canedit[signature]=1;
$canedit[title]=0;
$canedit[name]=1;
$canedit[avatars]=1; // 0 Cant edit, 1 Can edit, 2 Can upload custom avatars
$canedit[changegroups]=0; // Mods can move users from one group to another (just groups included in $canedit[usergroupids])
$canedit[usergroupids]="1 2 3 4 10 11"; // Which usergroups can be edited


Screenshots in following Posts

Xenon, could you please add the option for the moderator to be able to moderate new registrations?

That would be very handy :squareeyed:

Xenon
02-10-2004, 12:58 AM
hmm, i'll think about it, but my time is limited and i don't have any vb2 testboards anymore, so it's not likely ;)

BlackxRam
03-26-2004, 04:33 AM
Hey Xenon any word on this for a VB3 version?

Im trying to restrict certain ADMINS from accessing certain USERGROUPS.

How hard would it be to convert this over?

Xenon
03-26-2004, 02:16 PM
well, the vb3 version is planned in a more detailed way, but right now my time is too limited because of vb.org internal things and university tests..

so i cannot give an ETA when i'll release this mod for vb3

-mk-
06-29-2004, 04:33 AM
I would also love this for vB3 :)

This is exactly what ive been looking for.

brownafroduck
07-07-2004, 04:45 AM
Great hack!

/me clicks install!

Michael Morris
09-01-2004, 08:05 AM
Chiming in another vb3 request :)

Xxman
10-09-2004, 02:09 PM
@ Xenon : "please help me even if the Vb2 Hack support is finished !"

How I have to modify your hack for show in usergroup combo box the actual user's usergroup instead that the selected one ordered by this script ?

// Build WHERE clause
$splitlist=explode(" ",$usergroups);
$wheresql= "0 ";
while (list($key,$val)=each($splitlist)) {
$wheresql.=" OR usergroupid=".$val;
}

echo "<tr class='".getrowbg()."' valign='top'>\n<td><p>$title</p></td>\n<td><p><select name=\"$name\"".iif($size!=0," size=\"$size\"","").">\n";

$result=$DB_site->query("SELECT title,usergroupid FROM usergroup WHERE ".$wheresql." ORDER BY title");
while ($currow=$DB_site->fetch_array($result)) {

Thank's in advace magister ! ;)

Xenon
10-10-2004, 09:48 PM
Sorry, but i do not understand what you want to change.

*confused*

Xxman
10-11-2004, 08:05 AM
Well,
if I have to modify a user's profile searching for it ( a registered user for example ) in the usergroup combo box will be diplayed as default "coppa user" instead the correct user's usegroup. If a moderator doesn't realize it a trouble will be produced . You can fix this ?

Thanks.

Xenon
10-11-2004, 05:21 PM
Hmm, wierd according to my tests in the past it does that already.

also the "selected" is where it should be.

So it may be a browser issue, but as i don't have a vb2 anymore since one year now, i cannot help you out more.

Xxman
10-12-2004, 09:55 AM
Thanks however, you've been very kind to answer me ..

Xenon
10-12-2004, 03:50 PM
Sorry that i can't help out more.

Maybe when i write a vb3 version, i may run over this problem again and find something :)

rex_b
11-10-2004, 09:34 PM
when can we expect the vb3 version oh great one!?

Xenon
11-11-2004, 04:22 PM
I would like to know myself ^^

actually my schedule is totally full currently :(

the3jams
10-08-2005, 04:47 AM
I know you are a very busy person (your title even says so ;)) but I was wondering if you maybe had plans to port this hack to vb3.5?

This hack is a big part of my forum and I know others here would benefit as well. If you can't I understand, but this is one person who would be eternally grateful if you did. :)

craiovaforum
12-03-2005, 04:45 PM
I know you are a very busy person (your title even says so ;)) but I was wondering if you maybe had plans to port this hack to vb3.5?

This hack is a big part of my forum and I know others here would benefit as well. If you can't I understand, but this is one person who would be eternally grateful if you did. :)

adding the 3.5 support into discussion again...

mrcrx
12-30-2005, 12:07 PM
also looking for this hack in 3.5

Alfa1
01-11-2006, 06:21 PM
Yep, that would be great.

Eagle Creek
01-12-2006, 09:39 PM
Yep, that would be great.

Waiting for 3.5 ;)