Help - Search - Members - Calendar
Full Version: The most simple "Last X entries" method
Movable Type Community Forum > Additional Resources > Tips and Tricks
Beldar
I'm so new to MT, and I love it, but one thing I can't figure out is how to show the last 5 or 10 entries, across multiple weblogs, in one place.

For example, let's say my main weblog is main.com
I have about 11 other weblogs for various authors, etc, set up like main.com/weblog1, main.com/weblog2, main.com/weblog3 and so on.

What I'd like is to have just a little area on my main weblog that automatically updates whenever something new was added anywhere else. It would just show the title, nothing else, and link to the appropriate article/weblog. I've searched some of the topics here, but got confused because it seems there's a bunch of different methods for this(?) Is this doable in MT, or is php better?

If anyone could help out, or point me in the right direction, that'd be great, thanks!
LisaJill
a combination of MT and PHP will get you going on this, I do this with all my setups. PHP for including the indices of the other blogs on the home page.

Very powerful combo...
maddy
What do you actually want to display? Do you want the list to be just the last n new entries, over all of the blogs. Or do you want to show the last entry from each blog? Are you using mySQL?
Beldar
Let's say the last 5 entries (the 5 newest), no matter which blog they were posted in, would be listed together on the main page...just titles with links. That's basically all I want.

We do have mySql capabilities, but I don't have it set up...right now I'm just using MT for the crux of it, and php for some includes.
maddy
Well, you could use either of the GlobalListings or WholeSystem plugins to do it. You would need to do some linking or phping to have the list in the main blog be up to date even when it hasn't been rebuilt, though.

I think what I would do would be to create a new Category in the main blog (the one you want to display the list in) called "Updates". If you edit that categories attributes to accept incoming trackback pings, you willl then get an URL to ping for that category which you can add to the URLs to ping (along with weblogs.com, etc ) in Weblog Config | Preferences in the other blogs.

Then when entries are posted there, they will ping the category. And you can display those pings using this code in your Index template (or a template you can include into the main index - set to rebuild automatically) .
CODE
<MTPings category="Updates" lastn="5">
<a href="<$MTPingURL$>"><$MTPingTitle$></a><br />
</MTPings>



smile.gif
Beldar
Wow, thanks! That WholeSystem looks to be exactly what I'm looking for, but I have a question about this:

"Download wholesystem.tar.gz or wholesystem.zip , unpack it, and place wholesystem.pl in your plugins directory."

So I now have the wholesystem.pl file, but I don't have a "plugins" directory...and that's probably because, like I said, I'm totally new to this, and I'm not using plugins (yet). Can I just create a "plugins" directory, and put that file in there, or is there some special directory I should be looking for? Are there any config settings I should change as well? I don't want to break anything smile.gif
maddy
You can just create on in the same directory that holds mt.cgi. You don't need to change anything, just add the new tags to your template. smile.gif
Beldar
AWESOME, thanks!

It works wonderfully, thanks again. I'm bookmarking this board thanks to the good help and good advice. A++++ WOULD POST AGAIN wink.gif

...Drats, I didn't know I'd have to rebuild the main template for the list to update tongue.gif Oh well, something is better than nothing.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.