hi all – me and my friends have set up a couple of blogs using wordpress. I use a web hosting company with a domain name, and me and my friends have subdirectorys eg mydomain.com/myname.
This has become quite popular and I am looking to expand it to the local community. I am looking for a way to display recent posts from any of the blogs listed on the main home page.
I have seen this on sites like weblogs.us and would be looking for a similar way to display recent posts.
Does anyone know how I could be able to do this? Any help would be greatly appreciated!
RustIndy, that looks exactly like what I am looking for. Was there a lot of coding involved? I’m only just getting into PHP. My experience is limited to tweaks and edits of PHP scripts like zen cart or osCommerce / PHPNuke.
Podz, I’m not sure how to implement this – it seems to be able to gather RSS feeds to display on the blog? What I’d need is something that will display the most recent post of any of the blogs I am hosting on a subdomain to appear on the domains main page. Bit like a ‘weclome to my blog hosting. Here’s the most recent posts from our members’ sort of thing.
mydomain.com – will display recent posts from wordpress installs on mydomain.com/xyz and mydomain.com/abc
Will the plugin do the job? Forgive me if I overlooked it!
InnerEyes’ main page is written in ASP actually, not PHP. I know ASP way better, so I can write something in a hour that might take a day with PHP.
In short, and if you don’t mind skipping some of the error-handling with blanket on error resume next statements, the left column of the page is probably about a days work.
The trick is preventing the page from reading each and every blog every time someone loads the page – that’ll kill the server eventually. InnerEyes is set to refresh every 5 minutes – it just stores the last time a database refresh was done in a table, and checks that table every time the page is loaded. If it’s been over 5 minutes, it’ll re-query all the blog databases directly for posts and comments, and it stores all that info in another table. If it hasn’t been 5 minutes yet, it just reads the existing information from that same table.
In theory, a simple thing to do. In practice, you do have to put a little effort into making sure that the information you receive from the blogs is what you’re looking for (so you need to calculate the GMT timezone from the server’s timezone and limit your query so you don’t get future-dated posts, you need to ignore drafts, you need to ignore moderated comments, etc.).
Technically, using the blog’s RSS feed is safer, since it will already have filtered out everything (it only displays published posts, approved comments, etc.), but it’s really slow for more than a few blogs. InnerEyes originally used RSS, but the update for 20 blogs took almost a minute. So I rewrote it to query the blog databases directly and now it checks 75 blogs in 1 second 🙂
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘recent posts from multiple wordpress installs’ is closed to new replies.