Recent Topics

1 Jul 31, 2008 14:36    

My b2evolution Version: 2.x

Hi everyone,

I tried to follow some topics and docs to move the 1st sidebar of the skin "simple_zen" on the left of the main content (so, to get posts between the 2 sidebars), but i couldn't get it >:(
Does someone have the time to modify and send me a new css file for this skin with this configuration?

I'm still hopping for a tool in the back office which allow administrators to move the place of sidebars... :D i'm very confident in the development of b2 which i really think is the best one for newbies like me!

Thanks again to all the developpers ;)

MAIL : fdeconiac /at/ msn.com

2 Jul 31, 2008 23:33

what you need to do is to move

<?php
// ------------------------- SIDEBAR INCLUDED HERE --------------------------
skin_include( '_sidebar.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------
?>

above the

<div id="content" class="narrowcolumn">

so that it will load the sidebar to the left first...

just in case ; here is a modified version of posts.main.php:

<?php
/**
 * This is the main/default page template.
 *
 * 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).
 *
 * @package evoskins
 * @subpackage kubrick
 *
 * @version $Id: posts.main.php,v 1.1 2007/11/29 19:29:24 fplanque Exp $
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

// 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 --------------------------------
?>


<?php
// ------------------------- BODY HEADER INCLUDED HERE --------------------------
skin_include( '_body_header.inc.php' );
// Note: You can customize the default BODY heder by copying the generic
// /skins/_body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>


<?php
// ------------------------- SIDEBAR INCLUDED HERE --------------------------
skin_include( '_sidebar.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------
?>
<div id="content" class="narrowcolumn">

<?php
	// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
	messages( array(
			'block_start' 			=> '<div class="action_messages">',
			'block_end'   			=> '</div>',
		) );
	// --------------------------------- END OF MESSAGES ---------------------------------
?>

<?php
	// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
	request_title( array(
			'title_before'			=> '<h2>',
			'title_after' 			=> '</h2>',
			'title_none' 			=> '',
			'glue'        			=> ' - ',
			'title_single_disp' 	=> true,
			'format'      			=> 'htmlbody',
		) );
	// ------------------------------ END OF REQUEST TITLE -----------------------------
?>

<?php
// Display message if no post:
display_if_empty();

while( $Item = & mainlist_get_item() )
{	// For each blog post, do everything below up to the closing curly brace "}"
?>
	<div class="post post<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">

		<?php
			$Item->locale_temp_switch(); // Temporarily switch to post locale (useful for multilingual blogs)
			$Item->anchor(); // Anchor for permalinks to refer to.
		?>

		<h2 class="evo_post_title"><?php $Item->title(); ?></h2>

		<?php
			// ---------------------- POST CONTENT INCLUDED HERE ----------------------
			skin_include( '_item_content.inc.php', array(
					'image_size'		=>	'fit-400x320',
			) );
			// Note: You can customize the default item feedback by copying the generic
			// /skins/_item_feedback.inc.php file into the current skin folder.
			// -------------------------- END OF POST CONTENT -------------------------
		?>

		<div class="postmetadata">
		<ul>

			<?php
				$Item->author( array(
					'before'			=> '<li class="author">'.T_( 'By').' ',
					'after' 			=> '</li>',
				) );
			?>

			<?php
				$Item->issue_time( array(
					'time_format' 		=> 'F jS, Y',
					'before'			=> '<li class="date">',
					'after'				=> '</li>',
				) );
			?>

			<?php
				$Item->categories( array(
					'before'          	=> '<li class="category">'.T_('Posted in').' ',
					'after'           	=> '</li>',
					'include_main'    	=> true,
					'include_other'   	=> true,
					'include_external'	=> true,
					'link_categories' 	=> true,
				) );
			?>

			<?php
				/*
				$Item->permanent_link( array(
					'before'     		=> '<li>',
					'after'       		=> '</li>',
					'text'        		=> T_( 'Permalink' ),	// possible special values: '#', '#icon#', '#text#', '#title#'
					'title'       		=> '#',
					'class'       		=> '',
				//	'format'      		=> 'htmlbody',
				) );
				*/
			?>

			<?php
				/* Old style item */
				// Output number of views
				echo ( '<li class="views">' );
				$Item->views();
				echo ( '</li>' );
			?>

			<?php
				// Link to comments, trackbacks, etc.:
				$Item->feedback_link( array(
					'type' 				=> 'feedbacks',
					'link_before' 		=> '<li class="feedback">',
					'link_after' 		=> '</li>',
					'link_text_zero' 	=> '#',
					'link_text_one' 	=> '#',
					'link_text_more' 	=> '#',
					'link_title' 		=> '#',
					'use_popup' 		=> false,
				) );
			?>

		</ul>
		</div>

		<div class="metadata">
		
			<div class="floatright">

	          	<?php 
	          		$Item->locale_flag( array(
							'before'    => ' &nbsp; ',
							'after'     => ' &nbsp; ',
	 						'class'		=> '',         		
						) );
				?>
	
				<?php
					$Item->edit_link( array( // Link to backoffice for editing
						'before'       		=> ' ',
						'after'        		=> ' ',
						'text'         		=> '#',
						'title'        		=> '#',
						'class'        		=> '',
						'save_context' 		=> true,
					) );
				?>
				
			</div>
			
			&nbsp;

			<?php
				// List all tags attached to this post:
				$Item->tags( array(
					'before' 			=> T_('Tags').': ',
					'after' 			=> ' ',
					'separator' 		=> ', ',
				) );
			?>

		</div>
	</div>

	<?php
		locale_restore_previous();	// Restore previous locale (Blog locale)
}
	?>

<?php
	// -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
	mainlist_page_links( array(
			'block_start' 		=> '<div class="navigation">',
			'block_end' 		=> '</div>',
   			'prev_text' 		=> '&lt;&lt;',
   			'next_text' 		=> '&gt;&gt;',
		) );
	// ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
?>


</div>



<?php
// ------------------------- SIDEBAR INCLUDED HERE --------------------------
skin_include( '_sidebar_2.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------
?>

<?php
// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
skin_include( '_body_footer.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>


<?php
// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>

Afterwards, you need to open stylesheet.css and edit

#content {
	clear: both;
	font-size: 1.2em
}

clear:both prevents it to float with the sidebar so change it into :

#content {
	font-size: 1.2em
}

you might need to modify other files, do not hesitate to ask further, good luck

3 Jul 31, 2008 23:58

Thanks for your answer!

But i got a message error... 8|

"Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in [...]/skins/simple_zen/posts.main.php on line 52"

Have a good night!

5 Aug 28, 2008 10:54

It works very well! thank you very much.


Form is loading...