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
  #22  
Old 06-25-2011, 10:10 AM
Traxdata Traxdata is offline
 
Join Date: Jul 2004
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wondering if it is possible to show it in specific and not all subforums?
Reply With Quote
  #23  
Old 06-25-2011, 11:26 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just add conditionals to exclude the forums you don't want it to work in
Reply With Quote
  #24  
Old 07-29-2011, 12:52 AM
FockerFGAA FockerFGAA is offline
 
Join Date: Dec 2006
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
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
Can anyone test it on VB4?

I can't find the code to replace in postbit or postbit_legacy.
Reply With Quote
  #25  
Old 11-28-2011, 04:25 PM
Traxdata Traxdata is offline
 
Join Date: Jul 2004
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
Just add conditionals to exclude the forums you don't want it to work in
unfortunately it won't work with

<if condition="$forum[forumid] != XXX"></if>
Reply With Quote
  #26  
Old 11-28-2011, 05:26 PM
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 Traxdata View Post
unfortunately it won't work with

<if condition="$forum[forumid] != XXX"></if>
Thats because in vb4.x you don't use <IF you use <vb:If ...etc
Reply With Quote
  #27  
Old 11-28-2011, 08:34 PM
Traxdata Traxdata is offline
 
Join Date: Jul 2004
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im on vb3.7...
Reply With Quote
  #28  
Old 11-29-2011, 05:46 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this:
HTML Code:
<if condition = "$thread['forumid']==x">
where x would be your forumid
Reply With Quote
  #29  
Old 12-06-2011, 06:48 PM
Traxdata Traxdata is offline
 
Join Date: Jul 2004
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no way. have tried several codes but no one worked so far.
Reply With Quote
  #30  
Old 12-06-2011, 07:58 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and you're editing the right template and portion?
Reply With Quote
  #31  
Old 05-28-2012, 09:41 PM
matrex722's Avatar
matrex722 matrex722 is offline
 
Join Date: Jan 2007
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any way to hide replys from sorce page

i mean when you view sorce page

i hope you understand me
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 06:02 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.08705 seconds
  • Memory Usage 2,332KB
  • Queries Executed 29 (?)
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
  • (1)bbcode_html
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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