vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Selected Users Only Can Edit Admin Options (https://vborg.vbsupport.ru/showthread.php?t=40787)

TECK 07-06-2002 10:00 PM

Selected Users Only Can Edit Admin Options
 
This hack will let you NOT allow certain users to edit your administrator usernames properties and also other options you want to restrict access to, for example editing the templates.
I recommend you to enable only the ones you really trust, that means only yourself.

ESTIMATED INSTALL TIME: 2 minutes
REQUESTED BY: (nobody)
TESTED IN VERSION: 2.2.6

[high]UPDATE[/high]
The hack was updated. It was fixed the problem I had with editing yourself of all users.
NOTE: FireFly posted also another way of doing this, few posts below.

In my hack, I also explained how to stop other admins to edit other options, for example the templates.


You like this hack? Please click on the [high]Install[/high] button.
To download the latest version of this hack, click below:

g-force2k2 07-07-2002 04:26 PM

good job Nakkid i guess it was the global issue ;)

either way good work :)

g-force2k2

TECK 07-07-2002 04:29 PM

actually i unset in the wrong file the $caneditadmin variable... :)
firefly, as usual, helped me to understand what was wrong.

Xenon 07-07-2002 04:38 PM

Quote:

Originally posted by Nakkid
I recommend you to enable only the ones you really trust, that means only yourself.
Lool, but you're right ;)

Really a good idea, i won't use it, because im the only admin of my board, but ist very usefull, perhaps when i work on other boards where are more admins.


Also i know hellsatan loves this hack isn't it so? :)

Marshalus 07-07-2002 05:26 PM

What does this have that hellsatan's hack doesn't? Does his have more?

TECK 07-07-2002 05:34 PM

it wont let you edit nothing, not even the passwords if you are not listed in config.php file. it works the same way as pruning the admin log (i got the idea from there). simple and secure.
if i understood correctly, in his hack you still can edit the passwords? not sure. let me know please.

also dont look as doing more, but rather as hacking in a different way. :)
my hacks are learning tools for myself, while experiencing with different aspects of vB.

Marshalus 07-07-2002 05:42 PM

I was just wondering, I already installed yours :D

Also, can this same idea be applied to a hack I want to see, I'd like it so only adminid 1 can edit the templates, and create new styles, etc. Is that possible?

bonnmac 07-07-2002 05:49 PM

Fantastic Thanks! But I've got one question. I've already installed hellsaten's admin hack... should I uninstall that one or can the 2 work together?

Admin 07-07-2002 05:51 PM

Code:

+-----------------------------------------------+
| FILE: FORUM/admin/user.php (1 change)        |
+-----------------------------------------------+
|
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
if ($HTTP_POST_VARS['action']=="doupdate") {
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
if ($HTTP_POST_VARS['action']=="doupdate" && checklogperms($caneditadmin,1,"<p>You are not allowed to edit this user.</p>")) {
+--------------------------------------------------------------------------+

Call me crazy but according to this you will not be able to edit ANY user (regular included), if you are not listed in config.php.

TECK 07-07-2002 05:53 PM

yep. it is. for example, if you dont want your admins to modify the templates do this...

admin/template.php
find:
Code:

if ($action=="modify") {
replace it with:
Code:

if ($action=="modify" && checklogperms($caneditadmin,1,"<p>You are not allowed to modify the templates.</p>")) {
bingo. only the $caneditadmin listed users will be able to edit from now on the templates. replace anywhere you want to block access to other admins with a similary line.


All times are GMT. The time now is 11:12 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01164 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete