vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - TW7S - Hiding Posts From Guests (https://vborg.vbsupport.ru/showthread.php?t=231911)

LifesGreatestGift 01-01-2010 10:00 PM

TW7S - Hiding Posts From Guests
 
1 Attachment(s)
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 :)

akee 01-02-2010 11:26 AM

Thanks, works fine

I installed

Dr.osamA 01-03-2010 03:35 AM

installed too

thanxx
________
Extreme Q

Kolbi 01-03-2010 07:34 AM

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>


LifesGreatestGift 01-03-2010 10:41 AM

Quote:

Originally Posted by Kolbi (Post 1945711)
Thank you, but please modify your code to be xhtml valid:

Updated :) Thanks!

elwachiman 01-03-2010 06:39 PM

istalled work perfect tnks

PukkaBen 01-27-2010 12:26 PM

Hey, this looks very tidy and I am looking for a hack like this to install on my site, but I'd only like to hide certain bits of posts. There was a hack about for previous versions I'm sure and I wonder if anything like this could be done?

Any light shed on this would be awesome!!

LifesGreatestGift 01-28-2010 04:04 AM

Quote:

Originally Posted by PukkaBen (Post 1967917)
Hey, this looks very tidy and I am looking for a hack like this to install on my site, but I'd only like to hide certain bits of posts. There was a hack about for previous versions I'm sure and I wonder if anything like this could be done?

Any light shed on this would be awesome!!

tell me what all you'd like to hide and ill help ya out :)

----
Sent from my T-Mobile G1

Talk-Pets 01-28-2010 03:22 PM

Is it possible to exclude some forums from this?

angelimnot 02-07-2010 12:31 AM

Ok.. so I would like to hide some information on my site from certain user groups...

we were using bb code before [private] text here [/private]
but i cant seem to make vbulletin 4 hide that coding.. any help?


All times are GMT. The time now is 03:20 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.01277 seconds
  • Memory Usage 1,792KB
  • 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
  • (7)bbcode_html_printable
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete