Greetings,
I have been tinkering with and learning a lot about WPMU, plugins, and PHP/SQL.
I started with ah_recent_posts_mu (Thanks Dan and Andrea!), changed it a bit to show date of post, title of post, author's name and the first 65 characters of the tag-stripped post.
The challenge is that the entries are sorted by the last modification fo the blog, not the date of the post.
i do not know enough about the array PHP functions to know where to put the sort code.
Your help is appreciated.
The plugin starts by setting up
$blogs = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs WHERE ... ORDER BY last_updated DESC");
Then it gathers the post data through two calls to the database
foreach ($blogs as $blog) {
...
$wpdb->get_results("SELECT option_value FROM $blogOptionsTable WHERE ... ORDER BY option_name DESC");
$thispost = $wpdb->get_results("SELECT ID, post_title, post_date, post_content, post_author FROM $blogPostsTable WHERE ... ORDER BY post_date DESC LIMIT 0,1");
What variable do I resort (and how do I do so) at this point before I start echo'ing out the results?
I'd be happy to post the entire code if necessary. You can see it in operation (and the date mis-sorting) at http://mldfamily.org
Thanks,
Dean