PDA

View Full Version : Mods can edit users


xs1
06-07-2003, 06:01 AM
https://vborg.vbsupport.ru/showthread.php?s=&threadid=42096

i installed this hack ! but for editinng user post counts Xenon Said me
"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"

how to do it? :dead:
plz explaine me !

https://vborg.vbsupport.ru/showthread.php?postid=393715#post393715

Chris M
06-07-2003, 09:12 AM
Open mod/user.php:

Find:
$canedit[name]=1;
add below:
$canedit[postcount]=1;
Find:
if($canedit[signature]) maketextareacode("Signature","signature",$user[signature],8,45);
add below:
if($canedit[postcount]) makeinputcode("Number of Posts","posts",$user[posts]);
Find:
if($canedit[password] and $apassword!="") {
$pwsql = ",password='".addslashes(md5($apassword))."'";
} else {
$pwsql = "";
}
add below:
if($canedit[postcount]) {
$postsql = ",posts='$posts';
} else {
$postsql = "";
}
Find:
$DB_site->query("UPDATE user SET userid=$userid".$pwsql.$titlesql.$optionsql.$sigsql.$namesql.$tim efieldsql.$adrsql.$groupsql." WHERE userid=$userid");
replace with:
$DB_site->query("UPDATE user SET userid=$userid".$pwsql.$postsql.$titlesql.$optionsql.$sigsql.$nam esql.$timefieldsql.$adrsql.$groupsql." WHERE userid=$userid");

Done:) Save and upload mod/user.php:)

Satan

xs1
06-07-2003, 11:23 AM
Parse error: parse error in /home/httpd/vhosts/localhost/httpdocs/forum/mod/user.php on line 472