footer header script

  • Onderwerp starter Onderwerp starter xvilo
  • Startdatum Startdatum
Status
Niet open voor verdere reacties.
snap het niet helemaal maar

PHP:
include("header.php");
include("pagina.php");
include("footer.php");

zo iets?
 
Ik begrijp het ook niet helemaal

Je wilt dus een indeling hebben waarin content getoond wordt wat je in een extern bestand heb aangegeven.
Als dat zo is moet je eerst een indeling in HTML hebben en de includes zoals eeyk schreef.

PHP:
<?php
include_once dirname(__FILE__)."/header.php";
include_once dirname(__FILE__)."/content.php";
include_once dirname(__FILE__)."/footer.php";

$header = generateHeader();                     //functie vanuit header.php 
$content_left = generateContentLeft();     //functie vanuit content.php
$content_right = generateContentRight(); //functie vanuit content.php
$footer = generateFooter();                       //functie vanuit footer.php
?>
<html>
<head><title>Een Title</title></head>
<body>
<div id="container">
   <div id="header"><?php echo $header; ?></div>
   <div id="content">
      <div id="content_left"><?php echo $content_left; ?></div>
      <div id="content_right"><?php echo $content_right; ?></div>
   </div>
   <div id="footer"><?php echo $footer; ?></div>
</div>
</body>
</html>


Hoop dat je dit bedoel

groeten vreugde
 
het werkt niet goed ik krijg een fout melding als ik hem in mijn site zet

Fatal error: Call to undefined function generateheader() in /home/sems/webe/test/index.php on line 9
Fatal error: Call to undefined function generateheader() in /home/sems/webe/test/index.php on line 10
Fatal error: Call to undefined function generateheader() in /home/sems/webe/test/index.php on line 11


9
PHP:
$header = generateHeader();                     //functie vanuit header.php
10
PHP:
$content_left = generateContentLeft();     //functie vanuit content.php
11/12
PHP:
$content_right = generateContentRight(); //functie vanuit content.php
$footer = generateFooter();                       //functie vanuit footer.php

totale code:
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
include_once dirname(__FILE__)."/header.php";
include_once dirname(__FILE__)."/content.php";
include_once dirname(__FILE__)."/footer.php";
 
$header = generateHeader();                     //functie vanuit header.php 
$content_left = generateContentLeft();     //functie vanuit content.php
$content_right = generateContentRight(); //functie vanuit content.php
$footer = generateFooter();                       //functie vanuit footer.php
?> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>tiedes website</title>
<meta name="keywords" content="free templates, website templates, CSS, HTML" />
<meta name="description" content="free website template provided by templatemo.com" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />
<link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" />
<script language="javascript" type="text/javascript">
function clearText(field)
{
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}
</script>
Stap 1: Plak onderstaand script in de <head> van je site.

<SCRIPT>
var Message="dit is de website van tiede                          door semschilder.nl!";
var place=1;
function start() {document.title=Message.substring(0, place); if (place >= Message.length) {place=1; window.setTimeout("dragOut()",250);} 

else {place++; window.setTimeout("start()",60);}}

function dragOut() {document.title=Message.substring(place, Message.length);
if (place >= Message.length) {place=1; window.setTimeout("start()", 110);}
 
else {place++; window.setTimeout("dragOut()", 60);}}
</SCRIPT>

</head>
<body>

