Advertisement:

Author Topic: Mambo/Joomla <-> SMF Bridge (Combined Readme) [UPDATED for 1.1.7]  (Read 110777 times)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
The bridge for SMF and Joomla has been discontinued.  According to the current interpretation of the GPL (by Joomla and the FSF), the joomla-smf bridge is in violation of the GPL. Because SMF developers try to adhere to the license restrictions of other softwares, just as we expect others to respect our license, we have removed the joomla-smf bridge.





This thread now covers the bridge for SMF 1.1.x
This bridge is 1.1.7

If you are using SMF RC1 or prior (including 1.0.x) please see the SEPARATE thread on bridge 3.19a!

If you are using the 1.1.2 (aka 3.20), 1.1.3, 1.1.4, 1.1.5 or 1.1.6, then please upgrade to 1.1.7.
This thread no longer covers anything below 1.1.7


If you are using Mambo 4.6.1 or higher, then please go over to the support area dedicated to the mambo bridge.

I have tried to split this thread into distinct sections, now. Nearly the entire thread has been revised! If you are confused, please read the whole thing before asking questions!

Please also be sure to read the FAQ for v1.1.7

If you are unsure which bridge you should be using: READ THIS


In addition, this is a tutorial on modifying your SMF theme to be properly used in a bridged (wrapped) forum.
http://www.technoadvice.com/advanced/developer/modify_an_smf_theme_for_joomla_and_mambo.html



Installation of 1.1.7 with Joomla
Installation of 1.1.7 with Mambo 4.5.4
Width of Themes pages in SMF?
Modifications for Additional Functions and Code Hacks
Code being removed from Posts in a wrapped Forum?
THEMES!
OTHER MODULES/BOTS
MODULES & BOTS for 1.1.7

Are you having trouble after turning on SEF in Joomla?
problems with page compression?
« Last Edit: October 10, 2007, 05:57:43 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
Installation of the bridge with Joomla
« Reply #1 on: April 10, 2006, 04:32:13 PM »
The top of this thread now covers the new bridge for SMF 1.1.x.   This bridge is v1.1.7.
If you are using SMF RC1 or prior (including 1.0.x) please see the SEPARATE thread for bridge 3.19a!)


THIS message specifically pertains to SMF 1.1.x in combination with Joomla up to version 1.0.12. If you are using mambo, please see the NEXT message in this thread.

As of 1.1.4, there is now a system mambot that automatically inserts the code that you were previously required to add, by hand, into the joomla template. If you have previously modified joomla templates, you MUST remove this code from the <head> section of that template!

It should be noted, before you start with this bridge...
Everything in these instructions assumes that you already have Joomla (1.0.3 or higher) and SMF (1.1.x) installed and working as stand-alone utilities.

For simplicity, if you don't know exactly what you are doing:
- SMF should be installed in a "sub level" directory. (i.e. www.yoursite.com/forum or something like that)
- Mambo can be installed in a "sub level" directory or at the top level itself.

The bridge is available HERE

START:

First, unzip the Bridge ZIP file

This will extract to create threefiles.
com_smf.zip
readme.html
leggimi.html (the readme in Italian)

For new installs:

Unzip the package, read the readme.html, and install the com_smf.zip as a component.

For Joomla, you will not need to add code to your template anymore.

For upgrades from 1.1.2 or 1.1.3:

Uninstall the bridge component, the bridge registration component, and the mod_smf_login module.  Remove the code from your Joomla template.

For upgrades from 1.1.4 or 1.1.5:

Uninstall the bridge component, the bridge registration component, the mod_smf_login module, and the smf_header_include mambot.

Unzip the package, read the readme.html and install the com_smf.zip as a component.  Please note that for Mambo, the code in the template has changed significantly.  The code is no longer required for Joomla.

INSTALLATION INSTRUCTIONS:

Now that you have all the files unzipped and ready to load, you can log in to your
server and start installation.

This README has a detailed instructions, but the new one-step design makes things
fairly easy and straight-forward. Make sure you read the README.HTML file first!

1 ) Make sure that the mambots/system directory is chmod 777 (it is not, by default).

2 ) Install the Simple Machines Forum component.
      2a) Using Joomla Admin > Install/Uninstall Component
      2b) Choose Upload File Package and Browse to the into which you extracted
             the bridge and choose the file called "com_smf.zip"
      2c) This now automatically installs the com_smf_regsitration component,
             the mod_smf_login module and the SMF_header_include mambo as well
             as adding a Forum menu item to the main menu.

