Skifte banner/billeder på hjemmeside
Hej har en færdig side cms som jeg gerne vil indsætte min egen banner i toppen istedet for den der er der nu. Hvor skal man gøre dette og hvordan? Skal man ind i templatens index eller er der et andet sted man kan gøre dette? Jeg har templatens php koder hernede: Og hvordan man opdater fod og top....<!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>
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
<meta name="description" content="<?php page_description(); ?>" />
<meta name="keywords" content="<?php page_keywords(); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR; ?>/andreas00.css" media="screen,projection" />
<title><?php page_title(); ?></title>
</head>
<body>
<div id="wrap">
<div id="header">
<h1><a href="<?php echo WB_URL ?>"><?php page_title('', '[WEBSITE_TITLE]'); ?></a></h1>
<p><strong>Place for slogan</strong></p>
</div>
<div id="avmenu">
<?php if(SHOW_SEARCH) { /* Only show search box if search is enabled */ ?>
<form name="search" action="<?php echo WB_URL.'/search/index'.PAGE_EXTENSION; ?>" id="searchbox" method="post">
<label for="searchform"><?php echo $TEXT['SEARCH']; ?>:</label>
<input type="text" value="<?php echo $TEXT['SEARCH']; ?>" name="string" id="searchform"/>
<input type="hidden" id="searchsubmit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" />
</form>
<?php } ?>
<h2 class="hide">Menu</h2>
<?php show_menu(1,0,-1,true,'<li>[a][menu_title][/a]</li>','','<ul>','</ul>','','class="current"'); ?>
<?php
ob_start(); // start output buffer
global $database;
$query = "SELECT post_id,title,content_short,group_id,link FROM ".TABLE_PREFIX."mod_news_posts ORDER BY position DESC LIMIT 0, 5;";
$error = mysql_error();
if (!$result = mysql_query($query)) {
print "$error";
exit;
}
while($data = mysql_fetch_object($result)){
$title = $data->title;
$id = $data->post_id;
$link = $data->link;
$short = $data->content_short;
echo '<p><a href="'.WB_URL.'/pages/'.$link.PAGE_EXTENSION.'" class="latestnews">'.$title.'</a></p>';
}
$foo=ob_get_contents(); // put outputbuffer in $foo
ob_end_clean(); // clear outputbuffer
if ($foo<>"") { // some code to execute cause there is some block
echo '<div class="announce">';
echo '<h2>Latest news:</h2>';
echo $foo;
echo '</div>';
} else { // some code for no info
}
?>
</div>
<?php ob_start(); // start output buffer
page_content(2); // call content
$foo=ob_get_contents(); // put outputbuffer in $foo
ob_end_clean(); // clear outputbuffer
if ($foo<>"") { // some code to execute cause there is some block
echo '<div id="extras">';
echo '<p>';
echo $foo; // show the block (as saved in $foo)
echo '</p>';
echo '</div>';
echo '<div id="content">';
echo '<h2>';
echo page_title('','[PAGE_TITLE]');
echo '</h2>';
echo '<p>';
echo page_content();
echo '</p>';
echo '</div>';
} else { // some code for no info
echo '<div id="contentwide">';
echo '<h2>';
echo page_title('','[PAGE_TITLE]');
echo '</h2>';
echo '<p>';
echo page_content();
echo '</p>';
echo '</div>';
}
?>
<div id="footer">
<p>Powered by <a href="http://www.websitebaker.org/" target="_blank">
Website Baker</a> | Copyright © 2007 <?php page_title('','[WEBSITE_TITLE]'); ?> | Design by <a href="http://www.andreasviklund.com">Bozzi</a></p>
</div>
</div>
</body>
</html>
