insertar banner en php

V

bueno, haber como ago para poner este banner: http://port81.gratishost.com/banner2.jpg en esta web, arriva, onde poner Villodre's WeBlog ( www.Villodre.es.mn ). he intentado todo, y nada no se q hacer ya, me duele la cabeza y todo...os pongo en index.php y el themes.php para haber si me podeis decir como:

INDEX.PHP:

<?php
require('scripts/sb_functions.php');
$logged_in = logged_in( false, true );

read_config();

require('languages/' . $blog_config[ 'blog_language' ] . '/strings.php');
sb_language( 'index' );

// The $default_view determines whether to show
// just the first x entries or whether to show archive
// entries from a certain date.
global $default_view;

if ( !isset($_GET['y']) || !isset($_GET['m']) ) {
	// Set the $month, $year, $day globals...
	get_latest_entry();
	
	$default_view = 2;
} else {
	// Grab $year and $month from URL
	global $month, $year;
	$year = $_GET['y'];
	$month = $_GET['m'];
	
	if ( isset( $_GET['default_view'] ) ) {
		$default_view = $_GET['default_view'];
	} else {
		$default_view = 0;
	}
}

if ( isset($_GET['d']) ) {
	global $day;
	$day = $_GET['d'];
}

if ( isset($_GET['entry']) ) {
	global $entry;
	$entry = $_GET['entry'];
}

global $lang_string, $sb_info, $blog_config;

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=<?php echo( $lang_string['html_charset'] ); ?>'>

<!-- Meta Data -->
<?php global $lang_string, $sb_info, $blog_config; ?>
<meta name="generator" content="Simple PHP Blog <?php echo( $sb_info[ 'version' ] );?>" />
<link rel="alternate" type="text/xml" title="RSS 2.0" href="rss.php" />

<!-- Meta Data -->
<!-- http://dublincore.org/documents/dces/ -->
<meta name="dc.title"       content="<?php echo( $blog_config[ 'blog_title' ] ); ?>">
<meta name="author"         content="<?php echo( $blog_config[ 'blog_author' ] ); ?>">
<meta name="dc.creator"     content="<?php echo( $blog_config[ 'blog_author' ] ); ?>">
<meta name="dc.subject"     content="<?php echo( $blog_config[ 'info_keywords' ] ); ?>">
<meta name="keywords"       content="<?php echo( $blog_config[ 'info_keywords' ] ); ?>">
<meta name="dc.description" content="<?php echo( $blog_config[ 'info_description' ] ); ?>">
<meta name="description"    content="<?php echo( $blog_config[ 'info_description' ] ); ?>">
<meta name="dc.type"        content="weblog">
<meta name="dc.type"        content="blog">
<meta name="resource-type"  content="document"> 
<meta name="dc.format"      scheme="IMT" content="text/html">
<meta name="dc.source"      scheme="URI" content="<?php if ( dirname($_SERVER['PHP_SELF']) == '\\' ) { echo( 'http://'.$_SERVER['HTTP_HOST'].'/index.php' ); } else { echo( 'http://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']).'/index.php' ); } ?>">
<meta name="dc.language"    scheme="RFC1766" content="<?php echo( str_replace('_', '-', $lang_string['locale']) ); ?>" >
<meta name="dc.coverage"    content="global">
<meta name="distribution"   content="GLOBAL"> 
<meta name="dc.rights"      content="<?php echo( $blog_config[ 'info_copyright' ] ); ?>">
<meta name="copyright"      content="<?php echo( $blog_config[ 'info_copyright' ] ); ?>">

<!-- Robots -->
<meta name="robots" content="ALL,INDEX,FOLLOW,ARCHIVE"> 
<meta name="revisit-after" content="7 days"> 

 <!-- Fav Icon -->
<link rel="shortcut icon" href="favicon.ico">

<link rel=stylesheet type="text/css" href="themes/<?php echo( $blog_theme ); ?>/style.css">
<?php require('themes/' . $blog_theme . '/user_style.php'); ?>
<script language="JavaScript" src="scripts/sb_javascript.js"></script>
<title><?php echo($blog_config[ 'blog_title' ]); ?></title>

</head>
<?php
function page_content() {
global $month, $year, $day, $default_view, $logged_in, $entry;

	echo ( read_entries( $month, $year, $day, $logged_in, $entry ) );
}

?>
<?php
theme_pagelayout();
?>
</html>

THEMES.PHP:

<?php
// --------------------------
// Simple PHP Blog Theme File
// --------------------------
//
// Name: Classic Theme
// Author: Alexander Palmo
// Version: 0.3.7.1
//
// Description:
// This the is default theme for Simple PHP Blog. You can use
// this as a template for your own themes.
//
// All graphic will be relative to the base-url (i.e. the folder
// where index.php is located.)

theme_init();

// ---------------
// Theme Variables
// ---------------
function theme_init () {
	global $theme_vars;
	
	$theme_vars = array();
	$theme_vars['max_image_width'] = 450 - 20;
}

// Function:
// theme_blogentry( $entry_array )
//
// Theme for Blog Entries
// ----------------------
// All data is stored the $entry_array associative array and
// passed to the function. Keep in mind that multiple languages
// are used. So, try not to hard-code 'english' strings. If
// you are creating graphics for buttons, try to use icons
// instead of words.
//
// (Please note, the "\n" at the end of the echo() command adds
// a return charater in the HTML source. This is standard PHP
// behavior. Note the '\n' will not work for this. It has to be
// surrounded by double-quotes.)
//
// The array could contains the following keys:
// $entry_array['subject']          = String: Subject line
// $entry_array['date']             = String: Date posted in the appropriate language and format.
// $entry_array['entry']            = String: The body of the blog entry
// $entry_array['logged_in']       = Boolean: True if user is logged in (used to determine whether to show 'edit' and 'delete' buttons)
// $entry_array['edit']['url']      = String: URL
// $entry_array['edit']['name']     = String: The word 'edit' in the appropriate language.
// $entry_array['delete']['url']    = String: URL
// $entry_array['delete']['name']   = String: The word 'delete' in the appropriate language.
// $entry_array['comment']['url']   = String: URL
// $entry_array['comment']['name']  = String: This will be 'add comment', '1 comment', or '2 comments' in the appropriate language.
// $entry_array['comment']['count'] = String: The number of 'views' in the appropriate language.
// $entry_array['count']            = Integer: Index of current entry (i.e. use this if you want to add a line after every entry except the last one...)
// $entry_array['maxcount']         = Integer: Total number of entries
function theme_blogentry ( $entry_array ) {
	global $user_colors, $blog_theme;
	
	$img_path = 'themes/' . $blog_theme . '/images/';
	
	$blog_content = '';
	$blog_content = $blog_content . '<div id="blog_title">' . $entry_array['subject'];
	
	if ( isset( $entry_array['logged_in'] ) && $entry_array['logged_in'] == true ) {
		$blog_content = $blog_content . '<div id="blog_title_buttons">';
		
		// Show 'edit' and 'delete' buttons if the user is logged-in...
		if ( isset( $entry_array['edit']['url'] ) ) {
			$blog_content = $blog_content . '<a href="' . $entry_array['edit']['url'] . '">[i] </a>';
		}
		if ( isset( $entry_array['delete']['url'] ) ) {
			$blog_content = $blog_content . '<a href="' . $entry_array['delete']['url'] . '">[i] </a>';
		}
		
		$blog_content = $blog_content . '</div>';
	}
	
	$blog_content = $blog_content . '</div>' . "\n";
	$blog_content = $blog_content . '<div id="blog_body">';
	$blog_content = $blog_content . '<div id="blog_date">' . $entry_array['date'] . '</div>';
	
	// Blog content body...
	$blog_content = $blog_content . $entry_array['entry'];
	
	$blog_content = $blog_content . '</div>';
	
	// Comment Area
	$comment_area = '';
	if ( isset( $entry_array['comment']['url'] ) ) {
		// Show 'add comment' button if set...
		$comment_area = $comment_area . '<a href="' . $entry_array['comment']['url'] . '">[i] ' . $entry_array['comment']['name'] . ' </a>';
	}
	
	if ( isset( $entry_array['comment']['count'] ) ) {
		// Show '( x views )' string...
		$comment_area = $comment_area . ' ( ' . $entry_array['comment']['count'] . ' )';
	}
	
	if ( $comment_area != '' ) {
		$blog_content = $blog_content . '<div id="blog_comment">' . $comment_area . '</div>';
	}
			
	if ( isset( $entry_array['count'] ) ) {
		if ( $entry_array['count'] != $entry_array['maxcount'] ) {
			$blog_content = $blog_content . '<br>';
		}
	}		
	
	return $blog_content;
}

function theme_staticentry ( $entry_array ) {
	$blog_content = theme_blogentry( $entry_array );
	return $blog_content;
}

function theme_commententry ( $entry_array ) {
	$blog_content = theme_blogentry( $entry_array );
	return $blog_content;
}

// Function:
// theme_default_colors( )
//
// Default Base Colors
// -------------------
// $user_colors is an associative array that stores
// all color information. These are the default colors
// for the theme. These values are read in, and then
// get overwritten when the user saved colors are
// read from file.
//
// Note
// ----
// You can create your own "keys" but they will not
// show up in the "colors.php" document yet...
//
// Also, only these default keys have translations for
// different languages. If something is missing, email
// me and I'll add it for future releases.
//
// Eventually you'll have the option of disabling keys
// and added keys will appear on the "color.php" page.
function theme_default_colors () {
	global $lang_string;
	
	$color_def = array();
	
	// Backgrounds
	array_push( $color_def, array( 'id' => 'bg_color',
							'string' => $lang_string['bg_color'],
							'default' => 'D9D9D2' ) );
	array_push( $color_def, array( 'id' => 'header_bg_color',
							'string' => $lang_string['header_bg_color'],
							'default' => '8C8C7E' ) );
	array_push( $color_def, array( 'id' => 'footer_bg_color',
							'string' => $lang_string['footer_bg_color'],
							'default' => '8C8C7E' ) );
	array_push( $color_def, array( 'id' => 'main_bg_color',
							'string' => $lang_string['main_bg_color'],
							'default' => 'D7D7CF' ) );
	array_push( $color_def, array( 'id' => 'menu_bg_color',
							'string' => $lang_string['menu_bg_color'],
							'default' => '59594F' ) );
	
	// Borders
	array_push( $color_def, array( 'id' => 'border_color',
							'string' => $lang_string['border_color'],
							'default' => '58584E' ) );
	array_push( $color_def, array( 'id' => 'inner_border_color',
							'string' => $lang_string['inner_border_color'],
							'default' => '9A9A8C' ) );
	array_push( $color_def, array( 'id' => 'header_txt_color',
							'string' => $lang_string['header_txt_color'],
							'default' => 'FFFFFF' ) );
	array_push( $color_def, array( 'id' => 'footer_txt_color',
							'string' => $lang_string['footer_txt_color'],
							'default' => 'FFFFFF' ) );
	array_push( $color_def, array( 'id' => 'txt_color',
							'string' => $lang_string['txt_color'],
							'default' => '737367' ) );
	array_push( $color_def, array( 'id' => 'headline_txt_color',
							'string' => $lang_string['headline_txt_color'],
							'default' => '737367' ) );
	array_push( $color_def, array( 'id' => 'date_txt_color',
							'string' => $lang_string['date_txt_color'],
							'default' => 'A6A695' ) );
	
	
	array_push( $color_def, array( 'id' => 'entry_bg',
							'string' => $lang_string['entry_bg'],
							'default' => 'F2F2EB' ) );
	array_push( $color_def, array( 'id' => 'entry_title_bg',
							'string' => $lang_string['entry_title_bg'],
							'default' => 'BEBEB5' ) );
	array_push( $color_def, array( 'id' => 'entry_border',
							'string' => $lang_string['entry_border'],
							'default' => '95958C' ) );
							
	array_push( $color_def, array( 'id' => 'entry_title_text',
							'string' => $lang_string['entry_title_text'],
							'default' => '666661' ) );
	array_push( $color_def, array( 'id' => 'entry_text',
							'string' => $lang_string['entry_text'],
							'default' => '4F4F48' ) );
	
	array_push( $color_def, array( 'id' => 'menu_bg',
							'string' => $lang_string['menu_bg'],
							'default' => 'ACACA0' ) );
	array_push( $color_def, array( 'id' => 'menu_title_bg',
							'string' => $lang_string['menu_title_bg'],
							'default' => '959587' ) );
	array_push( $color_def, array( 'id' => 'menu_border',
							'string' => $lang_string['menu_border'],
							'default' => 'DADACE' ) );
							
	array_push( $color_def, array( 'id' => 'menu_title_text',
							'string' => $lang_string['menu_title_text'],
							'default' => 'FFFFFF' ) );
	array_push( $color_def, array( 'id' => 'menu_text',
							'string' => $lang_string['menu_text'],
							'default' => 'FFFFFF' ) );
	
	array_push( $color_def, array( 'id' => 'link_reg_color',
							'string' => $lang_string['link_reg_color'],
							'default' => '59594F' ) );
	array_push( $color_def, array( 'id' => 'link_hi_color',
							'string' => $lang_string['link_hi_color'],
							'default' => 'FF6600' ) );
	array_push( $color_def, array( 'id' => 'link_down_color',
							'string' => $lang_string['link_down_color'],
							'default' => '6329F7' ) );
							
	array_push( $color_def, array( 'id' => 'menu_link_reg_color',
							'string' => $lang_string['menu_link_reg_color'],
							'default' => '59594F' ) );
	array_push( $color_def, array( 'id' => 'menu_link_hi_color',
							'string' => $lang_string['menu_link_hi_color'],
							'default' => 'FF6600' ) );
	array_push( $color_def, array( 'id' => 'menu_link_down_color',
							'string' => $lang_string['menu_link_down_color'],
							'default' => '6329F7' ) );
	
	return ( $color_def );
}

// Function:
// theme_pagelayout( )
//
// Page Layout Container/Wrapper
// -----------------------------
// This function controls all HTML output to the browser.
//
// Invoking the page_content() fuction inserts the actual
// contents of the page.
//
function theme_pagelayout () {
	global $user_colors, $blog_config;
	
	$content_width = 450;
	$menu_width = 250;
	$page_width = $content_width + $menu_width; 
	
	// Begin Page Layout HTML
	?>
	[b]
		<br>
		<table border="0" width="<?php echo( $page_width ); ?>" cellspacing="0" cellpadding="0" align="center" style="border: 1px solid #<?php echo( $user_colors['border_color'] ); ?>; border-top: 8px solid #<?php echo( $user_colors['border_color'] ); ?>;">
			<tr align="left" valign="top">
				<td width="<?php echo( $page_width ); ?>" colspan="2" bgcolor="#<?php echo( $user_colors['header_bg_color'] ); ?>">
					<div id="header">
						<?php echo($blog_config[ 'blog_title' ]); ?>
					</div>
					<div id="pagebody">
						<table border="0" width="<?php echo( $page_width ); ?>" cellspacing="0" cellpadding="0" align="left">
							<tr valign="top">
								<td width="<?php echo( $content_width ); ?>" bgcolor="#<?php echo( $user_colors['main_bg_color'] ); ?>">
									<div id="maincontent">
										<?php page_content(); ?>
									</div>
								</td>
								<td width="<?php echo( $menu_width ); ?>" bgcolor="#<?php echo( $user_colors['menu_bg_color'] ); ?>" style="border-left: 1px solid #<?php echo( $user_colors['inner_border_color'] ); ?>;">
									<div id="sidebar">
										<?php theme_menu(); ?>
									</div>
								</td>
							</tr>
							<tr align="left" valign="top">
								<td width="<?php echo( $page_width ); ?>" colspan="2">
									<div id="footer"><?php echo($blog_config[ 'blog_footer' ]); ?> - <?php echo( page_generated_in() ); ?></div>
								</td>
							</tr>
						</table>
					</div>
				</td>
			</tr>
		</table>
		<br>
	</body>
	<?php 
	// End Page Layout HTML
}

