Joomla! Discussion Forums



It is currently Tue Nov 24, 2009 7:27 pm (All times are UTC )

 




Post new topic Reply to topic  [ 15 posts ] 
Author Message
Posted: Sat Dec 16, 2006 2:50 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
Hello everyone - I have a project I need some advice on. At work I've been developing pages with joomla for the last 4 months and become very familiar with the philosophy and approach to the code.  As a hobby I do technical work for a site that is built around vbulletin 3.0 and using a portal solution for that platform which pales in comparison to Joomla in terms of power and flexiablity.  I'm rebuilding the site and I want to use vbulletin 3.6 to handle the forum issues only and let Joomla 1.5 handle the rest.  This site isn't due for production for at least 3 months, more probably 6 months so I'm presuming 1.5 final will be out by the time this is ready for launch.

The requirements set upon me by the owner of the site is that if you are logged into the forum you are logged into joomla's frontend as well. The administrator parts do not need merger.

I have installed joomla 1.5 into a dev database of the site and it's tables clicked in quietly enough and without incident.  Now, at run time, vbulletin can see joomla's tables and vice-versa.

The approach I'm considering is to turn off user registration in joomla and let vbulletin handle user processing. To do this I need a script that will copy vbulletin's user table (which has around 32,000 entries for this site - did I mention this thing was pretty big though not necessarily the biggest site on the web) over to joomla and key usergroups in joomla off usergroups in vbulletin. Then I can, using vbulletin's hook system, issue queries on the joomla user databases whenever necessary to make sure the mirroring is complete.

Sessions present a bit of a challenge though. Again I only want the front-end login process to occur once per session but that will require either having joomla read the vbulletin cookie OR maintain it's own cookie.

Another plan would be to just have joomla 1.5 use the vbulletin session and user tables instead of its own - but I don't think this is possible without hacking the code which I don't want to do.

EDIT: Another thing - the old portal system has about 150 pages of content I'd like to get moved into jos_content where it belongs.  I could write a script to do this but it would be easier if I could somehow call up the document managing objects and pass the data through them to make sure everything is set up correctly.


Last edited by mlmorr0 on Sat Dec 16, 2006 2:52 pm, edited 1 time in total.

Top
  E-mail  
 
Posted: Sat Dec 16, 2006 4:15 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Nov 08, 2006 1:45 am
Posts: 777
Location: Ontario, Canada
1.5 has a very powerfull Auth API system - which is to be made even better. I'd start looking at writing an auth plugin that pulls data from your vBuilitain database data. You can let the sessions be as they may.

For the time being, the sessions are not back and forth compatable so users would have to login to Joomla and your forums seperately. Altho, you can add to the Joomla Session system via the current API the Forum session data. Heck, have your forum redirect to joomla login system and you're all set...

So:
1. Create Joomla Auth Plugin to use VB's User Database
2. In the Auth Plugin add to the Joomla Session the VB's Session data
3. Redirect VB's login system to Joomla, and set the redirect to the correct location back for the user.

Should be simple enough.

_________________
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net


Top
  E-mail  
 
Posted: Sun Dec 17, 2006 4:01 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
CoolAcid wrote:
1.5 has a very powerfull Auth API system - which is to be made even better. I'd start looking at writing an auth plugin that pulls data from your vBuilitain database data. You can let the sessions be as they may.

For the time being, the sessions are not back and forth compatable so users would have to login to Joomla and your forums seperately. Altho, you can add to the Joomla Session system via the current API the Forum session data. Heck, have your forum redirect to joomla login system and you're all set...

So:
1. Create Joomla Auth Plugin to use VB's User Database
2. In the Auth Plugin add to the Joomla Session the VB's Session data
3. Redirect VB's login system to Joomla, and set the redirect to the correct location back for the user.

Should be simple enough.


I've written modules and components but not plugins as of yet so I'm not familiar with the process. Anywhere I could get some documentation or discussion on this process?  Failing that, are there any components or projects out there that do something similar I can pull apart and analyze at a source code level?


Top
  E-mail  
 
Posted: Sun Dec 17, 2006 12:01 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Nov 08, 2006 1:45 am
Posts: 777
Location: Ontario, Canada
I would recomend looking at the current Auth Plugins that are available. Jinx and I are working on a more sophisticated plugin for OpenID that will probably hit SVN sooner or later.

