Customizing SMF > Mambo Bridge Support

I cannot login to SMF directly via Mambo CB (Solved - partly)

<< < (2/3) > >>

Kindred:
Hi...

The problem is - we are a volunteer group and none of the current developers is much interested in the bridges... :(   So, unfortunately, I can not even estimate any update.

the current bridge dates back to the beta versions of SMF 2.0 -- which means it is going to require some tweaking (code-side) to get it to work because the code, variables, functions and database have all changed between 2.0 beta4 and 2.0.2.

I'd suggest you try sending a message to Andre (the creator of the SMF2_API files) he might be willing to take a look at updating the bridge.

aht961:
Finally I have managed to solve the problem - at least partly. Since this was a painstaking experience I want to share my experience with you. In case if you are interested, I will try to go through the modifications one by one. This will let you use the most recent bridge (v2 beta) with the most recent SMF (2.0.2) and mambo, 4.6.5 (partly the community builder as well). Consequently in the only scenario which I have managed to function, the new registrations/cancellations will be made via SMF (unwrapped but accessed via mambo component), however, all the new registrations will be migrated automatically to your mambo database (and if you have community builder as well).

Before doing this we have to make some modifications and corrections. All of these, except one hard code change in the database table, could be found over these forums, but they are all scattered around. many thanks go to the developer of the bridge and to others who have suggested the solution in different messages.

1. Install the most recent bridge and the SMF and mambo. Then go through the decent installation guides given here, especially underlined by Kindred. Make sure to publish all mambots as well as the mod_smf_login. Choose as a part of the main menu, the bridge component and make it open to public. In SMF choose subdomaincookies and databased sessions (untick the local cookies). Don't use cache. Choose activation method (by email) for your registrations.

2. You will have a very messy board if you access it unwrapped, so go and correct the follwing in /com_smf/smf.php
Find (around row 1245): You will have a nice template thereafter.


--- Code: ---function integrate_load_theme() {
global $context, $simpleActions;
if (!WIRELESS && !isset($_REQUEST['xml']))
$context['template_layers'] = array('body');
}
--- End code ---

replace with:


--- Code: ---function integrate_load_theme() {
global $context, $simpleActions, $wrapped;
if (!WIRELESS && !isset($_REQUEST['xml']) && $wrapped == 'true')
$context['template_layers'] = array('body');
}
--- End code ---

2. You will get errors concerning the smf.php concerning three rows starting at row 1109

Find this:

   
--- Code: ---global $language, $synch_lang, $language_conversion, $smf_path;

$configuration =& mamboCore::getMamboCore();
$database =& mamboDatabase::getInstance();
$mainframe =& mosMainFrame::getInstance();
--- End code ---

Replace with this:

   
--- Code: ---global $language, $synch_lang, $language_conversion, $smf_path, $configuration, $database, $mainframe;
--- End code ---

3. You will get another error concerning mod.smf.login file:

Find (around row 50-52)

   
--- Code: ---function integrate_pre_load () {

global $lang, $mosConfig_lang, $synch_lang, $smf_lang, $smf_path;
--- End code ---

Add there also the configuration like as follows:

   
--- Code: --- function integrate_pre_load () {

global $lang, $mosConfig_lang, $synch_lang, $smf_lang, $smf_path, $configuration;
--- End code ---

You are done if you have not got community builder on the mambo side. If you want to have the members entered also in "mos_comprofiler" table you need following changes:

4. The mos_comprofiler table misses a row called "is_admin", so any attempts to copy a user via the bridge causes errors. You need to go to the database and add a row named "is_admin". That will be text field with default value "N". This means that any new user will considered as a normal registered member not a administrator (in which case the "N" changes to "Y" = yes).

5. Then you must change the SQL query in smf.registration.php file in order to be able to copy this row as well, otherwise the Community Builder will give server errors. So, fetch "/components/com_smf_registration/smf.registration.php"

Find (row 192)
          
--- Code: ---if ($cb_reg=="on")
                               $sql = mysql_query("
INSERT INTO {$mosConfig_dbprefix}comprofiler
(id, user_id)
VALUES ('$mos_id', '$mos_id')");
--- End code ---

Add also "is_admin" there with default value N

         
--- Code: ---if ($cb_reg=="on")
$sql = mysql_query("
INSERT INTO {$mosConfig_dbprefix}comprofiler
(id, user_id, is_admin)
VALUES ('$mos_id', '$mos_id', $mos_is_admin)");
--- End code ---

That's it -you are done!

Hope this helps others.

Kindred:
nicely done. :)

aht961:
Not everything is solved, though. If I keep the language sync with mambo, the SMF does not allow me to change the language from ISO-8859-1 to utf8 version of Finnish locale. If I don't sync the language with mambo, the email sent to the the member to be is full of "weird" characters and e.g. my Web based email client does not show the content , so one cannot click the confirmation link. Some mail clients (like iPhone's mail) show it, though. This means some of the members will not be able to confirm their registration. If I keep sync, I cannot change the default language from English to Finnish (although it is fi_FI and utf-8 in mambo config).

If I keep the default language in English, every thing is ok. If I choose the ISO-8859 version of the Finnish language, the mail is shown but the forum is full of these undefined characters.

Long story in short: Is there any way that I keep the language sync but still could change the language after login?

Weird thing is mambo's locale is using utf-8 character set, however, SMF thinks that it is ISO-8859-1. Hope I made myself clear?

Kindred:
did you install SMF with the UTF-8 language and UTF-8 database?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version