PDA

View Full Version : Display the Close Reason to admin users while board closed


TECK
16 Dec 2002, 17:11
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 (http://www.vbulletin.org/forum/misc.php?s=&action=install&threadid=46722).

TECK
16 Dec 2002, 17:19
Sorry guys. I added the file. :)
A screenshot is below...

Xenon
16 Dec 2002, 17:21
where's the file?

sounds familiar:
http://www.vbulletin.org/forum/showthread.php?s=&threadid=38551

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

assassingod
16 Dec 2002, 17:21
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
16 Dec 2002, 17:26
Cool:)

I will install after tea!:)

Satan

TECK
16 Dec 2002, 17:33
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
16 Dec 2002, 17:35
Done and thanks again! No problems installing on my test board:)

TECK
16 Dec 2002, 17:40
I know is really useful on my board, since we have admins galore... :D

Xenon
16 Dec 2002, 17:43
we have?
don't think so :D *ggg*

Chris M
16 Dec 2002, 18:02
Lol...

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

*Deleted*:)

Satan

ManagerJosh
16 Dec 2002, 18:52
Cute logo Teck.....and I see Chen is gonna love the advertisement for HiveMail ;)

Dean C
16 Dec 2002, 19:14
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
16 Dec 2002, 19:16
yes :)

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

Chris M
16 Dec 2002, 19:40
As, with vB standard, there is no warning, sometimes you forget to re-open the board;):):p

Satan

N9ne
16 Dec 2002, 19:47
Nice hack, will install, thanks :)

Dean C
16 Dec 2002, 21:42
Does this add any queries anywhere?

- miSt

Vile
17 Dec 2002, 06:41
Looks good, nice job as usual TECK :)

*installed.

Boofo
17 Dec 2002, 08:02
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
17 Dec 2002, 08:42
Boofo, read the first post. ;) Is all explained there.. plus the screenshot speaks for itself.
Mine's is different from PPN's...

Dean C
17 Dec 2002, 10:06
Originally posted by Mist
Does this add any queries anywhere?

- miSt

Xenon
17 Dec 2002, 17:12
no it wont, do you see an $DB_site in the file? :)

N9ne
17 Dec 2002, 18:07
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
17 Dec 2002, 18:09
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
17 Dec 2002, 18:12
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_loggedout,username_loggedin,phpi nclude,headinclude,header,footer,forumjumpbit,forumjump,nav_linkoff,nav_linkon,n avbar,nav_joiner';
$templatesused.=',pagenav,pagenav_curpage,pagenav_firstlink,pagenav_lastlink,pag enav_nextlink,pagenav_pagelink,pagenav_prevlink';

below add:
if (!$bbactive) $templatesused.=',bbinactive';

N9ne
17 Dec 2002, 19:09
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
17 Dec 2002, 20:41
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
17 Dec 2002, 20:45
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
17 Dec 2002, 20:51
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
17 Dec 2002, 21:55
LoL but nonetheless, when you're an admin and the board is closed, there will be that extra query ;)

Freddie Bingham
18 Dec 2002, 00:06
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
18 Dec 2002, 00:47
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
18 Dec 2002, 09:23
lmfao at Erwin

TECK
18 Dec 2002, 11:48
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
26 Dec 2002, 20:40
Nice hack...... this is great. Thanks.

Oblivion Knight
12 Aug 2003, 00:26
Is there any possible way to have this mod running alongside this one located here (http://www.vbulletin.org/forum/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