<BODY onload=start()> 
<div id="templatemo_container">

	<div id="templatemo_site_title_wrapper">
    
    	<div id="site_title">
            <h1>
                <a href="http://www.templatemo.com/" target="_parent">tiede
                <span>een vrolijke website</span></a>
            </h1>
        </div>
    
    </div> <!-- end of site title -->
    
	<div id="templatemo_banner">

     <div id="one" class="contentslider">
            <div class="cs_wrapper">
                <div class="cs_slider">
                
                <div class="cs_article">
                        <a href="http://books.google.nl/logos/worldcup.gif" target="_blank">
                        	<img src="http://books.google.nl/logos/worldcup.gif" alt="Artist's interpretation of article headline" />
                        </a>
                        
                        <div class="text">
                          <h2> <a href="#">zoekken</a> </h2>
                            
                            <p>
                          kun je hier beneden doen gesponsord door google leuk toch??
                          probeer het eens ui! &nbsp;</p>
                  </div>
       	      </div><!-- End cs_article -->
                
                    <div class="cs_article">
                        <a href="http://www.templatemo.com/preview/templatemo_121_simple_gray" target="_blank">
                        	<img src="images/article01.jpg" alt="Artist's interpretation of article headline" />
                        </a>
                        
                        <div class="text">
                            <h2> <a href="#">webpagina van tiede oost</a> </h2>
                            
                            <p>
                            dit stukje van semschilder.nl is gewijd aan tiede oost. 
                            
                            <a class="readmore" href="#">lees meer</a>                   		    </p>
                        </div>
                	</div><!-- End cs_article -->
                    
                    <div class="cs_article">
                        <a href="http://www.templatemo.com/preview/templatemo_124_media" target="_blank">
                        <img src="images/article02.jpg" alt="Artist's interpretation of article headline" />
                        </a>
                        
                        <div class="text">
                            <h2> <a href="#">sem schilder.nl</a> </h2>
                            
                            <p>
							sem schilder.nl is een leuke en spontane site van semschilder
                            omdat mijn lieftallig neefje tiede is mag hij een stukje op mijn site
                            </p>
                            
                            <a class="readmore" href="#">Read More</a>
                   		</div>
                	</div><!-- End cs_article -->
                    
                    <div class="cs_article">
                     <a href="movie/pre/shothead.gif" target="_blank">
                        	<img src="movies/pre/shothead.gif" alt="Artist's interpretation of article headline" />
                       </a>
                        <div class="text">
                        <h2> <a href="#">how to shot some one with a pen</a> </h2>                         
                            <p>
							sem en ik hebben op 26 januari een filmpje gemaakt hij is niet helmaal perfect maar voor beginners is het leuk. ook willen wij dit verder en vaker gaan doen
                            </p>
                            
                            <a class="readmore" href="#">Read More</a>
               		  </div>
               	  </div><!-- End cs_article -->

              </div><!-- End cs_slider -->
            </div><!-- End cs_wrapper -->
        </div><!-- End contentslider -->

	<!-- Site JavaScript -->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
	<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="js/jquery.ennui.contentslider.js"></script>
	<script type="text/javascript">
			$(function() {
				$('#one').ContentSlider({
					width : '860px',
					height : '210px',
					speed : 800,
					easing : 'easeInOutBack'
				});
			});
		</script>
	<script src="js/jquery.chili-2.2.js" type="text/javascript"></script>
	<script src="js/chili/recipes.js" type="text/javascript"></script>

    </div> 
    <!-- end of banner -->
    
    <div id="templatemo_menu">
    
	    <ul>
            <?php echo $header; ?>
          
            
            <li></li>
            <li></li>
        </ul>
    
    </div>
    
    <div id="templatemo_content">
    
    	<div class="section_w920">
        
        	<h2>welkom</h2>
        
   	  <div class="section_w430 fl">
            	<img class="image_wrapper fl_image" src="images/templatemo_image_01.png" alt="image" />
              	<?php echo $footer; ?>
          </div>
            
            <div class="section_w430 fr">
            	<img class="image_wrapper fl_image" src="images/templatemo_image_02.png" alt="image" />
                <h3>bedenk goed voordat je deze site bezoekt dat:</h3>
            	<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras tellus metus, adipiscing et adipiscing ut, commodo nec eros. Etiam non urna magna, id laoreet sem. Proin iaculis cursus vulputate.</p>	
            
            </div>
        
        	<div class="cleaner"></div>
      </div>
        
        <div class="cleaner_h50"></div>
        
        <div class="section_w920">
        	<?php echo $content_left; ?>
            <?php echo $content_right; ?>
