• Welcome to Simple Machines Community Forum. Please login or sign up.

Joomla Bridge FAQ

Started by Orstio, December 31, 2005, 03:30:46 PM

Previous topic - Next topic

Orstio

December 31, 2005, 03:30:46 PM Last Edit: May 27, 2007, 10:10:54 PM by Orstio
Since a lot of the old Frequently Asked Questions no longer apply to the latest release, I thought it best to start a new FAQ topic.

Thank you for not posting support questions here.  This topic is meant as a reference for others, so please do not clutter it up by asking for help with your site.  Please start a new topic when asking for help.

Orstio

December 31, 2005, 03:37:05 PM #1 Last Edit: July 02, 2006, 04:12:09 PM by Orstio
Separate Databases:

If you have installed Mambo/Joomla and SMF with Fantastico, or you installed them in separate databases intentionally, you will need to grant permission to the database users to access each others' databases.  If you have your forum and CMS installed in separate databases, and you have not granted access properly, you will most likely run into the "_LOGIN_INCOMPLETE" error in Joomla.

Here's how to grant database permissions:

1) Go to your site's cPanel.  Click on MySQL databases. (Do not Proceed to PhpMyAdmin!)

2) Near the bottom of the page, you will find two dropdown menus side-by-side.  One is labelled "User:" and the other "Db:".

3) In the first dropdown, select your SMF database user, and in the second dropdown, select the  Mambo/Joomla database.  Click the button that is labelled "Add User to Db".

4) Now go back to the same page again, and do the same, adding your Mambo/Joomla User to your SMF database.

Now you are set up to run your forum and CMS in separate databases.  :)

NOTE:  If you use a hosting service without cPanel, or a custom site control panel (like DreamHost), it is advised that you use the same database for both Joomla and SMF.  It can be very confusing, especially with DreamHost, as you can have multiple database users with the same username and password.

Orstio

Login and logout do not redirect to where you want them:

Go to your Joomla admin panel.  Go to your Modules Menu.  Click on Site Modules.

Find mod_smf_login in the list of modules.  It might not be on the first page.  Click on it.

Set the redirect parameters to your liking.  Make sure to click Save.  Even if you don't change anything, make sure to click Save.

Please note that the option for redirecting back to the page from which the user logged in does not work with the forum set to unwrapped.

Commando_Sondre

I am using two different databases, but I don't use cPanel, I use DirectAdmin, how do I make it work?

chadness

Quote from: Commando_Sondre on January 06, 2006, 01:33:39 PM
I am using two different databases, but I don't use cPanel, I use DirectAdmin, how do I make it work?
In general, you should  check with your hosting service.  Ask them how to give one database user rights to another database.  If you aren't able to set it up, it should be easy enough for them to do.

Orstio

January 14, 2006, 08:39:11 AM #5 Last Edit: March 19, 2006, 05:37:31 PM by Orstio
Some settings, what they mean, and how they affect the bridge:

1) Database driven sessions:  This setting in the SMF admin panel toggles the use of database driven sessions as opposed to flatfile sessions.  Database driven sessions are faster and cleaner, so it is recommended you have this turned on.  There are some rare circumstances where this is not possible, however.

2) Enable local storage of cookies:  This setting will store cookies on the server rather than on the user's computer.  This setting does not work with the bridge, and should always be turned off when using the bridge.  When turned on, logging in and out will most likely not work correctly.

3) Use subdomain independent cookies:  This setting controls whether SMF is able to read cookies across subdomains.  For most installations, it is advisable to turn this setting on, because the URL of your SMF installation is obviously different than the URL of your CMS installation.  If you find that logging in and out doesn't work with this turned on, try turning it off. 

4) Enable compressed output:  In SMF, this must be turned off if you are using your forum wrapped.  If it is unwrapped, then you may turn it on, because editing will then occur before zipping.  The bridge needs to edit the text output from SMF, and if the output is gzipped, it is obviously not raw text.  You may turn on compressed output in the CMS, which is the better choice if you wish to use compressed output anyway, as it will compress your entire site, not just the forum.


Orstio

Special characters are stripped from posts when using Joomla:

In your Joomla index.php, you can swap these two lines (~138-139):


$message = mosGetParam( $_POST, 'message', 0 );
if ($option == 'login') {


Altered code:


if ($option == 'login') {
     $message = mosGetParam( $_POST, 'message', 0 );


Orstio

Warning about download from MamboPortal/JoomlaPortal:

The SMF bridge that is available for download at mamboportal.com is badly outdated.  That is the original v2.0 released in October 2004, which was intended for use with SMF 1.0 RC2.  If you attempt to install that bridge on any currently available version of SMF, you will run into problems.

I emailed them to ask that they stop redistributing it, and they have refused.

Aravot

Quote from: Orstio on January 22, 2006, 07:28:33 PM
I emailed them to ask that they stop redistributing it, and they have refused.

Why did they refuse ??? it's out-dated.

paki

April 14, 2006, 05:55:46 PM #9 Last Edit: June 16, 2006, 02:03:56 AM by paki
So you bridged SMF and Joomla/Mambo.. and now your front page looks horrible? Here's a fix for it that requires very little knowledge of PHP or CSS :)

1) Go to your Themes folder in your SMF directory via FTP. Find a theme that has the possibility of being used on your forums. So if a user can choose their own theme, you will want to edit every theme in the Themes folder.. but if that is disabled then you just need to go into the default folder (or whichever theme is your default). Download the index.template.php file. Make a backup of this file just in case.

2) Open up this file in a text editor (such as Notepad) or other software (dreamweaver - CODE FORMAT ONLY!!! Do not use if you don't know what I mean!) and look for the the following:

style.css?rc2
print.css?rc2

They should be towards the top of the file.

3) Now, change those from what they are to

style_forum.css?rc2
print_forum.css?rc2

This ensures that the CSS files of Joomla/Mambo and SMF do not conflict.

4) Upload the new index.template.php file and overwrite your old one in that folder.

5) In the same folder, you will find style.css and print.css. Rename these to style_forum.css and print_forum.css

6) Create a "dummy" style.css and print.css. It just has to be empty.. this will reduce the entries in your error log by an ungodly amount :)

7) Repeat for any other themes that are used on your forum.

You may have to erase your cache to get the pages to show up, but this works. I am running it on my website and have had no problems whatsoever :) NOTE: I run an UNWRAPPED forum. If you run wrapped, this probably won't work for you.

Note: I use Joomla 1.0.8, not Mambo.. so it may be slightly different for Mambo users.

Hope this helps!
http://www.dfwhyundais.com <-- Dallas/Ft. Worth's Local Hyundai Group

Orstio

Quote2) Open up this file in a text editor (such as Notepad) or other software (dreamweaver) and look for the the following:

I'd like to rebut:  NEVER open your SMF index.template.php file in DreamWeaver or FrontPage, unless you really don't like your forum, and never want it to work again.

paki

Quote from: Orstio on April 14, 2006, 06:12:08 PM
Quote2) Open up this file in a text editor (such as Notepad) or other software (dreamweaver) and look for the the following:

I'd like to rebut:  NEVER open your SMF index.template.php file in DreamWeaver or FrontPage, unless you really don't like your forum, and never want it to work again.

Ah.. I meant to say in the "code" format.. not "design". I use code format all the time. I'll edit my original post :)
http://www.dfwhyundais.com <-- Dallas/Ft. Worth's Local Hyundai Group

phil_roy

Quote from: Orstio on April 14, 2006, 06:12:08 PMI'd like to rebut:  NEVER open your SMF index.template.php file in DreamWeaver or FrontPage, unless you really don't like your forum, and never want it to work again.
Seriously? I'm a Mac user (so no FP thank god!) and have opened the file in DW8 many times, altered things and uploaded.

Phil
http://www.nzmac.com
NZMac.com - Supporting the New Zealand Mac community

Orstio

For editing PHP, if you want something light that won't mess up your code, I suggest NotePad++:

http://notepad-plus.sourceforge.net/uk/site.htm

rotor

And fi you want a great little freeware editor try Context Editor



rotor

paki

Quote from: Orstio on April 23, 2006, 10:21:15 PM
For editing PHP, if you want something light that won't mess up your code, I suggest NotePad++:

http://notepad-plus.sourceforge.net/uk/site.htm

If you suggest it, then its definitely worth checking out :). Any plug-ins we should be looking into?
http://www.dfwhyundais.com <-- Dallas/Ft. Worth's Local Hyundai Group

Orstio

The function list plugin is useful.  Like everything else, too many plugins make it bloated.

Orstio

April 30, 2006, 08:23:43 AM #17 Last Edit: December 17, 2006, 06:04:33 PM by Orstio
Q:  Can the bridge move information from Joomla, or one of its components, to SMF?  For example, can the profile information from CB be migrated to the SMF profile?

A:  No.  The bridge moves information from SMF to Joomla.  The reason it works this way is because SMF has integration "hooks" that let it export information to other systems.  Joomla (as of yet) does not have a method to export information to other systems (only internally, not externally).  Therefore, information travel is one way:  From SMF to Joomla. With one exception:  On the event of logging in, a Joomla user can be migrated into SMF.  This is a very specific event, and does not occur several times/minute, and so the extra queries performed to do this are minimized.

[EDIT]  As of Mambo 4.6.2, this is no longer the case.  Mambo 4.6.2 will have multiple events where scripts can be made to export information out to other systems, including SMF.  The bridge for Mambo 4.6 will take full advantage of this new system in Mambo.

Orstio

There are two known incompatibilities with OpenSEF.  The first is SMF's use of semi-colons in the URL, and the second is SMF's use of query string variables without values.

OpenSEF has trouble interpreting these two types of anomalies in the query string correctly.

phil_roy

A month on from my comments re synching and I've discovered that all my users who were previously assigned as "Authors" have lost that status...could this be because of the group synch function? I'm not sure it's that straight forward..or I'm just lost.

Phil
http://www.nzmac.com
NZMac.com - Supporting the New Zealand Mac community

Advertisement: