The MU forums have moved to WordPress.org

Sitewide feed tweaking (14 posts)

  1. dbasulto
    Member
    Posted 16 years ago #

    I´m using the sitewide feed for displaying latest comments and latest posts. So far works fine and looks like it doesnt add too much load to the server. I wonder how to customize the output for latest comments, in order to make them more understable. As of now it outputs "By Author" and i´d like to turn it into "By Author on Post". I tried using the_title_rss variable for it but it didnt work.

    Also, it removes the Hello World post from the latest posts, based on its modification time, but it still displays the Mr Wordpress comments. I´ll try to remove it with a simple if statement, but i wonder if anyone tried tweaking this before.

  2. dbasulto
    Member
    Posted 16 years ago #

    Well, i decided to be proactive on this and found a simple way to remove the default comment, since it doesnt have an email so i just check for that. Go to line 213 and add a new line below it (continuing the series of AND) with:

    AND ".$wpmuBaseTablePrefix.$blogid."_comments.comment_author_email != ''
  3. dbasulto
    Member
    Posted 16 years ago #

    I have digged a bit more into getting the comments feed to output in the form of "by Author on Post"

    When each comment is being parsed into the rss format, each comment goes into a $comment array where you can get the blog id and the post id where the comment comes from.

    so, i think i could pull the post title this way:

    <?php $post_til = $wpdb->get_results("SELECT post_title FROM wp_".$blogid."_posts WHERE ID = ".$comment_post_ID.""); ?>

    but it gives me this error:

    Fatal error: Call to a member function get_results() on a non-object in /home/blablabla/wp-content/mu-plugins/wpmufeed.php on line 378

    if i call this function on my home.php by hardcoding the blog id and post id variables, i do get the post title in the form of an array...

    i think i'm getting closer, any ideas?

  4. SebastianCrump
    Member
    Posted 15 years ago #

    There are a couple of bugs you need to be aware of.

    1) The feed includes items from blogs that have been deactivated. I'll post a fix when I have done that.

    2) The options system doesn't work - it insists on URLs ending in / but then they don't work. I had to go and reset them directly in the database. That fix I think is beyond my skills at the moment.

  5. SebastianCrump
    Member
    Posted 15 years ago #

    Fix for 1) is adding AND deleted = '0' into line 195

    There are some other tweaks I'd like to make, such as showing the name of the Blog in addition to the post title. I also wonder whether different sorting options would be a good idea (e.g. by blog, in addition to just straight date).

    Any ideas/suggestions?

  6. tedmann
    Member
    Posted 15 years ago #

    It would be great to incorporate categories and/or tags into the sitewide feed. Is that feasible?

  7. Ovidiu
    Member
    Posted 15 years ago #

    you should also filter for SPAM blogs and for ADULT blogs, not only for deleted.
    I also made some other changes but can't remember them right now.

  8. tdjcbe
    Member
    Posted 15 years ago #

    Um, not sure which sitewide feed solution you;re looking at but we're using ITDamage's one and I see categories in the output.

  9. josswinn
    Member
    Posted 15 years ago #

    With all these personal changes to ITDamage's original file, could we maybe pull together a new release of it incorporating all recent refinements?

    One thing I noticed when I used it, was that it complained about not having wp-cache turned on. I was using wp-super-cache.

    Currently, I'm using site-wide-tags for this which works OK, but I've noticed that the twitter-tools plugin posts twice, once for the originating blog and one for the tags blog. It also seems a bit heavy duty, creating an entirely new blog, just to get site-wide-feeds and tags.

  10. Ovidiu
    Member
    Posted 15 years ago #

    sorry but you are confusing me: you say you are using itdamagers script, then continue talking about site wide tags...

    if I understood right, you would like to use itdamagers script for site wide feeds and make it use caching?

    if so I can give you a copy of the modded version I use, if it works for you and you are happy, we can publish it on wpmudev.org

    the modded version I use, does validate... needed a little hack though...

    AND I am really curious how we could get it to not display trackbacks in the site-wide comments feed.

  11. josswinn
    Member
    Posted 15 years ago #

    Sorry for the confusion. Previously, I used itdamager's script, but found it unreliable when combined with wp-super-cache and inlinefeed plugins. It was clearly written for wp-cache. I've since dropped all those plugins.

    I am now using site-wide-tags for a site-wide feed and tags, but I think that an updated version of itdamager's script is worth releasing. From a user's point of view, it's a nice plugin that could do a single task well if updated. It's more lightweight than site-wide-tags, which re-publishes every blog post on the site, just to provide site-wide tags (and feed).

  12. Ovidiu
    Member
    Posted 15 years ago #

    sitewide feeds was not written with wp-cache in mind, the cache its expecting is a totally different one (the object cache).
    see more details here: http://neosmart.net/dl.php?id=14

  13. josswinn
    Member
    Posted 15 years ago #

    I see. Thanks.

  14. leisegang
    Member
    Posted 15 years ago #

    gotten any further with this?

About this Topic

  • Started 16 years ago by dbasulto
  • Latest reply from leisegang