Recent Topics

Categories in the Bloglist

Started by on Mar 06, 2007 – Contents updated: Mar 06, 2007

Mar 06, 2007 15:03    

My b2evolution Version: Not Entered

Hi all
I am a web-master for a school and we are using B2evo 1.8 to let students blog.
Now there will be a lot of blogs in the future.
So to make things clearer I need the categories to be in the bloglist under the active blog.
A separate category list doesn't do the job for us.

Here is the site I am working on. ( a mix of Joomla and b2evo)
http://www.avbr.nl/blog/primary-elements.php

I tried to add in _bloglist.php on line 67:

 $Plugins->call_by_code( 'evo_Cats', array(	// Add parameters below:
                                                ) );


This doesn't work, the list is displayed on top of the whole list and not under the active Blog.

Can anybody help me out here?

Mar 08, 2007 11:14

In your skins _main.php you shuld just be able to add the catagories plugin right after the bloglist

<?php
	 * --------------------------- BLOG LIST INCLUDED HERE -----------------------------
	 */
	require( dirname(__FILE__).'/_bloglist.php' );
	// ----------------------------- END OF BLOG LIST ---------------------------- ?>
	<?php // -------------------------- CATEGORIES INCLUDED HERE -----------------------------
		// Call the Categories plugin:
		$Plugins->call_by_code( 'evo_Cats', array(	// Add parameters below:
			) );
		// -------------------------------- END OF CATEGORIES ---------------------------------- ?>

¥

Mar 08, 2007 12:13

This is not doing what I want, this wil result in one blog list and a cat list below.

I want the categories IN the bloglist under the active blog.

blog 1
blog 2
- cat 1
- cat 2
blog 3
blog 4
...

In the future I will have a lot of blogs so I need the categories in the bloglist and not below.

Mar 08, 2007 12:22

Try amending your bloglist to look something like this :-

	if( $curr_blog_ID == $blog )
	{ // This is the blog being displayed on this page:
		$blog_link .= '<a href="';
		$blog_link .= preg_replace( '#index\.php$#i', '', blog_list_iteminfo('blogurl', false) );
		$blog_link .= '" class="'.$blog_selected_link_class.'" title="';
		$blog_link .= format_to_output( blog_list_iteminfo($blog_title_param, false), 'htmlattr' );
		$blog_link .= '">';
		$blog_link .= $blog_selected_name_before;
		$blog_link .= format_to_output( blog_list_iteminfo($blog_name_param, false ), 'htmlbody' );
		$blog_link .= $blog_selected_name_after;
		$blog_link .= '</a>';

		// add categories
		ob_start();
		$Plugins->call_by_code( 'evo_Cats', array( // Add parameters below:
			'block_start'=>'',
			'block_end'=>'',
			'title'=>'',
			'option_all'=>''
			) );
		$blog_link .= ob_get_contents();
		ob_end_clean();
		// end add categories
	}

¥

Mar 08, 2007 12:29

Yess Thanks a LOT :D
This works super fine.

I omited the ob_start(); in my setup yesterday.
thanks a lot

Mar 08, 2007 17:33

I'm always forgetting to start my ob ..... which isn't so bad on sunny days :roll:

¥

Sep 14, 2007 22:51

How can i get summary.php to print out the catagory / subcategory list in the same manner? currently it's just printing a list of the posts from blog1


Form is loading...

b2evolution CMS – This forum is powered by b2evolution CMS, a complete engine for your website.