PDA

View Full Version : Mods can edit username, useremail, homepage and signature


Sandron
02-11-2002, 10:00 PM
That's my first hack. :)

The hack allows your mods to edit username, useremail, homepage and signature only from registered users via modCP.

Changed files: user.php in mod directory

All further instructions can be found in the attachment.

Xenon
02-12-2002, 12:24 PM
h?ttest wenigstens dazuschreiben k?nnen, dass der hack von mir ist tobi :mad:


Edit: Download bugfixed Version 1.0a here

Sandron
02-12-2002, 12:37 PM
Den hab ich heute morgen selber programmiert Stefan. Von dir hab ich nur den mit den Avataren...

Xenon
02-12-2002, 12:38 PM
wieso meinst du konnte man beim d2n sonst diese ganzen änderungen machen????

du hast ihn zwar etwas optimiert, muss ich dir ja zugestehn, aber die grundversion hab ich noch damals im d2n gebaut gehabt

MrLister
02-12-2002, 01:29 PM
for those that don't speak german and are itching to see what they're talking about http://babelfish.altavista.com/tr

Lesane
02-12-2002, 02:14 PM
Originally posted by MrLister
for those that don't speak german and are itching to see what they're talking about http://babelfish.altavista.com/tr

or u can simply translate the thread by "Translate Thread" under the thread (between Forum Jump & Admin Options) ;)

Lionel
02-12-2002, 10:00 PM
tanslate that! @###$!!!****@@@@@

Xenon
02-24-2002, 04:44 PM
sorry for this guys, we've cleared this outside, theres no need for an translation ;)

@Tobi: Warum eigentlich bei den Betahacks und nicht bei full releases? gibt doch keinerlei fehler
(i ask, why he put this hack into the Beta Area and not to the full releases)

Chris M
04-16-2002, 01:34 PM
Right...

I like this Hack...

Just one problem...

How do I remove the "Edit Username" function of it...

I dont want our mods editing user's usernames...

Satan

Sandron
04-16-2002, 02:29 PM
Hello hellsatan

Instead of this
maketableheader("Edit User - $user[username] (userid: $user[userid])");
makeinputcode("User Name","ausername",$user[username],0);
makeinputcode("Email Address","email",$user[email],0);
makeinputcode("Home Page","homepage",$user[homepage],0);
maketextareacode("Signature","signature",$user[signature],8,45);
echo "<input type=\"hidden\" name=\"userid\" value=\"$user[userid]\">";
echo "</td></tr>";
take this:
maketableheader("Edit User - $user[username] (userid: $user[userid])");
makeinputcode("Email Address","email",$user[email],0);
makeinputcode("Home Page","homepage",$user[homepage],0);
maketextareacode("Signature","signature",$user[signature],8,45);
echo "<input type=\"hidden\" name=\"userid\" value=\"$user[userid]\">";
echo "</td></tr>";