As for discussions - You can do it here on this post (Keeps the forum clean).

I'd recommend you start with just getting Joomla to Auth against the other DB. Once you have that, then move on to adding sessions.

I don't have a vBuilitain DB - but if you ZIP up any code and make a fake UserDB I'll be happy to dump it into my DEV system for you.

_________________
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net


Top
  E-mail  
 
Posted: Sun Dec 17, 2006 4:06 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
CoolAcid wrote:
I would recomend looking at the current Auth Plugins that are available. Jinx and I are working on a more sophisticated plugin for OpenID that will probably hit SVN sooner or later.

As for discussions - You can do it here on this post (Keeps the forum clean).

I'd recommend you start with just getting Joomla to Auth against the other DB. Once you have that, then move on to adding sessions.

I don't have a vBuilitain DB - but if you ZIP up any code and make a fake UserDB I'll be happy to dump it into my DEV system for you.




Unforutnately vbulletin isn't GPL so sharing the code is a violation of the EULA. I guess I could get a copy of the database structure and the auth libraries of vbulletin for study purposes though - since the object isn't to copy their code but create interoperability between it and joomla I believe that would fall under fair use. I also don't think Jelsoft would object - they are very open with third parties extending their supporting their code.


Top
  E-mail  
 
Posted: Sun Dec 17, 2006 4:23 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Nov 08, 2006 1:45 am
Posts: 777
Location: Ontario, Canada
mlmorr0 wrote:
Unforutnately vbulletin isn't GPL so sharing the code is a violation of the EULA. I guess I could get a copy of the database structure and the auth libraries of vbulletin for study purposes though - since the object isn't to copy their code but create interoperability between it and joomla I believe that would fall under fair use. I also don't think Jelsoft would object - they are very open with third parties extending their supporting their code.


Don't need code - write a quick php file that dumps the $_SESSION variable. (print_r($_SESSION)) run it before and after you login. Now you know how it gets/sets sessions.

As for the database, use phpMySQL or a simple program like that to dump the schema.

You now have everything you need to build your new Joomla Auth Plugin :)

_________________
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net


Top
  E-mail  
 
Posted: Mon Dec 18, 2006 2:28 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
CoolAcid wrote:
mlmorr0 wrote:
Unforutnately vbulletin isn't GPL so sharing the code is a violation of the EULA. I guess I could get a copy of the database structure and the auth libraries of vbulletin for study purposes though - since the object isn't to copy their code but create interoperability between it and joomla I believe that would fall under fair use. I also don't think Jelsoft would object - they are very open with third parties extending their supporting their code.


Don't need code - write a quick php file that dumps the $_SESSION variable. (print_r($_SESSION)) run it before and after you login. Now you know how it gets/sets sessions.

As for the database, use phpMySQL or a simple program like that to dump the schema.

You now have everything you need to build your new Joomla Auth Plugin :)


Sounds simple enough - I can get vbulletin to dump it's session data easily enough -- but how do you write auth plugins, or for that matter plugins in general.  I presume they need an install xml file like the components and modules do -- and I also presume I need to know which event(s) the plugin will need to trigger off of and enter them in the xml file.  Where do I find this sort of literature on the site - I've been trying google and search and turning up empty handed.


Top
  E-mail  
 
Posted: Mon Dec 18, 2006 1:41 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Nov 08, 2006 1:45 am
Posts: 777
Location: Ontario, Canada
Tell you what - You send me the dumps - I'll build a plugin and post the code for you.

I'll need a user table from SQL and session data.

_________________
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net


Top
  E-mail  
 
Posted: Tue Dec 19, 2006 6:14 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
CoolAcid wrote:
Tell you what - You send me the dumps - I'll build a plugin and post the code for you.

I'll need a user table from SQL and session data.


Apparently vbulletin doesn't use $_SESSION when cookies are available. This is the result of a dump

Code:
Session Dump:
Cookie Dump:
Array (
[bblastactivity] => 1158171902
[bbuserid] => 87
[bbpassword] => b6c585cbd85a908437caa5a80630db5d
[bblastvisit] => 1158155840 [250e160563124c78a894ffbe90f2f71c] => 4d1b8a8a071e4595b0a98146d7be2649
[mosvisitor] => 1 [bbsessionhash] => cd6977161b5ed0a0df48d2e1c8af6d7d
)


