View Full Version : Moderator Template Editor
blackice912
09-13-2002, 10:00 PM
Hello!
This is my first hack and so far, so good :)
This hack is a Moderator Template Editor. It will allow your moderators to edit their own template on your vb. It's also setup so they can not edit other templates as it only shows theirs.
If you have any questions or have a problem/idea, please post in this thread as I will check it often!
I still plan to addon to this hack with the style and replacements stuff too
Oh, and please hit install if you plan on using it :)
Security issue fix with Xenon's "Mods can edit users" included for those who use it so that means there are no security issues as far as I know when it comes to non-admins.
[UPDATE 2] Changed some code to increase security against people disabling javascript - Change the following to update this hack if you have it installed:
1. Open template.php
2. Find:
if ($expandset=$bbuserinfo[fieldID]) {
echo "";
} else {
echo "<script language=\"javascript\">
<!--
alert(\"You are not authorized to view this area\")
location.replace(\"http://www.yoursite.net/forums/mod/index.php?s=&action=home\");
//-->
</script>";
}
3. Between the } and the </script>"; - add:
die;
[/UPDATE 2]
Pictures will be attached after this thread...
Please visit this thread for the latest version of this hack! (https://vborg.vbsupport.ru/showthread.php?s=&threadid=43781)
blackice912
09-14-2002, 12:18 PM
The button to the editor in the Mod CP
blackice912
09-14-2002, 12:19 PM
Mod CP and the templates on the right
blackice912
09-14-2002, 12:19 PM
You're a mod that's not authorized to use this template editor!
Dean C
09-14-2002, 12:22 PM
so basically it allows mods to create their own template set that only THEY can use???
- Mist
blackice912
09-14-2002, 12:26 PM
Say you give a moderator their own forums and want to let them update their template to however they want it. This hack lets them use a template you setup for them and allow them to mod it however without hurting any other templates or forums.
Wow, this is just what I need. Quick question, am I able to let the mod change more then one template set? i.e. I want them able to edit template sets 2, 3 and 5.
Something you may like to add to your to-do list, it would be good if they were able to access the "Styles" and "Replacements" pages. It would also be nice if they could access features such as Search templates, Download/Upload Styles and maybe even "add style".
You see, I have a forum designer type guy, who is currently set as an administrator. He isn't really an administrator, he just plays around with the templates and all, it would be nice if he was able to do this without me having to risk the fact that he could shut down the forum and everything, although i do trust him, if his password came out and someone got access to it, etc etc...
blackice912
09-14-2002, 02:19 PM
Originally posted by DWZ
Wow, this is just what I need. Quick question, am I able to let the mod change more then one template set? i.e. I want them able to edit template sets 2, 3 and 5.
Something you may like to add to your to-do list, it would be good if they were able to access the "Styles" and "Replacements" pages. It would also be nice if they could access features such as Search templates, Download/Upload Styles and maybe even "add style".
Right now, I don't think you can set them up for multiple templates (verified, you can't at this moment)...I shall look into that.
And yup I plan on adding styles and replacements to this hack later on :)
Also if you want to let them add styles, then just don't delete that code when you install this (see step 4 in installation file) :)
I just wanted to get this part done since I know a few people who were lookin for it.
Hey I know you....you're on the Myacen forums!
Dean C
09-14-2002, 02:43 PM
this is awesome... but i dont want to give my mods this much power ;)
- Mist
blackice912
09-14-2002, 02:46 PM
Well you can give it to certain mods :p
I designed this because I know one site who has wanted this for certain groups that have forums on their site as well as my site so my clients can edit their forum to how they see fit.
Dean C
09-14-2002, 03:44 PM
true but i dont want to give them this much power anyway.... :D
still a wicked hack !
Regards
- Mist
blackice912
09-14-2002, 03:46 PM
Thanks :) Not bad for my first hack I think
Dean C
09-14-2002, 04:11 PM
/me agrees :thumbsup:
- Mist
SZ|TalonKarrde
09-14-2002, 04:24 PM
Pretty damn nifty.
Marshalus
09-14-2002, 04:39 PM
Originally posted by blackice912
Well you can give it to certain mods :p
I designed this because I know one site who has wanted this for certain groups that have forums on their site as well as my site so my clients can edit their forum to how they see fit.
Gee, I wonder who he could be talking about? ;)
* Marshalus coughs "Federation Studios (http://www.federationstudios.net)"
blackice912
09-14-2002, 04:41 PM
Gee...I think he's right!
SZ|TalonKarrde
09-14-2002, 04:42 PM
Originally posted by blackice912
Hey I know you....you're on the Myacen forums!
Yep. Another genious who decided myacen was the best host in the world.
Marsh, it's also for SD1. Our clients need to edit their own forums as well =P
blackice912
09-14-2002, 04:45 PM
I said that in my post :p
SZ|TalonKarrde
09-14-2002, 04:46 PM
Originally posted by blackice912
I said that in my post :p
I didn't see the and in there, lol.
NTLDR
09-14-2002, 05:58 PM
Excelent first hack blackice912! I'm sure many people will benifit from this. Thanks for sharing with the community :)
blackice912
09-14-2002, 06:00 PM
Thank you :)
just what I needed, sweet thx bro!
blackice912
09-14-2002, 07:26 PM
No problemo :)
Originally posted by blackice912
Right now, I don't think you can set them up for multiple templates (verified, you can't at this moment)...I shall look into that.
And yup I plan on adding styles and replacements to this hack later on :)Sounds good :) Originally posted by blackice912
Also if you want to let them add styles, then just don't delete that code when you install this (see step 4 in installation file) :) ahh, ok, but I guess it won't be much use until they are able to edit more then one template set :( Originally posted by blackice912
I just wanted to get this part done since I know a few people who were lookin for it.yep, thats cool :) Originally posted by blackice912
Hey I know you....you're on the Myacen forums! lol, yep, thats me :)
blackice912
09-15-2002, 02:01 AM
Originally posted by DWZ
ahh, ok, but I guess it won't be much use until they are able to edit more then one template set :(
Curious, are we thinking about different things? When I say template set, I think all of the templates in a template group.
Chris M
09-15-2002, 10:30 AM
Template Set usually means things like "Default", "Style 1" etc...
Es ist sehr gut Herr blackice912:)
*installs*
Satan
blackice912
09-15-2002, 10:32 AM
Yeah, exactly what I was thinkin in my head Hellsatan
And danke Hellsatan :)
Chris M
09-15-2002, 10:43 AM
Np;)
Was gibt es neues?
Satan
blackice912
09-15-2002, 10:47 AM
My German is limited to very limited translating programs, so I have no idea what you are asking :) heh
Xenon
09-15-2002, 10:53 AM
he asked something new? ^^
anyway i see you have modified my edit user hack for securiti reasons, but i think you have forgotten one thing:
you just disabled the inputbox if the varname is fieldID, but you didn't disable the DB change so it'll overwrite the value with an empty value if i'm not wrong.
so you also have to edit this part of my hack if i'm right:
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");
}
Chris M
09-15-2002, 10:56 AM
Any news?
About the styles add-on thingy I mean;)
Satan
blackice912
09-15-2002, 10:57 AM
Xenon:
Nope, because it doesn't even pull the info from the database and place it in the page. I've tested it over and over in my forums and it works fine.
By the way, wonderful hack you made :) My moderators jumped for joy when I installed it.
blackice912
09-15-2002, 10:59 AM
Originally posted by hellsatan
Any news?
About the styles add-on thingy I mean;)
Satan
Oh, heh that's next on my list. :) Probably later today since I just finished the replacement editor and published it.
Chris M
09-15-2002, 11:07 AM
I saw;):)
I dont usually mess with replacements myself, so my mods or others wouldnt be interested:D
:)
Satan
blackice912
09-15-2002, 11:10 AM
Yeah I don't usually either, but hey :)
Xenon
09-15-2002, 11:31 AM
Thanks, it's good to know my hacks are used ;)
ok, i've just had a brief look at the code, if it works good :)
blackice912
09-16-2002, 02:15 AM
Security Update!
Changed some code to increase security against people disabling javascript
Go to page 1 and grab the new code
I have a problem were it will show my main set (1)
but it will not show my template set 4!?
it just says the title of the set 1 (being light)
any ideas??
I coded it twice right! :)
wait my style id for it is 5, and my template id is 4
could this be the problem?
how could I fix it?
blackice912
09-16-2002, 07:07 AM
I'm going to look into that right now
blackice912
09-16-2002, 07:31 AM
Oh, crap. I see what you're saying now. I need to change the code.
blackice912
09-16-2002, 07:56 AM
No, I thank you for pointing that out. I'm going to re-write a bunch of the code and other stuff too.
Darn bugs :) Oh well, that's why it's beta.
blackice912
09-16-2002, 09:58 AM
Bah, this is going to take longer then I thought it would. It looks like there were even more bugs hiding then I thought.
Crap.
Expect a total new release of this since I need to combine all three systems together to make sure they get along together...
ack, I will revert my files
blackice912
09-17-2002, 03:24 AM
Good idea. The new system will be pretty much totally re-coded
SZ|TalonKarrde
09-21-2002, 08:07 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=43781" target="_blank">https://vborg.vbsupport.ru/showt...threadid=43781</a>
He released the combined version
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.