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

Reply
 
Thread Tools
TW7S - Hiding Posts From Guests Details »»
TW7S - Hiding Posts From Guests
Version: 4.0.0, by LifesGreatestGift LifesGreatestGift is offline
Developer Last Online: Apr 2015 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.x Rating:
Released: 01-01-2010 Last Update: Never Installs: 29
Template Edits
Re-useable Code Translations  
No support by the author.

This Will Hide EVERY post on the thread from Guest's

Open postbit_legacy or postbit (Works with both)

Find:
PHP Code:
{vb:raw post.message
Replace With:
PHP Code:
<vb:if condition="$show['member']">
           {
vb:raw post.message}
      <
vb:else />
           <
br /><br />
           <
div style="text-align: center;">
           
Please login, or  <a href="./register.php"><u>register</u></ato view message content.
           </
div>
</
vb:if> 

This will JUST hide the threads PRIMARY (FIRST) post of the thread, and show the rest of the posts (replies to first post) to the guest's

Find:
PHP Code:
{vb:raw post.message
Replace With:
PHP Code:
<vb:if condition="$show['member']">
               {
vb:raw post.message}
          <
vb:else />
               <
br /><br />
                         <
vb:if condition="$post[postcount] == 1">
                                      <
div style="text-align: center;">
                                      
Please login, or <a href="./register.php"><u>register</u></ato view message content.
                                      </
div>
                                <
vb:else />
                                      {
vb:raw post.message}
                         </
vb:if>
</
vb:if> 

This will SHOW the threads PRIMARY (FIRST) post of the thread, and HIDE the rest of the posts (replies to first post) to the guest's

Find:
PHP Code:
{vb:raw post.message
Replace With:
PHP Code:
<vb:if condition="$show['member']">
               {
vb:raw post.message}
          <
vb:else />
               <
br /><br />
                         <
vb:if condition="$post[postcount] != 1">
                                      <
div style="text-align: center;">
                                      
Please login, or <a href="./register.php"><u>register</u></ato view message content.
                                      </
div>
                                <
vb:else />
                                      {
vb:raw post.message}
                         </
vb:if>
</
vb:if> 

Enjoy

Show Your Support

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

Comments
  #12  
Old 02-07-2010, 05:48 PM
Kolbi Kolbi is offline
 
Join Date: Mar 2009
Location: D - S?dbaden
Posts: 899
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^ such a function I need too.

I?m using
Reply With Quote
  #13  
Old 03-08-2010, 04:13 PM
Muggz562 Muggz562 is offline
 
Join Date: Jan 2010
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfectly. Thanks.
Reply With Quote
  #14  
Old 03-09-2010, 09:33 PM
PukkaBen PukkaBen is offline
 
Join Date: Apr 2009
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheWindows7Site View Post
tell me what all you'd like to hide and ill help ya out
Sorry for the slow reply, not been anywhere near a PC for some time!! I'm looking for just some BBCode really, so that I can hide bits of posts from guests/not logged in. Something like [hide] would be awesome. They have been on previous versions of vB3 but I can't find any that work on vB4 so it's a big shame!!
Reply With Quote
  #15  
Old 03-10-2010, 09:45 AM
Manoel J?nior Manoel J?nior is offline
 
Join Date: Feb 2009
Location: SP / Brasil
Posts: 778
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please,

screens...
Reply With Quote
  #16  
Old 03-12-2010, 01:37 PM
steve1966 steve1966 is offline
 
Join Date: Dec 2007
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

brilliant thank you
Reply With Quote
  #17  
Old 03-18-2010, 09:21 PM
giorgino giorgino is offline
 
Join Date: Dec 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What about spider indexing?
Reply With Quote
  #18  
Old 03-19-2010, 06:09 AM
LifesGreatestGift's Avatar
LifesGreatestGift LifesGreatestGift is offline
 
Join Date: Jul 2009
Location: Louisville, KY USA
Posts: 885
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be a slight downside, Im sure you could make a specific group for spiders so that they can bypass the hide code with a simple IF statement, but then people would emulate bots with their browsers. :\
Reply With Quote
  #19  
Old 03-19-2010, 06:48 AM
giorgino giorgino is offline
 
Join Date: Dec 2009
Posts: 122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
I don't want sacrifice my indexing...
Reply With Quote
  #20  
Old 03-19-2010, 11:53 AM
kozzie kozzie is offline
 
Join Date: Mar 2009
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi I want to show just main forum and sub forum titles not posts can this be done?
Reply With Quote
  #21  
Old 03-19-2010, 06:35 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kolbi View Post
Thank you, but please modify your code to be xhtml valid:
HTML Code:
<vb:if condition="$show['member']">
           {vb:raw post.message}
      <vb:else />
           <br /><br />
           <center>
           Please login, or  <a href="./register.php"><u>register</u></a> to view message content.
           </center>
</vb:if>
to:

HTML Code:
<vb:if condition="$show['member']">
           {vb:raw post.message}
      <vb:else />
           <br /><br />
           <div align="center">
           Please login, or  <a href="./register.php"><u>register</u></a> to view message content.
           </div>
</vb:if>
and:
HTML Code:
<vb:if condition="$show['member']">
               {vb:raw post.message}
          <vb:else />
               <br /><br />
                         <vb:if condition="$post[postcount] == 1">
                                      <center>
                                      Please login, or <a href="./register.php"><u>register</u></a> to view message content.
                                      </center>
                                <vb:else />
                                      {vb:raw post.message}
                         </vb:if>
</vb:if>
to:
HTML Code:
<vb:if condition="$show['member']">
               {vb:raw post.message}
          <vb:else />
               <br /><br />
                         <vb:if condition="$post[postcount] == 1">
                                      <div align="center">
                                      Please login, or <a href="register.php"><u>register</u></a> to view message content.
                                      </div>
                                <vb:else />
                                      {vb:raw post.message}
                         </vb:if>
</vb:if>
last:
HTML Code:
<vb:if condition="$show['member']">
               {vb:raw post.message}
          <vb:else />
               <br /><br />
                         <vb:if condition="$post[postcount] != 1">
                                      <center>
                                      Please login, or <a href="./register.php"><u>register</u></a> to view message content.
                                      </center>
                                <vb:else />
                                      {vb:raw post.message}
                         </vb:if>
</vb:if>
to:
HTML Code:
<vb:if condition="$show['member']">
               {vb:raw post.message}
          <vb:else />
               <br /><br />
                         <vb:if condition="$post[postcount] != 1">
                                      <div align="center">
                                      Please login, or <a href="register.php"><u>register</u></a> to view message content.
                                      </div>
                                <vb:else />
                                      {vb:raw post.message}
                         </vb:if>
</vb:if>
to:

HTML Code:
<vb:if condition="$show['member']">
               {vb:raw post.message}
          <vb:else />
               <br /><br />
                         <vb:if condition="$post[postcount] == 1">
                                      <div align="center">
                                      Please login, or <a href="./register.php"><u>register</u></a> to view message content.
                                      </div>
                                <vb:else />
                                      {vb:raw post.message}
                         </vb:if>
</vb:if>


Sorry to butt in here but you didn''t make it xhtml valid either

The align center on div has been depricated.

So this:

HTML Code:
<div align="center">
code here
</div>
should be instead:

HTML Code:
<div style="text-align: center;">
code here
</div>
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 11:56 AM.


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.04789 seconds
  • Memory Usage 2,373KB
  • Queries Executed 26 (?)
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
  • (9)bbcode_html
  • (6)bbcode_php
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete