PDA

View Full Version : Show Thread Enhancements - Show First Post To Unregistered User


ryans
04 Jun 2008, 06:06
This is just a simple hack that will show the first post to unregistered users. The rest of the posts will ask them to login or register. This is a template hack

In Postbit Templates edit the postbig_legacy

Find


<div id="post_message_$post[postid]" class="overflow_parent"><div class="overflow_child">$post[message]</div></div>


and replace it with



<if condition="$show['member']">
<div id="post_message_$post[postid]" class="overflow_parent"><div class="overflow_child">$post[message]</div></div>


<else />


<if condition="$post[postcount] == 1">
<div id="post_message_$post[postid]" class="overflow_parent"><div class="overflow_child">$post[message]</div></div>
</if>
<else />
<if condition="$show['guest']">
<if condition="$post[postcount] != 1">
<br><br>You Must be a registered member and logged in to view this response. To Register <a href=register.php>Please Click Here</a>
<br><br>
</if></if></if>



-Enjoy.

logicuk
04 Jun 2008, 07:19
isnt this the same

http://www.vbulletin.org/forum/showthread.php?t=178720

??

solution24
04 Jun 2008, 07:25
doesnt work wid my skin :(

ryans
04 Jun 2008, 07:37
No, because that one lets people look a certain amount of times. Mine works all the time.

isnt this the same

http://www.vbulletin.org/forum/showthread.php?t=178720

??

ryans
04 Jun 2008, 07:39
doesnt work wid my skin :(

post up or pm me your postbig_legacy

euro2low
04 Jun 2008, 13:35
when I do this, my 1st post is repeated 2 times within the 1st post..

example

This is a test


This is a test

----------

next post


Edit: Fixed.... there were 2 lines of code that were the same so I guess it understood to re-write the same text.

ryans
04 Jun 2008, 14:52
sorry I made one change. Took the first </if> and moved it to the bottom closing if statements.

euro2low
04 Jun 2008, 15:24
now they dont even see the first post. Its just blank

DJTREX
10 Jun 2008, 15:43
don't work!!!!

II AnDo II
11 Jun 2008, 18:50
dosent work

ryans
01 Nov 2008, 15:47
I just added it to my new skin, it worked fine. what version are you guys using?

chaot1c
01 Nov 2008, 19:18
isnt this the same

http://www.vbulletin.org/forum/showthread.php?t=178720

??

It's totally different.

This modification only shows the first post in every thread viewable to guests.

The Limit Guest Viewing modification only allows each guest to view a x number of threads viewable to guests.

wolfstream
24 Dec 2008, 10:29
Guys,
Keep in mind this will only work if you're using the legacy postbit, NOT the traditional postbit!

For traditional postbit, you want something like the following:

In the postbit template, look for:

$post[message]

and replace with:

<if condition="$show['member']">
$post[message]
<else />
<if condition="$post[postcount] == 1">
$post[message]
</if>
<else />
<if condition="$show['guest']">
<if condition="$post[postcount] != 1">
<br><br>In order to view this response, you must be a <b>registered member</b>. You may register <a href="register.php">here</a>, it's quick and painless!
<br><br>
</if></if></if>


Of course that's just my own markup of it (wording), but it should work fine for you.

Raptor
29 Apr 2009, 13:09
Ported to vb 3.8.x

http://www.vbulletin.org/forum/showthread.php?t=212437