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-25-2013, 04:11 PM
35mm 35mm is offline
 
Join Date: Jul 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Cocdeigniter vB integration

Hi all, It's been a while! I'm developing a large site in Codeigniter and want to integrate vB into it. The first rough development of the site I hand coded without a framework, and got the full integration I was after i.e. member registers to main site, and is automatically registered on vB too. Member logs into main site and is automatically logged into vB too. Main site header and footer are displayed on vB pages. Basic site functionality such as message alerts work on vB pages too. It all looks and behaves like one site. I only want to use vB for it's forums as the site has it's own private messaging system, profiles etc.

My hand coded dev simply includes the site's main functions.php in vB's global.php and starts a site wide session. I redirected vB's register, login, profile, messaging etc links to the features on the main site. vB's DB tables are within the main site's DB (shared DB). The main site uses the same password / salt hashing as vB and when a user registers it creates a member account in the main site DB tables and duplicates it in the vB tables. It would be more efficient for the site just to use the vB user table, but I don't want the site to be reliant on vB in any way - more the other way round - hence two lots of user tables.

I'm new to Codeigniter, but I'm enjoying working with it. I've been using vB forums for many years now and vB is my forum system of choice, so I don't want to switch to another forum system for this and future projects if I can help it. I'm currently working with vB4.x but am posting here because I'll be upgrading in due course.

So the question is, what's the best way to integrate? Can I include a Ci model in vB globals.php? Would I have to build some kind of bridge between Ci and vB? I could include header and footer with ajax if needs be, but I'd rather include them properly via php and vB's plugin system as I did with the hand coded dev. How best to do this with Ci/vB?
Reply With Quote
  #2  
Old 03-16-2013, 03:42 AM
fungku's Avatar
fungku fungku is offline
 
Join Date: Jan 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry I have nothing to add, unfortunately... I have a question, though

Quote:
Originally Posted by 35mm View Post
member registers to main site, and is automatically registered on vB too. Member logs into main site and is automatically logged into vB too. Main site header and footer are displayed on vB pages.
I am looking to do this with my new VB5 site and wondering if you have any tips?
Reply With Quote
  #3  
Old 03-16-2013, 05:04 AM
35mm 35mm is offline
 
Join Date: Jul 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I gave up messing about trying to integrate vB in Ci and built my own forum system in CI. I've coded forums before by hand, but it's much quicker and easier in CI and there are no compromises - it works the way I want, has the features I want, isn't bloated with features I don't need, and it's light weight and efficient. My site uses HTML5 Boilerplate and Twitter Bootstrap (see ci hb5 and bootstrap combi here) so my forums do too which means I don't have to waste any time on restyling and it looks and works great on mobile devices too. To be honest, although my forum isn't completely finished yet, it has taken less time to make than it took to integrate vB into the hand coded development of my site. In fact I actually spent more time searching the web for how to integrate vb with CI than I spent building my own forum system! So I'd recommend you have a go at building your own - you'll find it very rewarding! I used 1 x model, 3 x views and 1 x controller. My site uses CKEditor and HTMLPurifier library so my forum makes use of those too. My only issue now is that I have a vB license going spare.
Reply With Quote
  #4  
Old 03-16-2013, 03:15 PM
fungku's Avatar
fungku fungku is offline
 
Join Date: Jan 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice.

How do you find these nice libraries? I find when I search for stuff like that I need to wade through tons of outdated crap.
Reply With Quote
  #5  
Old 03-16-2013, 03:22 PM
35mm 35mm is offline
 
Join Date: Jul 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ha ha I found them by wading through tons of outdated crap!
Reply With Quote
  #6  
Old 03-16-2013, 05:31 PM
fungku's Avatar
fungku fungku is offline
 
Join Date: Jan 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

google needs to add a "Recency" filter
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 06:41 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.04715 seconds
  • Memory Usage 2,204KB
  • 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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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