A structure dump of the DB's in question is at http://www.enworld.org/dumps.zip  Since there are 256 tables in the db I pulled the user related tables out into an sql file by themselves.

Thank you for your time on this.  In the meanwhile I'll move onto skinning joomla for this site and working on a custom frontpage component for the site.


Top
  E-mail  
 
Posted: Fri Dec 22, 2006 8:08 pm 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Aug 20, 2005 4:12 pm
Posts: 462
Hi mlmorr0 / CoolAcid ,

I am excited to hear you try to bridge vBulletin and Joomla! 1.5.  Bridging Joomla 1.0x and vB was a challenge.  Many attempts and the only one that was any good was bbpixel's version and it required a fair number of vB code hacks.

It seems that the AUTH upgrades in 1.5 will finally allow a meaningful bridge.

That is not to trivialize the attempts that have been made. 

Please visit the vBridge/com_connector forums here ---> http://forum.joomla.org/index.php/board,174.0.html

The people to talk to are Predator and Leonsio.  I am sure they have some code/suggestions that would help your plans.

Many many people are hoping for a working solution.  And I feel, that once a good solution is established, even more people would be
interested in a vB/J! site. 

Hope to see you both in the forums.


Last edited by Anonymous on Fri Dec 22, 2006 8:17 pm, edited 1 time in total.

Top
   
 
Posted: Thu Dec 28, 2006 3:00 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
Interesting links. Looking at them. However, I've ran into my first real hurdle - and it wasn't where I expected it.  I can't get my test plugins to install - Hell, I can't get ANYTHING to install.

Keep running into this error...

Fatal error: Only variables can be passed by reference in /www/enworld.org/dev/htdocs/libraries/joomla/filesystem/archive.php on line 53

PHP 5.0.5

I really don't want to recompile PHP on the server for this to work :(


Top
  E-mail  
 
Posted: Sat Dec 30, 2006 1:55 pm 
User avatar
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Nov 08, 2006 1:45 am
Posts: 777
Location: Ontario, Canada
OK - so I've played with it a bit.

I was able to get a hold of a Q&A VB site to auth against. It's more then just check password and create session cookies.

VB does some weird stuff with the password - ie:

Code:
md5(md5($password) . salt)


With my code, I was able to auth against the VB, but not create the VB sessions. I may look more at it later. Since there is a plugin already for 1.0.x I would see about talking to them for session creations.

Find me start off point here: http://jakendall.coolacid.net/joomla

BTW: there is no extra funky stuff in here like checking for multiple logins etc. Just bash against VB's DB. Also, the DB has to be the same as Joomla - table prefix can be different (and should be). Shouldn't be to trivial to add support for other DBs.

_________________
Thank you for calling the GOD department. What Now?
- My Blog: http://www.coolacid.net


Top
  E-mail  
 
Posted: Sat Dec 30, 2006 3:07 pm 
User avatar
Joomla! Champion
Joomla! Champion
Offline

Joined: Fri Aug 12, 2005 12:47 am
Posts: 6431
Mod note : moved post to 1.5 development forum for easy followup by the development working group.

_________________
Johan Janssens - Joomla Co-Founder, Lead Developer of Joomla 1.5

http://www.nooku.org - multi-lingual content manager and rapid extension development framework for Joomla 1.5
http://www.joomlatools.eu - training, consulting and extension development


Top
   
 
Posted: Thu Jan 04, 2007 5:24 am 
Joomla! Intern
Joomla! Intern
Offline

Joined: Thu Sep 21, 2006 12:57 pm
Posts: 53
Due to the error noted above I will be shifting my focus on Joomla 1.0 for now.


Top
  E-mail  
 
Posted: Mon Sep 24, 2007 3:23 am 
Joomla! Explorer
Joomla! Explorer
Offline

Joined: Sat Aug 20, 2005 4:12 pm
Posts: 462
any updates here ?


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

Quick reply

 



Who is online

Users browsing this forum: becyn, hiramcp, ianmac, whazupwidu and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group