The Arcive of vBulletin Modifications Site. |
|
Show First Post Only To Unregistered User / Guest Details »»
|
|||||||||||||||||||||||||||||
|
Show First Post Only To Unregistered User / Guest
Developer Last Online: Jun 2022
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 --> 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
Supporters / CoAuthors Show Your Support
|
|||||||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
Here is another version which puts a nice graphical box around the "Please Register Text"
Upload Warn.png to images/misc/ Add this CSS code to Additional CSS : Code:
.warning-box,
{
color: #000;
border: 1px solid #000;
-moz-border-radius: 5px;
background-color: #defee3;
padding: 6px;
text-align:left;
}
.warning-box img,
{
float:left;
margin-top: 10px;
margin-right: 5px;
vertical-align:middle;
border: 0px;
}
.warning-box h2,
.warning-box p,
{
padding: 0px;
margin: 0px;
margin-left: 60px;
}
.warning-box h2,
{
padding-bottom: 4px;
font-size: 14px;
border-bottom: 1px solid #000;
}
.warning-box h1,
{
padding: 0px;
margin: 0px;
margin-left: 60px;
font-size: 12px;
font-weight:normal;
}
.warning-box h6,
{
margin: 20px;
padding: 0px;
margin-left: 60px;
font-size: 12px;
font-weight:normal;
}
.warning-box
{
background-color: #FFCCCC;
}
.warning-box ul,
{
margin-left: 30px;
}
find: Code:
<!-- message --> <div id="post_message_$post[postid]"> $post[message] </div> <!-- / message --> 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">
<div class='warning-box'>
<img src='images/misc/warn.png' alt='Warning' />
<h2><strong>Warning</strong></h2>
<h1><font color="#000000">
<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>
</font></h1>
<br /><br /></div>
<br><br>
</if></if></if>
<!-- / message -->
|
|
#3
|
||||
|
||||
|
Interesting Raptor, I like the custom CSS and the included image. One quick question though. How will this affect search engines indexing one's site??
|
|
#4
|
|||
|
|||
|
I would think that most of the time the OP is what's important to a search engine.
Search engines crawl as guests so they wouldn't see the responses iirc |
|
#5
|
||||
|
||||
|
Tagged this one for now.
Search engines crawl as guest but as a certain user agent: http://www.pctools.com/guides/registry/detail/799/ People can imitate that, but maybe there is a way to change you mod and make a filter so the mod does not affect search engines. I presume there are also user agent statements voor yahoo and others. If it can be fixed that search engines still can crawl, I would be happy to use this mod. |
|
#6
|
|||
|
|||
|
I would be happy to use this mod. If you can a way that allows search engines to crawl,
|
|
#7
|
|||
|
|||
|
I agree. Search engine access and I REALLY like this one.
|
|
#8
|
|||
|
|||
|
I don't really think, were going ot get what we want though are we? ha!
|
|
#9
|
|||
|
|||
|
Quote:
|
|
#10
|
|||
|
|||
|
Is there anyway to show only the first post and total hide all other posts?
Thank you |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|