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)
-   -   Restrict Modification of Main Options to Head Administrator 1.01 (https://vborg.vbsupport.ru/showthread.php?t=49006)

N9ne 02-16-2003 10:00 PM

Restrict Modification of Main Options to Head Administrator 1.01
 
-------------------------------------------------------------------------
Only head admin can modify main options in the adminCP hack
by N9ne, on Feb 17 2003, Copyright 2003.
-------------------------------------------------------------------------

-------------------------------------------------------------------------
For: 2.2.x and 2.3.x
-------------------------------------------------------------------------

I believe the hack's name is quite descriptive and self explanatory.

Just a simple hack, requested by TheMayhem.

Just thought i'd post it here incase anyone else is worried what other admins might do while editing the options page (can do a lot of damage there!).

Open attached file in a text editor for instructions.

Hack updated [March 17th 2003]
- Now with cleaner coding. Should work for all.

Merjawy 02-17-2003 01:26 AM

works for me fine with the original hack on 2.2.8


thnx for it I needed it :) ... Install

Davey 02-17-2003 06:36 AM

Nice idea N9ne; you seem to be bringing a lot of new ideas out lately.
[high]* Davey installs.
[/high]
Keep up with the good ideas :).

Dave.

Erwin 02-17-2003 06:38 AM

I've made this hack already - however, my version blocks all other Admins from accessing any of the vB Options EXCEPT Ban Email Domains and Ban IP.

I want other admins to be able to do that, but nothing else.

It's here:

https://vborg.vbsupport.ru/showthrea...threadid=43475

P.S. I hope you don't mind me posting this in your thread. :) Just wanted you to know that I've made it.

N9ne 02-17-2003 07:51 AM

Oh, I didn't know it'd been made before, oh well, I guess they're slightly different anyway, you allow them access to a certain part :).

PSI|Dr-X 02-17-2003 01:45 PM

Whoo N9ne You're making lots of hacks great :)

frankenberrie 02-18-2003 08:58 PM

Funny... When I add this hack, all admins are banned including me the head admin!

if (!$userinfo[userid]==1) {
echo "You cannot access this page.";
exit;
}

I am head admin user id #1

Martin64 02-18-2003 09:05 PM

frankenberrie, try replacing it with this:

Code:

if (!$bbuserinfo[userid]==1) {
 echo "You cannot access this page.";
exit;
}


emuchina 02-20-2003 04:34 AM

Oh,the two are can't use by me.
When I change like N9ne say,the VBB ban all admins,include the userid=1.
And I use Martin64 's changes,they havn't ban any of the admins.
Please help me:(

emuchina 02-20-2003 04:57 AM

BTW: I am using VBB 2.3.0

And I find the problem:)

Change like this,then OK in the 2.3.0

if ($bbuserinfo['userid']!=1) {
echo "You cannot access this page.";
exit;
}

Zelda-King 02-20-2003 07:53 AM

Yes, that works on vB 2.2.9 also. I'm reluctant to keep the hack activated because I want the other admins to be able to IP ban but if they go screwing with my settings, BAM!

N9ne 03-17-2003 04:47 PM

Ok I've updated this hack with cleaner code now, I'm using !$bbuserinfo['userid']=="1" instead of !$userinfo[userid]==1

This should work in 2.x.x

Dean C 03-17-2003 05:41 PM

n9ne this is not the best way of doing it. You should add a query to run which adds an option to the admin options where you can set who can edit the main options. Then after that it will create a global variable in which you can specify the userid instead of assuming that the userid of the main admin is always 1 :)

- miSt

N9ne 03-17-2003 06:34 PM

Actually, while the hacker is hacking his board, he can just change the userid to his userid. It's easier that way Mist.

Since when am I assuming that the userid of the main admin is 1? It's there to be edited.

Adding an option is risky, as other admins may view that page, and change it, before the head admin has time to get to the page while hacking.

Also, admins who have phpMyAdmin access or access to the database can easily change this to reflect a different userid, so they gain access again, and they will then most likely use it maliciously.

The best way is to keep it in the file.

jusunlee 04-13-2003 03:18 AM

the restriction does not seem to work at all, all userids will still be able to access admin options. heres the edited one that works:

PHP Code:

if ($bbuserinfo['userid']!="1") {
    echo 
"You cannot access this page.";
    exit;



N9ne 04-13-2003 10:56 AM

jusunlee, works fine for me...

csidlernet 04-27-2003 12:15 AM

on jusunlee
last post.. doesn't that code mean it stops the person with user id 1, accessing it?

SemperFidelis 05-06-2003 01:55 PM

Not a bad idea
Would it also be a good idea to add something to /admin/setting.php as well ?
Plenty of damage can be done there too.

-Sidekick- 06-04-2003 09:22 PM

I'm sure N9ne's phrasing works though Jun's is correct and is the way I've always phrased something to this effect.


All times are GMT. The time now is 04:44 PM.

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.01171 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete