vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Administrative and Maintenance Tools - AdminCP Access (https://vborg.vbsupport.ru/showthread.php?t=188852)

TheInsaneManiac 08-21-2008 10:00 PM

AdminCP Access
 
A friend of mine requested this so I made it. By default the plugin is disabled, otherwise you would not be able to access the AdminCP. :cool:

If someone tries to access your AdminCP and they are not the IP, User Group, or User ID that you defined, they will automatically be forwarded to the forum home. If you wanted to you could enable the IP, User Group, and User ID at once. Enable as many of the features as you feel a need for.


Features:
  • Enable and Disable hack (Disabled by default)
  • Define MULTIPLE IPs that are allowed to access the AdminCP
  • Able to separate multiple IPs by | (No spaces between the IPs and |)
  • Define MULTIPLE User Groups that are allowed to access the AdminCP
  • Able to separate multiple User Groups by | (No spaces between the User Groups and |)
  • Define MULTIPLE User IDs that are allowed to access the AdminCP
  • Able to separate multiple User IDs by | (No spaces between the User IDs and |)
Upgrade:
You MUST uninstall the old product after that just follow the directions of the New Installation.

File Edits:
In admincp/index.php find:
Code:

require_once('./global.php');

Add after:
Code:

if ($vbulletin->options['allowip_enabled']){
$valid_ips = explode("|", $vbulletin->options['allowedips']);
if (!in_array($_SERVER['REMOTE_ADDR'],$valid_ips)) {
    header('Location: ../index.php'); //change according to your site setup
    exit();
}
}
//allowed usergroups
if ($vbulletin->options['allowgroups_enabled']){
$valid_ids = explode("|", $vbulletin->options['allowedgroups']);
if (!in_array($vbulletin->userinfo['usergroupid'], $valid_ids)) {
    header('Location: ../index.php'); //change according to your site setup
    exit();
}
}
//allowed user ids
if ($vbulletin->options['allowids_enabled']){
$valid_ids = explode("|", $vbulletin->options['allowedids']);
if (!in_array($vbulletin->userinfo['userid'], $valid_ids)) {
    header('Location: ../index.php'); //change according to your site setup
    exit();
}
}


New Installation:
1.) Perform the file edits

2.) Go to AdminCP-> Plugins & Products-> Manage Products-> Import the product-admincpaccess.

3.) Go to AdminCP-> VBulletin Options-> VBulletin Options-> AdminCP Access.

4.) Under AdminCP Allowed IPs put your IP and then enable the hack and save. For multiple IPs just follow this example:
1.1.1.1|2.2.2.2|3.3.3.3|

Optional:
1.) Under AdminCP Allowed User Groups put the User Groups you wish to allow access and then enable the hack and save. For multiple User Groups just follow this example:
6|7

2.) Under AdminCP Allowed User IDs put the User IDs you wish to allow access and then enable the hack and save. For multiple User IDs just follow this example:
1|2|3

Screenshots:
Of what? If you are not the defined IP, User Group, or User ID you will be redirected to the forum home.

*If you locked yourself out just reupload your original admincp/index.php file to you admincp root. Go into your AdminCP-> VBulletin Options-> VBulletin Options-> AdminCP Access and fix what ever caused you to get locked out. Once you fix it just reupload the edited admincp/index.php file.

Changelog:
1.0 - Initial release with just IP Access
2.0 - Now you can allow access to the Admin CP by IP Addresses, User Groups, and User IDs.
2.1 - Added instructions to edit the file as VBulletin Staff don't like for VBulletin files to be edited for you. :( Other than that nothing has changed, so if you have version 2.0 there's no need to update. :D


Notice: A 3.8.x version can be found HERE.

Daky 08-22-2008 08:38 PM

Does it have to be full IP address ?

TheInsaneManiac 08-22-2008 08:58 PM

Quote:

Originally Posted by Daky (Post 1604746)
Does it have to be full IP address ?

I haven't tested that. When testing it, I used the full IP. If it does have to be the full IP address, I could probably set it up so it didn't have to be, but why is that needed? If you are only wanting to allow your Admins access, then they should only have one IP.

Golzarion 08-22-2008 09:04 PM

I had the same idea before ... and about 8 mounths ago I created the similar system!
But know I'm very encoraged to know the person who requested the hack. !
Anyway I believe it it is an important hack.https://vborg.vbsupport.ru/member.php?u=212384

dirtyfeast 08-22-2008 09:05 PM

So what happens when your IP changes. How can you make sure you can still get into your Admin CP when your IP changes. My internet provider always changes IP's, and I do not have the same IP. So what about users like me. We simply can not use a hack like this.

TheInsaneManiac 08-22-2008 09:09 PM

Quote:

Originally Posted by dirtyfeast (Post 1604770)
So what happens when your IP changes. How can you make sure you can still get into your Admin CP when your IP changes. My internet provider always changes IP's, and I do not have the same IP. So what about users like me. We simply can not use a hack like this.

Since you are the owner of the website and have server access you can easily change the IP manually. However if your IP changes too frequently this may be what Daky was reffering to.

So does your IP change complete numbers like XX.XX.XX.XX or would it change like one area like 22.22.22.XX?

If it's the second option I can add in a way for partial IP Address, but otherwise I would not see that feature as to any use.

helpmehost 08-23-2008 02:36 AM

How can I set it in a way that just a particular country can login all other countries cant
also not proxies

GaiLoan 08-23-2008 06:38 AM

this sound kool, let me try install now, thanks

fattony69 08-23-2008 07:18 AM

Why not setup an .htaccess file?

apiasto 08-23-2008 11:22 AM

looks very helpful,but the same question regarding IP changes.these days most service providers often change IPs.if you can resolve this issue,i am up for it.cause in days like these we do need something like this.thanks
by the way if i disable all hacks via server.will it then allow me to loginto admin panel?thnx


All times are GMT. The time now is 02:33 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.01274 seconds
  • Memory Usage 1,743KB
  • 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
  • (2)bbcode_code_printable
  • (2)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