Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Disallow guests to view threads, must register first Details »»
Disallow guests to view threads, must register first
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-06-2004 Last Update: Never Installs: 89
 
No support by the author.

Yes I know that there is already a a feature to stop guests from viewing threads, but then this also shows all the posts and threads counters to zero, and under Last Post it will say never (which sucks ). But, with my hack, it just asks guests to either login or register when viewing a thread and still shows all the right numbers

Instructions

Open archive/index.php and find
PHP Code:
    $title .= ' - ' $foruminfo['title'];
}
else
{
    
$do 'index';

Below, add
PHP Code:
if ($bbuserinfo['userid'] == AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si"$_SERVER['HTTP_USER_AGENT'])) 

    
print_no_permission(); 

Open showthread.php and find
PHP Code:
globalize($_REQUEST, array('perpage' => INT'pagenumber''highlight' => STR'goto')); 
Below, add:
PHP Code:
if ($bbuserinfo['userid'] == AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si"$_SERVER['HTTP_USER_AGENT']))
{
    
print_no_permission();

Open template threadbit and find:
PHP Code:
<td class="alt1Active" id="t$thread[threadid]title="$thread[preview]"
Replace it with
PHP Code:
<td class="alt1Active" id="t$thread[threadid]<if condition="$show['member']">title="$thread[preview]"</if>> 
Done!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #182  
Old 12-09-2005, 08:41 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this a good idea to install this hack? Do you think it'll get me more members?
Reply With Quote
  #183  
Old 12-09-2005, 05:26 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 99SIVTEC
and how is this a feature in the system already? The stock system doesn't allow search engine spiders while blocking guests.
Thats content cloaking and a big no no. (This can get you black listed from sites like google and yahoo).

The Default vB system allows you to disallow users from viewing the thread content but see the titles etc.
Reply With Quote
  #184  
Old 12-09-2005, 05:26 PM
Zachery's Avatar
Zachery Zachery is offline
 
Join Date: Jul 2002
Location: Ontario, Canada
Posts: 11,440
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Aftermath
Is this a good idea to install this hack? Do you think it'll get me more members?
If your using the 3.5 you already have it built in.

Can view forum > Yes
Can View Others Threads > Yes
Can view thread content > No
Reply With Quote
  #185  
Old 12-09-2005, 07:45 PM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, and good luck getting caught doing it. Myspace does the same thing as do other very large websites. You are highly unlikely to get penalized for something like this. Cloaking infers that you are showing DIFFERENT content to a search engine than a regular user. This isn't the case. The two see the exact same info they just must be registered to view it. Thus this is not cloaking. Do some research on the subject (I know quite a bit about the subject as I have built ip based cloaking system for sites in the past)

Quote:
Originally Posted by Zachery
Thats content cloaking and a big no no. (This can get you black listed from sites like google and yahoo).

The Default vB system allows you to disallow users from viewing the thread content but see the titles etc.
Reply With Quote
  #186  
Old 12-14-2005, 01:03 AM
Justice's Avatar
Justice Justice is offline
 
Join Date: Oct 2001
Location: New Orleans
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm very interested in this topic... not so much the arguing, but the tangible differences between this hack and the built-in method.

Also, was this a built-in feature in 3.0 or was it just added in 3.5? I don't recall vbulletin always having this.
Reply With Quote
  #187  
Old 12-14-2005, 01:58 AM
99SIVTEC 99SIVTEC is offline
 
Join Date: Nov 2001
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THIS is NOT a built in feature.
Reply With Quote
  #188  
Old 12-14-2005, 02:52 AM
Justice's Avatar
Justice Justice is offline
 
Join Date: Oct 2001
Location: New Orleans
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I didn't think so, but I haven't installed 3.5 yet. *shrug*
Reply With Quote
  #189  
Old 12-28-2005, 01:02 AM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Onkel_Tom
As I wrote one post before my code is working for all vB 3 Versions right now. I using vB3.0.3 on my Boards too and it works.

Your find the instruction of the Hack in the first post. I only changed some parts for better fitting on my own wishes, so I posted my code which is working for the most recent search engines.

This code can be placed in /archive/index.php to allow search engines which are written in the code to index this pages.

If you want to use my code instead of Gary W's code for the archive just replace in /archive/index.php:
Code:
if ($bbuserinfo['userid'] == 0 AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si", $_SERVER['HTTP_USER_AGENT'])) 
{ 
    print_no_permission(); 
}
With my code:
Code:
$grouparray = array ( 3,4); 
if (in_array($bbuserinfo['usergroupid'],$grouparray) OR $bbuserinfo['userid'] == 0 AND !preg_match("#(google|slurp@inktomi|yahoo! slurp|lycos|ask jeeves|scooter|fast-webcrawler|turntinbot|msnbot|webcrawler|Infoseek|W3C_Val|googlebot)#si", $_SERVER['HTTP_USER_AGENT']))
{ 
	  echo "<center><font face=verdana, arial, helvetica size=3>You are not allowed to show our archive.<br><br>Your have to <a href=\"$vboptions[bburl]/register.php?\">register</a> first at $vboptions[bbtitle] to show threads in our forums.<br><br>If you are registered at our forum it could be that you are not logged in our your account must first be checked and enabled from an Administrator.</font></center>\n<hr />\n";
	 
    print_no_permission(); 
}
You can add or remove search engines by editing this line:
Code:
!preg_match("#(google|slurp@inktomi|yahoo! slurp|lycos|ask jeeves|scooter|fast-webcrawler|turntinbot|msnbot|webcrawler|Infoseek|W3C_Val|googlebot)#si",
for each new spider add his user agent identification to the line with a "|" between like "spider1|spider2|spider3"

The echo syntax is only for index.php of archive because if you use this code and a unauthorised person will access the archive only a white page is shown. Therefore I added the echo information to the screen to show "what is wrong".

I used the "$grouparray = array ( 3,4); " function to define my usergroups which are not allowed to access the archive. You can put here any usergroup ID you want not to access your archive separated by ",". Usergroup 8 and 11 are defined groups from my board, just remove that both group ID's.

I hope I could help and the instructions are easy to understand
Thanks for that, works great to stop other usergroups awaiting email. But there is still one problem you might know the answer to. If you logon to an account you create that needs email validation. You can still hover over thread titles on your board and read the full THREAD PREVIEW as a member waiting email validation.

Which defeats the whole object if they can read the thread that way
Reply With Quote
  #190  
Old 12-28-2005, 03:07 AM
MRGTB MRGTB is offline
 
Join Date: Dec 2004
Posts: 548
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've spotted a problem with this. Even if you protect the Archive and threads from being viewed on the forum board.

They can still view them via the printthread.php link instead to bypass the permissions as a guest and still view the full thread as a printable thread version. By simply replacing the showthread name in the link they want to view with "printthread" instead. This can be done manually quite easy to view all threads as printable versions.

Does anybody know how to use the same method to stop certain usergroups from accessing the printthread page?

EDIT:

Fixed it now for printthread.

Find:
Code:
globalize($_REQUEST, array('perpage' => INT, 'pagenumber' => INT));
below it put:
Code:
$grouparray = array ( 3,4); 
if (in_array($bbuserinfo['usergroupid'],$grouparray) OR $bbuserinfo['userid'] == 0 AND !preg_match("#(google|slurp@inktomi|yahoo! slurp|lycos|ask jeeves|scooter|fast-webcrawler|turntinbot|msnbot|webcrawler|Infoseek|W3C_Val|googlebot)#si", $_SERVER['HTTP_USER_AGENT']))
{  
    print_no_permission();  
}
Reply With Quote
  #191  
Old 12-28-2005, 02:20 PM
Snoop-It's Avatar
Snoop-It Snoop-It is offline
 
Join Date: Jun 2005
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zachery
If your using the 3.5 you already have it built in.

Can view forum > Yes
Can View Others Threads > Yes
Can view thread content > No
that does not work with 3.5.x

it makes no difference what so ever. guests can still view thread content. iv had that option on since 3.5.0 was released even now i still have it on 3.5.2 and guests still can view the posts.

if i edit the files that is explained on here would it work with 3.5.x ?? :ermm:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:54 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.04971 seconds
  • Memory Usage 2,332KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (6)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete