Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mods can edit Users Details »»
Mods can edit Users
Version: 1.00, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-08-2002 Last Update: Never Installs: 78
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 08-10-2002, 08:31 PM
dxb's Avatar
dxb dxb is offline
 
Join Date: Oct 2001
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #13  
Old 08-10-2002, 10:10 PM
MrLister's Avatar
MrLister MrLister is offline
 
Join Date: Oct 2001
Posts: 434
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great job!

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

thanks!
Reply With Quote
  #14  
Old 08-11-2002, 05:46 PM
ladyfyre's Avatar
ladyfyre ladyfyre is offline
 
Join Date: Nov 2001
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope Xenon, the above didn't work for me

This is the exact code I put in...it is giving a parse error.
PHP Code:
if($bbuserinfo[usergroupid]==26)_{
$canedit[usergroupids]="2 3 9 25";_
}_else_{
$canedit[usergroupids]="2 9 12 17 19 22 23 ";_

Reply With Quote
  #15  
Old 08-11-2002, 05:56 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
PHP Code:
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:

PHP 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
Reply With Quote
  #16  
Old 08-12-2002, 12:24 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@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?
Reply With Quote
  #17  
Old 08-12-2002, 01:07 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #18  
Old 08-12-2002, 05:45 AM
dxb's Avatar
dxb dxb is offline
 
Join Date: Oct 2001
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

waaaw now it works like a charm

great work

thanks alot Xenon
Reply With Quote
  #19  
Old 09-15-2002, 08:00 PM
BorgGanon BorgGanon is offline
 
Join Date: Jun 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
PHP Code:
  makeyesnocode("Can can view whole user profile (but not edit)","canviewprofile",0); 
AFTER ADD
PHP Code:
  makeyesnocode("Can edit User","canedituser",0); 
FIND
PHP Code:
  makeyesnocode("Can can view whole user profile (but not edit)","canviewprofile",$moderator[canviewprofile]); 
AFTER ADD
PHP Code:
  makeyesnocode("Can edit User","canedituser",$moderator[canedituser]); 
FIND
PHP Code:
    $DB_site->query("INSERT INTO moderator (moderatorid,forumid,userid,newpostemail,newthreademail,caneditposts,candeleteposts,canviewips,canmanagethreads,canopenclose,caneditthreads,caneditstyles,canbanusers,canviewprofile,canannounce,canmassmove,canmassprune,canmoderateposts,canmoderateattachments) VALUES (NULL,'$parentid','$userid','$newpostemail','$newthreademail','$caneditposts','$candeleteposts','$canviewips','$canmanagethreads','$canopenclose','$caneditthreads','$caneditstyles','$canbanusers','$canviewprofile','$canannounce','$canmassmove','$canmassprune','$canmoderateposts','$canmoderateattachments')"); 
REPLACE WITH
PHP Code:
    $DB_site->query("INSERT INTO moderator (moderatorid,forumid,userid,newpostemail,newthreademail,caneditposts,candeleteposts,canviewips,canmanagethreads,canopenclose,caneditthreads,caneditstyles,canbanusers,canviewprofile,canedituser,canannounce,canmassmove,canmassprune,canmoderateposts,canmoderateattachments) VALUES (NULL,'$parentid','$userid','$newpostemail','$newthreademail','$caneditposts','$candeleteposts','$canviewips','$canmanagethreads','$canopenclose','$caneditthreads','$caneditstyles','$canbanusers','$canviewprofile','$canedituser','$canannounce','$canmassmove','$canmassprune','$canmoderateposts','$canmoderateattachments')"); 
FIND
PHP Code:
  $moderator=$DB_site->query_first("SELECT forumid,userid,newpostemail,newthreademail,caneditposts,candeleteposts,canviewips,canmanagethreads,canopenclose,caneditthreads,caneditstyles,canbanusers,canviewprofile,canannounce,canmassmove,canmassprune,canmoderateposts,canmoderateattachments FROM moderator WHERE moderatorid=$moderatorid"); 
REPLACE WITH
PHP Code:
  $moderator=$DB_site->query_first("SELECT forumid,userid,newpostemail,newthreademail,caneditposts,candeleteposts,canviewips,canmanagethreads,canopenclose,caneditthreads,caneditstyles,canbanusers,canviewprofile,canedituser,canannounce,canmassmove,canmassprune,canmoderateposts,canmoderateattachments FROM moderator WHERE moderatorid=$moderatorid"); 
FIND
PHP Code:
    $DB_site->query("UPDATE moderator SET forumid='$parentid',userid='$userid',newpostemail='$newpostemail',newthreademail='$newthreademail',caneditposts='$caneditposts',candeleteposts='$candeleteposts',canviewips='$canviewips',canmanagethreads='$canmanagethreads',canopenclose='$canopenclose',caneditthreads='$caneditthreads',caneditstyles='$caneditstyles',canbanusers='$canbanusers',canviewprofile='$canviewprofile',canannounce='$canannounce',canmassmove='$canmassmove',canmassprune='$canmassprune',canmoderateposts='$canmoderateposts',canmoderateattachments='$canmoderateattachments' WHERE moderatorid='$moderatorid'"); 
REPLACE WITH
PHP Code:
    $DB_site->query("UPDATE moderator SET forumid='$parentid',userid='$userid',newpostemail='$newpostemail',newthreademail='$newthreademail',caneditposts='$caneditposts',candeleteposts='$candeleteposts',canviewips='$canviewips',canmanagethreads='$canmanagethreads',canopenclose='$canopenclose',caneditthreads='$caneditthreads',caneditstyles='$caneditstyles',canbanusers='$canbanusers',canviewprofile='$canviewprofile',canedituser='$canedituser',canannounce='$canannounce',canmassmove='$canmassmove',canmassprune='$canmassprune',canmoderateposts='$canmoderateposts',canmoderateattachments='$canmoderateattachments' WHERE moderatorid='$moderatorid'"); 
in mod/index.php:
FIND
PHP Code:
makenavoption("View","user.php?action=find"); 
REPLACE WITH
PHP Code:
makenavoption("View","user.php?action=find","|");
makenavoption("Edit","user.php?action=find"); 
in mod/user.php:
FIND
PHP Code:
if ($action=="edit") { 
AFTER ADD
PHP Code:
  $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
PHP Code:
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
PHP Code:
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"
Reply With Quote
  #20  
Old 09-16-2002, 12:08 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ^^
Reply With Quote
  #21  
Old 09-24-2002, 12:01 PM
Rapdis's Avatar
Rapdis Rapdis is offline
 
Join Date: Mar 2002
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

u added it, where can the mod access that cp?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11215 seconds
  • Memory Usage 2,374KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (19)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete