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)
-   -   Display the Close Reason to admin users while board closed (https://vborg.vbsupport.ru/showthread.php?t=46722)

Xenon 12-17-2002 04:12 PM

no it wont, do you see an $DB_site in the file? :)

N9ne 12-17-2002 05:07 PM

I'm not sure if it would work, but I think bbinactive should be added to the templatesused variable in index.php? Would it work even though its being called from global.php? Or does global.php have a templatesused variable? All I know is, a query will be added as bbinactive is eval()'d in the code, so when you close your forum, there will be one more query?

Visionray 12-17-2002 05:09 PM

nice hack teck, it was getting annoying when the other admin of my site would continue posting when I had the board closed for updating.

Xenon 12-17-2002 05:12 PM

you are right N9ne it'll create an extra query on every page if you are loggedin as admin and the board is closed:

fix:

in global.php find
PHP Code:

$templatesused.='gobutton,timezone,username_loggedout,username_loggedin,phpinclude,headinclude,header,footer,forumjumpbit,forumjump,nav_linkoff,nav_linkon,navbar,nav_joiner';
$templatesused.=',pagenav,pagenav_curpage,pagenav_firstlink,pagenav_lastlink,pagenav_nextlink,pagenav_pagelink,pagenav_prevlink'

below add:
PHP Code:

if (!$bbactive$templatesused.=',bbinactive'


N9ne 12-17-2002 06:09 PM

WOW this is something new, TECK adds a query to his forum :D hehe, glad I could help, I feel all proud for no reason now lol.

TECK 12-17-2002 07:41 PM

Quote:

Originally posted by Xenon
you are right N9ne it'll create an extra query on every page if you are loggedin as admin and the board is closed...
There is no need to worry about it Stefan. ;)
First, it doesn't matter if it adds a query since is not everyone who will see the pages. Plus you save in the server memory by not loading an extra template. I rather perform an extra query. :)

Although, your fix is good. :D

Xenon 12-17-2002 07:45 PM

well i'm not worried, that's why i said that long sentence that you have to be logged in as admin and the board must be off.

but i think the small bit of extra server memory used is better than an extra query...
with my if-cunstruction it won't hurt when borad is online ;)

TECK 12-17-2002 07:51 PM

I was repeating Freddie's words, about the server memory... hihi... to late. :D He explained that to me once.
Is good that you posted in details the explanation, people will have the choice to mod or not to... ;)
Speeking of... he's reading the thread right now. :classic:

N9ne 12-17-2002 08:55 PM

LoL but nonetheless, when you're an admin and the board is closed, there will be that extra query ;)

Freddie Bingham 12-17-2002 11:06 PM

Quote:

Originally posted by N9ne
LoL but nonetheless, when you're an admin and the board is closed, there will be that extra query ;)
IF you can use an if/else to determine whether or not to run a query than do it. If the only choice is to either (a) always grab the template or (b) only grab when you need it but with an extra query than you need to weigh how much each option is going to occur. If for 99.5% of a boards life, you are grabbing a template that you don't need than you should take option (b) and only get it when you need it.


All times are GMT. The time now is 08:30 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.01162 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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