View Full Version : 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.
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.
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 (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=46722).
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/showthread.php?s=&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
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:)
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
Nice hack, will install, thanks :)
Dean C
12-16-2002, 08:42 PM
Does this add any queries anywhere?
- miSt
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. :)
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
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? :)
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$templatesused.='gobutton,timezone,username_lo ggedout,username_loggedin,phpinclude,headinclude,h eader,footer,forumjumpbit,forumjump,nav_linkoff,na v_linkon,navbar,nav_joiner';
$templatesused.=',pagenav,pagenav_curpage,pagenav_ firstlink,pagenav_lastlink,pagenav_nextlink,pagena v_pagelink,pagenav_prevlink';
below add:
if (!$bbactive) $templatesused.=',bbinactive';
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.
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 ;)
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:
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
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
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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=50468).
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.