Also replace this
$DB_site->query("UPDATE user SET
username='".addslashes(htmlspecialchars($ausername))."'$pwdinclude,email='".addslashes(htmlspecialchars($email))."',homepage='".addslashes(htmlspecialchars($homepage))."',signature='".addslashes($signature)."' WHERE userid=$userid");
with
$DB_site->query("UPDATE user SET email='".addslashes(htmlspecialchars($email))."',homepage='".addslashes(htmlspecialchars($homepage))."',signature='".addslashes($signature)."' WHERE userid=$userid");

Didn't try it out, but it should work.

Chris M
04-16-2002, 05:44 PM
Thanks...

I was thinking about this earlier, and I thought of something that would be good to add to it, but I dont know how...:(

At ThePhora, we have a big craze on at the moment of Glowing Custom Titles - At the moment, only Admins can do it via the Admin CP, but I was wondering if there was a way to allow Mods to do it...

If you wouldnt mind...

I think it would be a great Hack to add, and I am sure that some people would like the idea of Custom Glowing Titles...They would need to be able to add HTML to it, so if that is not too much of a problem...

<b><table style="filter:glow(color=yourcolour, strength=3,400)"><font color=white>Your title</font></table></b>

Satan

Sandron
04-16-2002, 07:35 PM
First I didn't get what you want, but I think you want your mods to be able to change usertitles. In this case you have to add this code:

Under
maketableheader("Edit User - $user[username] (userid: $user[userid])");
add
makeinputcode("User Title","usertitle",$user[usertitle]);
makeyesnocode("Use Custom Title","customtitle",$user[customtitle]);
and replace
$DB_site->query("UPDATE user SET email='".addslashes(htmlspecialchars($email))."',homepage='".addslashes(htmlspecialchars($homepage))."',signature='".addslashes($signature)."' WHERE userid=$userid");
with
$DB_site->query("UPDATE user SET usertitle='".addslashes($usertitle)."',customtitle=$customtitle,email='".addslashes(htmlspecialchars($email))."',homepage='".addslashes(htmlspecialchars($homepage))."',signature='".addslashes($signature)."' WHERE userid=$userid");

Try it out and tell me, if it works for your mods :)

Chris M
04-16-2002, 07:44 PM
I would love to...

Big Problem...

I am getting this error when I try and view the Database -

Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,FROM_UNIXTIME(awaydate) AS awaydateastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,
avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid=13
mysql error: You have an error in your SQL syntax near ') AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,
' at line 1

mysql error number: 1064

Date: Tuesday 16th of April 2002 02:39:41 PM
Script: http://www.thephora.com/admin/user.php?action=edit&userid=13
Referer: http://www.thephora.com/admin/

Any clues as to what it might be?

Satan

Sandron
04-16-2002, 08:21 PM
Hm, I checked it out on my forum and there the code I provided works fine.
I'm also wondering, why the error comes up in your admin directory, the code doesn't change anything there.

I hope you have a backup, because I can't imagine where the error comes from.

Where did you the changes? Perhaps you edited in your admin directory and not in the mod directory? Because this piece of code doesn't exist in my edit code for mods, but it exists in the edit code for admins.

Chris M
04-17-2002, 07:34 PM
Whatever it was, it sorted itself out...

I think I made a tiny syntax error earlier in the day...

I work on 2 machines, and the one I worked on was the one that caused the problem...I think I hit a key and didnt realise it...

Luckily, I had made the adjustments in the index.php file on my other computer already, so I uploaded that one after adding more to it, and it corrected the problem...

I shall be installing this hack within the next few days...I only clicked "install" when I did, so I can identify it when I visit the Beta Hacks forum once more...

Thanks for the Hack - This is a Great hack...You should be proud...

Satan

KuraFire
04-18-2002, 08:42 PM
Does this work on 2.2.5 properly?

Chris M
04-19-2002, 01:05 PM
Yes it does...

Satan

Ian
05-21-2002, 11:54 PM
Thos hack isn't working for me... When I click the "edit" link I get a blank page... Here's the contents of it:
<html><head>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<meta http-equiv="MSThemeCompatible" content="Yes">
<link rel="stylesheet" href="../cp.css">
</head>
<body leftmargin="10" topmargin="10" marginwidth="10" marginheight="10">
</BODY></HTML>
I double checked to make sure I applied the hack right and everything looks good... I'm using version 2.2.5 BTW. Any idea what's wrong?

comprichie
06-17-2002, 06:49 PM
Hi, to all
I am new on this forum, and I want to say that this is a great board.
I have a question that is:
I have vb 2.2.6. and I want to use the hack so that mods can edit users.
I found a script for 2.2.2, but this one is not working with me.
When i want to edit a user, it says that it can not find the page.

Can I change the script, so yes how?
I dont want to give my mods admin.
Is there an option, or a new script?

I hope that here is someone who can help me.

Thanx,

Palmer ofShinra
06-27-2002, 05:31 AM
I just hope you guys realize that an unscrupulous mod can use this to hijack any account by setting up a dummy email, then editing a users email to their own, and then using "lost password"

comprichie
06-27-2002, 08:21 AM
Yes, that is possible
But I do trust my moderators, and they cannot change anything in the account of de administrator(s).
That's why i want to use this hack.
So if anyone still has an answer, please reply
:bunny:

Marv
06-27-2002, 02:13 PM
anyone who installed this on 2.2.6 without problems?

joschiv
07-11-2002, 05:28 PM
nope same problems with 2.2.6....blank page....

BigJohnson
07-11-2002, 05:51 PM
I get a blank page as well. Can someone please help me out here.

Xenon
07-11-2002, 07:43 PM
it works here with vb2.2.6 without any problems

@palmer: if you think so of your mods, it wouldn't be a problem to take out the email-part of the hack

Xenon
07-14-2002, 09:42 AM
sorry for that doublepost, but after crosscheking the install file sandron posted here, and the one i has at home, i found out, sandron hasn't the newest one uploaded here.

check out my first post in the thread to download the newest version.

be careful and just apply the hack to an unhacked user.php.
the bug in the old file was to insert the code at the wrong position, so some } aren't right anymore...

also some small codeoptimizations are made :)

Xenon
08-09-2002, 03:57 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=42096" target="_blank">https://vborg.vbsupport.ru/showt...threadid=42096</a>