Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2015, 05:24 PM
cnnx cnnx is offline
 
Join Date: Feb 2015
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default VB5 Integration into my website

When a new user registers on my website an entry is added to the users table in the mysql database, if the same user wants to use the forum he has to re-register again. Is there a way so that when they register in my website a user entry is also created in the VB5 mysql database table and they can use the forum with the same username as the website without registering on the forum?

Thanks,
Reply With Quote
  #2  
Old 02-12-2015, 02:09 AM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes. You'd want to call the vB5 API and have it generate a new user record when your user registers.
Reply With Quote
  #3  
Old 02-12-2015, 11:21 AM
cnnx cnnx is offline
 
Join Date: Feb 2015
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a sample template I can use to get started with for my website integration? Is it php code?
Reply With Quote
  #4  
Old 02-12-2015, 10:44 PM
EvanAbagail EvanAbagail is offline
 
Join Date: Apr 2014
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not just a plug-in-play thing. Try searching as there are already some threads regarding implementing the VB5 login / registration system(s) into your web system.

Kindly,
Evan Abagail
Reply With Quote
  #5  
Old 02-12-2015, 11:08 PM
cnnx cnnx is offline
 
Join Date: Feb 2015
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So I found this on the forum, which I modified a bit for VB5.

define('VB_AREA', 'External');
define('SKIP_SESSIONCREATE', 1);
define('SKIP_USERINFO', 1);
define('CWD', 'forum');
require_once(CWD . '/core/includes/init.php');

$newuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$newuser->set('username', '$user');
$newuser->set('email', '$email');
$newuser->set('password', '$pass');
$newuser->set('usergroupid', 2);

$user,$email,$pass are my variables on my website for when a new user signs up, what do I need to modify to make it vb5 compatible? as this was for vb3/vb4.. ?
Reply With Quote
  #6  
Old 02-13-2015, 04:25 PM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cnnx View Post
So I found this on the forum, which I modified a bit for VB5.

define('VB_AREA', 'External');
define('SKIP_SESSIONCREATE', 1);
define('SKIP_USERINFO', 1);
define('CWD', 'forum');
require_once(CWD . '/core/includes/init.php');

$newuser =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY);
$newuser->set('username', '$user');
$newuser->set('email', '$email');
$newuser->set('password', '$pass');
$newuser->set('usergroupid', 2);

$user,$email,$pass are my variables on my website for when a new user signs up, what do I need to modify to make it vb5 compatible? as this was for vb3/vb4.. ?
Vb5 doesn't use the data managers, so that's not going to work.

I'm doing something similar for somebody as a POC, so I'll be posting sample code. Otherwise, you'll have to look into how to actually call the API (either internally or externally, depending on your need).
Reply With Quote
  #7  
Old 02-20-2015, 03:15 PM
cnnx cnnx is offline
 
Join Date: Feb 2015
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will you be posting the code soon? I'd really like to get this integration done on my website, users are asking if they need to register again to vbulletin after they register on my site. I'm telling them its being worked on. If you can't post the code can you provide documentation or links to get me started?
Reply With Quote
  #8  
Old 02-24-2015, 04:59 PM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cnnx View Post
Will you be posting the code soon? I'd really like to get this integration done on my website, users are asking if they need to register again to vbulletin after they register on my site. I'm telling them its being worked on. If you can't post the code can you provide documentation or links to get me started?
This is something that I can possibly look at next week.

Since saying I'd look at it, I've had a funeral on the other side of the country, the flu for almost a week, and a non-stop visit from family from the other side of the country. Free time hasn't been a luxury I've had.
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 07:26 PM.


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.04653 seconds
  • Memory Usage 2,229KB
  • 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
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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