vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Sitewide use of VB permissions (https://vborg.vbsupport.ru/showthread.php?t=58762)

MkJnr 11-22-2003 09:37 PM

Sitewide use of VB permissions
 
Had a quick browse round these forums and what I gather is that to use the VB member permissions etc throughout your site you would just have to include external.php into your page. Do you then have to write your own queries to use that or is there a way to access the existing functions?

e.g. How would you check that someone is in the usergroup which is allowed to access a certain page? Or could you allow someone to login from a non forum page?

Thanks in advance,

Mark

Xenon 11-23-2003 10:56 AM

all you need is to import global.php, with that file you can use the complete permission system of vb :)

MkJnr 11-23-2003 06:33 PM

I tried to import it like so from my file:

Quote:

chdir("$DOCUMENT_ROOT/forum/");
require_once("./global.php");
But then it comes with this error:

Quote:

Warning: main(./includes/init.php): failed to open stream: No such file or directory in <.Dir to forum folder>/global.php on line 18

Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <.Dir to forum folder>/global.php on line 18

insanctus 11-23-2003 08:58 PM

chdir('./../forum/');
require_once('./global.php');

Try that..

wce 12-08-2005 03:43 PM

I tried this including global.php, and it works to get the cookie data of the user, but it doesn't seem to be updating the session to keep users logged in when they're on non-vb pages.... so when they go back to the forum, if its been longer than the cookie timeout, they're no longer logged into the forums.... any ideas?

Andreas 12-08-2005 03:47 PM

That's expected behaviour if they don't have userid/password cookies.
There is no way around this, except increasing cookie timeout :)

wce 12-08-2005 03:53 PM

they would have userid and password cookies wouldn't they? Well, not individual cookies but doesn't the vb cookie store the userid and the password? theres no way to update the cookie to keep them 'active'? even if it's a code snippet or something that I need to throw into my non-vb pages, i'd be glad to do it if I could figure out where in VB it updates the cookie to keep the user active :)


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