3 ) Configure the SMF component in Joomla Admin.
      3a) Using the Joomla Admin, choose Components > Simple Machines Forum > Configuration

     CONFIGURATION TAB
      3b) Set the Path to SMF. This is NOT a URL! This is the absolute path to your SMF
            Installation.
            (Usually this will be something similar to /home/username/public_html/forum)
      3c) Choose if you want your Forum wrapped or unwrapped.
 
            It should be noted that there are essentially three formats to display your Joomla
            to Forum integration:
      Wrapped:         You are using SMF through the Joomla bridge. The Forum appears
                           "wrapped" in the Joomla template.
      Unwrapped:      You are still using SMF through Joomla, but it doesn't have the
                           look of a wrapped forum. It looks stand-alone, but it is actually
                           loading through Joomla.
                           This is set in the Joomla config for the component.

     REGISTRATION TAB
      3d) Choose what registration method you want to use:
            - The bridge registration looks like mambo's registration method...
            - The joomla registration uses Joomla's registration routine...
            - The SMF registration uses SMF's registration routine...
            - The Community Builder registration uses the CB registration component...
            - The MamboCharge registration uses the MamboChargeregistration component...
            but all options will still result in the users being added to both databases (eventually).
      3e) Require Registration Agreement? Display the agreement.txt from SMF's directory and
           require "I agree" to be checked?
      3f) Ask for ICQ, AIM, YIM, MSN? At registration time, as for the IM info?
      3g) Send a SMF PM to the user on registration?
      3h) Use real name or username as display? For SMF, is the joomla NAME (aka realname)
            used as their display name or is the joomla USERNAME (login name) used for both
            the username AND display name fields?
      3i) Also register into Community Builder?
           (You must have Community Builder already installed, and be using Bridge Registration)

     GROUPS TAB
      3j) Associate the SMF groups with the Joomla Groups here. This is ONE WAY, SMF to Joomla!
           It will not make a Joomla admin into an SMF admin!

     SYNC TAB
      3k) This should be self-explanatory.

4 ) The Simple Machines Forum Registration component just opens the same configuration
      screen, to the REGISTRATION TAB
     
      Other Configuration notes
      4a) You will probably want to start SMF off with default settings...
      4b) If you make the Joomla menu item (for the SMF - Bridge component) available to registered
            users only, the login and registration may not function correctly.
      4c) Activation emails should be handled by Joomla (for Bridge Regsitration) or in SMF (for SMF registration)
 
5) Configure the Login Form (mod_smf_login)
      5a) Choose what options you want displayed in your Login box...
      5b) Even if you do not change any options, click SAVE!
            It is a known issue in Joomla that modules must be "saved" at least once in order to
            be fully activated.
 
6 ) In Joomla Admin > Menu > User Menu
      6a) Remove the link for the User Profile.
            (You will probably not want Mambo/Joomla to handle the user
            information any more, unless you are using CB.)
      6b) Remove the link for the Joomla Logout.
 
7 ) In Joomla Admin > Menu > Main Menu
     7a) You may have to delete and re-enter the Menu item for the SMF- Bridge Component.
          (if it points to "Component - "). (Don't forget to empty the trash)
          If so, then add a new item, pointing to the SMF - Bridge component.
« Last Edit: February 22, 2007, 12:39:16 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
Installation of the bridge with Mambo 4.5.4
« Reply #2 on: April 10, 2006, 06:05:55 PM »
The top of this thread now covers the new bridge for SMF 1.1.x   This bridge is v1.1.7.
If you are using SMF RC1 or prior (including 1.0.x) please see the specific message further down in this thread!)


THIS message specifically pertains to SMF 1.1.x in combination with Mambo up to version 4.5.4. If you are using Joomla, please see the PREVIOUS message in this thread. If you are using Mambo 4.6.x, we are currently TESTING a new version of the bridge. 1.1.7 will NOT work with Mambo 4.6.x

The system mambot that automatically inserts the code does not work with Mambo!

It should be noted, before you start with this bridge...
Everything in these instructions assumes that you already have Mambo (4.5.2.3 or higher) and SMF (1.1.x) installed and working as stand-alone utilities.

For simplicity, if you don't know exactly what you are doing:
- SMF should be installed in a "sub level" directory. (i.e. www.yoursite.com/forum or something like that)
- Mambo can be installed in a "sub level" directory or at the top level itself.

The bridge is available HERE

START:

First, unzip the Bridge ZIP file

This will extract to create threefiles.
com_smf.zip
readme.html
leggimi.html (the readme in Italian)

For new installs:

Unzip the package, read the readme.html, and install the com_smf.zip as a component.

For Joomla, you will not need to add code to your template, but for Mambo, you will.

For upgrades from 1.1.2 or 1.1.3:

Uninstall the bridge component, the bridge registration component, and the mod_smf_login module.  Remove the code from your Mambo template.

For upgrades from 1.1.4 or 1.1.5:

Uninstall the bridge component, the bridge registration component, the mod_smf_login module and the smf_header_include mambot.  Remove the code from your Mambo template.

Read the readme.html.  Install the com_smf.zip as a component.  Please note that for Mambo, the code in the template has changed significantly.

INSTALLATION INSTRUCTIONS:

Now that you have all the files unzipped and ready to load, you can log in to your
server and start installation.

This README has a detailed instructions, but the new one-step design makes things
fairly easy and straight-forward. Make sure you read the README.HTML file first!

1 ) Install the Simple Machines Forum component.
      1a) Using Mambo Admin > Install/Uninstall Component
      1b) Choose Upload File Package and Browse to the into which you extracted
             the bridge and choose the file called "com_smf.zip"
      1c) This now automatically installs the com_smf_registration component and
             the mod_smf_login module as well as adding a Forum menu item to the main menu.

2 ) Modify the index.php of your Mambo Template.
      2a) Go to directory MAMBO/templates/NAME
            (where MAMBO is your mambo directory and NAME is the name of the template.)
      2b) Open index.php
      2c) Add the following code just before the </HEAD> tag in index.php

Code: [Select]
<?php 
global $sc$context$settings;

if (!
defined('SMF')){
// Get the configuration. This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
"
);
$variables $database->loadAssocList();

foreach (
$variables as $variable){
$variable_name $variable['variable'];
$
$variable_name $variable['value1'];
}
require (
$smf_path."/SSI.php");
}

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

mysql_select_db($mosConfig_db);

echo 
'
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js?beta4"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
$settings['theme_url'], '";
var smf_images_url = "'
$settings['images_url'], '";
var smf_scripturl = "'
$scripturl'";
var smf_session_id = "'
$context['session_id'], '";
// ]]></script>'
;

echo 
'
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc1" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?beta4" media="print" />
<link rel="help" href="'
$scripturl'?action=help" target="_blank" />
<link rel="search" href="' 
$scripturl '?action=search" />
<link rel="contents" href="'
$scripturl'" />';
?>

AND add the following just above the </body> tag at the bottom of the index.php file:
Code: [Select]
<?php mysql_select_db($GLOBALS['db_name']); ?>

3 ) Configure the SMF component in Mambo Admin.
      3a) Using the Mambo Admin, choose Components > Simple Machines Forum > Configuration

     CONFIGURATION TAB
      3b) Set the Path to SMF. This is NOT a URL! This is the absolute path to your SMF
            Installation.
            (Usually this will be something similar to /home/username/public_html/forum)
      3c) Choose if you want your Forum wrapped or unwrapped.
 
            It should be noted that there are essentially three formats to display your Joomla
            to Forum integration:
      Wrapped:         You are using SMF through the Mambo bridge. The Forum appears
                           "wrapped" in the Joomla template.
      Unwrapped:      You are still using SMF through Mambo, but it doesn't have the
                           look of a wrapped forum. It looks stand-alone, but it is actually
                           loading through Mambo.
                           This is set in the Mambo config for the component.

     REGISTRATION TAB
      3d) Choose what registration method you want to use:
            - The bridge registration looks like mambo's registration method...
            - The mambo registration uses Mambo's registration routine...
            - The SMF registration uses SMF's registration routine...
            - The Community Builder registration uses the CB registration component...
            - The MamboCharge registration uses the MamboChargeregistration component...
            but all options will still result in the users being added to both databases (eventually).
      3e) Require Registration Agreement? Display the agreement.txt from SMF's directory and
           require "I agree" to be checked?
      3f) Ask for ICQ, AIM, YIM, MSN? At registration time, as for the IM info?
      3g) Send a SMF PM to the user on registration?
      3h) Use real name or username as display? For SMF, is the joomla NAME (aka realname)
            used as their display name or is the Mambo USERNAME (login name) used for both
            the username AND display name fields?
      3i) Also register into Community Builder?
           (You must have Community Builder already installed, and be using Bridge Registration)

     GROUPS TAB
      3j) Associate the SMF groups with the Mambo Groups here. This is ONE WAY, SMF to Mambo!
           It will not make a Mambo admin into an SMF admin!

     SYNC TAB
      3k) This should be self-explanatory.

4 ) The Simple Machines Forum Registration component just opens the same configuration
      screen, to the REGISTRATION TAB
     
      Other Configuration notes
      4a) You will probably want to start SMF off with default settings...
      4b) If you make the Mambo menu item (for the SMF - Bridge component) available to registered
            users only, the login and registration may not function correctly.
      4c) Activation emails should be handled by Mambo (for Bridge Regsitration) or in SMF (for SMF registration)
 
5 ) Configure the Login Form (mod_smf_login)
      5a) Choose what options you want displayed in your Login box...
      5b) Even if you do not change any options, click SAVE!
            It is a known issue in Mambo that modules must be "saved" at least once in order to
            be fully activated.
 
6 ) In Mambo Admin > Menu > User Menu
      6a) Remove the link for the User Profile.
            (You will probably not want Mambo/Joomla to handle the user
            information any more, unless you are using CB.)
      6b) Remove the link for the Joomla Logout.
 
7 ) In Mambo Admin > Menu > Main Menu
     7a) You may have to delete and re-enter the Menu item for the SMF- Bridge Component.
          (if it points to "Component - "). (Don't forget to empty the trash)
          If so, then add a new item, pointing to the SMF - Bridge component.
« Last Edit: February 22, 2007, 12:40:13 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
Width of Themes pages in SMF?
« Reply #3 on: April 11, 2006, 10:10:04 AM »
If you are having troubles with the width of the theme setup page in any version of SMF 1.1 while it is wrapped:

In the core theme, in Themes.template.php, find this (3 instances, on lines 100, 108, and 117):

Code: [Select]
<td style="padding-left: 20%;">
replace with this:

Code: [Select]
<td style="padding-left: 20ex;">
I also came across a similar issue with the "find and fix errors" link in the Admin section.
If your board is large enough that it has to do the find/fix in slices, there is a "percent complete" bar that gets filled in. The page with this bar has the same extreme width issue and has the same fix. in Admin.template.php, change the 20% to 20ex.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
Modifications for Additional Functions and Code Hacks
« Reply #4 on: April 11, 2006, 10:55:16 AM »
ADDITIONAL FUNCTIONS:



REDIRECT USERS FROM ACCESSING THE FORUM DIRECT URL

Inserting the code below into smf's index.php will redirect any users who access the forum URL directly into the joomla/mambo wrapped forum URL.
Orstio made the original hack and exrace modified it...

Code: [Select]
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false && strpos($_SERVER['QUERY_STRING'], 'verificationcode') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: /index.php?option=com_smf&Itemid=yourItemidNum&".$_SERVER['QUERY_STRING']); }
}



MULTIPLE FORUMS!

GooseMoose has come up with another amazing hack.
This one allows you to run multiple forums (with completely separate message boards) sharing the same mambo/Joomla login. In other words, access to the site gives you access to all the separate forums.
CODE HACK AND DISCUSSION



SEARCH SMF, COPPERMINE and MAMBO/JOOMLA

To add a search function of SMF (and Coppermine) to your mambo/joomla search box, check out
THIS thread by bmwheaven
(This is different from the searchbot!)



ADD COPPERMINE LINK TO THE USER DATA DISPLAYED IN POSTS

to add the coppermine link to your user's posts (or anywhere else) and still open it
wrapped in mambo/joomla, Goosemoose has come up with the following modification:

First, insert the following code before the words "// auto height control" in wrapper.php in your wrapper components folder.
Code: [Select]
// pass all except Mambo specific parameters to the wrapper
    $allparams = '?';
             
    if (isset( $_GET['option'] ))
      $workarray = $_GET;
    if (isset( $_POST['option'] ))
      $workarray = $_POST;
             
    reset($workarray);

    while (list($key, $val) = each($workarray)) {
    if (($key != 'option') && ($key != 'Itemid'))
        $allparams = $allparams . $key . '=' . $val . '&';
    }
    $row->url = $row->url . $allparams;

Now open your display.template.php in your SMF theme and add the following code after where you want the gallery link to occur, I placed mine below the personal text which you can find by searching for:
// Show their personal text?

Code: [Select]
// Add for personal gallery
      echo '
', '<a href="' . $mosConfig_live_site . 'index.php?option=com_wrapper&Itemid=66&cat=', $message['member']['id']+10000, '"/><img border="0" src="' . $settings['images_url'] . '/gallery.gif" width="75" height="35" alt="" /></a><br />';

and finally, the code to make coppermine's wrapped page return to the top when you click on a link.
In mambo/joomla's file, wrapper.html.php, insert the following twice into the function iFrameHeight:
parent.scrollTo(0,0);

so your function looks like this:
Code: [Select]
function iFrameHeight() {
var h = 0;
if ( !document.all ) {
h = document.getElementById('blockrandom').contentDocument.height;
document.getElementById('blockrandom').style.height = h + 60 + 'px';
parent.scrollTo(0,0);
} else if( document.all ) {
h = document.frames('blockrandom').document.body.scrollHeight;
document.all.blockrandom.style.height = h + 20 + 'px';
parent.scrollTo(0,0);
}
}

How this is going to work (this is for the info of those who want to use this elsewhere):
Now anytime you call a wrapper from smf or anywhere else anything that you add to the end of the link with &putparamatershere will get added on to the actual wrapped page. For example if you want to link to a user gallery the address is usually http://www.yoursite.com/coppermine/index.php?cat=15031 but your coppermine wrapper is actually something like http://www.yoursite.com/index.php?option=com_wrapper&Itemid=66, and it wraps http://www.yoursite.com/coppermine/index.php. Now that we have edited wrapper.php if you call the wrapped item by saying http://www.yoursite.com/index.php?option=com_wrapper&Itemid=66&cat=10001 the &cat=10001 will become ?cat=10001 and get appended to the http://www.yoursite.com/coppermine/index.php and become a link to that users gallery, http://www.yoursite.com/coppermine/index.php?cat=10001.



FIXING LINKS IN SMF MESSAGES FROM PRE-BRIDGED FORUMS

(thanks to Goosemoose for this)
If you were running a forum prior to bridging it with mambo/joomla, there will be links in
messages that point to the unbridged forum location. You can change these by going
into phpMyAdmin and running a simple SQL command on the smf_messages table.

The format is:

Code: [Select]
UPDATE smf_messages SET `body` = replace(`body`,"http://www.yoursite.com/forum/index.php?","http://www.yoursite.com/mambo/index.php?option=com_smf&Itemid=##&")

where smf_messages is your actual table (change the smf_ if you are using a different
prefix, obviously)
where http://www.yoursite.com/forum/index.php is the actual URL of your previous
(unbridged) SMF index.php.
where http://www.yoursite.com/mambo/index.php is the actual location of your MAMBO/JOOMLA
index.php
where Itemid=## is your actual SMF component Itemid

so, an example, (as provided by Goosemoose)

Code: [Select]
UPDATE rfc_messages SET `body` = replace(`body`,"http://www.goosemoose.com/rfc/index.php?topic=","http://www.goosemoose.com/index.php?option=com_smf&Itemid=70&topic=")

He used rfc_ as his SMF database table prefix and rfc was the SMF directory.
note that his mambo is installed in the root directory...



DYNAMIC PAGE TITLES

From Goosemoose, if you add this line into the code that you added in your mambo/joomla template file (just before the call for mosShowHead(); for the v1.1.6 bridge), it will add dynamic page titles for your forum pages.

Code: [Select]
if(!empty($context['page_title']))
     $mainframe->setPageTitle($context['page_title']);



DYNAMIC PAGE TITLES

Dynamic page titles in your wrapped forum, and your Mambo content items, can also (theoretically) be accomplished like this:
(If your mambo/joomla template does not have a title tag, that is because it is being called in the mos_header code... and this hack may not work)

1) For the v1.1.x bridge, move the mosShowHead(); to above the <title> tag in your Mambo template. (Just cut and paste).

2)  Change the code from <title> to </title> (inclusive) to this:

Code: [Select]
<title><?php 

  
if ($_REQUEST['id']) {
  
// load the content item name and category
    
$database->setQuery"SELECT title, catid FROM #__content WHERE id=$id);
    
$row null;
    
$database->loadObject$row );
  }

echo 
$context['page_title'] ? $context['page_title'] : ($row->title $row->title $mosConfig_site_name); ?>
</title>



PATHWAY HACK for 1.1.3 and above

RJPrince, who wrote the original hack has noted that v1.1.3 of the Bridge breaks the previous hack for the pathways (see below).
He has worked out that adding this code to the Joomla template's index.php file (just below the opening body tag) should work.

Code: [Select]
<?php
/************************Below Added to use Mambo Pathway *********************/
global $mainframe;

// Get last item.
end($context['linktree']);
$last_link_key key($context['linktree']);

foreach ($context['linktree'] as $link_num => $tree)
{
if ($link_num 0) { // Don't show first linktree element, because forum menu item will already be in Mambo Pathway.
//If there is a url and this is not the last link item, show as a link. Otherwise just show.
$mainframe->appendPathWay(((isset($tree['url']) && ($last_link_key != $link_num)) ? 
 ob_mambofix('<a href="' $tree['url'] . '" class="pathway">') . $tree['name'] . '</a>' $tree['name']) . ' ');
}
}
/************************Above Added to use Mambo Pathway *********************/
?>



Audible alert on new PM
« Last Edit: February 22, 2007, 12:41:08 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
Code being removed from Posts in a wrapped Forum?
« Reply #5 on: April 11, 2006, 11:08:17 AM »
This first hack is for Mambo 4.5.2.3 or prior ONLY. It will not work with Mambo 4.5.3 or any version of Joomla. See the second half of this message for Mambo 4.53 and Joomla.

If HTML code is being removed from posts in your wrapped forum, then you can try the following...


For a quick fix, you can do this:

In your Mambo includes folder, there is a file called mambo.php.  In it there is a function called mosGetParam().

Find this:

Code: [Select]
function mosGetParam( &$arr, $name, $def=null, $mask=0 ) {
$return = null;
if (isset( $arr[$name] )) {
if (is_string( $arr[$name] )) {
if (!($mask&_MOS_NOTRIM)) {
$arr[$name] = trim( $arr[$name] );
}
if (!($mask&_MOS_ALLOWHTML)) {
$arr[$name] = strip_tags( $arr[$name] );
}
if (!get_magic_quotes_gpc()) {
$arr[$name] = addslashes( $arr[$name] );
}
}
return $arr[$name];
} else {
return $def;
}
}

and replace with this:

Code: [Select]
function mosGetParam( &$arr, $name, $def=null, $mask=0 ) {
$return = null;
if (isset( $arr[$name] )) {
if (is_string( $arr[$name] )) {
if (!($mask&_MOS_NOTRIM)) {
$arr[$name] = trim( $arr[$name] );
}
if (!defined("_MOS_ALLOWHTML")) {
$arr[$name] = strip_tags( $arr[$name] );
}
if (!get_magic_quotes_gpc()) {
$arr[$name] = addslashes( $arr[$name] );
}
}
return $arr[$name];
} else {
return $def;
}
}




This second hack is for Joomla ONLY. It will not work with Mambo 4.5.2.3 or previous. See the first half of this message for Mambo 4.5.2.3 and prior.

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

Code: [Select]
$message = mosGetParam( $_POST, 'message', 0 );
if ($option == 'login') {

Altered code:

Code: [Select]
if ($option == 'login') {
     $message = mosGetParam( $_POST, 'message', 0 );



*Note that this is NOT a change recommended for everyone. Modifying core files is not typically required for the installation.)

« Last Edit: April 11, 2006, 11:13:42 AM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
THEMES!
« Reply #6 on: April 11, 2006, 11:29:45 AM »
THEMING:

Changing the SMF doc_type from xhtml to html will handle many of the basic "super large font" issues.
The can be done by changing the line near the top of index.template.php in your SMF Theme directory.
However, some of the Mambo/Joomla templates and SMF themes do not play well together.

In the Mambo/Joomla Template, fixed width templates of less than 500 pixels width are difficult for SMF to "fit in".
You have two main options.
The first is to increase the basic width of the Mambo/Joomla Template.
-> In MAMBO/templates/TEMPLATE_NAME/index.php, change the width call of the main table to something larger...

The second option, which may require some tweaking, is the change the Mambo/Joomla Template into a variable width template.
-> In MAMBO/templates/TEMPLATE_NAME/index.php, change the width call of the main table 100%...

In addition to the width issues, there are some overlaps in the CSS entires between Mambo/Joomla and SMF.
The CSS files for Mambo/Joomla and SMF have some duplicate values that may conflict.
A proper design of the bridged site will include personalized templates/themes for Mambo/Joomla and SMF that will avoid this situation. This may take some time (and effort), however. You can make a "quick and dirty" merge of the CSS files by doing the following:

Open the MAMBO/templates/TEMPLATE_NAME/css/template_css.css file
Open the SMF/Themes/THEME_NAME/style.css file

Copy all of the SMF Theme file into the Mambo/Joomla template file.
Remove the Duplicate entries from the newly copied portion.
(In other words, if the CSS entry exists in the Mambo/Joomla template, delete the entry in the newly created SMF section)
Now save it, and then remove the same "duplicate" entries in the style.css file in your SMF theme directory.
« Last Edit: May 23, 2006, 01:10:12 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
OTHER MODULES/BOTS:
« Reply #7 on: April 11, 2006, 11:30:32 AM »
OTHER MODULES/BOTS:

DiscussBot
There is a Mambot utility that allows a "discussion link" to be inserted
into Mambo/Joomla News items.
This link will create a new topic, if one does not already exist. If a topic linked
to this News item does exist,
the link will add a reply from the current user.
Chadness has taken over most of the work on this Bot, HERE

SEARCHBOT
This Bot will add SMF locations into your standard Mambo/Joomla search function.
RJPrince has made an excellent utility: a searchbot to integrate the SMF forums into Mambo's general search feature. Be sure to read the readme file to make necessary changes to index.php.
also avilable by link at the Princeclan site

AUTHORBOT
This bot will associate the author of Joomla Content Items to the user's SMF Profile. Written by Benson, Orstio (and Kindred) have made a few corrections and the modified version is available in the post below.

MISCELLANEOUS MODULES

There are various modules that use SSI functions to display SMF
information in the Mambo/Joomla framework.
These can all be loaded directly into Mambo Admin > Modules > Install/Uninstall Modules.
or Jooma Admin > Install/Uninstall > Modules

mod_related_topics:
&nbsp;&nbsp; This module displays links to SMF topics that are related to the Item currently displayed.
&nbsp;&nbsp; These are based on the keywords Metadata. All the keywords of the current Content Item are
&nbsp;&nbsp; searched against the titles of topics. For example, you may have an Item on 'Breeding Cockatoos'
&nbsp;&nbsp; and you may have a discussion entitled 'Hand Raising Parrots'. If you include the keyword
&nbsp;&nbsp; 'parrot' in the Metadata of the item, then the Related Topics module will list the
&nbsp;&nbsp; 'Hand Raising Parrots' Topic when viewing 'Breeding Cockatoos'.

mod_smf_RecentEvents:
&nbsp;&nbsp; This module uses the SSI function to display the Upcoming (5 days) Events, in a simple list.

mod_smf_RecentPosts:
&nbsp;&nbsp; This module uses the SSI function to display the last 5 posts made in the SMF Forum.

mod_smf_RecentTopics:
&nbsp; &nbsp;This module uses the SSI function to display the last 5 Topics posted to in the SMF Forum.

mod_smf_NewTopics:
&nbsp; &nbsp;This module uses the SSI function to display the last 5 NEW Topics posted in the SMF Forum.

mod_smf_topTopicsReplies.zip
&nbsp;&nbsp; This module uses the SSI function to display the top 5 Topics posted to in the SMF Forum.

mod_smf_whosOnline
&nbsp;&nbsp; This module uses the SSI function to display the users currently online.
&nbsp;&nbsp; (The Mambo Who's Online module is buggy when working with the bridge. This file
&nbsp;&nbsp; actually is also a bit buggy...&nbsp; I recommend using the online2 module listed next)

mod_smf_online2.zip
&nbsp;&nbsp; This module has been modified by Kindred and then spruced up (alot) by mic. Mic has
&nbsp;&nbsp; done a great job and there are many parameters you can set to get the display that
&nbsp;&nbsp; you want. This, by default, displays the number of Guests and Users online and then
&nbsp;&nbsp; a bulleted list of the users. The exact text, and the format of the list of users
&nbsp;&nbsp; (bulleted or comma separated) is defined in the module configuration.

mod_smf_topPosters.zip
&nbsp; This module has been designed from the original SSI function by Kindred. It will list
&nbsp; the top X posters along with their current post count (all defineable as parameters)

mod_smf_events.zip
&nbsp; This module has been modified from the original SSI function by Kindred. It will list
&nbsp; (configurable) the holidays, birthdays and events form the SMF calendar.

mod_smf_showcal.zip
&nbsp; This module has been modified from White Rabbit's original attempt at the bridge
&nbsp; and SSI functions by Kindred. It is fairly configurable and will show the SMF calendar
&nbsp; in minitaure, to fir in the module (usually side-bar) space. A mouse-over of days with
&nbsp; events will show a pop-up with the event, holiday and/or birthday information from
&nbsp; the SMF calendar.

mod_smf_keystats2.zip
&nbsp; This module by xenovanis displays certain statistics about your SMF forum.
« Last Edit: April 19, 2007, 06:22:59 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
MODULES & BOTS for bridged sites
« Reply #8 on: April 11, 2006, 11:32:42 AM »
Attached to this message are versions of the modules & bots that will work with v1.1.3 and higher of the bridge.

Dec 6, 2006
note: recentPosts and recentTopics have been modified to include a security check (valid MOS or die) also
recentTopics has been modified to add some parameters and code is movied out of SSI to make it easier for people to customize.
Dec 22, 2006: Updated mod_recentTopics to correct an error in the XML.
Dec 26, 2006: Updated mod_recentTopics to work...
Jan 15, 2007: Orstio added mod_related_topics
Jan 19, 2007: corrected mod_recentTopics correctly this time...
Feb 22, 2007: Added mod_recentTopics and mod_newTopics updated by Zeri YT!
Mar 1, 2007: mod_recentTopics and mod_newTopics corrected by Zeri YT!

The Discussbot can be gotten from this link
« Last Edit: March 01, 2007, 02:36:03 PM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
Are you having trouble after turning on SEF in Joomla?
« Reply #9 on: May 18, 2006, 07:17:31 PM »
From Paki...

Are you having trouble after turning on SEF in Joomla? Getting 404 errors when you try to access this:
Code: [Select]
The requested URL /component/option,com_smf/Itemid,27/board,49.0 was not found on this server.
Ensure your HTACCESS file's Standard SEF section looks like this. If it does, and the problems continue, THEN post on the SMF boards about it.
Code: [Select]
########## Begin Standard SEF Section
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
RewriteRule ^(content/|component/) index.php
#
########## End Standard SEF Section

Although it is CLEARLY documented in the HTACCESS file itself, people still have trouble with it. Having it in the README file will reduce most of it since people will be reading it while trying to install it, though some people will still disregard it.

This is what it says in the HTACCESS file:
Quote from: JOOMLA HTACCESS FILE. READ IT
#####  SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented.  If you are running your Joomla/Mambo from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line.  For example, if your Joomla/Mambo is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
problems with page compression?
« Reply #10 on: October 09, 2006, 09:50:19 PM »
Try this:

Turn off compressed output in both Joomla and SMF.

Add this to the top of your .htaccess:

Code: [Select]
AddType application/x-httpd-php .html
php_value output_handler ob_gzhandler

(Thanks to GooseMoose for that!)  ;)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,508
  • Gender: Male
    • Kindred-999 on GitHub
discussbot issues
« Reply #11 on: December 07, 2006, 10:33:46 AM »
The discussbot has been revised several times since this fix... However, if you inist on using the old version, continue reading.


For Joomla 1.0.10 and 1.0.11 on systems using the OLD dicussbot:
(Thanks to Predator)
Due to the lastest Joomla! Release (Version 1.0.10) the bot could add it's links into a MODULE display. To avoid this, you need to do the following in the function MOSBOT_add_smfforumlink():

Find:
Code: [Select]
if (strpos($row->text,"{mos_smf_discuss:") === false && $default_discuss == "") {
       // No - just leave
       return;
}

Add after:
Code: [Select]
// Since Joomla! 1.0.10 also module can effect Bots, to avoid just return if it is a module.
if (@$row->content){
       return;
}
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.