Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-08-2012, 03:28 AM
awang awang is offline
 
Join Date: Mar 2012
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Integration with Ruby on Rails Application

Hi,

We're trying to figure out vBulletin integration with our Ruby on Rails application. We're currently hosted by URL Jet.

The first integration points would be:
1. vBulletin user access from RoR application
+ from our RoR application, have the ability to update usernames and emails
2. vBulletin user creation from RoR application
+ from our RoR application, have the ability to create new vBulletin users

vbulletin.org has Data Manager tutorials with some php snippets about user creation and editing. Could not find much information regarding the actual integration. We want to avoid ssh'ing into URL Jet and running a custom php script each time.

Any help would be much appreciated! Cheers!



p.s. Here are some useful links

Tutorial Index
https://vborg.vbsupport.ru/showthread.php?t=99570

Add new Users (automatically)
https://vborg.vbsupport.ru/showthread.php?t=82836

Deal with User deletion/pruning and Username Changes
https://vborg.vbsupport.ru/showthread.php?t=97132

Datamanager API Example
https://www.vbulletin.com/docs/html/...anager_example
Reply With Quote
  #2  
Old 03-08-2012, 08:59 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you see it integrating, are you planning on calling php scripts from RoR?
Reply With Quote
  #3  
Old 03-09-2012, 05:16 PM
awang awang is offline
 
Join Date: Mar 2012
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi kh99, Thank you for the reply!

Yes that sounds like a viable option.

Would it be reasonable to call php scripts very frequently? We want it to scale for heavy user acquisition. Unlikely as it may be for now, maybe the target can be one every second.

Currently vBulletin and our RoR app are not on the same instance. Is the scripting option still feasible with this setup, or will we have to host them on the same instance to make this work?

Another idea I read online was making a database connection to connect with the vBulletin user table.
Reply With Quote
  #4  
Old 03-09-2012, 05:23 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by awang View Post
Hi kh99, Thank you for the reply!

Yes that sounds like a viable option.

Would it be reasonable to call php scripts very frequently? We want it to scale for heavy user acquisition. Unlikely as it may be for now, maybe the target can be one every second.

Currently vBulletin and our RoR app are not on the same instance. Is the scripting option still feasible with this setup, or will we have to host them on the same instance to make this work?

Another idea I read online was making a database connection to connect with the vBulletin user table.
I'm probably not the right person to talk about scaling, but once per second doesn't sound like a lot.

I'm not sure what you mean by instance - do you mean server? You could write a php scirpt to do what you want then call it from a RoR program on another server. The issue I see with that would be security (obviously you don't want anyone else running that script).

Connecting to the database is an option, the only issue is that you won't be able to take advantage of the vb functions. But it's a reasonable approach that I've seen other people here use.
Reply With Quote
  #5  
Old 03-09-2012, 06:03 PM
awang awang is offline
 
Join Date: Mar 2012
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the quick reply!

> I'm not sure what you mean by instance - do you mean server? You could write a php scirpt to do what you want then call it from a RoR program on another server. The issue I see with that would be security (obviously you don't want anyone else running that script).

Yes I mean server. Maybe we can obfuscate the script name and only call it from our servers. How easy it would be to sniff packets coming out of our servers to find the call to the vBulletin server? Want to make sure this is still a viable option without turning it into a security discussion =)

> Connecting to the database is an option, the only issue is that you won't be able to take advantage of the vb functions. But it's a reasonable approach that I've seen other people here use.

Great! A quick search shows that I may have to chat with our vBulletin host to see if they can enable us to access the db remotely. Do you have any experience, or can you point us in the right direction?
Reply With Quote
  #6  
Old 03-09-2012, 06:40 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm probably not the right person to tell you how to design such an app (what *am* I the right person for, you may ask? Maybe nothing ). Offhand I wouldn't feel so good about a system that only depended on the script name remaining secret, but you might be able to do something as simple as sending a password as part of the request (I don't see how that's less secure than vb is now, as long as you have some kind of time delay or max tries for a wrong password).

Quote:
Do you have any experience, or can you point us in the right direction?

Experience with what, accessing the database directly? Not really, I'm just familiar with what vb does. I guess I'd probably find the vb code that adds a user and try to use what I could from it.

Maybe someone else will read this and have a better idea.
Reply With Quote
  #7  
Old 03-09-2012, 08:57 PM
awang awang is offline
 
Join Date: Mar 2012
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Haha thank you kh99! Very helpful!
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 09:47 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.04066 seconds
  • Memory Usage 2,218KB
  • Queries Executed 11 (?)
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
  • (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_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