Recent Topics

1 Sep 07, 2008 04:12    

My b2evolution Version: 2.4.x

hello.

i want to have a "showcase" type page that shows the most recent postings across many blogs in one spot. i have a site with many bloggers and want to showcase a "what's new" by showing the latest and greatest posts.

i searched and found http://forums.b2evolution.net/viewtopic.php?t=8162 from 2006. can someone help me decipher this, in english, and for the latest versions of b2evo.

thanks in advance.

2 Sep 07, 2008 04:20

Hi adriscoll,

The post is not going to get you anywhere.
Try this:
Make a blog that is not in the blogroll (call it a hidden blog) and in that blog aggregate all other blogs (that is all interesting blog).
Now you can make a posts list widget with the ten most recent posts from this hidden blog, being the ten most recent posts from all blogs you have aggregated.
As a sideffect the RSS from this hidden blog is the feed for all your blogs.

Good luck

3 Sep 07, 2008 04:30

afwas,

that sounds awesome, but is beyond my technical grasp. i don't think i need play-by-play instructions, but I am not far off.

thanks.

4 Sep 07, 2008 04:38

10 Make a blog
2) Hide it from Blogroll; Blog settings -> features -> Include in public blog list -> No
3) aggregate all interesting blogs: Blog settings -> Advanced -> Blogs to aggregate -> comma seperated list (no space after comma) of IDs from interesting Blogs
4) I some blog / main blog / every blog add a post list widget: Blog settings -> Widgets -> Add Widget (SideBar) -> Post list. In the setting from this post list add the ID of you newly created aggregate blog.

Sort of something like this.

Good luck

5 Sep 07, 2008 04:41

Afwas,

i am with you on 1 and 2. for 3, i have 300 blogs and want it to pull recent postings, for the reason that I don't want to have to looking for them..like interesting blog 1, 2, 3 etc (although I will use this concept for another part of the site, so thank you for the inspiration). that is where i am stuck..how to grab the last 5 postings across all blogs.

hope that makes more sense. i will take your comments and make it work for another part of the site, but i am still stuck on this one.

thanks

6 Sep 07, 2008 05:03

Grab the Sorted Bloglist widget, install it, but don't do anything with it. In it's settings are all blogs comma seperated. Copy/paste from there.
One problem, there is a space after each comma in that list. Either you copy to notepad++ and filter out the space or you hack the Sorted Bloglist plugin (really easy, the code is a few lines down ;)

You could hack the core but for a one time operation, I'd say don't go that way,

Good luck

7 Sep 08, 2008 03:19

Hi adriscoll,

I've looked into this but the direction I was heading is not going to work. If it could work it would generate an enormous heap of memory unfriendly and superfluous material. The ItemListLight cache works one blog at a time.
In fact your idea -directly assessing the db- isn't as bad as I initially thought. However that's quit an undertaking. Perhaps Yabba can assist with his ideas. he did the AMFeed plugin and should know something about these lists.
Anyhow I won't be able to find time for it this week. Perhaps next week, perhaps not.

Good luck

8 Sep 08, 2008 09:23

¥åßßå wrote:

<yabs> select post_ID from evo_items__item where post_status = 'published' order by post_datestart desc limit 5
<yabs> then build a $Mianlist with post_id array

9 Oct 20, 2008 00:29

I was able to get the most recent posts listed by directly calling the database and table.


$query = "SELECT * FROM evo_items__item WHERE post_status = 'published' ORDER BY post_ID DESC LIMIT 5";

I am pulling the title and date, and would like to connect the title to the actual entry or main blog page via link. However, I am unable to link these entries in the table evo_items_item.

Any help would be awesome. thanks for everything.

10 Oct 20, 2008 01:08

Why don't you use summary.php since it does exactly what you want?

11 Oct 20, 2008 08:59

Sam2kb,

I have over 300 blogs on my site and I just want to show the latest 5 or so articles between all of them as opposed to listing each blog and the represented articles. Summary.php is great, but I have never been able to break it down to accomplish this in the right way.

Let me know if it is doable.

-adriscoll

by the way, thank you for the modifications on the mail sender plugin.

12 Oct 20, 2008 15:06

Do you need it in b2evo 1.10 or 2.x ?

13 Oct 20, 2008 16:15

Sam,

I used version 2.4.2 . The version 1.xxxx connotation on this message board kept defaulting back to 1.xxx no matter what version I put in.

Thanks for all of your help.

14 Oct 21, 2008 07:08

Done ;)

Put this function in conf/hacks.php

function get_latest_post( $limit = 5 )
{
	global $DB;
		
	$ids = $DB->get_col('
				SELECT post_ID
				FROM T_items__item
				WHERE post_status = "published"
				ORDER BY post_ID DESC
				LIMIT 0,'.$limit );
	
	if( !empty($ids) )
	{
		$ItemCacheLight = & get_Cache( 'ItemCacheLight' );
		
		$r = '<ul>';
		foreach( $ids as $ID )
		{
			if( $Item = & $ItemCacheLight->get_by_ID( $ID, false ) )
			{
				$r .= "\n".'<li><a href="'.$Item->get_permanent_url().'">'.$Item->title.'</a></li>';
			}
		}
		$r .= '</ul>';
		
		echo $r;
	}
}

To display 5 latest posts use

get_latest_post();

To display 17 latest posts use

get_latest_post( 17 );

Good luck


Form is loading...