The MU forums have moved to WordPress.org

Aggregate Plugin (3 posts)

  1. nitsujri
    Member
    Posted 16 years ago #

    Hey everyone,

    I've been working on this for a few weeks now, but haven't run into anything that I particularly enjoyed. I've seen all the RSS feed systems, but I would like the original post for its pictures and such. Current post aggregation solutions scan through the blogs and only pull a single post as well. I decided to build one my own, but I ran into a problem. So, I'm looking for some help from anybody willing to toss around ideas.

    Currently, I:

    1. Obtain a list of blog names I want to pull from (i.e. Featured blogs or All).
    2. Compile the SQL statement to UNION which ever blogs I desire to pull from and ORDER BY post_date
    3. Spit out the posts to a webpage.

    This works great except for one problem, getting the link back to the original post. There's no column that contains which blog that specific post came from because it was stored in the table name. Now that they're all UNION'ed I don't have a reference back to this information.

    Any ideas for ways around this? Thanks in advanced from everyone.

  2. dsader
    Member
    Posted 16 years ago #

    Using Donncha's Site Wide Tags Pages, all posts on site aggregate in one blog, but all permalinks(titles/tags/cats) point to the originating blog. It ain't for all, but it works for me.

    Aggregation occurs when a post is saved/updated. Other ideas in discussion ...

    http://ocaoimh.ie/2008/07/19/sitewide-tags-pages-for-wordpress-mu/

  3. wamitchell
    Member
    Posted 16 years ago #

    It might work to hard code the blog id into the SELECT statement, if you are already building the query out of a list of tables. Something like:


    (SELECT wp_1_posts.*, '1' AS blog_id FROM wp_1_posts) UNION (SELECT wp_2_posts.*, '2' AS blog_id FROM wp_2_posts);

    I'm working on something similar to this, and that's what I've come up with so far. Not sure how far it'll go.

About this Topic

  • Started 16 years ago by nitsujri
  • Latest reply from wamitchell