Hi,
after a long few days playing with the bridge and template I have decided to have my forum unwrapped but designed to look like my joomla site.
I have come across one big problem. When the forum is unwrapped. My joomla site is still calling for the forums css file.
I think its due to this code I have to put into my joomla template file
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, '" />';
Ok, so when the forum is unwrapped, the forum only calls for the forums css file. But my main joomla site is actually calling for the joomla css file AND the forums css file. This is causing major problems as the forums css file is overriding any styles I set in my joomla css.
Why does joomla even need to see the forums css file if it is unwrapped?
obviously, it does not...
so, remove that line...
The problem is, even on the forum page, you will get the conflicting CSS. Your best bet is to remove the duplicate code from your SMF theme's CSS file. If you REALLY don't want any of that CSS on any other page, you could try doing something like:
Change:
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" />
to
if ($option = "com_smf") {
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />';
}
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?beta4" media="print" />
Quote from: Kindred on January 31, 2006, 05:56:41 PM
obviously, it does not...
so, remove that line...
I always thought that was the case. Maybe this should included in the readme? Thanks for confirming this :) My site is working fantastically now ;)
Quote from: chadness on February 01, 2006, 10:14:03 AM
The problem is, even on the forum page, you will get the conflicting CSS. Your best bet is to remove the duplicate code from your SMF theme's CSS file. If you REALLY don't want any of that CSS on any other page, you could try doing something like:
Change:
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" />
to
if ($option = "com_smf") {
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?rc1" />';
}
echo '
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?beta4" media="print" />
Thanks, thats something to try out over the weekend :)
However, that's really only necessary if you will use it wrapped some times, so it may not be of any use to you.
I see. I really think that code should probably be in the readme. The code you posted seems more intelligent than the current code in the readme
I, however disagree... we have enough people who are confused about that code that I don't think additional "if" statements would be useful overall.
It also might have a negative effect on things like the recent post module. Definitely on the version of the discussbot that relies on the SMF CSS code.