vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   2 Plugins, Bypass Busy and Inactive errors on non-vB pages (https://vborg.vbsupport.ru/showthread.php?t=83504)

tamarian 06-20-2005 09:00 PM

2 Plugins, Bypass Busy and Inactive errors on non-vB pages
 
What these 2 plugins do: If you run webpages that are integrated with vBulletin, or includes global.php to pull stuff/stats/etc (a gallery, webtemplates, CMS etc.) your users may get the "The administrator has closed the forum for maintenance" or "server too busy" errors, when you don't want them too.

I've made this into two seperate plugins so that you can choose to bypass either of the errors if you want, rather than be all or nothing.

How it works:

On none vB pages/scripts that use vBulletin, find:

Quote:

require_once('./global.php');
It may differ by using include(''global.php'), but as long as you find global.php, that's the line you want.

Add above it:

Quote:

define('BYPASS_INACTIVE_ERROR', 1);
define('BYPASS_BUSY_ERROR', 1);
Once you import the plugin file, simply activate or deactivate the plugins:

1. Bypass forum busy error for non-vB pages
2. Bypass forum inactive error for non-vB pages

Activating both plugins will bypass the busy and inactive errors, activating one will just bypass that error. This will not affect your forum, just the scripts that you modified with the code above. (But you can do the same on vB scripts, if you want to)

Diana Notacat 06-22-2005 01:03 AM

This is a fantastic idea, as I've really needed it for some of my non-forumpages on those days I need to close the forums but don't want to shut down the whole site! Excellent!

tamarian 06-22-2005 01:08 AM

Quote:

Originally Posted by Diana Notacat
This is a fantastic idea, as I've really needed it for some of my non-forumpages on those days I need to close the forums but don't want to shut down the whole site! Excellent!

Yes, that's exactly why I needed it. Shutdown the forum when I have to, but leave the rest accessable. Glad you like it.

Marco van Herwaarden 06-22-2005 03:31 AM

Looks nice tamarian.

Just one thing, could you please upload it in a zip file as recently requested.

Logician 06-22-2005 09:35 AM

neat idea :)

Chris M 06-22-2005 10:05 AM

Nice idea tamarian :)

Satan

jamiemcd 08-05-2005 07:51 PM

That's why I like vbulletin.org Either someone has already found a fix or can point you in the right direction. You just need to know what to search on to find the thread.

Primal Rage 09-05-2005 11:06 PM

This is great, Is there any way i can implement this into vb 3.0.X ... I assume it would be possible just don't know how.

Any help would be appreciated, thank you.

tamarian 09-05-2005 11:50 PM

Quote:

Originally Posted by Primal Rage
This is great, Is there any way i can implement this into vb 3.0.X ... I assume it would be possible just don't know how.

Any help would be appreciated, thank you.

It's possible, but not as a plugin :) You can try this, but I have not tested it, so make sure you test:

Edit global.php

Find:
PHP Code:

$servertoobusy true

Add after it:
PHP Code:

if (BYPASS_BUSY_ERROR == 1) {

        
$servertoobusy FALSE;



Find:
PHP Code:

if (!$vboptions['bbactive'] AND THIS_SCRIPT != 'login'

Replace with:
PHP Code:

if (!$vboptions['bbactive'] AND THIS_SCRIPT != 'login' AND BYPASS_INACTIVE_ERROR != 1


Primal Rage 09-06-2005 12:13 AM

I am actually only interrested in the define('BYPASS_INACTIVE_ERROR', 1); plugin, and therefore tried your suggested edit, but once replacing that line in the global.php file it gives them access to the whole board and not just the pages i want.

Essentially what i am trying to do is the following:

I have the forum closed, however i want users to be able to access the Paid Subscriptions page.

Any help, again is appreciated. I would assume the above would work as well, just not happening.

tamarian 09-06-2005 12:19 AM

Quote:

Originally Posted by Primal Rage
I am actually only interrested in the define('BYPASS_INACTIVE_ERROR', 1); plugin, and therefore tried your suggested edit, but once replacing that line in the global.php file it gives them access to the whole board and not just the pages i want.

Essentially what i am trying to do is the following:

I have the forum closed, however i want users to be able to access the Paid Subscriptions page.

Any help, again is appreciated. I would assume the above would work as well, just not happening.

O.k., try this one for the second edit:
PHP Code:

 if (!$vboptions['bbactive'] AND THIS_SCRIPT != 'login' AND BYPASS_INACTIVE_ERROR != 1


Primal Rage 09-06-2005 12:25 AM

I wanted to add, taht actually it does work, however i would have to add define('BYPASS_INACTIVE_ERROR', 0); to every single script except the usercp one.

So it does work just kinda backwards from what i want. Basically i wan to give access to a specific page when the forums are closed.

Primal Rage 09-06-2005 12:30 AM

Oops, didn't see your post. You suggestion fixed it up for me. Thank you it seems to be doing what i want now :)


All times are GMT. The time now is 09:51 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.01565 seconds
  • Memory Usage 1,746KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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