The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Disallow guests to view threads, must register first Details »» | |||||||||||||||||||||||||||
Disallow guests to view threads, must register first
Developer Last Online: Jun 2020
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:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Show Your Support
|
Comments |
#132
|
|||
|
|||
Anyone knows how get this work with 3.0.1?
(Showthread.php does not containt this code: Code:
globalize($_REQUEST, array('perpage' => INT, 'pagenumber', 'highlight' => STR, 'goto')); |
#133
|
|||
|
|||
Quote:
If anyone can find a fix, please post it!!! Thanks in advance. This is a very useful hack. I don't know why this feature is not default in vB3. Plain s2pid!!!!!!!!! |
#134
|
|||
|
|||
Google for some reason has stop indexing my site after I blocked the archives from being viewed by non members. The purpose of the archive is has nothing to do with archiving but instead it's work around to make vb3 search-engine-friendly. So the solution would be to uninstall the hack from archive and remove the archive link in the footer?
|
#135
|
||||
|
||||
Quote:
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(); } For my Board Google is idexing all threads in archive and it works great |
#136
|
|||
|
|||
Quote:
|
#137
|
||||
|
||||
Quote:
$bbuserinfo, $usergroupid and print_no_permission() is the same for vB3 in all Versions right now. |
#138
|
|||
|
|||
Hi Onkel Tom,
Does it work with 3.0.3 ? I have tried Gary W's code but unfortunately it works for all usergroups (don't know why???) not just guest/not logged in, so if you could post the instruction from scratch for all the files, it would really help me. I think I'm in the same boat with IndyWebDesign. Quote:
|
#139
|
||||
|
||||
Quote:
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(); } 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(); } Code:
!preg_match("#(google|slurp@inktomi|yahoo! slurp|lycos|ask jeeves|scooter|fast-webcrawler|turntinbot|msnbot|webcrawler|Infoseek|W3C_Val|googlebot)#si", 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 |
#140
|
|||
|
|||
Very cool, I will try this. Thanks a lot man!!!
|
#141
|
|||
|
|||
Tried it, looks great! Many thanks to you....
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|