vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Show Thread Enhancements - Show First Post To Unregistered User (https://vborg.vbsupport.ru/showthread.php?t=181462)

ryans 06-03-2008 09:00 PM

Show First Post To Unregistered User
 
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

Code:

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

Code:


<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 06-04-2008 05:19 AM

isnt this the same

https://vborg.vbsupport.ru/showthread.php?t=178720

??

solution24 06-04-2008 05:25 AM

doesnt work wid my skin :(

ryans 06-04-2008 05:37 AM

No, because that one lets people look a certain amount of times. Mine works all the time.

Quote:

Originally Posted by logicuk (Post 1540342)


ryans 06-04-2008 05:39 AM

Quote:

Originally Posted by solution24 (Post 1540348)
doesnt work wid my skin :(

post up or pm me your postbig_legacy

euro2low 06-04-2008 11:35 AM

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 06-04-2008 12:52 PM

sorry I made one change. Took the first
Code:

</if>
and moved it to the bottom closing if statements.

euro2low 06-04-2008 01:24 PM

now they dont even see the first post. Its just blank

DJTREX 06-10-2008 01:43 PM

don't work!!!!

II AnDo II 06-11-2008 04:50 PM

dosent work

ryans 11-01-2008 02:47 PM

I just added it to my new skin, it worked fine. what version are you guys using?

chaot1c 11-01-2008 06:18 PM

Quote:

Originally Posted by logicuk (Post 1540342)

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 12-24-2008 09:29 AM

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

$post[message]
and replace with:
Code:

<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 04-29-2009 11:09 AM

Ported to vb 3.8.x

https://vborg.vbsupport.ru/showthread.php?t=212437


All times are GMT. The time now is 06:52 PM.

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.01678 seconds
  • Memory Usage 1,749KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)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