Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2006, 02:48 PM
hidjra hidjra is offline
 
Join Date: Jan 2002
Location: Amsterdam
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default cookies AND session on nonvb site without including global.php

Hi,

I don't if this is the right forum. If it's not, i apologize and please move to the right/apropriate forum.

Im setting up a website (on the same domain [subdomain]) outside the forum directory and i want to share cookies and sessions BUT without including the vB global.php file.

I don't like the idea of including the global.php because there is to much complexity in the vB functions/classes structures that i don't really need. I want to eliminate any overhead by just sharing the sessions and the cookies. Anyone tried this before?

Do i need really to code a custom sessions.php or is there something i can do with the vB API's

I really need this, please please please, any help is appreciated.

Grtz,
Hidjra
Reply With Quote
  #2  
Old 03-04-2006, 12:03 AM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'll probably need quite a few files regardless of including global.php.

The minimum would be class_core.php, and initialise at least vB_Session. (which will probably need the database class as well as the registry class)
Reply With Quote
  #3  
Old 03-07-2006, 08:21 PM
hidjra hidjra is offline
 
Join Date: Jan 2002
Location: Amsterdam
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merk
You'll probably need quite a few files regardless of including global.php.

The minimum would be class_core.php, and initialise at least vB_Session. (which will probably need the database class as well as the registry class)
I'm not an advanced coder so i don't even know where to start. Has anyone done this before or maybe an existing hack that has some similarity?

Grtz,
Hidjra
Reply With Quote
  #4  
Old 03-07-2006, 09:05 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IF you're not an advanced coder, the best (and really only solution) will be to include global.php

Doing it any other way is quite a hard road.
Reply With Quote
  #5  
Old 03-07-2006, 09:09 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mean by "share the cookies and sessions", what exactly is it you want to do ?
Reply With Quote
  #6  
Old 03-07-2006, 09:24 PM
hidjra hidjra is offline
 
Join Date: Jan 2002
Location: Amsterdam
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
What do you mean by "share the cookies and sessions", what exactly is it you want to do ?
We have different websites on the same domain, and because our forum has over 90.000 members we want members to be able to browse all the websites by using there vb username and password.

So basicly i'm trying to include the vb userinfo in a nonvb environment. I want members to be able to login to vb without leaving the nonvb page and to stay logged in while browsing outside of vb. We also want people browsing on nonvb pages to be counted in the loggedin users thingy.

Any help is appreciated

Grtz,
Hidjra
Reply With Quote
  #7  
Old 03-10-2006, 11:43 AM
hidjra hidjra is offline
 
Join Date: Jan 2002
Location: Amsterdam
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No one any ideas?
Reply With Quote
  #8  
Old 04-03-2006, 10:11 PM
therczone therczone is offline
 
Join Date: Sep 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm looking for this too. I want to restrict guest access to non-vB pages of my site. For example, I want them to be redirected to the forum login page if they are not logged in and want to view my glossary.

I don't want to include global.php, because it contains a lot of code (and includes other files) that I do not need.

I'll probably end up hacking global.php to bits and pieces to get only the vital code, but thought I'd check here first.
Reply With Quote
  #9  
Old 04-04-2006, 02:18 AM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hidjra
No one any ideas?
When you say "different" sites on your domain do you mean something like "SiteA.domain.com", "SiteB.domain.com" and "SiteC.domain.com"? (All sites point to the same domain)

In vB options, how did you set your Cookie domain?

Quote:
Originally Posted by therczone
I'm looking for this too. I want to restrict guest access to non-vB pages of my site. For example, I want them to be redirected to the forum login page if they are not logged in and want to view my glossary.
I could be off the mark but maybe something like this:

Code:
<?php
    if (!$vbulletin->userinfo['userid'])
    {
          header("Location: http://www.whatever_page.com/");
          exit;
    }
?>
Reply With Quote
  #10  
Old 04-04-2006, 08:43 AM
hidjra hidjra is offline
 
Join Date: Jan 2002
Location: Amsterdam
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Freesteyelz
When you say "different" sites on your domain do you mean something like "SiteA.domain.com", "SiteB.domain.com" and "SiteC.domain.com"? (All sites point to the same domain)

In vB options, how did you set your Cookie domain?
Yes, that's what i mean. The cookie domain is .domain.com

The cookies are all working without any problems.

Grtz,
Hidjra
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:01 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.04878 seconds
  • Memory Usage 2,257KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete