PDA

View Full Version : Hiding text in a post from non logged in user


shiznatix
10-02-2007, 09:08 AM
I want to have a post that is viewable by guests and everything but I want only 1 line of text to only be displayed to users that are logged in to the forums and if they are not logged in have it say something like 'you must be logged in to see this'

Basically I have a password that I want to give to only the users of our forums and not the whole world but I want the world to know the password exists and that they have to register to view it.

Is there a mod out there that would give me a special tag or something simmilar?

armatik
10-03-2007, 01:15 AM
Go to postbit template, and find:

<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->


And wrap it like so:

<if condition="!$bbuserinfo['userid']">
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
<else />
You gotsa register to view posts lolosaur.
</if>


And that's it.

YLP1
02-03-2008, 04:21 PM
Will this work to only allow guests or non logged in members to view the first post and to view all subsequent posts, the guest or member must be logged in?