// Function:
// theme_popuplayout( )
//
// Popup Layout Container/Wrapper
// -----------------------------
// This function controls all HTML output to the browser.
//
// Same as above, but for the pop-up comment window and 
// the image list pop-up.
//
function theme_popuplayout () {
	global $user_colors, $blog_config;
	
	$popup_width = 450; 
	
	// Begin Popup Layout HTML
	?>
	[b]
		<br>
		<table border="0" width="<?php echo( $popup_width ); ?>" cellspacing="0" cellpadding="0" align="center" style="border: 1px solid #<?php echo( $user_colors['border_color'] ); ?>; border-top: 8px solid #<?php echo( $user_colors['border_color'] ); ?>;">
			<tr align="left" valign="top">
				<td width="<?php echo( $popup_width ); ?>" bgcolor="#<?php echo( $user_colors['header_bg_color'] ); ?>">
					<div id="header">
						<?php echo($blog_config[ 'blog_title' ]); ?><br>
					</div>
				</td>
			</tr>
			<tr align="left" valign="top">
				<td width="<?php echo( $popup_width ); ?>" bgcolor="#<?php echo( $user_colors['main_bg_color'] ); ?>">
					<div id="maincontent">
						<?php page_content(); ?>
					</div>
				</td>
			</tr>
			<tr align="left" valign="top">
				<td width="<?php echo( $popup_width ); ?>">
					<div id="footer"><?php echo($blog_config[ 'blog_footer' ]); ?> - <?php echo( page_generated_in() ); ?></div>
				</td>
			</tr>
		</table>
		<br>
	</body>
	<?php 
	// End Popup Layout HTML
}

function theme_menu () {
	global $user_colors, $lang_string, $logged_in;
	
	$result = menu_display_links();
	echo( '<div id="menu_title">' . $result['title'] . '</div>' );
	echo( '<div id="menu_body">' );
	echo( $result['content'] );
	echo( '<br>' . menu_display_login() );
	echo( '</div><br>' );
	
	$result = menu_display_blognav();
	echo( '<div id="menu_title">' . $result['title'] . '</div>' );
	echo( '<div id="menu_body">' );
	echo( $result['content'] );
	echo( '</div><br>' );
	
	// Search Box - Added in 0.3.7
	$result = menu_search_field();
	echo( '<div id="menu_title">' . $result['title'] . '</div>' );
	echo( '<div id="menu_body">' );
	echo( $result['content'] );
	echo( '</div><br>' );
	
	$result = menu_display_user();
	if ( $result['content'] != '' ) {
		echo( '<div id="menu_title">' . $result['title'] . '</div>' );
		echo( '<div id="menu_body">' );
		echo( $result['content'] );
		echo( '</div><br>' );
	}
	
	$result = menu_display_setup();
	if ( $result['content'] != '' ) {
		echo( '<div id="menu_title">' . $result['title'] . '</div>' );
		echo( '<div id="menu_body">' );
		echo( $result['content'] );
		echo( '</div><br>' );
	}
	
	$result = menu_most_recent_comments();
	if ( $result['content'] != '' ) {
		echo( '<div id="menu_title">' . $result['title'] . '</div>' );
		echo( '<div id="menu_body">' );
		echo( $result['content'] );
		echo( '</div><br>' );
	}

	// Web Badges - Changed in 0.3.7
	echo( '<div align="center"><a href="mailto:[email protected]">[i]</a>' );
	echo( '<div align="center">[i] </iframe>' );
	echo( '</a></div>' );
	
	
}

?>

y nada no se q ahcer... thx a kien me ayude

guiye

Con la web tan bonita que tienes ponerle ese baner es autoinmolarte...

Edita el index.php con el dreamweaver y pégale (insertar imagen desde archivo) la imagen.
Editalo para que no queda nada de c:\documents y tal y palante.

TeTu

buscas <img src.... y tal pascual xD nose...

A

a ver, tu acaso has escrito todo eso? porque preguntas como ponerlo en php si con un simple de html se pone un banner... ¬¬ no esperaras que nos leamos todo el theme.php y el index.php que nisiquiera te lo has leido tú

D

eso es 1 script exo no? xk sta wapa la web.. no creo k se t haya ocurrido a ti

Usuarios habituales

  • DeiX
  • automecanic
  • TeTu
  • guiye
  • villodre