Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Customized Forum Closed Screen Details »»
Customized Forum Closed Screen
Version: 1.01, by Michael Morris Michael Morris is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 12-24-2004 Last Update: Never Installs: 15
 
No support by the author.

By default the vbulletin closed screen is a simple message with the standard header and footer for the boards. You can change this to a different page entirely with this hack.

This hack requires you to create a new template entirely and install a slight modification in your global.php file.

The file modification is as follows:

Search for this code.
PHP Code:
// #############################################################################
// check that board is active - if not admin, then display error
if (!$vboptions['bbactive'] AND THIS_SCRIPT != 'login')
{
    if (!(
$permissions['adminpermissions'] & CANCONTROLPANEL))
    {
        eval(
'standard_error("' str_replace("\'""'"addslashes($vboptions['bbclosedreason'])) . '");');
        unset(
$shutdownqueries['lastvisit']); 
Comment out the eval('standard_error.... line and place this below the unset($shutdownque.... line.
PHP Code:
eval('print_output("' fetch_template('boards_closed') . '");'); 
The finished code, assuming you have no other hacks in this section of the code, will look like this:

PHP Code:
// #############################################################################
// check that board is active - if not admin, then display error
if (!$vboptions['bbactive'] AND THIS_SCRIPT != 'login')
{
    if (!(
$permissions['adminpermissions'] & CANCONTROLPANEL))
    {
        
//eval('standard_error("' . str_replace("\'", "'", addslashes($vboptions['bbclosedreason'])) . '");');
        
unset($shutdownqueries['lastvisit']);
        eval(
'print_output("' fetch_template('boards_closed') . '");'); 
Now create a new template called boards_closed. This can be any html document you want and you can of course call some of the variables from vbulletin.

If you want the boards closed reason to appear in the page you'll need to include $vboptions[bbclosedreason] somewhere in the file.

Below is a very simple template that will include the reason on a blank page.

HTML Code:
<html>
<body>
$vboptions[bbclosedreason]
</body>
</html>
From this model you can build up a page. Attached is a screenshot of ENWorld's closing screen using this modification.

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 01-01-2005, 08:43 PM
The Ghost's Avatar
The Ghost The Ghost is offline
 
Join Date: Feb 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I know, I've created some HTML Tag an inserted in the Template, but only white Page.....
Reply With Quote
  #13  
Old 01-01-2005, 10:39 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the source code. Is it matching your html? If so, the problem is your html. If not then you misnamed the template. the template must be named:

boards_closed

exactly, or it won't find the template.
Reply With Quote
  #14  
Old 01-27-2005, 12:26 PM
Silverdawn222 Silverdawn222 is offline
 
Join Date: Jun 2003
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those who have the same problem - make sure that the 'boards_closed' template is present in each style selectable by your users.
Reply With Quote
  #15  
Old 01-27-2005, 04:16 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Michael Morris
The print_output function doesn't check this variable and that function terminates the script. Hence the line isn't necessary (as far as I'm aware) - though there is no harm in it's inclusion.
The reason you would want to keep this would be to retain the previous visit's timestamp for members who get the board_closed message: that way, and messages posted by Admin's during board downtime would be "new posts" when the board is restored.
Reply With Quote
  #16  
Old 01-31-2005, 03:25 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works great, but I kept the
PHP Code:
unset($shutdownqueries['lastvisit']); 
***CLICKS INSTALL***
Reply With Quote
  #17  
Old 02-08-2005, 08:24 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So do I now that I understand what it's for. Changed the instructions slightly, but the hack isn't functionally changed.
Reply With Quote
  #18  
Old 07-27-2006, 05:57 PM
noj75 noj75 is offline
 
Join Date: Nov 2004
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Michael

Been trying to suss this out myself all day. Then I found this :-)

Great stuff !!!!
Reply With Quote
Reply


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 07:13 AM.


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.06235 seconds
  • Memory Usage 2,287KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_html
  • (4)bbcode_php
  • (1)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
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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