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?

Kolbi 02-07-2010 05:48 PM

^^ such a function I need too.

I?m using :)

Muggz562 03-08-2010 04:13 PM

Works perfectly. Thanks.

PukkaBen 03-09-2010 09:33 PM

Quote:

Originally Posted by TheWindows7Site (Post 1968636)
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!!

Manoel J?nior 03-10-2010 09:45 AM

Please,

screens...

steve1966 03-12-2010 01:37 PM

brilliant thank you

giorgino 03-18-2010 09:21 PM

What about spider indexing? :)

LifesGreatestGift 03-19-2010 06:09 AM

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. :\

giorgino 03-19-2010 06:48 AM

Thank you :)
I don't want sacrifice my indexing...

kozzie 03-19-2010 11:53 AM

Hi I want to show just main forum and sub forum titles not posts can this be done?

borbole 03-19-2010 06:35 PM

Quote:

Originally Posted by Kolbi (Post 1945711)
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>


LifesGreatestGift 03-20-2010 03:56 PM

Thanks for the update ;)

borbole 03-20-2010 08:41 PM

No problem :)

xsamet 05-06-2010 08:00 AM

Thank you.

Would you like to do in the forum.

shuett 05-09-2010 12:51 PM

Great mod. Thanks so much.

merk_aus 06-27-2010 11:25 AM

I am not picky and not wanting changes to this - it works currently as designed and as described.

It is perfect for what I was after, I am currently going through and installing all of your modifications as they are what "real" administrators need to install to improve their websites they are fantastic.

Thank you for taking the time I truly appreciate it.

ozzy47 07-04-2010 12:11 PM

This worked great been looking for a way to prevent guests from seeing posts but not changing perms, so the latest posts in marquee would work. Great job!

ozzy47 07-06-2010 08:37 PM

Ok I have 1 issue now. If I am logged in and click a thread on my marquee, I get the register, message, and when I try to log in on post page it brings me back to the register message?

Ok I figured it out I needed to remove the www from path as it is not in my forum home that way

RonH. 09-27-2010 04:58 PM

I like this piece of modification. Thanks. Works like a charm.

8thos 10-29-2010 02:53 AM

Hiding posts from Guests should be an option that members can individually choose themselves so that only their own posts be hidden. How would this be done?


All times are GMT. The time now is 03:33 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.02411 seconds
  • Memory Usage 1,875KB
  • 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
  • (16)bbcode_html_printable
  • (6)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete