vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Guests may only view first page of thread (https://vborg.vbsupport.ru/showthread.php?t=104447)

D|ver 01-03-2006 10:00 PM

Guests may only view first page of thread
 
i use a small template modification in my forums, so that guests may only view the first page of a thread. otherwise they will get a (error) message
maybe someone want to use this, too


in the following,
XX is the number of posts shown in a thread
(i think default was 25)
you need to replace this 2 times in the first 2 lines according to your posts/page

postbit legacy
add to the very beginning:
Code:

<if condition="$post[postcount] > XX and !$bbuserinfo['userid']">
<if condition="$post[postcount]%XX == 1">
<!-- Start Error Message -->
<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>   
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view the first page of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>
<!-- End Error Message -->
<else /></if><else />

and add to the end of the template:
Code:

</if>
this modification saves traffic and it should increase your registrations rate :)

its my first release to please be kind ;)

sensimilla 01-04-2006 05:40 PM

great hack! keep up the good work

Snake 01-04-2006 07:00 PM

Yeah well done!

Robru 01-05-2006 12:45 PM

*installed*

NuclioN 01-05-2006 01:35 PM

Does this have an effect on the Google adsense bot's that are scanning your threads?

D|ver 01-05-2006 03:19 PM

well i tried to set rel="nofollow" attributes for all other pages than page 1
so i think it wouldn't affect them at all

hollyboy 01-05-2006 08:07 PM

It would be interesting to have the same hack that does the same but for the first post

D|ver 01-06-2006 10:54 PM

Quote:

Originally Posted by hollyboy
It would be interesting to have the same hack that does the same but for the first post

here i found a solution for this

in postbit_legacy replace:
PHP Code:

<!-- message --> 
<
div>$post[message]</div
<!-- / 
message --> 

with:
PHP Code:

<!-- message --> 
<
div><if condition="$post[postcount] > 1 and !$bbuserinfo['userid']"
$vbphrase[guest_no_posts
<else /> 
$post[message
</if></
div
<!-- / 
message --> 

then create a customguest_no_posts phrase

hollyboy 01-07-2006 07:02 AM

Quote:

Originally Posted by D|ver
here i found a solution for this

in postbit_legacy replace:
PHP Code:

<!-- message --> 
<
div>$post[message]</div
<!-- / 
message --> 

with:
PHP Code:

<!-- message --> 
<
div><if condition="$post[postcount] > 1 and !$bbuserinfo['userid']"
$vbphrase[guest_no_posts
<else /> 
$post[message
</if></
div
<!-- / 
message --> 

then create a customguest_no_posts phrase

thank u for looking for it, but with that code I get a message for every reply given saying "guest can only read first post" so if there are 100 replies I get 100 of those messages :) by each members who replied in the topic.

It would be better to get only 1 message

Emmy2 01-10-2006 12:52 PM

Why are all the quotes (") in the code in the first box coming out as &quot; ????

I actually tried to install this with just copying the code (without looking at it too closely) and nearly sent my server into septic shock! Once I replaced all the &quot; with normal quotes it all worked, but it's very odd it's posted that way, and that no one else has commented on it.

but other than that, I love the concept of this and it's working well on my forum.

D|ver 01-10-2006 01:41 PM

i'm sorry. i used the php tag instead of code
it should be fixed now

YLP1 01-12-2006 01:55 AM

Where in the code do I put the usergroups that I want to get this message?

I ask because I installed it but guests can see all of the topics.

I am fairly new to php and vb (yep, one of those noobe's) so any help is greatly appreciated.

Thanks in advance.

D|ver 01-12-2006 09:08 AM

Quote:

Originally Posted by hollyboy
thank u for looking for it, but with that code I get a message for every reply given saying "guest can only read first post" so if there are 100 replies I get 100 of those messages :) by each members who replied in the topic.

It would be better to get only 1 message

hmm try using this one

postbit legacy
add to the very beginning:
Code:

<if condition="$post[postcount] > 1 and !$bbuserinfo['userid']">
<!-- Start Error Message -->
<if condition="$show['spacer']">
        $spacer_open
        <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
        <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>       
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view the first page of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
        </div>
        $spacer_close
</if>
<!-- End Error Message -->
<else />

and at the end
Code:

</if>

D|ver 01-12-2006 09:12 AM

Quote:

Originally Posted by YLP1
Where in the code do I put the usergroups that I want to get this message?

I ask because I installed it but guests can see all of the topics.

I am fairly new to php and vb (yep, one of those noobe's) so any help is greatly appreciated.

Thanks in advance.

have you replaced the XX in the first two lines of the first template edit with the number of posts shown in a page?
the !$bbuserinfo['userid'] should prevent guests from viewing the posts

Rickie3 01-12-2006 10:07 AM

very handy thanx *installed*

LloydSev 01-19-2006 07:47 PM

Quote:

Originally Posted by D|ver
hmm try using this one

postbit legacy
add to the very beginning:
Code:

<if condition="$post[postcount] > 1 and !$bbuserinfo['userid']">
<!-- Start Error Message -->
<if condition="$show['spacer']">
        $spacer_open
        <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
        <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>       
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view the first page of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
        </div>
        $spacer_close
</if>
<!-- End Error Message -->
<else />

and at the end
Code:

</if>

With that code I also get that error message for every message in the thread.

Rogue_SSEi 02-07-2006 05:46 PM

Anyone intall this on 3.51? I cant seem to get it to work but I guess I will try again after upgrading this week.

Rogue_SSEi 02-07-2006 06:54 PM

Nevermind, I figured it out. I was not using postbit_legacy so I installed this to postbit and it works great. Awesome Mod!

6piston 02-12-2006 04:23 PM

D|ver:

Quote:

With that code I also get that error message for every message in the thread.
same here D|ver bro.
Any ideas? would really appreciate it if there's really a way to limit all replies to 1 error message...

Thanks!
Tom

icare 02-18-2006 09:03 PM

Didint work in my case. I tried in both templetes, ies postbit and post legacy..

It still didnt work. please help

Taylor123 02-24-2006 09:49 AM

didn't work for me neither 3.5.4

Taylor123 02-24-2006 09:56 AM

ok, i got it working in post bit just wouldn't work in legacy

D|ver 03-09-2006 03:45 PM

did you all repleace the XX in the template with the default posts/per page number?

Raydar 03-15-2006 07:50 AM

This seems like an awesome hack. Great Idea.

I am still quite new to VB and Code.

Is it possible to stop guests seeing a thread after the first three posts (sorry for being difficult)?

I just think if the guest sees the convo start a little, he or she would be more inclined to register or login.

Most of my threads don't go past 10 posts. So I'm thinking that having guests only allowed to read the first page of a thread may not really have much of an effect on my forums, which I why I ask about stopping them after the first three posts.

And can we tailor the error message to say that they need to log in or register before they can keep reading the thread?

Sorry for the Noob questions. :bunny:

Thanks

Reggie

nufc fan 03-22-2006 09:13 PM

will this hack have stop spidering as they will only be able to see the first page.

D|ver 03-23-2006 08:24 AM

Quote:

Originally Posted by Reg Car
This seems like an awesome hack. Great Idea.

I am still quite new to VB and Code.

Is it possible to stop guests seeing a thread after the first three posts (sorry for being difficult)?

I just think if the guest sees the convo start a little, he or she would be more inclined to register or login.

Most of my threads don't go past 10 posts. So I'm thinking that having guests only allowed to read the first page of a thread may not really have much of an effect on my forums, which I why I ask about stopping them after the first three posts.

And can we tailor the error message to say that they need to log in or register before they can keep reading the thread?

Sorry for the Noob questions. :bunny:

Thanks

Reggie

hmm, try using this one

add this to the very beginning of your postbit or postbit_legacy
Code:

<if condition="$post[postcount] > 3 and !$bbuserinfo['userid']">
<!-- Start Error Message -->
<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>   
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view 3 posts of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>
<!-- End Error Message -->
<else />

then add to the end of your template
Code:

</if>
but this one will add an error message in each post higher than 3

D|ver 03-23-2006 08:27 AM

Quote:

Originally Posted by nufc fan
will this hack have stop spidering as they will only be able to see the first page.

i don't think so because your archive pages are not affected by this

but if your showthread pages are seo'd you might try to set a "rel=nofollow" tag to each link in the page navigation

Bison 03-27-2006 09:38 PM

My mind tells me that there's more code needed to hide threads beyond the threshold that you'd like guests to see and that it would require hacking the showthread.php. Somehow you will have to check how many posts are currently within a thread and when you reach the number of posts you set, a call to a phrase that prints the error message should be displayed to include a link to the register link.

Rickie3 04-06-2006 05:01 AM

ok i have a problem with this,for some unknown reason its showing the posts after the warning,and the display is all over the place,i have used your code in postbit only,this is what ive put in
Code:

<if condition="$post[postcount] > 10 and !$bbuserinfo['userid']">
<if condition="$post[postcount]%10 == 1">
<!-- Start Error Message -->
<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>   
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view the first page of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>
<!-- End Error Message -->
<else /></if><else />

here is my postbit template
Code:

<if condition="$post[postcount] > 10 and !$bbuserinfo['userid']">
<if condition="$post[postcount]%10 == 1">
<!-- Start Error Message -->
<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>   
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view the first page of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>
<!-- End Error Message -->
<else /></if><else />

<!-- post #$post[postid] -->
<if condition="$show['spacer']">
        $spacer_open
        <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
        <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>       
</if>


<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead" $post[scrolltothis]>
                <div class="normal" style="float:$stylevar[right]">
                        &nbsp;
                        <if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> &nbsp;</if>
                        <if condition="$show['reputationlink']"><a href="#" onclick="reputation($post[postid]); return false;"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> &nbsp;</if>
                        <if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> &nbsp;</if>
                        $post[iplogged]
                        <if condition="$show['inlinemod']">
                        <input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" onclick="inlineMod.toggle(this)" />
                        </if>
                </div>
               
                <div class="normal">
                        <!-- status icon and date -->
                        <a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
                        <if condition="!$show['announcement']">
                                $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
                        <else />
                                <phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
                        </if>
                        $post[firstnewinsert]
                        <!-- / status icon and date -->
                </div>
        </td>
</tr>
<tr>
        <td class="alt2" style="padding:0px">
                <!-- user info -->
                <table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
                <tr>
                        <if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>
                        <td nowrap="nowrap">
                       
                                <!-- vbPlaza start -->
<div id="postmenu_$post[postid]" <if condition="$post['namestyle']">style="$post[namestyle]"</if>>
<!-- vbPlaza end --></if>
                                        <if condition="$show['profile']">
                                        <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>

                                        $post[onlinestatus]
                                        <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
                                        <else />
                                        $post[musername]
                                        </if>
                                </div>
                               
                                <!-- vbPlaza start -->
<if condition="$post['usertitle']"><div class="smallfont" <if condition="$post['titlestyle']">style="$post[titlestyle]"</if>>$post[usertitle]</div></if>
<!-- vbPlaza end -->
<if condition="$show['zodiacsign']">
<div class="smallfont">$zodiacsign</div>
</if>
                                <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
$post[crowns]<br>$post[champtext]
                               
                        </td>


                        <td width="100%">&nbsp;$post[petz]</td>
                        <td valign="top" nowrap="nowrap">
                                <if condition="$post['styleid'] != 0"><div class="smallfont">Style: <a href="{$GLOBALS[vbulletin]->scriptpath}&styleid=$post[styleid]">$post[styletitle]</a></div></if>
                                <div class="smallfont">
                                        <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                                        <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                                        <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                                        <div>
                                                $vbphrase[posts]: $post[posts]<br />
<!-- vbPlaza start -->
<if condition="$vboptions['vbbux_enabled']"><br />
$vbphrase[vbbux_points]: $post[points]<br />
$vbphrase[vbbux_bank]: $post[bank]<br />
<phrase 1="$vbphrase[vbbux_points]">$vbphrase[vbbux_total_points]</phrase>: $post[totalpoints]<br />
<a href="vbplaza.php?do=donate&amp;userid=$post[userid]">$vbphrase[vbplaza_donate]</a><br />
</if>
<!-- vbPlaza end -->

<if condition="$post[field9] != ''"><div>
                                        Gender: <img src="images/gender/$post[field9].gif" title="$post[fieldX]" align="center">
                                </div></if>




<!-- Start Post Thank You Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_thanks_thanks]: $post[post_thanks_user_amount]
<br />
<if condition="$post[post_thanks_thanked_times] == 1">
$vbphrase[post_thanks_time_post]
<else />
<if condition="$post[post_thanks_thanked_posts] == 1">
<phrase 1="$post[post_thanks_thanked_times]">$vbphrase[post_thanks_times_post]</phrase>
<else />
<phrase 1="$post[post_thanks_thanked_times]" 2="$post[post_thanks_thanked_posts]">$vbphrase[post_thanks_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Thank You Hack -->
<!-- Start Post Groan Hack -->
<if condition="$post[userid]">
<br />
$vbphrase[post_groan_groans]: $post[post_groan_user_amount]
<br />
<if condition="$post[post_groan_times_on] == 1">
$vbphrase[post_groan_time_post]
<else />
<if condition="$post[post_groan_posts_on] == 1">
<phrase 1="$post[post_groan_times]">$vbphrase[post_groan_times_post]</phrase>
<else />
<phrase 1="$post[post_groan_times]" 2="$post[post_groan_posts]">$vbphrase[post_groan_times_posts]</phrase>
</if>
</if>
</if>
<!-- End Post Groan Hack -->
                                        </div>
<div>
                                        <strong>Time spent on Forum:</strong><br />  $post[timeonboard]
                                </div>

        <if condition="$post[field6] != ''"><div>
                                        Country: <img src="images/flags/$post[field6].gif" title="$post[field6]" align="center">
                                </div></if>
<if condition="$post[field10] != ''"><div>
                                        State: <img src="images/state/$post[field10].gif" title="$post[field10]" align="center">
                                </div></if>


                                        <if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if>
                                        <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon]</div>
<!-- vbPlaza start -->
                                <if condition="$post['giftsdisplay']"><div class="smallfont">$post[giftsdisplay]</div></if>
                                <if condition="$post['ribbonsdisplay']"><div class="smallfont">$post[ribbonsdisplay]</div></if>
<!-- vbPlaza end -->
                                </div>
                                <!-- mood hack display start -->
                                <br /><if condition="$post[field8] != ''"><div class="smallfont">
                                Current Mood: <img src="images/mood/$post[field8].gif" title="$post[field8]" align="center">
                                </div></if>
                                <!-- mood hack display end -->

                        </td>
                </tr>
                </table>
                <!-- / user info -->
        </td>
</tr>
<tr>
        <td class="alt1" id="td_post_$post[postid]">
        <!-- message, attachments, sig -->
       
                <if condition="$show['messageicon'] OR $post['title']">
                        <!-- icon and title -->
                        <div class="smallfont">
                                <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
                                <if condition="$post['title']"><strong>$post[title]</strong></if>
                        </div>
                        <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                        <!-- / icon and title -->
                </if>
               
                <!-- message -->
                <div id="post_message_$post[postid]">$post[message]</div>
                <!-- / message -->
       
                <if condition="$show['attachments']">
                <!-- attachments -->
                        <div style="padding:$stylevar[cellpadding]px">
                       
                        <if condition="$show['thumbnailattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_thumbnails]</legend>
                                        <div style="padding:$stylevar[formspacer]px">
                                        $post[thumbnailattachments]
                                        </div>
                                </fieldset>
                        </if>
               
                        <if condition="$show['imageattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_images]</legend>
                                        <div style="padding:$stylevar[formspacer]px">
                                        $post[imageattachments]
                                        </div>
                                </fieldset>
                        </if>
                       
                        <if condition="$show['imageattachmentlink']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_images]</legend>
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                        $post[imageattachmentlinks]
                                        </table>
                                        </fieldset>
                        </if>
                       
                        <if condition="$show['otherattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attached_files]</legend>
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                        $post[otherattachments]
                                        </table>
                                </fieldset>
                        </if>
                       
                        <if condition="$show['moderatedattachment']">
                                <fieldset class="fieldset">
                                        <legend>$vbphrase[attachments_pending_approval]</legend>
                                        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                                        $post[moderatedattachments]
                                        </table>
                                </fieldset>               
                        </if>
                       
                        </div>
                <!-- / attachments -->
                </if>
               
                <if condition="$post['signature']">
                <!-- sig -->
                        <div>
                                __________________<br />
                                $post[signature]
                        </div>
                <!-- / sig -->
                </if>
               
                <if condition="$show['postedited']">
                <!-- edit note -->
                        <div class="smallfont">                        <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
                                <em>
                                <phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
                                <if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
                                </em>
                        </div>
                <!-- / edit note -->
                </if>
       
                <div align="$stylevar[right]">
                        <!-- controls -->
<!-- Start Post Groan Hack -->
$post_groan_button
<!-- End Post Groan Hack -->
<if condition="$show['pmlink']"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" target="_blank" rel="nofollow"><img src="$stylevar[imgdir_button]/sendpm.gif" alt="sendpm.gif" title="<phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase>" border="0" /></a></if>

<!-- Start Post Thank You Hack -->
$post_thanks_button
<!-- End Post Thank You Hack -->

                        <if condition="$post['editlink']">
                                <a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
                        </if>
                        <if condition="$post['forwardlink']">
                                <a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
                        </if>
                        <if condition="$post['replylink']">
                                <a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
                        </if>
                        <if condition="$show['quickreply'] AND !$show['threadedmode']">
                                <a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
                        </if>
                        <if condition="$show['moderated']">
                                <img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
                        </if>
                        <!-- / controls -->
                </div>
               
        <!-- message, attachments, sig -->
       
        </td>
</tr>
</table>

<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
        <table cellpadding="4" cellspacing="1" border="0">
        <tr>
                <td class="thead">$post[username]</td>
        </tr>
        <if condition="$show['profile']">
                <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
        </if>
        <if condition="$show['pmlink']">
                <tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
        </if>
        <if condition="$show['emaillink']">
                <tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
        </if>
        <if condition="$show['homepage']">
                <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
        </if>
        <if condition="$show['search']">
                <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr>
        </if>
        <if condition="$post['userid'] AND $show['member']">
        <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
        </if>
        </table>
</div>
<!-- / post $post[postid] popup menu -->




<if condition="$show['spacer']">
        </div>
        $spacer_close
</if>
<!-- / post #$post[postid] -->
<!-- Start Post Groan Hack -->
$post_groan
<!-- End Post Groan Hack -->
<!-- Start Post Thank You Hack -->
$post_thanks
<!-- End Post Thank You Hack -->
</if>

this is happening in all browsers
i have supplied a screenshot with what i mean,any help appreciated,

Lea Verou 04-08-2006 08:21 AM

I think they will be able to see the other pages via printthread or archive. At least that was the problem with a hack I had made for that purpose.

amykhar 06-01-2006 05:28 PM

For the guy who wanted one error message to show after post 3, I have NOT tested this and do not know if it will work, but you could try this:

Code:

<if condition="$post[postcount] > 4 and !$bbuserinfo['userid']">
<else />

<if condition="$post[postcount] > 3 and !$bbuserinfo['userid']">
<!-- Start Error Message -->
<if condition="$show['spacer']">
    $spacer_open
    <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>   
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr><td class="alt1" id="td_post_$post[postid]">
<div><b>Guests may only view 3 posts of a thread. You need to register to get full access. <a href="register.php" rel="nofollow">Click here to register.</a>
</b></div>
</td></tr>
</table>
<if condition="$show['spacer']">
    </div>
    $spacer_close
</if>
<!-- End Error Message -->
<else />

You'll need an extra </if> at the end of the postbit though.

karlm 07-28-2006 02:59 AM

Works for me on 3.5.4 test board... :)

mano1.com 07-29-2006 01:34 PM

*install*

thanks

Jim O 07-30-2006 01:59 AM

FWIW, it works in 3.6 RC3 (no real surprise there). Installed.

karlm 08-18-2006 03:39 AM

working also on 3.6 gold...

AndyA 08-24-2006 08:29 AM

Using the code as shown in the original mod post, does this still create an error for each post ? I'd like to clarify that before I install. :confused:

Thanks
Andy

AndyA 08-25-2006 02:06 PM

Anyone ?

dxguru 11-15-2006 06:53 AM

Does anyone have a solution to the printthread.php issue? This hack can simply be bypassed by using the printthread script.

dxguru 11-15-2006 09:29 AM

Actually, don't worry. I've fixed it mayself.

For those interested ...

printthread.php needs to be changed first -
Find:
PHP Code:

$postbits '';
while (
$post $db->fetch_array($posts))


and Replace with:
PHP Code:

//PostCounter
    
$postcount = ($vbulletin->GPC['pagenumber'] - ) * $vbulletin->GPC['perpage'];
    if (
$postorder)
    { 
// Newest first
        
if ($totalposts $postcount $vbulletin->GPC['perpage'])
        {
            
$postcount $totalposts $postcount 1;
        }
        else
        {
            
$postcount $totalposts $postcount 1;
        }
    }
    
$counter 0;
// PostCounter

$postbits '';
while (
$post $db->fetch_array($posts))
{
// PostCounter
            
if ($counter >= $vbulletin->GPC['perpage'])
            {
                break;
            }
            ++
$counter;
            if (
$postorder)
            {
                
$post['postcount'] = --$postcount;
            }
            else
            {
                
$post['postcount'] = ++$postcount;
            }
// PostCounter 

Then make the same changes to template 'printthreadbit' as you do in 'postbit/legacy'

bigfraggle 04-14-2008 09:12 PM

Does this hack works with vB 3.7?


All times are GMT. The time now is 05:49 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.01683 seconds
  • Memory Usage 1,992KB
  • 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
  • (11)bbcode_code_printable
  • (6)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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