Mambo-SMF Bridge FAQ

Started by Orstio, December 04, 2004, 01:36:05 PM

Previous topic - Next topic

Orstio

I thought I would start this Q&A for those questions that seem to come up most often, so people do not have to keep starting topics for their "unique" and never-before-seen "bugs".  (The ones that are caused by improper installation, or from not reading and following the instructions.)  Please do not ask for support in this topic.  Please start a new topic if your questions are not answered here.

Q:  I get a lot of errors in the login module.  They look like this:

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Subs.php on line 167

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Load.php on line 107

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Load.php on line 109

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Subs.php on line 167

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Load.php on line 741

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Load.php on line 751

Warning: array_unshift(): The first argument should be an array in /xxxx/xxxx/xxxx/xxxx/smf/Sources/Load.php on line 820

A:  You have not put the code from your integrated login readme.txt into the header of the Mambo template you are using.

Q: I installed this, and it broke everything.  I get a white screen with these errors:

Warning: main(/xxxx/xxxx/smf/SSI.php): failed to open stream: No such file or directory in xxxx/xxxx/xxxx/xxxx/xxxx/modules/mod_smf_login.php on line 7

Fatal error: main(): Failed opening required '/xxxx/xxxx/smf/SSI.php' (include_path='.;./includes;./pear') in xxxx/xxxx/xxxx/xxxx/xxxx/modules/mod_smf_login.php on line 7

A: You do not have the path correct in your bridge configuration.  If you are unsure about your path, look at the last line of the error for a hint.  If you still don't get it, contact your host.

Q:  I am logged in, but I can't logout.

A:  Your cookie settings in SMF are not right for the server you are using.  Local cookies must be turned off for the bridge login to work, and if you have subdomain independent cookies turned on, try turning them off.  SMF still works fine with both off.

Q:  How do I migrate my users over to Mambo from SMF?

A:  Users are migrated over to Mambo as they login to the bridge login.

Q:  I get errors when I try to login, and/or it logs me into only SMF.

A:  This is usually caused by having different usernames/passwords for your Mambo and SMF logins.  You can't expect to login to two accounts with a single password if they both have different passwords, now can you?  You'll have to make both your Mambo and SMF passwords the same (case sensitive).

Q:  The login module is there, but it seems to be missing a lot of text and information.

A: You probably have guest viewing turned off.  SMF locks out everything but its own login page if guest browsing is disabled, so almost none of the SSI features will work.

Q:  When I go to my bridged forum, the page is blank (I use Mozilla FireFox).

A: Turn off GZip compression in Mambo.

Q:  My fonts are all messed up in the bridged SMF.

A:  Edit your SMF theme.   Find where it says doctype="xhtml" and change xhtml to html.  That will fix most issues.  There may be more, which can be accomplished by pasting your SMF CSS into your Mambo CSS, and then deleting duplicate entries.

Q:  When I click on the forum link from the menu, I get a white screen with this error message:
QuoteThe XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Only one top level element is allowed in an XML document. Error processing resource 'http://www.mydomain.com/index.php?option=com_smf&Itemid=40';. Line 2, Position 2

<b>Warning</b>:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>/home/XXX/XXX/httpdocs/XXX/components/com_smf/smf.php</b> on line <b>47</b><br />
-^

A:  You have installed Mambo and SMF in separate databases, and you have failed to grant access to the SMF database user to the Mambo database, and/or grant access to the Mambo database user to the SMF database.  You can do this from your website's control panel.  If this error continues even after granting the permissions, multiple databases will not work on your host.  In this case, you must move your Mambo and SMF tables into the same database.

I'll add more as I think of them.  ;)

Orstio

Q:  How do I install the components and modules?

A: Please read the Mambo documentation on how to use Mambo administration.  It can be found here:  CLICK HERE

Kindred

Q: I am having trouble getting an SMF mod to work after installing the mambo bridge.

A: While some of the mods may conflict, there are a number that just need a simple change.
smf.php, in the mambo/components/com_smf directory is being used in place of index.php in your smf directory for most calls. This means that any mods that you have installed that changed index.php need to be mirrored in smf.php.


for example, I will use the Member Map mod.
Member Map adds a line into the action calls list of index.php:   'mm' => array('MemberMap.php', 'MemberMap'),
this need to be also added to smf.php (after the 'mlist' call)
Now, you can call the Member Map from within smf, or also as a straight Mambo menu feature.


Bonus Answer: You can add the function to your Mambo menus.

In your Mambo installation, go to your forum and look how the link to your Calendar is parsed. Usually it will be something like: http://www.yoursite.com/index.php?option=com_smf&Itemid=49&?action=calendar
(where Itemid will be the menu item id that was used in adding the Forum to your menu)

Take this link and copy it to your clipboard.

Add a new Mambo Menu item, and choose a "Wrapper".
When asked for the link for your wrapped object, use your clipboard to paste the link, replacing the caledar reference with mm (or whatever the action code for your mod was, in the case of Member Map, it was "mm")(you can call just index.php or the full site string) i.e. index.php?option=com_smf&Itemid=49&?action=mm

You now have a Menu link from Mambo to your Member's Map.



Q: I want to have the forum available only to registered (and logged in) users. When I try to make the forum accessable to registered users, it screws up my login procedure.

A: Yes, the SMF component needs to be a public menu item.

However, it does not have to be a PUBLISHED public menu item.
Make a menu item, using the component choice to add Simple Machines Forum and make it public access, but do not publish this menu item.
Now add another component choice of Simple Machine Forum and make it registered (or special) access only.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Orstio

QuoteBonus Answer: You can add the function to your Mambo menus.

In your Mambo installation, go to your forum and look how the link to your Calendar is parsed. Usually it will be something like: http://www.yoursite.com/index.php?option=com_smf&Itemid=49&?action=calendar
(where Itemid will be the menu item id that was used in adding the Forum to your menu)

Take this link and copy it to your clipboard.

Add a new Mambo Menu item, and choose a "Wrapper".
When asked for the link for your wrapped object, use your clipboard to paste the link, replacing the caledar reference with mm (or whatever the action code for your mod was, in the case of Member Map, it was "mm")(you can call just index.php or the full site string) i.e. index.php?option=com_smf&Itemid=49&?action=mm

You now have a Menu link from Mambo to your Member's Map.

Yet another bonus answer:

The Member Map is automatically wrapped in Mambo if you go into MemberMap.php, and comment out the two instances of obExit();

Then you don't need to use the icky wrapper component.

beau

#4
I get this error in the login module:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/kompanykidsonline.com/httpdocs/modules/mod_smf_login.php on line 16

I just installed SMF and then the Bridge, so everything is brand new on the site. What have I missed?

EDIT: I think I found the answer in another post - different usernames and pwds in Mambo/SMF dbs. I'll go modify that. I think.

Crud. So, how do i SAFELY change the databases? Will I have to do an entirely new install? I no very little about mySQL and have no clue how to copy tables from one db over to another.

Puc conDoin

Q: Where can I find/download the SMF-Mambo bridge?

Gorsha


lanesharman

Hi,

this has been an excellent faq and has helped me (a php and mambo newbie) get the bridge working well. Many thanks!!!!!

From the FAQ, it appears to me that users existing BEFORE the installation of the bridge should migrate for both the mambo set and the smf set.

It appears that only SMF/forum users get migrated. With the bridge login, I can login/out with the bridge using a pre-existing smf login.

But, I cannot login using a pre-existing mambo login.

Am I incorrect here?

thanks!

Lane Sharman

Orstio

QuoteIt appears that only SMF/forum users get migrated. With the bridge login, I can login/out with the bridge using a pre-existing smf login.

But, I cannot login using a pre-existing mambo login.

Am I incorrect here?

Correct.  You can migrate your Mambo users over to SMF by using this script:

http://mamboforge.net/frs/download.php/2369/mos2smf.zip

Orstio

#9
Known incompatibilities with other components:

1)  The phpBB component for Mambo.  This component modifies the structure of the mos_user table, and the mos_core_acl_aro table.  The SMF bridge asssumes the structure of core tables are the same as a fresh Mambo installation.

2) The a6HelpDesk version 1.0 component.  Still not exactly sure why, but new registrations end up with errors when both the a6HelpDesk component and the bridge are installed.  This might have been resolved in more recent versions of the HelpDesk component.

ivytony

Quote from: Gorsha on January 07, 2005, 05:47:14 AM
http://mamboforge.net/projects/mos-smf/

cannot get through that address at all.

why you don't provide the downloads of SMF bridge on your own website?

or I didn't find it? :-*

Orstio

I noticed also that MamboForge seems to be down today.  It should be back up soon.

I make the files available only at MamboForge for a number of reasons:

1)  If there is a version change, or minor tweak, it needs to get updated in only one place.
2)  MamboForge is the official development site for Mambo third-party components/modules/templates/mambots, etc.
3)  The software at MamboForge facilitates the development of Mambo components quite nicely.  It's a pleasure to use, from a development perspective.

mindfriction

#12
Q: Disabling guests from viewing my message board has stopped my members from being able to log in successfully with the bridged login

A: Add 'mambo_login' to the action array on line 119 of smf.php (tested on version 2.2 of bridge)

// If guest access is off, a guest can only do one of the very few following actions.
	
elseif (empty(
$modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('login''login2''mambo_login''register''register2''reminder''activate''help''.xml'))))


Thanks [Unknown] ;)
(see http://www.simplemachines.org/community/index.php?topic=26530.0)

Puc conDoin

Q: Is PHP Safe-Mode needed to be OFF?

trenchteam

How do I get arcade and chat to work within the portal? everytime I click it, it takes me outside the portal even when I have my forum wrapped.

Kindred

I have the same problem with the Memeber Map mod...    you have to comment out the obexit calls in the arcade and chat functions.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

trenchteam

#16
^^ this will keep it wrapped?  Can you point me to the exact names of the files and lines I need to modify.  thanks again.

Puc conDoin


Orstio

Q: Is PHP Safe-Mode needed to be OFF?

A: No.  But you may need to chmod some files manually.

christiant

thx for deleting my post, i was gonna ask for it too
cheers

Advertisement: