Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Block access to vB PHP files by user ID Details »»
Block access to vB PHP files by user ID
Version: 1.0.0, by calorie calorie is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 02-01-2006 Last Update: 02-01-2006 Installs: 7
Uses Plugins
 
No support by the author.

This mod allows you to block access to the following vB PHP files by specifying what user IDs to block. This works on a per file basis, so you can have different userIDs for different files. You can also block userID 0 to prevent guests or bots from accessing any of the files. No screenshot is necessary, as a blocked user will see the 'you do not have permission to access this page' notice instead of the file output. See post6 for how to add extension files. To install, go to the ACP -> Manage Products -> Add/Import Product, and then go to the ACP -> vBulletin Options.
Code:
ajax.php          announcement.php  attachment.php     calendar.php
cron.php          editpost.php      external.php       faq.php
forumdisplay.php  image.php         index.php          inlinemod.php
joinrequests.php  login.php         member.php         memberlist.php
misc.php          moderator.php     newattachment.php  newreply.php
newthread.php     online.php        payments.php       poll.php
postings.php      printthread.php   private.php        profile.php
register.php      report.php        reputation.php     search.php
sendmessage.php   showgroups.php    showpost.php       showthread.php
subscription.php  threadrate.php    usercp.php         usernote.php
Code:
// in case you block yourself from login, why would you do that, :wink:
// place this in the vB config to completely disable everything
// and then go log in, and then comment this from the vB config

define('DISABLE_HOOKS', true);

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-02-2006, 04:53 PM
IrPr IrPr is offline
 
Join Date: Mar 2005
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good!
is it possible to do with Extension Modifications??
Reply With Quote
  #3  
Old 02-02-2006, 05:47 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this idea...Installed
Reply With Quote
  #4  
Old 02-02-2006, 05:56 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this mod!
Reply With Quote
  #5  
Old 02-02-2006, 06:22 PM
evenmonkeys's Avatar
evenmonkeys evenmonkeys is offline
 
Join Date: Aug 2004
Location: Iowa
Posts: 896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a rather clever idea.
Reply With Quote
  #6  
Old 02-02-2006, 06:37 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the extension has both of these, where global is the forum root global:
Code:
define('THIS_SCRIPT', 'uniquename');
require_once('./global.php');
And the extension prints out a text page, go stick this in vB config:
Code:
// change 123.123.123.123 to your IP address
if ($_SERVER['REMOTE_ADDR'] == '123.123.123.123')
{
        $config['Misc']['debug'] = true;
}
Then go to vB Options -> Block File Access Settings -> Add Setting:
Code:
Varname: bfabu_uniquename_uids
Setting Group: Block File Access Settings
Product: Block File Access
Title: Block 'uniquename' Usage
Description: Enter the user IDs to block from using the uniquename.php file. Separate each user ID with a space. Example: 8 16 24
Option Code: leave it blank
Data Validation Type: Free
Default: leave it blank
Display Order: leave as-is
vBulletin Default: Yes
And then remove this from vB config:
Code:
// change 123.123.123.123 to your IP address
if ($_SERVER['REMOTE_ADDR'] == '123.123.123.123')
{
        $config['Misc']['debug'] = true;
}
Note uniquename needs to be unique.
Reply With Quote
  #7  
Old 02-02-2006, 07:35 PM
Bro_Joey_Gowdy's Avatar
Bro_Joey_Gowdy Bro_Joey_Gowdy is offline
 
Join Date: May 2002
Location: Hickory Flat MS 38633
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, been waiting for this, great plugin !!

*installs*
Reply With Quote
  #8  
Old 02-02-2006, 09:11 PM
IrPr IrPr is offline
 
Join Date: Mar 2005
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by calorie
If the extension has both of these, where global is the forum root global:
Code:
define('THIS_SCRIPT', 'uniquename');
require_once('./global.php');
And the extension prints out a text page, go stick this in vB config:
Code:
// change 123.123.123.123 to your IP address
if ($_SERVER['REMOTE_ADDR'] == '123.123.123.123')
{
        $config['Misc']['debug'] = true;
}
Then go to vB Options -> Block File Access Settings -> Add Setting:
Code:
Varname: bfabu_uniquename_uids
Setting Group: Block File Access Settings
Product: Block File Access
Title: Block 'uniquename' Usage
Description: Enter the user IDs to block from using the uniquename.php file. Separate each user ID with a space. Example: 8 16 24
Option Code: leave it blank
Data Validation Type: Free
Default: leave it blank
Display Order: leave as-is
vBulletin Default: Yes
And then remove this from vB config:
Code:
// change 123.123.123.123 to your IP address
if ($_SERVER['REMOTE_ADDR'] == '123.123.123.123')
{
        $config['Misc']['debug'] = true;
}
Note uniquename needs to be unique.
Thanks Calorie ! one of my fav. coders
Reply With Quote
  #9  
Old 02-06-2006, 10:51 PM
IrPr IrPr is offline
 
Join Date: Mar 2005
Posts: 351
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is it possible to with usergroup instead of userid?
Reply With Quote
  #10  
Old 02-07-2006, 06:13 PM
calorie calorie is offline
 
Join Date: May 2003
Posts: 2,804
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Untested, but for primary usergroups only, find:
Code:
			if (in_array($vbulletin->userinfo['userid'], $bfabu_user_ids_array))
And replace with the following:
Code:
			if (in_array($vbulletin->userinfo['usergroupid'], $bfabu_user_ids_array))
Or, for both primary and secondary usergroups, replace with the following:
Code:
			if (in_array($vbulletin->userinfo['usergroupid'], $bfabu_user_ids_array) OR !empty(array_intersect($bfabu_user_ids_array, explode(",", str_replace(" ", "", $vbulletin->userinfo['membergroupids'])))))
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09870 seconds
  • Memory Usage 2,298KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (13)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete