vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Give mods power to change options in users profiles? (https://vborg.vbsupport.ru/showthread.php?t=30728)

Gutspiller 10-19-2001 02:16 AM

So that if somebody wants to change their name they can have one of my mods help them, and not bother me. They can see all the settings, they just need a submit button to save the changes they make. Does anybody know if there is a hack out there like this, or could somebody make one? It would really lower admin loads. :(

Thanks for any help you can provide.

Xenon 10-19-2001 03:03 PM

i have made this, for my mods too.
also now they can edit sigs and userhps.

but i'm not allowed to post full files, so i have tu search my changes in the files ;)

Xenon 10-19-2001 03:11 PM

ok, here it is, but im taking no garantee if i have forgotten a piece of code ;)

open mod/user.php

search

PHP Code:

$user=$DB_site->query_first("SELECT userid,usergroupid,username,password,email,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,customtitle,FROM_UNIXTIME(joindate) AS joindate,cookieuser,daysprune,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,posts,timezoneoffset,emailnotification,emailonpm,receivepm,ipaddress FROM user WHERE userid=$userid");

  
doformheader("user",""); 

after Start viewuser

replace it with
PHP Code:

$user=$DB_site->query_first("SELECT userid,usergroupid,username,password,email,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,customtitle,FROM_UNIXTIME(joindate) AS joindate,cookieuser,daysprune,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,posts,timezoneoffset,emailnotification,emailonpm,receivepm,ipaddress FROM user WHERE userid=$userid");
  if (
$user[usergroupid]!=2) {
    echo 
"<p>You do not have permission to do this!</p>";
    exit;
  }
  
  
doformheader("user","doupdate");
  
makehiddencode("userid","$userid"); 

then goto this two lines:
PHP Code:

echo "</table></td></tr></table></form>\n";


and replace them with

PHP Code:

doformfooter("Save Changes");
  
//echo "</table></td></tr></table></form>\n";
}

// ###################### Start do update  Hack by Xenon#######################
if ($HTTP_POST_VARS['action']=="doupdate") {
 
  
$DB_site->query("UPDATE user SET username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,homepage='".addslashes(htmlspecialchars($homepage))."',signature='".addslashes($signature)."' WHERE userid=$userid");
  echo 
"<p>Record updated!</p>";


in doupdate you could allow more changes if you want to.

hope i could help :)


All times are GMT. The time now is 11:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02197 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete