The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Style / Template / Replacement Hack For Moderators Details »» | |||||||||||||||||||||||||||
Style / Template / Replacement Hack For Moderators
Developer Last Online: Jun 2006
Alright, I've finally finished working on this darn thing and ready for a beta release!
This hack impliments the Style, Template, and Replacement hack into one hack since it was the best way to work on it and easy to setup. Please read the readme file before you install it. For the style part, view this thread for screenshots For the template part, view this thread for screenshots For the replacement part, view this thread for screenshots Also remember: It's a beta. There will probably be bugs I haven't found. -------------------------- SECURITY FIX IF YOU USE XENON'S "MODS CAN EDIT USERS" (https://vborg.vbsupport.ru/showthrea...threadid=42096) Security fix by me, thanks to Xenon for pointing out where to edit the code -------------------------- 1. Open user.php in your forums/mod/ folder 2. Find the following: -------------------------- Code:
if($canedit[profilefields]) { maketableheader("Custom Profile Fields"); $userfield=$DB_site->query_first("SELECT * FROM userfield WHERE userid=$userid"); $profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield"); while ($profilefield=$DB_site->fetch_array($profilefields)) { $varname="field$profilefield[profilefieldid]"; makeinputcode($profilefield[title],"field".$profilefield[profilefieldid],$userfield[$varname]); } } Replace it with: --------------------------- Code:
if($canedit[profilefields]) { maketableheader("Custom Profile Fields"); $userfield=$DB_site->query_first("SELECT * FROM userfield WHERE userid=$userid"); $profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield"); while ($profilefield=$DB_site->fetch_array($profilefields)) { $varname="field$profilefield[profilefieldid]"; if ($varname != "field999") if ($varname != "field998") if ($varname != "field997") makeinputcode($profilefield[title],"field".$profilefield[profilefieldid],$userfield[$varname]); } } Find: --------------------------- Code:
if($canedit[profilefields]) { $profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield"); while ($profilefield=$DB_site->fetch_array($profilefields)) { $varname="field$profilefield[profilefieldid]"; $sql.=",field$profilefield[profilefieldid]='".addslashes($$varname)."'"; } $DB_site->query("UPDATE userfield SET userid=$userid$sql WHERE userid=$userid"); } Replace it with: Code:
if($canedit[profilefields]) { $profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield"); while ($profilefield=$DB_site->fetch_array($profilefields)) { $varname="field$profilefield[profilefieldid]"; if ($varname != "field999") if ($varname != "field998") if ($varname != "field997") $sql.=",field$profilefield[profilefieldid]='".addslashes($$varname)."'"; } $DB_site->query("UPDATE userfield SET userid=$userid$sql WHERE userid=$userid"); } That's it, your forums are now secure from moderators breaking your security! ----------------------------- Now...onto the download... Oh, and if you use it, please click install! Show Your Support
|
Comments |
#32
|
|||
|
|||
SZ|TalonKarrde with the mysql select query of all the templates you can include a statement not to select the phpinclude template
ie: find the 'WHERE templatesetid' statement above it add to that: AND template != 'phpinclude' i don't currently have any vbulletin files available at the time... but if it doesn't work i'll take a look at it when i get home from college... regards... g-force2k2 |
#33
|
|||
|
|||
Thank you, I'll get Brad to fix it ASAP
|
#34
|
||||
|
||||
Ah, I think I can fix that.
I didn't even think of that as a risk but thanks for the insight |
#35
|
|||
|
|||
Any updates to the code status?
|
#36
|
||||
|
||||
I have had no time to update it...hopefully soon.
|
#37
|
||||
|
||||
Good man, I'm waiting for this one, it'll come in handy!
|
#38
|
||||
|
||||
Was the major security risk fixed in this hack yet? I notice this thread is almost a year old.
Also is there a way to not allow members to edit templates? Just allow them to edit colors, fonts and image paths only? Thanks |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|