Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Show First Post Only To Unregistered User / Guest Details »»
Show First Post Only To Unregistered User / Guest
Version: 1.00, by Raptor Raptor is offline
Developer Last Online: Jun 2022 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.1 Rating:
Released: 04-28-2009 Last Update: Never Installs: 33
Template Edits
Re-useable Code Translations  
No support by the author.

Ported from: https://vborg.vbsupport.ru/showthread.php?t=181462

Thanks to ryans

Fully tested on 3.8.1 - probably works the same on 3.8.2+

This is just a simple hack that will show the first post to unregistered users / guests. The rest of the posts in the thread will ask them to login or register. This is a template hack. Of course you can edit your own message.

Additions / Changes / Ideas are welcome.

In Postbit Templates edit the postbit_legacy or the postbit template depending on which one you use.

Find:

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

Code:
<!-- message -->

<if condition="$show['member']">
		<div id="post_message_$post[postid]">
                $post[message]
		</div>				
		<else />				
		<if condition="$post[postcount] == 1">
		<div id="post_message_$post[postid]">
                $post[message]</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>

<!-- / message -->

Screenshots

File Type: jpg firstpostgurst.jpg (77.2 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-31-2016, 11:07 AM
GiorgioV GiorgioV is offline
 
Join Date: Feb 2015
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
is there something similar for 4.2.3 ?
Reply With Quote
  #33  
Old 01-31-2016, 01:46 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GiorgioV View Post
Hi,
is there something similar for 4.2.3 ?
You could try:

Show First Post Only

and exclude all usergroups except "Unregistered / Not Logged In".
Reply With Quote
  #34  
Old 02-03-2016, 01:20 PM
GiorgioV GiorgioV is offline
 
Join Date: Feb 2015
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it, but it doesn't work. I can see the message "All Posts Except The First and Yours Are Hidden From View" , but scrolling down i can see all the posts without login. I tried both setting "all" in the active forum option, and selecting specific forum. It doesn't work..
Reply With Quote
  #35  
Old 02-03-2016, 02:36 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GiorgioV View Post
I tried it, but it doesn't work. I can see the message "All Posts Except The First and Yours Are Hidden From View" , but scrolling down i can see all the posts without login. I tried both setting "all" in the active forum option, and selecting specific forum. It doesn't work..
Are you using the "postbit" template, and not the "postbit_legacy" template? I meant to add support for the "postbit" template, but forgot...I will do that today.
Reply With Quote
  #36  
Old 02-05-2016, 09:54 AM
GiorgioV GiorgioV is offline
 
Join Date: Feb 2015
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried with both templates, no way. All posts showed to unregistered users.
Reply With Quote
  #37  
Old 02-07-2016, 11:42 AM
GiorgioV GiorgioV is offline
 
Join Date: Feb 2015
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Found and installed this . It works fine . Anyway thank you very much.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04264 seconds
  • Memory Usage 2,283KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete