Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 11-30-2009, 11:57 PM
ravenfaust ravenfaust is offline
 
Join Date: Aug 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Agreed This will rune your forum if you rely on indexing.
Reply With Quote
  #13  
Old 01-11-2010, 09:48 PM
Hasann's Avatar
Hasann Hasann is offline
 
Join Date: Aug 2005
Location: Germany
Posts: 897
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this code for search enginee access with this mod

PHP Code:
<!-- message -->

<if 
condition="$show['search_engine']">
<
div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]</div>        
</if>
<if 
condition="$show['member']">
<
div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]</div>                
<else />                
<if 
condition="$post[postcount] == 1">
<
div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]</div>
</if>
<else />
<if 
condition="$show['guest']">
<if 
condition="$post[postcount] != 1">
<
div class='warning-box'>
<
img src='images/misc/warn.png' alt='Warning' />
<
h2><strong>Warning</strong></h2>
<
h1><font color="#000000"><br /><br />Konunun devamindaki mesajlari okuyabilmek icin ?ye olmaniz gerekmektedir. <br />L?tfen ?ye Olmak icin <a href=register.php>BURAYA</aTiklayin.
</
font></h1>
<
br /><br />
</
div>
<
br /><br />
</if></if></if>

<!-- / 
message --> 
Reply With Quote
  #14  
Old 08-22-2010, 01:34 AM
ecreweb ecreweb is offline
 
Join Date: Oct 2008
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks.
Reply With Quote
  #15  
Old 09-24-2010, 11:13 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry but for the search engine adjustment... could you translate this to English for me?
Quote:
Konunun devamindaki mesajlari okuyabilmek icin ?ye olmaniz gerekmektedir. <br />L?tfen ?ye Olmak icin <a href=register.php>BURAYA</a> Tiklayin.
Reply With Quote
  #16  
Old 02-18-2011, 03:33 AM
kpmedia's Avatar
kpmedia kpmedia is offline
 
Join Date: Jan 2008
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Black Tiger View Post
Sorry but for the search engine adjustment... could you translate this to English for me?
Google Translate says this is Turkish, and it means this:
Quote:
You must be a member of the subject to read the subsequent posts . Please CLICK HERE to Become a Member
Reply With Quote
  #17  
Old 02-18-2011, 12:38 PM
Black Tiger's Avatar
Black Tiger Black Tiger is offline
 
Join Date: Apr 2004
Location: Netherlands
Posts: 957
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.
Reply With Quote
  #18  
Old 04-06-2011, 02:05 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hasann View Post
Try this code for search enginee access with this mod

PHP Code:
<!-- message -->

<if 
condition="$show['search_engine']">
<
div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]</div>        
</if>
<if 
condition="$show['member']">
<
div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]</div>                
<else />                
<if 
condition="$post[postcount] == 1">
<
div id="post_message_$post[postid]">
$ad_location[ad_showthread_firstpost_start]
$post[message]</div>
</if>
<else />
<if 
condition="$show['guest']">
<if 
condition="$post[postcount] != 1">
<
div class='warning-box'>
<
img src='images/misc/warn.png' alt='Warning' />
<
h2><strong>Warning</strong></h2>
<
h1><font color="#000000"><br /><br />Konunun devamindaki mesajlari okuyabilmek icin ?ye olmaniz gerekmektedir. <br />L?tfen ?ye Olmak icin <a href=register.php>BURAYA</aTiklayin.
</
font></h1>
<
br /><br />
</
div>
<
br /><br />
</if></if></if>

<!-- / 
message --> 
Hi Hassan, how would i work another condition in? you display only the first post to guests and display a message i would like to display only the first post to unconfirmed users but display a different message, like
PHP Code:
<if condition="is_member_of($bbuserinfo, 3)">PLEASE COMPLETE YOUR REGISTRATION</if> 
could you help?
Reply With Quote
  #19  
Old 04-16-2011, 08:04 AM
cergat cergat is offline
 
Join Date: Apr 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what about vb 4.1.3 - i would like to apply this mod on that version - i tryed but seams not possible - help?
Reply With Quote
  #20  
Old 05-26-2011, 01:20 PM
oliver22 oliver22 is offline
 
Join Date: Jan 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, what about 4.1.x support ? Is there any other plugin to do this ?
Reply With Quote
  #21  
Old 05-26-2011, 05:47 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This mod is for vb3.8.x not 4.x however, i believe it should work if you change the if condtionals properly for vb4 i.e instead of <if you would use <vb:if
Reply With Quote
Reply


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 02:42 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.04988 seconds
  • Memory Usage 2,366KB
  • Queries Executed 27 (?)
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
  • (3)bbcode_php
  • (4)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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