phpDivelog-Header.tpl

3rd party extensions (phpDivingLog, dive computer downloader,...)
Post Reply
ehelm
Posts: 29
Joined: Sun Jun 24, 2007 12:42
Location: Norway
Contact:

phpDivelog-Header.tpl

Post by ehelm »

Hi,
I really have a nut here and was wondering if anyone could help. As I learned from this forum that the template files (.TPL) could be added inn HTML code. This works fine but with the exception in the datagrids. Something is changing the letters presentation in the datagrid. When I put my html code in the header.tpl, the letters Æ, Ø and Å are not showing correct. When I take the HTML out, all looks fine. Do any of you expert have an idea? :cry:

Regards...
divinglog
Site Admin
Posts: 5768
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

I'm not sure, but I think it could be only the encoding line of the tpl file.
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

Do you have a screenshot?

But I think it in the encoding, all should be UTF-8
ehelm
Posts: 29
Joined: Sun Jun 24, 2007 12:42
Location: Norway
Contact:

Post by ehelm »

Thanks
The site that is showing the error can be veiwed at:http://divelog1.helm.no

As you can see dive 36 that looks like this: Engøy, Stavanger should look like: Engøy,Stavanger. When I take out what every HTML code I put inn all looks fine.

my header.tpl looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" >
<head>
<title>Eric's DiveLog -
<?php echo $pagetitle; ?></title><style type="text/css">
<!--
body {
background-image: url();
background-color: #996633;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="screen"
href="includes/divelog.css">

<script type="text/javascript"
src="includes/lightbox/prototype.js"></script>
<script type="text/javascript"
src="includes/lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript"
src="includes/lightbox/lightbox.js"></script>
<link rel="stylesheet" type="text/css" media="screen"
href="includes/lightbox/lightbox.css">



<link href="style.css" rel="stylesheet" type="text/css" />

<!--[if IE]>
<style type="text/css">
.content-box
{
margin-left:9px;
}
#footer_line
{
position:relative;
right:8px;
}
#footer_text
{
margin-top:10px;
margin-right:15px;
}
</style>
<![endif]-->

</head>

<body>

<div id="container">
<div id="core_header">
<div id="header_text" style="width: 180px; height: 24px"><font color="#FFFFFF">Divelog for Eric </font></div>
</div>

<div id="core_container">
<div id="core_container2">

<div id="core_left">
<div id="navcontainer">
<ul>
<li><a href="index.php" title="Home">Log</a></li>
<li><a href="divestats.php" title="About">Dive Statistics</a></li>
<li><a href="divesite.php" title="Webdesign">Dive Sites</a></li>
<li><a href="equipment.php" title="Music">Dive Equipment</a></li>
<li><a href="http://www.helm.no/mediagallery/album.php?aid=22&page=1" title="Contact">Dive Pictures</a></li>
<li><a href="http://www.helm.no/index.php?topic=Dykking" title="Contact">Helm.no Dykking</a></li>
</ul>
</div>
</div>
<div id="core_right">

<div class="content-box">

<table width="625" border="0" cellspacing="0" cellpadding="0" summary="">
<tbody>
<tr>
<td width="625" valign="top">
<h1><?php echo $pagetitle; ?></h1>



</div>
<div id="footer2"><div id="footer_line"></div>

</div>
</div>

</div>
<div id="footer">&nbsp;</div>

</body>
</html>
<br><br>


regards
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

In my dev version I added:

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
You also have to change the mysql query in includes/misc.inc.php

Code: Select all

function parse_mysql_query($filename) 
{
        mysql_select_db($db, $connection);
=>this line        mysql_query("SET CHARACTER SET 'utf8'", $connection);
hope it helps
ehelm
Posts: 29
Joined: Sun Jun 24, 2007 12:42
Location: Norway
Contact:

Post by ehelm »

WOW..great stuff. It is working now. Thanks a tonn. :D

Regards,
Post Reply