Recent Topics

1 Jul 11, 2008 19:10    

My b2evolution Version: 1.10.x

Hi, I am using the YourContentIII layout and have included a php rotating random banner script to display at the top of the blog. I added the call to the script to the _html_header.inc.php

<!-- Start of skin_wrapper -->

<?
include_once("adverts.php");
echo "<div align='center'>$bannerAd</div>";
?>
<BR>

The problem is I want the ads to display below my blog banner, but it is displaying above the header banner.

Can someone tell me how to fix it? Am I editing the wrong file?

Thanks

2 Jul 11, 2008 19:14

Just for info, there is no <BR> tag in xhtml.

If moving your code to the bottom of that file doesn't work ( sorry, not familiar with the skin ), then the chances are that you want to be looking at using it in index.main.php ( or whatever the 1.10.x version of that file is )

¥

3 Jul 11, 2008 19:25

¥åßßå wrote:

Just for info, there is no <BR> tag in xhtml.

If moving your code to the bottom of that file doesn't work ( sorry, not familiar with the skin ), then the chances are that you want to be looking at using it in index.main.php ( or whatever the 1.10.x version of that file is )

¥

Thanks, I got the no BR tag information <br />

I have no idea where to place the code in the index.main.php I guess thats the biggest part of my problem.

4 Jul 11, 2008 19:32

Post the first 50 lines of your index.main.php and lets hope we strike lucky ;)

( wrap the lines in [ php]---paste first 50 lines ---[/php] tags ... otherwise I *tilt* when my scrollbar gets to long ;) )

¥

5 Jul 11, 2008 19:34

:lol:

<?php
/**
 * This is the main/default page template for the "custom" skin.
 *
 * This skin only uses one single template which includes most of its features.
 * It will also rely on default includes for specific dispays (like the comment form).
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://manual.b2evolution.net/Skins_2.0}
 *
 * The main page template is used to display the blog when no specific page template is available
 * to handle the request (based on $disp).
 *
 *
 * @version $Id: index.main.php,v 1.1 2008/04/15 17:52:15 fplanque Exp $
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

if( version_compare( $app_version, '2.4.1' ) < 0 )
{
	die( 'This skin is designed for b2evolution 2.4.1 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
}

// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );


// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include( '_html_header.inc.php' );
// Note: You can customize the default HTML header by copying the generic
// /skins/_html_header.inc.php file into the current skin folder.
// -------------------------------- END OF HEADER --------------------------------
?>

<div id="header">
	<div id="title">
		<?php
				// ------------------------- "Header" CONTAINER EMBEDDED HERE --------------------------
				// Display container and contents:
				skin_container( NT_('Header'), array(
						// The following params will be used as defaults for widgets included in this container:
						'block_start'       => '<div class="description">',
						'block_end'         => '</div>',
						'block_title_start' => '<h1>',
						'block_title_end'   => '</h1>',
					) );
				// ----------------------------- END OF "Header" CONTAINER -----------------------------

6 Jul 11, 2008 19:39

bugger, maybe the first 60 lines :P

You want to be placing it not far below that though ( skin_container( NT_('header' )........ is probably the blog banner, but you may have a skin_container( NT_( 'menu' )...... below that ... in which case it needs to go below that as well )

Continuing my xhtml lessons, there is no attribute "align" use style="text-align:center" ;)

¥

7 Jul 11, 2008 19:43

I am still learning and appreciate that. :D

			?>
	</div>
    <div id="topright">
     <div id="navtop">
	 <?php
			// Display container and contents:
			skin_container( NT_('Page Top'), array(
					// The following params will be used as defaults for widgets included in this container:
					'block_start' => '<div class="$wi_class$">',
					'block_end' => '</div>',
					'block_display_title' => false,
					'list_start' => '<ul>',
					'list_end' => '</ul>',
					'item_start' => '<li>',
					'item_end' => '</li>',
				) );
		?>
        </div>
    	<div id="search">
				<?php if ( true /* change to false to hide the search box */ ) { ?>
		  <form action="<?php $Blog->gen_blogurl() ?>" method="get" class="search">
			<input name="s" size="25" value="search..." class="form_text_input" type="text" />
		  </form>
				<?php } ?>
         </div>
     </div>
</div>
<div id="navigation">
	<ul>
		<?php

8 Jul 11, 2008 19:45

Ok, the chances are that you want it between these 2 lines :

</div>
<div id="navigation"> 

Either that or you want it just after the </div> for <div id="navigation">

¥

9 Jul 11, 2008 21:09

:D

THANK YOU!

That did the trick. Now I'm messing around with the code and learning what I can and cannot do.

By the Way, I found the banner script at http://www.i-fubar.com/rotation-ad-script.php

I'm not sure how well it will work with affiliate ads with coding in the url but straight html links work well.


Form is loading...