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)
-   -   Reminder to admin when the board is off (https://vborg.vbsupport.ru/showthread.php?t=38551)

Scott MacVicar 05-11-2002 10:00 PM

Reminder to admin when the board is off
 
Someone requested this on vBulletin.com real quick hack not really a major thing but I'll do it anyway.

open global.php and find
PHP Code:

// check that board is active - if not admin, then display error
if (!$bbactive) {
  if (!
$permissions['cancontrolpanel']) {
    eval(
"standarderror(\"".str_replace("\'""'"addslashes($bbclosedreason))."\");");
    exit;
  }


change to

PHP Code:

unset($board_closed);
// check that board is active - if not admin, then display error
if (!$bbactive) {
  if (!
$permissions['cancontrolpanel']) {
    eval(
"standarderror(\"".str_replace("\'""'"addslashes($bbclosedreason))."\");");
    exit;
  }
  else {
    
$board_closed "<center><b>The board is currently closed to non admins</b></center>";
  }


then in whatever template you want add $board_closed, i just added it to the header template at the very top.

GOD-Dblade 05-12-2002 11:16 AM

cool hack...once my site gets up and i get it all modded again ill add this one :)

Pilot 05-12-2002 12:00 PM

Nice, but should be standard, I hope a lot of these hacks make it to VB 3. Hacks are not desirable in themselves.

Boofo 05-12-2002 03:04 PM

Thanks! Another simple but handy hack! I don't take the board down yet, but good to have if I ever have to. :)

Admin 05-12-2002 05:27 PM

Do you really FORGET to turn the board back on? :D

FWC 05-12-2002 05:46 PM

Quote:

Originally posted by FireFly
Do you really FORGET to turn the board back on? :D
LOL, I did for about an hour once. :)

Silenced Soul 05-12-2002 06:08 PM

I like it, great hack PPN, this will be useful for me, because last night when I was writing a hack (for my site), I kinda forgot I closed it, and it was down for about 10 hours ^^;;

Ian 05-12-2002 06:31 PM

I followed the instuctions and it didn't work...
:angry:

Scott MacVicar 05-12-2002 07:01 PM

did you close your bored to test and place the $board_closed in a header template viewable on every page.

Ian 05-12-2002 07:03 PM

Yup.


All times are GMT. The time now is 06:00 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.01249 seconds
  • Memory Usage 1,736KB
  • 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_php_printable
  • (1)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