vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Site Integration with VB3 (https://vborg.vbsupport.ru/showthread.php?t=73506)

MuratCetin 12-30-2004 12:07 PM

Site Integration with VB3
 
Hi,

I want some help for integration of vbulletin and my own codes.

Firstly, I must use the $bbuserinfo[] variable on my portal site. I just tried to read user informations from cookie and also db but it doesn't work. My codes are like this:

PHP Code:

$cookie_userid $_COOKIE[$cookieprefix.'userid']; //vbulletin3 userid
$cookie_password $_COOKIE[$cookieprefix.'password']; //vbulletin3 password
$bbuserinfo $db->query_first("SELECT * FROM ".$tableprefix."user WHERE userid = '$cookie_userid' and password = '$cookie_password'"); // $bbuserinfo variable for my portal 

I know to include all vbulletin variables from global.php to my page but I don't want to do this. Is there any way to use $bbuserinfo variable without include global.php?

Thank you so much for your answers.

Zachery 12-30-2004 12:10 PM

Quote:

Originally Posted by MuratCetin
Hi,

I want to help for integration of vbulletin and my own codes.

Firstly, I must use the $bbuserinfo[] variable on my portal site. I just tried to read user informations from cookie and also db but it doesn't work. My codes are like this:

PHP Code:

$cookie_userid $_COOKIE[$cookieprefix.'userid']; //vbulletin3 userid
$cookie_password $_COOKIE[$cookieprefix.'password']; //vbulletin3 password
$bbuserinfo $db->query_first("SELECT * FROM ".$tableprefix."user WHERE userid = '$cookie_userid' and password = '$cookie_password'"); // $bbuserinfo variable for my portal 

I know to include all vbulletin variables from global.php to my page but I don't want to do this. Is there any way to use $bbuserinfo variable without include global.php?

Thank you so much for your answers.

Of course if you wish to query the database directly and other such stuff, however simply put no :), not without some work.

MuratCetin 12-30-2004 12:27 PM

Quote:

Originally Posted by Zachery
Of course if you wish to query the database directly and other such stuff, however simply put no :), not without some work.

Well, but It seems to be $_COOKIE[$cookieprefix.'userid'] and also $_COOKIE[$cookieprefix.'password'] are blank : ) So my bbuserinfo query doesn't work.

$cookieprefix, $tableprefix variables and db options are the same as vbulletin settings.

rake 12-30-2004 01:53 PM

why don't you just print out the entire $_COOKIE array and see what you get?

MuratCetin 12-30-2004 02:09 PM

Quote:

Originally Posted by rake
why don't you just print out the entire $_COOKIE array and see what you get?

I have already done this, and the result is blank : (

rake 12-30-2004 02:21 PM

just checking: did you use print_r($_COOKIE); ? try $HTTP_COOKIE_VARS instead and see what you get. and make sure cookie domain is set to .yourdomain.com in your vbulletin options.

MuratCetin 12-30-2004 02:34 PM

Quote:

Originally Posted by rake
just checking: did you use print_r($_COOKIE); ? try $HTTP_COOKIE_VARS instead and see what you get. and make sure cookie domain is set to .yourdomain.com in your vbulletin options.

Oow, I understood what my fault was. Now there is another problem, how can I read forum cookies from the portal pages.

Thank you so much, again.

rake 12-30-2004 02:39 PM

you can read all the cookies that are set for that particular domain. make sure your cookie domain is .domain.com, so can read those cookies across your domain, and then just use print_r($_COOKIE); to find your vbulletin cookies.


All times are GMT. The time now is 10:00 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.01031 seconds
  • Memory Usage 1,735KB
  • 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_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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