Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Display the Close Reason to admin users while board closed Details »»
Display the Close Reason to admin users while board closed
Version: 1.00, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 12-15-2002 Last Update: Never Installs: 22
 
No support by the author.

This is a simple hack that is really useful to all of us, since it let us know if the board is closed or not, if you have administrative rights, especially when you have several admins on your board.
Basically it will display the closing reason, at the top of the board.
[high]That is good because it will prevent you from forgetting the board closed or it will let your collegue admins be aware the board is closed and it will display for them (as well as for you) the close reason.[/high]

ESTIMATED INSTALL TIME: 1 minute
REQUESTED BY: (nobody)
TESTED IN VERSION: 2.2.8, 2.2.9

You like the hack? Use the force to click on the Install Button.

Show Your Support

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

Comments
  #22  
Old 12-17-2002, 04:12 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no it wont, do you see an $DB_site in the file?
Reply With Quote
  #23  
Old 12-17-2002, 05:07 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #24  
Old 12-17-2002, 05:09 PM
Visionray's Avatar
Visionray Visionray is offline
 
Join Date: Feb 2002
Location: DC - USA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #25  
Old 12-17-2002, 05:12 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'
Reply With Quote
  #26  
Old 12-17-2002, 06:09 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

WOW this is something new, TECK adds a query to his forum hehe, glad I could help, I feel all proud for no reason now lol.
Reply With Quote
  #27  
Old 12-17-2002, 07:41 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 12-17-2002, 07:45 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #29  
Old 12-17-2002, 07:51 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was repeating Freddie's words, about the server memory... hihi... to late. 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:
Reply With Quote
  #30  
Old 12-17-2002, 08:55 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LoL but nonetheless, when you're an admin and the board is closed, there will be that extra query
Reply With Quote
  #31  
Old 12-17-2002, 11:06 PM
Freddie Bingham's Avatar
Freddie Bingham Freddie Bingham is offline
 
Join Date: Oct 2001
Posts: 506
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

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 06:08 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.04761 seconds
  • Memory Usage 2,297KB
  • 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
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete