vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Ban IP's In vBulletin Options Easily (https://vborg.vbsupport.ru/showthread.php?t=268147)

Simon Lloyd 11-02-2012 09:44 PM

Edit: Must be a conflict with another mod you have.

TheSupportForum 11-02-2012 10:22 PM

Quote:

Originally Posted by Simon Lloyd (Post 2377923)
Edit: Must be a conflict with another mod you have.

i dont have any IP blocking scripts that use your

PHP Code:

function ip_redirect($to$code '301 Permanently Moved'

which points to your script

its does seem obvious to me its your function that's causing the issue shown in the erro_log, this is not shown on the main forum as an eror

PHP Code:

PHP Fatal error:  Cannot redeclare ip_redirect() (previously declared in  /archive/global.php(40) : eval()'d code:95) in /includes/class_bootstrap.php(996) :  eval()'d code on line 99 


Simon Lloyd 11-03-2012 09:01 AM

Can you check your /archive/global.php to see if it contains ip_redirect?

TheSupportForum 11-03-2012 09:42 AM

Quote:

Originally Posted by Simon Lloyd (Post 2378009)
Can you check your /archive/global.php to see if it contains ip_redirect?


yeah

as its a fresh install no pronlem

tambo 11-03-2012 09:44 AM

Other than the ability to redirect to a custom page (which is quite an attractive feature, BTW), what is the difference between this mod and the standard IP Banning options under:

ACP > User Banning Options > Banned IP Addresses

Thanks,
TM

TheSupportForum 11-03-2012 09:45 AM

for 4.2.0 pl3 it seems to be

PHP Code:

exec_header_redirect(fetch_seo_url('forumhome|bburl', array())); 

which has a header redirect, so 2 redirects are occurring, your ip_redirect

TheSupportForum 11-03-2012 09:46 AM

Quote:

Originally Posted by tambo (Post 2378018)
Other than the ability to redirect to a custom page (which is quite an attractive feature, BTW), what is the difference between this mod and the standard IP Banning options under:

ACP > User Banning Options > Banned IP Addresses

Thanks,
TM

you have a point there, i suppose the developer should use that array in the plugin instead of a new textarea

TheSupportForum 11-03-2012 10:00 AM

Quote:

Originally Posted by Simon Lloyd (Post 2378009)
Can you check your /archive/global.php to see if it contains ip_redirect?

just checking it furthur this is the whole script that is affecting it


PHP Code:

// #############################################################################
// ### CACHE PERMISSIONS AND GRAB $permissions
// get the combined permissions for the current user
// this also creates the $fpermscache containing the user's forum permissions
$permissions cache_permissions($vbulletin->userinfo);
$vbulletin->userinfo['permissions'] =& $permissions;
// #############################################################################

// check that board is active - if not admin, then display error
if ((!$vbulletin->options['bbactive'] AND !($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])) OR !($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']))
{
    
exec_header_redirect(fetch_seo_url('forumhome|bburl', array()));
}

// if password is expired, deny access
if ($vbulletin->userinfo['userid'] AND $permissions['passwordexpires'])
{
    
$passworddaysold floor((TIMENOW $vbulletin->userinfo['passworddate']) / 86400);

    if (
$passworddaysold >= $permissions['passwordexpires'])
    {
        
exec_header_redirect(fetch_seo_url('forumhome|bburl', array()));
    }
}

verify_ip_ban();

$cache_templates = array('ad_archive_above_content1''ad_archive_above_content2''ad_archive_below_content');

(
$hook vBulletinHook::fetch_hook('archive_global')) ? eval($hook) : false;

cache_templates($cache_templates$style['templatelist']);
unset(
$cache_templates); 


Simon Lloyd 11-03-2012 10:12 AM

Quote:

Originally Posted by tambo (Post 2378018)
Other than the ability to redirect to a custom page (which is quite an attractive feature, BTW), what is the difference between this mod and the standard IP Banning options under:

ACP > User Banning Options > Banned IP Addresses

Thanks,
TM

This does much more, did you read the settings?, you can ban single ip's, ip ranges, redirect to url of your choice and have notification if specific ip's have accessed your site - different enough? :)

Simon Lloyd 11-03-2012 10:15 AM

Quote:

Originally Posted by simonhind (Post 2378026)
just checking it furthur this is the whole script that is affecting it


PHP Code:

Code displayed above


Thats the archive/global.php, i cant seem to recreate it on my test site, my mod works at style fetch, so pretty much before anything else has been executed so redirect happens then, do you have any mods or custom code in your fresh install?


All times are GMT. The time now is 06:34 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.01079 seconds
  • Memory Usage 1,762KB
  • 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
  • (5)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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