News:

Wondering if this will always be free?  See why free is better.

Main Menu

Automated CSS "Integrator" - Nice timesaver

Started by Jen Smith, March 26, 2007, 10:26:05 AM

Previous topic - Next topic

Jen Smith

I started working on another Joomla/SMF integrated web site for a friend of mine, and I came across this nifty little page called the CSS Integrator.  This thing saved me a lot of time getting the SMF and Joomla templates to play nicely together.

It's pretty simple.  First, you send the script your SMF theme's CSS file.  It processes it and sends back a modified version of it.  All it's really doing is making a "child class" of your CSS entries with the name you specify.

After that's done, you need to change your template's index.template.php file a tad.

First, where it's calling the template's CSS file, you need to change that to the name of the new CSS file.

Then, you have to add two bits to the file.

After the <body> tag, add:

<table width=100%>
    <tr>
        <td class="mainCell">


(Adjust the name of the class for whatever you specified when you ran the integrator script.)

Then, right before the </body> tag, add:

        </td>
    </tr>
</table>


And that's it.  The SMF template will now render perfectly inside of your CMS without messing up the CMS's theme in any way.

Granted, technically you're not done.  For XHTML validation you'll need to rip out the headers out of the SMF template, and move the CSS call into the CMS's theme and so on. (Not required but recommended) But that part's the easy part, and there's good documentation here in the forums for that if needed.

Hope this helps someone.  :)

Edit: Couldn't something like this be done as an SMF Package or Joomla component? A little admin panel addon that lets you patch and unpatch the selected theme's CSS and index.template.php file? Would be a huge benefit to anyone wanting to do Joomla/SMF integration I would think.

Orstio

Very cool.

QuoteEdit: Couldn't something like this be done as an SMF Package or Joomla component? A little admin panel addon that lets you patch and unpatch the selected theme's CSS and index.template.php file? Would be a huge benefit to anyone wanting to do Joomla/SMF integration I would think.

Yep, this could definitely be done as a SMF package.  ;)

On that note, I wonder how well it works with Xoops and e107?

Jen Smith

I would think that the process should work on near any CMS and forum really, as the principle is the same.  You're just altering the CSS so it doesn't conflict with the one from the CMS.  (Thats working under the assumption that the CMS in question can wrap SMF in one of its own pages in the first place.) Reasonably sure Xoops can do it, not sure on E107 as I've never messed with that one.

As far as the package goes though, I know just enough PHP to be dangerous... altho I may have to try it as a larf.  (Hopefully someone who knows what they're doing comes along and saves me a lot of aggrivation ;))

Orstio

Quote(Thats working under the assumption that the CMS in question can wrap SMF in one of its own pages in the first place.) Reasonably sure Xoops can do it, not sure on E107 as I've never messed with that one.

I've made bridges for both Xoops and e107.

QuoteAs far as the package goes though, I know just enough PHP to be dangerous... altho I may have to try it as a larf.  (Hopefully someone who knows what they're doing comes along and saves me a lot of aggrivation )

Yeah, I'll see if somebody has time to work on it, or maybe do it myself.  The problem with mods like this is that they work only on the default themes.   :-\

Chriss Cohn

#4
So i can use it with the mambo/joomla tagcleanup together?
If so, do i have to move these "altered" classes inside my Joomla-template css like before?

Edit: i've tried it and it works...... great, but for me there are no real benefits......
1. I have double the work to format the forum-classes (of course the fonts) to look like my Classes from Joomla.
2. It still looks pretty bad on IE6 and 7 (they don't care about max. widths when accessing the forum.)

So i will undo it again.....
Thanks for this "trick" anyway

New Edit: I made some thoughts about it and now i use this together with the Tagcleanup MOD, and its great!!!
Regards, Christian

ormuz

QuoteAfter that's done, you need to change your template's index.template.php file a tad.

First, where it's calling the template's CSS file, you need to change that to the name of the new CSS file.

Can someone give an exemple! My first language isn't english, I don't understand this part...

Advertisement: