vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Mini Mods - Enhanced Forum Closed Message (https://vborg.vbsupport.ru/showthread.php?t=157827)

ericgtr 09-13-2007 10:00 PM

Enhanced Forum Closed Message
 
This may already be out there but I needed to set it up on my site and thought I would share. Even though users can see the title and post count, the message "There are no posts in this forum" is not enough when I want people to register in order to veiw it.

What it does:
When you set the permissions of your forum so that guests can view it, but not the content this will add a message that says "Please Register to download files and view content" to the forum(s) of your choice.

This is just a quick template solution, I didn't find it necessary to phrase for such a small change.

In the FORUMDISPLAY template find:
Code:

                                <if condition="$show['noposts']"><strong>$vbphrase[no_posts_in_this_forum]</strong><else /><strong><phrase 1="$daysprune">$vbphrase[no_posts_last_x_days_forum]</phrase></strong><br />
                                <span class="smallfont">$vbphrase[try_controls_below_for_older_posts]</span></if>

Add this under:
Code:

                                <if condition="in_array($GLOBALS[forumid], array(9,41,20))">
                                <br />
        <strong>Please <a href="register.php">Register</a> to download files and view contents</strong>
        </if>

You can add or remove your forum id's accordingly to the array (in red above). Also, ensure that your path is correct for register.php

ravenfaust 01-24-2010 01:26 AM

will this work with 3.8.4?


All times are GMT. The time now is 10:31 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.00938 seconds
  • Memory Usage 1,710KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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