+ Reply to Thread
Results 1 to 9 of 9

Thread: Accumulo - RSS aggregation theme

  1. #1
    BinaryMoon's Avatar
    BinaryMoon is offline Hello World
    Join Date
    Jun 2009
    Posts
    52

    Default Accumulo - RSS aggregation theme

    Hope you don't mind me posting this here but we released a new Premium WordPress theme today. Since releasing http://WPTopics.com last year Darren had some requests to sell the theme so we tidied up the code and packaged it up as Accumulo

    You can see the demo site here: http://demo.prothemedesign.com/wordpress/accumulo/

    And the release post here: http://prothemedesign.com/news/accum...heme-released/

    Would love any feedback and suggestions/ criticism you might have

  2. #2
    ryno267's Avatar
    ryno267 is offline Hello World
    Join Date
    Nov 2009
    Location
    Phoenix
    Posts
    10

    Default

    you guys using the built-in fetch_feed function or you rolling your own simplepie mod like onenews does? just wondering

  3. #3
    Ryan's Avatar
    Ryan is online now WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

    Default

    Quote Originally Posted by ryno267 View Post
    you guys using the built-in fetch_feed function or you rolling your own simplepie mod like onenews does? just wondering
    Thanks. I didn't even know there was a built in fetch_feed function! Thanks for the tip

  4. #4
    Cais's Avatar
    Cais is offline Big Tipper
    Join Date
    Feb 2009
    Location
    Mississauga, ON, CANADA
    Posts
    347

    Default

    Quote Originally Posted by Ryan View Post
    Thanks. I didn't even know there was a built in fetch_feed function! Thanks for the tip
    I built the BNS SMF Feeds plugin using the built-in fetch_feed() function, but the most recent updates required incorporating the code into the plugin so I could change the feed refresh frequency.

  5. #5
    BinaryMoon's Avatar
    BinaryMoon is offline Hello World
    Join Date
    Jun 2009
    Posts
    52

    Default

    ryno267 - Yeah - we're using the built in fetch_feed functionality.

    Edward - could you clarify what you mean about the refresh frequency, I think this may be related to a problem we've been having with feeds being cached for longer than intended. I've had a look but can't work out where the cache is stored or how it works. I do caching myself in the theme so any info you can give would be great.

  6. #6
    Otto's Avatar
    Otto is offline Trac Master
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    770

    Default

    Default feed caching time is 12 hours.

    We discussed how you could change that over here:
    Setting cache duration for SimplePie in WP?

    Note, the URL bug I mention is fixed in 3.0. Not in 2.9 though.

  7. #7
    BinaryMoon's Avatar
    BinaryMoon is offline Hello World
    Join Date
    Jun 2009
    Posts
    52

    Default

    ooh - thanks for the link. Interesting reading.

    I have tried looking for the cache directory and can't find it anywhere (says it's ./cache). Can you tell me where the files are cached so I can clear them?

  8. #8
    Cais's Avatar
    Cais is offline Big Tipper
    Join Date
    Feb 2009
    Location
    Mississauga, ON, CANADA
    Posts
    347

    Default

    Quote Originally Posted by BinaryMoon View Post
    Edward - could you clarify what you mean about the refresh frequency, I think this may be related to a problem we've been having with feeds being cached for longer than intended. I've had a look but can't work out where the cache is stored or how it works. I do caching myself in the theme so any info you can give would be great.
    I borrowed heavily from the core files to create the BNS SMF Feeds plugin, specifically code from
    Code:
    ../wp-includes/feed.php
    
    and
    Code:
    ../wp-includes/default-widgets.php
    
    Inside feed.php you will find the fetch_feed() function ... I modified it like so:
    PHP Code:
    function bns_fetch_feed($url) {
        require_once (
    ABSPATH WPINC '/class-feed.php');

        
    $feed = new SimplePie();
        
    $feed->set_feed_url($url);
        
    $feed->set_cache_class('WP_Feed_Cache');
        
    $feed->set_file_class('WP_SimplePie_File');
        
    $feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime'$feed_refresh));
        
    $feed->init();
        
    $feed->handle_content_type();

        if ( 
    $feed->error() )
            return new 
    WP_Error('simplepie-error'$feed->error());

        return 
    $feed;

    The user can then set the new $feed_refresh variable in the option panel (instead of the core default of 43200 seconds, or 12 hours); and, although it has not been tested 100%, I would expect the refresh frequency will work at different speeds within each instance of the widget.

    The plugin was more about building a SMF Forum specific RSS URL than displaying the feed items ...

  9. #9
    BinaryMoon's Avatar
    BinaryMoon is offline Hello World
    Join Date
    Jun 2009
    Posts
    52

    Default

    Just a quick update from me, I found the cache. It's stored in the database under wp_options as _transient_feed_XYZ (or something similar). Thanks for getting me started on this - helped a lot

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts