PDA


View Full Version : CSS conflict using vBa as News-Engine


SirCampalot
08-24-2005, 07:53 PM
I'm not sure if this is best posted in vBa or on the vB forums - so - but I thought I'd ask anyways...

Here's the site we're working on: http://www.usimod.clanspy.net/main.php

We're running vB 3.0.3 forums.

Now -

We downloaded the latest version of vBa - with the intent of using it solely for a news engine on the main page. In the vBa cmps console we created a custom page that strips out everything except the news module.

We copied the board style and modified it to strip out the header, footer images etc. - and we're now trying to INCLUDE the cmps_index.php page into this main page:

http://www.usimod.clanspy.net/main2.php

so far so good.

Here's the problem:

If you look closely on the first link, the page body has a darker brown background. After looking into this further, I found a CSS conflict between the cmps page and the style/css on the main2.php page.

I tested this assumption by stripping out the


<!-- CSS Stylesheet -->
$style[css]
<if condition="is_browser('opera')">
<style type="text/css">
ul, ol { padding-left:20px; }
</style>
</if>
<!-- / CSS Stylesheet -->


out of the header portion of the modified style. when I did that, the page looked normal again, but the news piece of course looked completely nerfed.

Perhaps I should add that the CSS for the main2.php is defined between the header tags of that page:


<head>
<title>US Intervention : A Battlefield 2 Modification</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-color: #7C7266;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
body,td,th {
color: #DFDCD6;
}
a:link {
color: #DFDCD6;
}
a:visited {
color: #DFDCD6;
}
a:hover {
color: #DFDCD6;
}
a:active {
color: #DFDCD6;
}
.style1 {color: #B5AEA4}
-->
</style></head>

I'm no CSS expert - so does anyone know how I could change the header to include the default CSS for the main2.php page without tearing up my news postbit?

Thanks in advance for any help that is provided.

SirCampalot
08-24-2005, 07:54 PM
I also tried to iframe the cmps_index page - which looked good - until I tried to "reply" to a news post. It ended up opening the forums inside the iframe which of course wasn't what we intended.

KW802
08-24-2005, 09:03 PM
Why try to include CMPS in a different page instead of just using a one-off style for CMPS? In that link you gave you could just create a child style of your regular vB style and then in that child style modify the header & footer so that there is an extra column on the left (you'd end up with two columns, the left sidebar and the main section which then would be the normal CMPS output).

SirCampalot
08-26-2005, 12:21 AM
well - the site isn't mine. I am just trying to help the site owner use vBa as a news engine - sort of like how www.totalbf2.com does it. The owner really would like to keep his regular site as the main site.

I did however solve the CSS issue - but now I am getting another error:

Unable to add cookies, header already sent.
File: /home/usimod/public_html/main2.php
Line: 10

This error is intermittend on Firefox, and persistent on IE.

I tried to research the "Unable to add cookies, header already sent." error on Yahoo and almost ALL results listed point back to some vB threads.

I also found this thread and created a phpinfo page to verify my php and Zend versions.

PHP is 4.4.0 and Zend is 2.5.10

I can send a link to the phpinfo page via pm if someone has an idea of what the problem could be.

Is the error caused by the fact that the main2.php page has <head> tags as well as the vB page? Is there a way I can surpress the vB header?

Brian
08-26-2005, 02:45 PM
My guess would be that you're trying to print out content before your vB files are included, which vB doesn't like.