vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Customized Forum Closed Screen (https://vborg.vbsupport.ru/showthread.php?t=73287)

Michael Morris 12-24-2004 10:00 PM

Customized Forum Closed Screen
 
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.

MrNase 12-25-2004 09:26 AM

Thank you for sharing it with us :)

error_22 12-25-2004 11:10 AM

cool, thanks for sharing *clicks install*

moley 12-25-2004 01:48 PM

thanks a lot the vb default is so boring will be fun to make a new one.

Boofo 12-25-2004 04:14 PM

Why didn't you include this in your code replacement?
PHP Code:

        unset($shutdownqueries['lastvisit']); 


Red Blaze 12-25-2004 06:46 PM

Very cool, I'll definatly have this in my to-do list. :)

Michael Morris 12-25-2004 07:32 PM

Quote:

Originally Posted by Boofo
Why didn't you include this in your code replacement?
PHP Code:

        unset($shutdownqueries['lastvisit']); 


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 Ghost 01-01-2005 05:55 PM

Hi,

I get only a white Page?

Greetz

Michael Morris 01-01-2005 06:35 PM

You have to create a new template for your custom forum closed screen named boards_closed. This can be any XML document you like - but it has to be loaded into the template boards_closed

Dan 01-01-2005 06:44 PM

I like this mod :D Thanks for sharing it with us


All times are GMT. The time now is 11:17 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.01638 seconds
  • Memory Usage 1,748KB
  • 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
  • (1)bbcode_html_printable
  • (5)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete