Recent Topics

1 Jun 21, 2006 04:55    

I'm new to b2evolution so I'm still trying to feel my way around. Rather than using it as a full "blog" engine like it was intended - I am just using it as a news posting tool for my family website. I deleted all the default blogs it came with and am posting in what was called the "Blog all" (ID 1) blog.

It works great so far - the only thing that bugs me a little bit - is that on posts - it shows the date of the post in the header, rather than the category name.

This is my site: http://www.robitzsch.com

Which file manages the post output? Is there a variable I can change? Or is there a cleaner way to "fix" this?

Thanks in advance for any help that is provided.

2 Jun 21, 2006 09:02

Very short :
You have adapted a skin to 'myskin'

In that dir you'll find a file _main.php

In that file you'll find somewhere :

<?php // ------------------------------------ START OF POSTS ----------------------------------------
	if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post

	if( isset($MainList) ) while( $Item = $MainList->get_item() )
	{
		$MainList->date_if_changed();
	?>


change it with

<?php // ------------------------------------ START OF POSTS ----------------------------------------
			if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
		
			if( isset($MainList) ) while( $Item = $MainList->get_item() )
			{
			?>

This code will show the category :

<?php echo T_('Category: '); $Item->main_category(); ?>

So put that where you want the category to be show

ie :

<div class="bPost<?php $Item->disp('status', 'htmlattr'); ?>" lang="<?php the_lang() ?>">
		<?php
			$Item->anchor(); // Anchor for permalinks to refer to
			locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
		?>
		<div class="category"><?php echo T_('Category: '); $Item->main_category(); ?></div>
		<div class="bPostTitle"><?php $Item->title(); ?> 

3 Jun 21, 2006 19:54

Thanks Topanga. I think you were working with a different version since my code looks a little different from what you listed, and the custom.css didn't include a "category" class - but I got the jest of where I needed to touch the code.

Thanks again :)


Form is loading...