vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Restricted forum problem (involving the Search) (https://vborg.vbsupport.ru/showthread.php?t=45255)

mindbuster 10-31-2002 03:58 PM

Restricted forum problem (involving the Search)
 
Hi.

I have placed this piece of code on line 63 in forumdisplay.php

PHP Code:

if ($bbuserinfo[posts]<AND $forumid==19) {show_nopermission();exit;} 

to deny access for forum guests and members with less than 5 posts.
It works fine except that if a guest uses the search function, threads in that forum shows up too and they can just click one of the search results to get access to the forum.

How do i prevent that?

Xenon 10-31-2002 04:03 PM

well you can add
PHP Code:

if ($bbuserinfo[posts]<AND $threadinfo[forumid]==19) {show_nopermission();exit;} 

to showthread.php

but user can always see posts in the searchengine.
functions to completly secure vb forums through postcounter isn't so easy, because you have to edit more file.

vb3 will have this feature as a built in

mindbuster 10-31-2002 04:12 PM

Ahh, thanks, that makes it even better, the forum is a "sign up and make some posts to get access to the goods" forum, all can see the forum is there but not all can access it, it's only for the good that the threads show up in a search as long as they cant be accessed.

But, umm, where in showthread.php do i include the line. :lick:

Xenon 10-31-2002 04:18 PM

i'd put it after this:
PHP Code:

$forum=getforuminfo($thread['forumid']);

$getperms=getpermissions($thread['forumid'],-1,-1,$forum['parentlist']);
if (!
$getperms['canview']) {
  
show_nopermission();
}
if (!
$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
  
show_nopermission();



mindbuster 10-31-2002 04:44 PM

Hmm, didnt work, and i did log out first.

I placed the line where you mentioned.

NTLDR 10-31-2002 04:57 PM

Use $thread[forumid] and not $threadinfo[forumid] ;)

mindbuster 10-31-2002 05:20 PM

Just tried that too NTLDR, didnt work either.

Erwin 10-31-2002 05:46 PM

Mmm... are you sure... it should work... Try placing the code ABOVE that piece of code Xenon told you to find.

mindbuster 10-31-2002 06:15 PM

Nope, didnt work either Erwin.


All times are GMT. The time now is 05:10 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.01288 seconds
  • Memory Usage 1,727KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete