Home arrow Developers arrow Developer arrow Modify an SMF theme for Joomla and Mambo
 
Modify an SMF theme for Joomla and Mambo - Intro Print E-mail
Article Index
Intro
Removing excess tags
Removing extra theme info
Removing conflicting CSS
Conclusion

Removing conflicting CSS

Last, but not least, we'll want to remove the CSS from your SMF theme that might conflict with Joomla or Mambo's template.  What we are going to do here, is, remove conflicting CSS from the theme's CSS file, and add it to a new file we will call "style-unwrapped.css".  This will only load when the forum is accessed unwrapped.

Open up your theme's style.css file in your text editor.  The first thing we'll cut out is lines 1-12, which contain the CSS for links, a:link, a:visited, and a:hover:
Code:
/* Normal, standard links. */
a:link
{
color: #000000;
text-decoration: underline;
}
a:visited, a:hover
{
color: #323232;
text-decoration: underline;
}


Paste those in to a new file called "style-unwrapped.css".

Next, we'll cut out the body tags, which should now be on lines 20-35:
Code:
/* By default (td, body..) use Tahoma in black. */
body, td, th
{
color: #000000;
font-size: small;
font-family: tahoma, sans-serif;
}

/* The main body of the entire forum. */
body
{
background-color: white;
margin: 0px;
padding: 0px;
}


Again, paste those in to "style-unwrapped.css".

That should be it for most themes, but you might want to go through and compare it to your Mambo or Joomla template to see if any of the other CSS calls conflict.

One more thing to do.  Going back to our index.template.php file, we need to tell it to load style-unwrapped.css. The best place to do this is right after the line that it loads style.css, which is line 74.  Just after line 74, paste in this line:
Code:
    <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style-unwrapped.css?rc2" />

Now, upload all of these to your theme's directory, and test it out!


 
 
© 2008 technoadvice.com
Joomla! is Free Software released under the GNU/GPL License.