vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBgarage (https://vborg.vbsupport.ru/forumdisplay.php?f=104)
-   -   Stopping Guests from using vBGarage (https://vborg.vbsupport.ru/showthread.php?t=75024)

noppid 01-24-2005 05:59 PM

Stopping Guests from using vBGarage
 
If you run a board where only members should be allowed to access vBGarage, you can add this code to lock out all guests.

Please note that if you use the "Display Latest Uploads on Forum Home" hack, this will cause a problem, Images will be displayed as the dreaded Red X.

If you want to use this, in vbgarage.php find...
PHP Code:

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// ####################################################################### 

Below that add...
PHP Code:

// Stop guests hack
if (!$bbuserinfo['userid'])
{
    
print_no_permission();
}
// end stop guests hack 


Zachery 01-24-2005 08:08 PM

Why not use

PHP Code:

// Stop guests hack 
if (!$bbuserinfo['userid'] AND THIS_SCRIPT != 'index'

print_no_permission(); 

// end stop guests hack 

?

noppid 01-24-2005 08:25 PM

I just gave that a try as it looks like a good idea and I'm all for improvement. However I tried it and did not get the desired result. I'll have to experiment after I put the kids to bed later.

oops, I see and edit... I'll try again later. Dinners on.

Zachery 01-24-2005 08:37 PM

Quote:

Originally Posted by noppid
I just gave that a try as it looks like a good idea and I'm all for improvement. However I tried it and did not get the desired result. I'll have to experiment after I put the kids to bed later.

oops, I see and edit... I'll try again later. Dinners on.

hmm, now that I think about it it might not work because you are defining it in vbgarage.php. So we just need check the referer no?

noppid 01-24-2005 08:46 PM

Quote:

Originally Posted by Zachery
hmm, now that I think about it it might not work because you are defining it in vbgarage.php. So we just need check the referer no?

I've been wrestling with this in two ways really releated to THIS_SCRIPT. First I've been trying to stop the online locations from saying a user is in the garage when they are really on forumhome and now this.


All times are GMT. The time now is 08:39 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.01359 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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