vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Disallow guests to view threads, must register first (https://vborg.vbsupport.ru/showthread.php?t=59859)

WreckRman2 04-01-2004 08:32 PM

Hmm, for some reason that didn't work... should it be AND $forumid == X OR $forumid == X OR $forumid == X OR $forumid == X OR $forumid == X OR $forumid == X ???

Code:

if ($bbuserinfo['userid'] == 0 AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si", $_SERVER['HTTP_USER_AGENT']) AND $forumid == 78 AND $forumid == 111 AND $forumid == 108 AND $forumid == 141 AND $forumid == 110 AND $forumid == 129 AND $forumid == 109 AND $forumid == 112 AND $forumid == 150 AND $forumid == 151 AND $forumid == 152 AND $forumid == 153 AND $forumid == 154 AND $forumid == 155 AND $forumid == 156 AND $forumid == 157)
{
    print_no_permission();
}


WreckRman2 04-01-2004 08:34 PM

Yep that was it... I changed the AND to OR and it works now. Thanks!

sabret00the 04-01-2004 08:37 PM

Quote:

Originally Posted by Gary W
I think I posted this before I knew there was a mini-mod forum anyways :)

2 questions, how would i go about only applying this to certain forums and also making sure that those threads are also unaccessible via the archive?

sabret00the 04-01-2004 08:38 PM

Quote:

Originally Posted by Gary W
Use this code, replacing X with whatever forumid you want to block to guests:
PHP Code:

if ($bbuserinfo['userid'] == AND !preg_match("#(google|slurp@inktomi|yahoo! slurp)#si"$_SERVER['HTTP_USER_AGENT']) AND $forumid == X

    
print_no_permission(); 



that's one question answered :)

sabret00the 04-01-2004 08:41 PM

i thought of another question is this/can this be used to just "override the visiable but must be registered to view threads" option or is it all hardcoded?

the reason i ask is because i don't want unactive usergroups viewing the threads either.

WreckRman2 04-01-2004 08:48 PM

Well the above worked great to tell a guest they needed to login but when I'm logged in even as an admin I get the error:

you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

NeoBlu 04-08-2004 07:55 PM

Great Hack. Thx

Pigs 04-15-2004 05:43 AM

Great Hack Gary,
I have a question. With non apache servers the archive is disabled. What is the implecation with this and spiders.

Gary King 04-16-2004 11:19 AM

Quote:

Originally Posted by Pigs
Great Hack Gary,
I have a question. With non apache servers the archive is disabled. What is the implecation with this and spiders.

It should still be working fine, because this hack has nothing to do with the archive, really :)

Pigs 04-16-2004 09:31 PM

Quote:

Originally Posted by Gary W
It should still be working fine, because this hack has nothing to do with the archive, really :)

I understand your comment however if running and IIS setup with no archive ability then aren't spiders unable to index the site?

I probably worded it wrongly.

The hack by the way works perfectly. It should be the default setup IMHO.

Cheers.


All times are GMT. The time now is 03:28 AM.

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.01232 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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