Recent Topics

1 Jul 25, 2007 01:57    

My b2evolution Version: 1.9.3

Hi, I have worked on the HTML of the "main" file of the "plain" sklin to create my own page for my blog, but I'm trying to remove the date from the top of the post title and put a small reference for date an time in the bottom of the post.

Can someone help me on the PHP/HTML code to change that? I couldn't find a way to do it :(

This is may blog:
http://www.vladimircampos.com

Thanks a lot!

2 Jul 29, 2007 20:24

Find in _main.php this piece of code:

	<?php 
		$MainList->date_if_changed( '<h2>', '</h2>', '' );
	?>


and comment it out. That will get rid of the large date on top of posts.

To get the date/time (time is easy) look at another skin's _main.php at

		<div class="bSmallHead">
		<?php
			$Item->permanent_link( '#icon#', '#', '' );
			echo ' ';
			$Item->issue_time( '' );
			echo ', '.T_('by').' ';
			$Item->author( '<strong>', '</strong>' );
[...]


It goes on, but this displays extra information about the post. Among it is issue_time( '');.

Good luck

3 Aug 01, 2007 03:44

Hi Afwas, thanks a lot for the help but it didn't work.

If I remove this part, I end up with a problem loading the page:
<?php // -------------------- TITLE FOR THE CURRENT REQUEST --------------------
if( $disp != 'single' ) {
request_title( '<h2>', '</h2>' );
}
// ----------------------------- END OF REQUEST TITLE ----------------------- ?>

The same if I remove this part:
$MainList->date_if_changed(); // display post date if it changed

Below you can see the complete code. Any ideas?

Thanks a lot again!

<?php // ------------------------ START OF MAIN AREA ------------------------ ?>

<div id="mainbar">

<?php // ------------------- MESSAGES GENERATED FROM ACTIONS -------------------
if( empty( $preview ) ) $Messages->disp();
// ------------------------------- END OF MESSAGES -------------------------- ?>


<?php // -------------------- TITLE FOR THE CURRENT REQUEST --------------------
if( $disp != 'single' ) {
request_title( '<h2>', '</h2>' );
}
// ----------------------------- END OF REQUEST TITLE ----------------------- ?>


<?php // ------------------------ START OF POSTS LOOP --------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = & $MainList->get_item() ) {
$MainList->date_if_changed(); // display post date if it changed
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
$Item->anchor(); // Anchor for permalinks to refer to
?>

<div class="bPost bPost<?php $Item->status( 'raw' ) ?>" lang="<?php $Item->lang() ?>">

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

<div class="bText">
<?php
$Item->content();
link_pages();
?>
</div>

4 Aug 01, 2007 17:23

Ok a step by step guide:

1) find:

$MainList->date_if_changed(); // display post date if it changed 


replace by:

/* $MainList->date_if_changed(); // display post date if it changed */

2) add before <div class="bSmallPrint">

<div class="bSmallHead">
   <?php
      $Item->issue_date();
      echo(' ');
      $Item->issue_time();
   ?>
</div>

Good luck

5 Apr 05, 2008 21:02

Thanks a lot!!! It worked perfectly!


Form is loading...