Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 09-13-2004, 09:12 PM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Integrating vBulletin with another application

I'm working on integrating the vBulletin forums into a C++ client application. The forums will be accessed through a built-in browser. What we would like to do is to be able to integrate some of the user's actions in the client application with the user's information in the forums.

We would like to be able to integrate login and logout, new account registration and editing the user's profile. Is there a method for doing this? For example, when the user creates a new account through our client, we would like to be able to send a request to the forums server that would create the forums account with the information the user provided. The same thing would happen when the user logs in....we would verify their password, and then send a request to the forums server to log them in.

Is it possible to do something like this? We were hoping to be able to send the requests from our main server, but I assume that the client needs to send the requests, as the forum cookies and session information will be stored on the individual computers. Is there a listing of URL query strings for logging in and out, creating new accounts and editing existing accounts?

I hope this makes sense, and I appreciate any advice you guys can provide.
Reply With Quote
  #2  
Old 09-13-2004, 09:20 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well session info is stored in your database, and while users do get cookies they are not required in most cases to use the board, but some fetures do rely on them (thread/forum activity markers for example).

I asume you know how forms work, and if so you should be able to pass anything from your client application to vBulletins php files. Do you know php btw?

Two files to look at are login.php and register.php and their associated function files, if you need help finding exactly what you are looking just reply again
Reply With Quote
  #3  
Old 09-13-2004, 09:29 PM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm a Java programmer, not too big on my PHP knowledge. I'll take a look through those two files though, as a place to start.

One question that sticks in my head though....let me run through a quick set of steps:
User logs in to client application
Client contacts main server with login info
Server validates username/password
Can the main server then hit the forums server with a login request for the user?

My knowledge of sessions and cookies isn't as good as it should be, but I'm thinking that the client would have to hit the forums through it's embedded browser in order to get the session information set up properly. I could be wrong though (it's happened once or twice before).

I'm assuming we'll be able to do the user registration and profile editing from the server, but that the logging in and out will have to come from the client.

Thanks! I'm sure I'll have more questions tomorrow....
Reply With Quote
  #4  
Old 09-13-2004, 09:41 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well sessions are stored in the database in the session table, amoung other things there are three important parts of a session you may have to correct for:

PHP Code:
define('SESSION_IDHASH'md5($_SERVER['HTTP_USER_AGENT'] . ALT_IP )); // this should *never* change during a session
define('SESSION_HOST'substr(IPADDRESS015));
define('USER_AGENT'$_SERVER['HTTP_USER_AGENT']); 
Seeing how your going to log-in from a second server you may have to pass the user_agents and ipaddress's from the user because the second server could interfer with this process.
Reply With Quote
  #5  
Old 09-17-2004, 11:56 AM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Talked with our client people, and they're going to handle the logging in and out through their browser. That means the server will need to handle the registration and profile/password editing.

Would it be easier to just go straight to the DB to change profiles and passwords? That's what I'm thinking. I'm not sure about creating a new user though....can I just pass a URL that I've created to the forums server and have it do all the creating? Anyone know the format of that URL?

Thanks again....
Reply With Quote
  #6  
Old 09-17-2004, 01:08 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not so much a URL as a set of POST'ed data (when performed from a web page) which is processed thru the register.php script and an account is created by Queries to the SQL database ...

Your C++ app should be able to be extended to connect to a SQL server and create teh accounts no problem (unless C++ is more limited than I'm led to believe, not being a C++ guru)
Reply With Quote
  #7  
Old 09-17-2004, 07:20 PM
BrandonC BrandonC is offline
 
Join Date: Jul 2004
Location: Scotia, NY
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Our server is Java-based, we'll be doing the registering and such from there. (I'm new to the POST/GET/WHATEVER stuff) Is it possible to send the POST from our server so that the registration will go through all the checks and stuff that are built into the register.php file? Or do we just have to go straight to the DB? I'm wondering if that would create any problems with the passwords or the password salt fields or anything once the user actually attempts to log into the forum....
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04712 seconds
  • Memory Usage 2,218KB
  • 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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete