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)

TECK 12-15-2002 10:00 PM

Display the Close Reason to admin users while board closed
 
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.

TECK 12-16-2002 04:19 PM

Sorry guys. I added the file. :)
A screenshot is below...

Xenon 12-16-2002 04:21 PM

where's the file?

sounds familiar:
https://vborg.vbsupport.ru/showthrea...threadid=38551

but the msg is also usefull, i want to see what users see ;)

assassingod 12-16-2002 04:21 PM

Thanks:) Will install this (Once I closed my board and didnt open it until 3 days later - forgot I closed it :doh: )

Thanks again:)

Chris M 12-16-2002 04:26 PM

Cool:)

I will install after tea!:)

Satan

TECK 12-16-2002 04:33 PM

I didn't released a hack for a while, that's why I lost the habit of doing the right thing. :)
Guys, please delete the first 2 replies, so it has the screenshot right below the posted instructions. Thanks.

assassingod 12-16-2002 04:35 PM

Done and thanks again! No problems installing on my test board:)

TECK 12-16-2002 04:40 PM

I know is really useful on my board, since we have admins galore... :D

Xenon 12-16-2002 04:43 PM

we have?
don't think so :D *ggg*

Chris M 12-16-2002 05:02 PM

Lol...

Thats a bit of an understatement Teck me ol' fruit;):p

*Deleted*:)

Satan

ManagerJosh 12-16-2002 05:52 PM

Cute logo Teck.....and I see Chen is gonna love the advertisement for HiveMail ;)

Dean C 12-16-2002 06:14 PM

I'm a lil confused....

So this hack displays the message that the forums closed to everyone and the message that is shown to users if your admin and just displays the normal message to other usergroups ?

- miSt

Xenon 12-16-2002 06:16 PM

yes :)

it's just a remider for you and the other admins, that the board is offline...

Chris M 12-16-2002 06:40 PM

As, with vB standard, there is no warning, sometimes you forget to re-open the board;):):p

Satan

N9ne 12-16-2002 06:47 PM

Nice hack, will install, thanks :)

Dean C 12-16-2002 08:42 PM

Does this add any queries anywhere?

- miSt

Vile 12-17-2002 05:41 AM

Looks good, nice job as usual TECK :)

*installed.

Boofo 12-17-2002 07:02 AM

I guess I'm confused here. Can't you do the same thing in "Reason for turning board off" in the vBulletin options? Or is this supposed to be more for Admins than anybody else? If so, since I have only one Admin on my site, PPN's will do basically the same thing. :)

TECK 12-17-2002 07:42 AM

Boofo, read the first post. ;) Is all explained there.. plus the screenshot speaks for itself.
Mine's is different from PPN's...

Dean C 12-17-2002 09:06 AM

Quote:

Originally posted by Mist
Does this add any queries anywhere?

- miSt


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.

Erwin 12-17-2002 11:47 PM

The world as we know is about to end. Floren has released a hack that actually adds a query rather than subtracts one.

/me runs away in terror...

Dean C 12-18-2002 08:23 AM

lmfao at Erwin

TECK 12-18-2002 10:48 AM

Quote:

Originally posted by Erwin
The world as we know is about to end. Floren has released a hack that actually adds a query rather than subtracts one.

* Erwin runs away in terror...

Heh... :D
Well, I really don't care if a query is performed extra... since the admins are such a small number of users... If it would be done in general, trust me I would not do this.
But for those who dont want to run a query extra and instead to load the server memory, use Stefan's fix. ;)

Talisman 12-26-2002 07:40 PM

Nice hack...... this is great. Thanks.

Oblivion Knight 08-11-2003 11:26 PM

Is there any possible way to have this mod running alongside this one located here.
ie. Anyone that has the ability to view the forum offline has the close reason box displayed at the top of the forums and not just admins? I have also allowed supervisors to view the forum and would like this message to be displayed to them.

I have tried to do this myself and failed.. :o


All times are GMT. The time now is 01:35 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.01138 seconds
  • Memory Usage 1,780KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)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