PDA

View Full Version : Mini Mods - Enhanced Forum Closed Message


ericgtr
09-13-2007, 10:00 PM
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:

<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:

<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?