<div class="cleaner_h20"></div>
            
            <img class="image_wrapper fl_image" src="images/templatemo_image_04.png" alt="image" />
            
            <p>hier is het filmpje dan eindelijl:</p>
            <p>.            	<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/OaYBNJun2Zc&hl=nl_NL&fs=1&rel=0&hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/OaYBNJun2Zc&hl=nl_NL&fs=1&rel=0&hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object>
          </p>
        <!-- <div class="button_01"><a href="#">Read more</a></div> -->
            
          <div class="cleaner"></div>
            
      </div>
    
    </div>
    
    <div id="templatemo_footer">
        
        <ul class="footer_menu">
           <?php echo $header; ?>
        </ul>

        <p>Copyright © 2010 <strong>semschilder.nl</strong>| 
        Designed by <a href="http://www.templatemo.com" target="_parent">Free CSS Templates</a> | 
        Validate <a href="http://validator.w3.org/check?uri=referer">XHTML</a> &amp; <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
   
        
    </div> <!-- end of footer -->
  <div id="cse" style="width: 100%;">Laden</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'nl'});
google.setOnLoadCallback(function(){
var customSearchControl = new google.search.CustomSearchControl('004013244498531771271:tzdods0dgeg');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
customSearchControl.draw('cse');
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/shiny.css" type="text/css" /> <style type="text/css">
.gsc-control-cse {
font-family: Verdana, sans-serif;
border-color: #DAE0E5;
background-color: #999999;
}
input.gsc-input {
border-color: #8A99A6;
}
input.gsc-search-button {
border-color: #8A99A6;
background-color: #D0D1D4;
}
.gsc-tabHeader.gsc-tabhInactive {
border-color: #B2BDC6;
background-color: #B2BDC6;
}
.gsc-tabHeader.gsc-tabhActive {
border-color: #8A99A6;
background-color: #8A99A6;
}
.gsc-tabsArea {
border-color: #8A99A6;
}
.gsc-webResult.gsc-result {
border-color: #FFFFFF;
background-color: #FFFFFF;
}
.gsc-webResult.gsc-result:hover {
border-color: #D2D6DC;
background-color: #EDEDED;
}
.gs-webResult.gs-result a.gs-title:link,
.gs-webResult.gs-result a.gs-title:link b {
color: #0568CD;
}
.gs-webResult.gs-result a.gs-title:visited,
.gs-webResult.gs-result a.gs-title:visited b {
color: #0568CD;
}
.gs-webResult.gs-result a.gs-title:hover,
.gs-webResult.gs-result a.gs-title:hover b {
color: #0568CD;
}
.gs-webResult.gs-result a.gs-title:active,
.gs-webResult.gs-result a.gs-title:active b {
color: #0568CD;
}
.gsc-cursor-page {
color: #0568CD;
}
a.gsc-trailing-more-results:link {
color: #0568CD;
}
.gs-webResult.gs-result .gs-snippet {
color: #5F6A73;
}
.gs-webResult.gs-result .gs-visibleUrl {
color: #5F6A73;
}
.gs-webResult.gs-result .gs-visibleUrl-short {
color: #5F6A73;
}
.gsc-cursor-box {
border-color: #FFFFFF;
}
.gsc-results .gsc-cursor-page {
border-color: #B2BDC6;
background-color: #FFFFFF;
}
.gsc-results .gsc-cursor-page.gsc-cursor-current-page {
border-color: #8A99A6;
background-color: #8A99A6;
}
.gs-promotion.gs-result {
border-color: #D2D6DC;
background-color: #D0D1D4;
}
.gs-promotion.gs-result a.gs-title:link {
color: #0066CC;
}
.gs-promotion.gs-result a.gs-title:visited {
color: #0066CC;
}
.gs-promotion.gs-result a.gs-title:hover {
color: #0066CC;
}
.gs-promotion.gs-result a.gs-title:active {
color: #0066CC;
}
.gs-promotion.gs-result .gs-snippet {
color: #333333;
}
.gs-promotion.gs-result .gs-visibleUrl,
.gs-promotion.gs-result .gs-visibleUrl-short {
color: #5F6A73;
}
</style>
</div> <!-- end of container -->
</body>
</html>

het ziet er allemaal wat vreemd uit maar dat komt omdat ik er nog mee aan het ***** ben:P
 
Dat komt waarschijnlijk omdat je geen functie hebt om de header te maken, maar geen nood! Ik heb er iets voor:


PHP:
<html>
<head>
<title></title>
</head>
<body>
<?php
include 'site/header.php';
?>
Dit is je content
<?php
include 'site/footer.php';
?>
</body>
</html>
 
thnx ik zal het probeeren op het moment geen tijd maar dat komt wel
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan