Hallo Tijmen,
This is normally out of the scope of the support given here, but because I liked to do some puzzling tonight I will point you in the right direction.
And I think it is also good to show it here because I have seen many times that people want to add code to the <head> ... </head> section of the page but do not know where to place it. They mostly put it in the header.txt file, which is wrong. It should be placed in the overall_header.php file which can be found in the template folder.
First of all, you have havily modified the file gbook.php. You should restore the original file. Your modifications should be made in other files which are placed in the gbook root folder, you named it gastenboek (for all non dutch speaking people, gastenboek is dutch for guestbook) and in your
templates\amsing folder.
I will try to give clear guideline.
1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
You have added this in the gbook.php file. This should be defined in your language.inc.php file.
So open your file nederlands.inc.php and change $lang['enc']='windows-1250'; to $lang['enc']='utf-8';
2. Using your own template folder, make sure you copy all files
Because of the extend of your modifications, it is good that you have created your own template folder. Make sure you copy all the files from the default template. In the archive you provided, the overall_footer.php file is missing.
3. Code added in the <head> ... </head> section should be added to the file overall_header.php
This file can be found in your templates\amsing folder.
The following code that you have added to the gbook.php file should be added just before the </head> tag in the overall_header.php file.
Code: Select all
<link rel="shortcut icon" href="../klaverblad.ico">
<style type="text/css">
<!--
body {
font: 80%/1.4 Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #2F363E;
background-color: #2F363E;
}
/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
}
h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 0px;
padding-left: 0px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
}
h1 {
font-size: 36px;
}
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
}
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color: #2F363E;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
}
a:visited {
color: #4B5663;
text-decoration: underline;
}
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
}
/* ~~this fixed width container surrounds the other divs~~ */
.container {
-webkit-box-shadow:0 0 20px #B5B6BD;
-moz-box-shadow:0 0 20px #B5B6BD;
box-shadow:0 0 20px #B5B6BD;
width: 1024px;
border: 3px solid #455268;
margin: 20px auto 50px auto; /* the auto value on the sides, coupled with the width, centers the layout */
background-image: url(../Images/bggradient1500dl.png);
background-repeat: repeat;
background-color: #a4e666;
/* height: 1000px; */
}
/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
.header {
border-bottom: 2px solid #455268;
height: 120px;
}
/* ~~ These are the columns for the layout. ~~
1) Padding is only placed on the top and/or bottom of the divs. The elements within these divs have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.
2) No margin has been given to the columns since they are all floated. If you must add margin, avoid placing it on the side you're floating toward (for example: a right margin on a div set to float right). Many times, padding can be used instead. For divs where this rule must be broken, you should add a "display:inline" declaration to the div's rule to tame a bug where some versions of Internet Explorer double the margin.
3) Since classes can be used multiple times in a document (and an element can also have multiple classes applied), the columns have been assigned class names instead of IDs. For example, two sidebar divs could be stacked if necessary. These can very easily be changed to IDs if that's your preference, as long as you'll only be using them once per document.
4) If you prefer your nav on the right instead of the left, simply float these columns the opposite direction (all right instead of all left) and they'll render in reverse order. There's no need to move the divs around in the HTML source.
*/
.navigation {
width: auto;
height: 26px;
padding: 2px;
padding-right: 8px;
}
.sidebar {
float: left;
width: 180px;
padding-top: 85px;
}
.content {
padding: 10px 0;
width: 832px;
float: left;
border: 1px solid #455268;
background-color: #F4F5F7;
text-align: left;
}
/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
}
/* ~~ The footer ~~ */
.footer {
padding: 10px 0;
position: relative;/* this gives IE6 hasLayout to properly clear */
clear: both;
}
/* ~~ miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
.breadcrumbs {
float: left;
padding: 2px;
}
#loguitbutton {
float: right;
}
.menu,
.menu ul {
margin:0;
padding:0;
list-style:none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
.menu { /* geheel menu */
width:175px;
}
.menu li { /* ondergeschikte blokken */
margin:0;
padding:0;
margin-bottom:1px;
}
.menu a {
display:block;
padding:8px 10px;
color:#A4E666;
text-decoration:none;
margin-bottom:1px;
background-color: #434E5A;
}
.menu a:hover {
background:#2F363E;
}
.menu ul a {
padding-left:10px;
}
.menu li {
padding-left:25px;
}
.menu ul a {
background-color: #535F6C;
}
.hidden {
display:none;
}
-->
</style>
<script type="text/javascript">
function fLoguit() {
var loguit=window.confirm('Weet u zeker dat u uit wilt loggen?');
if (loguit==true) {
window.location="handlelogout.php";
}
else {
return;
}
}
</script>
You can now close the overall_header.php file.
In case you have not noted, in the style fo .container { I have commented out the height: 1000px; style. You could also delete it. This is needed so that the container wraps around the guestbook.
4. Code added in the top of the <body> ... </body> section should be added to the file header.txt
This file can be found in the gbook root folder.
The following code that you have added to the gbook.php file should be placed in the header.txt file.
Code: Select all
<div class="container">
<div class="header"><img src="../Images/banner.png" width="1024" height="120" alt="banner" /><!-- end .header --></div>
<div class="sidebar">
<ul class="menu">
<li><a href="#">#</a> </li>
<li><a href="#">#</a> </li>
<li><a href="#">#</a>
<ul>
<li><a href="#">#</a></li>
<li><a href="#">#</a></li>
</ul>
</li>
<li><a href="#">#</a>
<ul>
<li><a href="#">#</a></li>
<li><a href="#">#</a></li>
</ul>
</li>
</ul>
<!-- end .sidebar1 -->
</div>
<div class="navigation">
<div class="breadcrumbs"> > Gastenboek </div>
<div id="loguitbutton">
<input name="log uit" type="button" onclick="fLoguit()" value="log uit" />
</div>
<!-- end navigation -->
</div>
<div class="content">
You can now close the header.txt file.
5. Code added in the bottom of the <body> ... </body> section should be added to the file footer.txt
This file can be found in the gbook root folder.
The following code that you have added to the gbook.php file should be placed in the header.txt file.
Code: Select all
</div>
<div class="footer">
<h6 align="right"><em>© Tijmen Amsing 2011 </em></h6>
<!-- end .footer --></div>
<!-- end .container --></div>
You can now close the footer.txt file.
And that is all.
I hope this was clear enough. Now that I read it back, it does not look as hard to do as I thought it would, but if you still have problems feel free to ask.
Groeten,
Henrie