![]() |
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']"> Code:
</if> its my first release to please be kind ;) |
great hack! keep up the good work
|
Yeah well done!
|
*installed*
|
Does this have an effect on the Google adsense bot's that are scanning your threads?
|
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 |
It would be interesting to have the same hack that does the same but for the first post
|
Quote:
in postbit_legacy replace: PHP Code:
PHP Code:
|
Quote:
It would be better to get only 1 message |
Why are all the quotes (") in the code in the first box coming out as " ????
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 " 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. |
i'm sorry. i used the php tag instead of code
it should be fixed now |
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. |
Quote:
postbit legacy add to the very beginning: Code:
<if condition="$post[postcount] > 1 and !$bbuserinfo['userid']"> Code:
</if> |
Quote:
the !$bbuserinfo['userid'] should prevent guests from viewing the posts |
very handy thanx *installed*
|
Quote:
|
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.
|
Nevermind, I figured it out. I was not using postbit_legacy so I installed this to postbit and it works great. Awesome Mod!
|
D|ver:
Quote:
Any ideas? would really appreciate it if there's really a way to limit all replies to 1 error message... Thanks! Tom |
Didint work in my case. I tried in both templetes, ies postbit and post legacy..
It still didnt work. please help |
didn't work for me neither 3.5.4
|
ok, i got it working in post bit just wouldn't work in legacy
|
did you all repleace the XX in the template with the default posts/per page number?
|
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 |
will this hack have stop spidering as they will only be able to see the first page.
|
Quote:
add this to the very beginning of your postbit or postbit_legacy Code:
<if condition="$post[postcount] > 3 and !$bbuserinfo['userid']"> Code:
</if> |
Quote:
but if your showthread pages are seo'd you might try to set a "rel=nofollow" tag to each link in the page navigation |
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.
|
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']"> Code:
<if condition="$post[postcount] > 10 and !$bbuserinfo['userid']"> i have supplied a screenshot with what i mean,any help appreciated, |
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.
|
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']"> |
Works for me on 3.5.4 test board... :)
|
*install*
thanks |
FWIW, it works in 3.6 RC3 (no real surprise there). Installed.
|
working also on 3.6 gold...
|
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 |
Anyone ?
|
Does anyone have a solution to the printthread.php issue? This hack can simply be bypassed by using the printthread script.
|
Actually, don't worry. I've fixed it mayself.
For those interested ... printthread.php needs to be changed first - Find: PHP Code:
PHP Code:
|
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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|