Ok, for the technically inclined, and especially for those considering writing components or modules for this variant of Joomla, here in brief is how this works.
Joomla's global file calls vbulletin's global.php - either the forum or the admincp version as needed. If the forum version is used it caches it's 20 templates. The rest of the hacks are in the Joomla mainframe. Rather than allow the Joomla database object to connect itself the resource id of the Master connection is passed to it from the vbulletin database object. Both database classes are therefore available. So if you like you can do
$database->setQuery("-- some query");
$database->loadObjectList();
or you can use vbulletin's way.
$db->query_read(" -- some query ");
Each system has it's advantages and disadvantages. Typically I use the joomla object to handle joomla tables if, for no other reason, the table prefix in the queries is automatically parsed. But I digress.
Joomla doesn't do it's own login in this hack. Instead, at the line where Joomla WOULD verify the password it instead checks the vbulletin registry object ($vbulletin) to see if there is a user. If there is the hack lies to Joomla and cuts it loose with a session without independent verification. Therefore, in this hack all logins and user manipulations go through vbulletin (which has a far more robust user system anyway so in my opinion, no loss).
This will cause problems if you install a Joomla component that extends on the Joomla user object. These components probably will not work.
vJoomla, for the most part, doesn't need a complete user list. The first time a vbulletin user moves to a joomla page though part of their registration is copied into the joomla user table. This should help certain components function and is also necessary for the Joomla backend to work. I may write some stricter syncing code if necessary -- vJoomla itself doesn't need it to work but some components might.
The admin side is a little tricker. I had to disable joomla timing out - I swear this took longer than any other part but it works now. Again, Joomla is dependent on vbulletin to get the security right in this hack. Since admincp global throws a login interface automatically if you time out on it there's no reason for Joomla to maintain a seperate check. If you return from vbulletin global.php in the Joomla admin files you're golden.
Final notes are on templates. Once Joomla is ready to call it's template engine a hack steps in and iterates over the Joomla module positions, reading them all into an array. Each module position is then wrapped in a template file (though in this base distribution there are no elaborations on these templates). After this is done Joomla's output passes through vbulletin's template engine and vbulletin completes the page output.
In all it took 2 months on and off to figure this all out. But though it's incomplete, it's working very smoothly at the moment. Questions and comments welcome.
|