View Full Version : More Admin Security - Protect Templates, Templatesets and Styles!!!
Chris M
10-18-2002, 10:00 PM
In conjunction with the request of others, I have released this add-on, which can be used in conjunction with my Total Admin Security (https://vborg.vbsupport.ru/showthread.php?s=&threadid=40738) hack...
So...
There is an easy way to ensure that they cannot change your templates, templatesets, or delete your templates, templatesets and styles...
Just use this hack below, and then they cant!!!
Just remember to follow any instructions in brackets ( ) that follows some PHP Code...
I have this used on DarkBlazes (my forums) - I cannot provide any screenshots at this time, but if anyone would, that would be good:)
Other Related Hacks:
Total Admin Security (https://vborg.vbsupport.ru/showthread.php?s=&threadid=40738)
Satan
Goldknight
10-19-2002, 07:02 PM
lol other admin hack but good one.
(change X to the templatesetid, change Y to your userid) I wonder can I add more than one templatesetid like (1,2,3,etc..) if I have more than one set? And userid for who? for other admin?
Thanks
Chris M
10-19-2002, 07:13 PM
To add another templateset, just copy the code again... (making sure you change the X and Y)
The userid is for you - I made it, by default, that nobody can delete the templatesets you dont want them to...
Then I made it so that they can delete individual templates (custom templates), but only the user(s) you specify...
Satan
Goldknight
10-19-2002, 07:24 PM
Ah, thanks for answer. I m going to install this one. Thanks
Chris M
10-19-2002, 07:26 PM
No problems:)
Satan
Sweet. Thanks for the hack. Installed :)
Chris M
10-20-2002, 12:08 AM
Good:)
There shouldnt be any install problems, but if there are, just ask:)
Satan
Roman
01-01-2003, 05:54 PM
this hack looks sweet, but while reading your instructions / hack i got few questions...
why is there no check for userid on the remove and the kill template set? This way even the main admin (me) can't delete that template, right?
and for the style... will this hack only protect the deletion of the style, and not the modification of styles? Cause i want the other admin to be able to do anything but touch my templetes and styles.
Dean C
01-01-2003, 06:06 PM
Hehe nice hack satan :p
Chris M
01-01-2003, 08:40 PM
The reason for the specified templateset is purely because, if that is your main Template Set, I am presuming you don't want it to be able to be deleted by anyone, including yourself;)
To protect styles from being modified, Find:
// ###################### Start Update #######################
if ($HTTP_POST_VARS['action']=="doupdate") {
Add below:
if(($styleid==X) and ($bbuserinfo[userid]!=Y)) {
echo "<p>You cannot edit this Style!</p>";
exit;
}
(change X to the styleid, change Y to your userid)
@Mist - Thanks:)
Satan
KelteN
04-18-2003, 08:17 AM
Nice Hack :)
sonic3d
05-01-2003, 02:10 PM
installed.
l8er
sonic
Logikos
05-12-2003, 09:56 AM
If seperated bt commas it protects more correct? And same question for Total Admin Security? User IDs can be seperated by commas to protect other admins
Chris M
05-12-2003, 10:11 AM
No you must expand the statement...
Explanation :
Normal code:
if(($styleid==X) and ($bbuserinfo[userid]!=Y)) {
echo "<p>You cannot edit this Style!</p>";
exit;
}
Expanded code (to allow 2 users) :
if(($styleid==X) and ($bbuserinfo[userid]!=Y or $bbuserinfo[userid]!=Z)) {
echo "<p>You cannot edit this Style!</p>";
exit;
}
Expanded code (to protect 2 styles) :
if(($styleid==X or $styleid==Z) and ($bbuserinfo[userid]!=Y)) {
echo "<p>You cannot edit this Style!</p>";
exit;
}
Expanded code (to protect 2 styles and allow 2 users) :
if(($styleid==X or $styleid==W) and ($bbuserinfo[userid]!=Y or $bbuserinfo[userid]!=Z)) {
echo "<p>You cannot edit this Style!</p>";
exit;
}
:)
Satan
Logikos
05-12-2003, 10:20 AM
Thanks Man!!
Chris M
05-12-2003, 10:44 AM
No problems;):)
Satan
-Sidekick-
05-30-2003, 10:46 PM
Wouldn't it be easier to just restrict the primary actions to the userid of the board owners choice?
Chris M
05-31-2003, 09:24 AM
@-Sidekick- - Perhaps, but this allows you let other admins add and edit their own styles, and not be able to edit your existing styles...
Satan
-Sidekick-
05-31-2003, 11:15 PM
The reason I ask is cause I'm the only one messing with the Styles, Templates, & Replacements.
So just restricting the primary functions would be safe right? =]
Chris M
05-31-2003, 11:25 PM
Well if you are the only one, simply restricting the entire file to just your userid is better;)
But, like me, if you have admins (in my case co-admins) editing styles, you want to ensure that your styles that you do not want deleting or being tampered with remain that way;):)
Satan
-Sidekick-
06-01-2003, 11:54 PM
thanks. =]
X-Fan
06-02-2003, 01:33 PM
Very nice hack, especially for boards with lots of templates and styles!
One less thing to worry about, thanks hs! :)
Chris M
06-02-2003, 06:37 PM
No problems;)
I might release a more general hack for other admin files, or maybe implement some kind of "password" security soon;)
Satan
Raven
07-14-2003, 05:16 AM
hi hellsatan
some i see this one here
then it is only the templates you protect or the Remove button
but you can still edit the templates and remove the templates there insted
but maby i am wrong
BlackxRam
01-17-2004, 04:55 PM
Hey HellSatan...
Is there a way to add the restriction of EDITING certain styles and templates as well for Certain users? I have a bunch of Admins on my forums, and i dont want them editing templates and styles they shouldnt be editing except for ones i WANT them to edit.
Deletion protection is great but what about them editing templates. Can there be a restriction for that as well?
BlackxRam
01-17-2004, 04:59 PM
I found the Styles Code to protect editing.. but what about saving TEMPLATES as well?
BlackxRam
01-17-2004, 05:02 PM
Sorry for the Triple post... Itll never happen again...
But What is the code to ONLY allow a certain userID to edit CERTAIN styles and templates?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.