Firefox PHP

integrate phorum to my own site

Posted by devoyon 
integrate phorum to my own site
March 02, 2007 05:35PM
Hello,

i'm doing a new template of a site and i use a small css for it :

h1 {
font-size : 12;
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif;
color : grey;
background-color : #F0F0FB;
text-align: center;
line-height:2;
}
h2 {
font-size : 10;
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif ;
font-weight: normal ;
text-align: right;
line-height:0.5;
}

h3 {
font-size : 12;
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif;
color : grey;
background-color : #F0F0FB;
text-align: left;
line-height:2;
}

a:link {color: blue; text-decoration:none;}
#a:active { color: red; text-decoration: none }
a:hover {color:blue; background-color: #F0F0FB; text-decoration:underline;}
a:visited { color: blue; text-decoration: none; }

.menu_c {
background-color: white;
width:140px;
float:left;
border-style:solid;
border-color:#F0F0FB;
border-width:1px;
padding:10px;
}
.article_c{
background-color: white;
width:700px;
float:left;
padding:10px;
margin-left:5px;
text-align:left;
font-size : 10;
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif;
}
.footer{
background-color: white;
float:left;
width:100%;
height: 20px;
}
.tableau{
background-color: white;
font-size : 10;
font-family : Verdana, Arial, Helvetica, Geneva, sans-serif;
}


I have integrated it to css.tpl

When i have a look at my site from Ie or Firefox i don't have same vue.

[promotion.ref-union.org]

As you can see on the directory below [promotion.ref-union.org] my css is working fine with both explorers.

What i have made wrong with the integration ?
I have modified header.tpl with my own code i can paste here if needed.

Any help apreciate.
Guil.
Re: integrate phorum to my own site
March 02, 2007 06:14PM
Firefox and MSIE have different ideas on how to handle CSS unfortunately. So you'll have to tweak the CSS until both agree on the looks. It often helps to not specify only a class name, but the full CSS instead if a browser doesn't see the more general definition somehow. E.g.
<div id="div1">
  <div id="div2">
     <h1 class="title">blah blah</h1>
  </div>
</div>
Sometimes h1.title {..} isn't enough for a browser. In that case, you could try

#div1 #div2 h1.title {..}

I'm not sure if this is the case for your template, but this is something that I experienced myself while hacking CSS code.

One general remark about your template: I think it's too fluid. If I make the browser less wide, then the forum content will be pushed to the bottom of the page. Also, the text in the left column is compressed in an unpleasant way. Maybe you're trying to hard to use CSS/div layouting here. Not seeing the forum, because it was pushed to the bottom of the page because of space issues is not desireable.

I hope this helps.
Good luck!


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: integrate phorum to my own site
March 03, 2007 03:29AM
thanks for answer i'll do some tests ... i let you know
Best regards

Guillaume
Re: integrate phorum to my own site
March 03, 2007 03:44AM
In fact i played.
I have seen my page of the forum on firefox. I saved the source code on toto.php in forum root directory.
I tried to acces on it without succes i had an error about T_text on line 1.
In fact my first line in my html page was the xml version and the encoding.
I removed it from header.tpl :

{IF CHARSET}
<?php
  header("Content-Type: text/html; charset=".htmlspecialchars($PHORUM['DATA']['CHARSET']))
?>
{/IF}
<?php echo '<?' ?>xml version="1.0" encoding="{CHARSET}"<?php echo '?>' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

so right now my page start directly with the <html> tag .
and it ran good !!!
Best regards
Guillaume



Edited 3 time(s). Last edit at 03/03/2007 03:46AM by devoyon.
Re: integrate phorum to my own site
March 03, 2007 07:16AM
Some things are mixed up here. If you save the rendered source code from your browser to a new .php file, then that file will be parsed as PHP again. But in fact it is an HTML file, so you should have saved it as toto.html instead.

The reason that you get the error message is because of the <?xml..?> specification in the HTML code. The <? .. ?> is recognized by PHP as a block of PHP code to execute. But in between is no PHP code, but xml info instead. That is the reason why the xml definition is not put directly in the header.tpl, but that it's printed out by a piece of PHP code instead.

What you probably accomplished now, is that your page is rendered using a different document type by your browser. The document type that was defined by the Phorum header.tpl was "XHTML 1.0 Transitional". Without a specific document type in your HTML code, I guess the browser would fall back to "HTML 4" or so. So probably, the code that you wrote was not compatibel with "XHTML 1.0 Transitional".

While removing the doctype might have fixed your problem, beware that Phorum is now rendered using a different document type than the one the template was designed with. Parts of Phorum might show up differently now. I don't think it will be a very big deal though, so you probably won't run into troubles here.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Sorry, only registered users may post in this forum.

Click here to login