[Plugin: WP RSS Aggregator] Limit Results
-
Great plugin! Works like a charm.
Was curious if there was a clean way to limit the results? I’ve been adding rss feeds to a widget on sidebar using php and the results are long! Any way to limit it to, lets say, last 50 items or so? Or maybe do you plan on adding pagination?
Thanks!
-
This is something I can consider for the next update. Rather than pagination I think I would add a limit, say 10 items for each section (today, yesterday, 2 days ago etc.).
Hopefully that would help you keep things tidier.
I have just installed the Aggregator and it does just what I want and is simple to use but I have the same issue as gfa202. So I am pleased to see you intend to address this. It would be better from my point of view if there was a way of setting the numbers of entries displayed in each section.
Thanks.
I am adding my “yes please” to this!
Thanks all feedback appreciated, I will gather all requests and work on them for the next release.
Is that possible to show the images (thumbnails) and a beginning of the original posts with the plugin? I’m trying to create a content aggregator, and i’d like to use this plugin.
It would be possible with modifications, I can’t guarantee that I’ll be adding this feature though.
@ninanoespelho – just posted info on how to add images π
best,
-jennybHi there,
I’ve read Jenny’s solution on adding thumbnail but would like to know in specific location of adding those codes to wp-rss-aggregator.php.
I’m not so sure of where to insert the following codes to wp-rss-aggregator.php?
1) preg_match_all(‘/<img([^>]*)>/i’, $item->get_content(), $matches);
// Get all of the image tags2) $all_images = $matches[0];
Could anyone please guide me on these? Many thanks.
a field to limit the number of items fetched for a particular feed would be nice — and/or a date limit field (i.e. nothing older than a month)
great little plugin!
hi! I am really new here, stupid than a newbie. π I need some help.
1. How do I limit the feeds to just the most recent? Like maybe 5 or 6 items?
2. How to put the thumbnails?I am actually working on it, with de.pinque WP theme. I am trying to put it in my sidebar. Thanks a million. π
Coming in the new version π
Wow! Thanks. π Looking forward to it. π I wish I could also show the thumbnails. π
Desperately wanting to limit number of posts in feed! :))))))
And updated my add thumbnail explanation here for those in need. Hope it helps.
cheers,
-jennybOk folks, I couldn’t wait and am very happy to announce that I have a solution for us π
Modifiy the shortcode declartion in wp-rss-aggregator.php at line 223, by replacing
// Register a new shortcode add_shortcode( 'wp_rss_aggregator', 'wprss_shortcode'); function wprss_shortcode( $atts ) { if ( !empty ($atts) ) { foreach ( $atts as $key => &$val ) { $val = html_entity_decode($val); } } wp_rss_aggregator( $atts ); }
with
// Register a new shortcode add_shortcode( 'wp_rss_aggregator', 'wprss_shortcode'); function wprss_shortcode( $atts ) { extract( shortcode_atts( array( 'limit' => '20', ), $atts ) ); if ( !empty ($atts) ) { foreach ( $atts as $key => &$val ) { $val = html_entity_decode($val); } } wp_rss_aggregator( $atts ); }
This will add the “limit” variable with a default of 20.
Then, before the (or each of the) foreach statements replace:
`foreach ( $items_today as $item ) {
echo $link_before . ‘<a class=”colorbox” href=”‘ . $item->get_permalink() .'”>’. $item->get_title(). ‘ ‘. ‘</a>’;
echo ‘<br><span class=”feed-source”>Source: ‘.$item->get_feed()->get_title()/* . ‘ | ‘ . $item->get_date(‘l jS F’).”*/ . ‘</span>’;
echo $link_after;}`
with
$feedlimit = $limit; //call variable foreach ( $items_today as $item ) { $counter++; //add counter echo $link_before . '<a class="colorbox" href="' . $item->get_permalink() .'">'. $item->get_title(). ' '. '</a>'; echo '<br><span class="feed-source">Source: '.$item->get_feed()->get_title()/* . ' | ' . $item->get_date('l jS F').''*/ . '</span>'; echo $link_after; if($counter >= $feedlimit) break; //break if count is met }
Then, in your shortcode simply add limit=X, where X is the number of posts you want to show. Et voilΓ ! works on my end, let me know how it works for you!
-jennyb
This is the only working aggregator plugin, so I do hope that jeangalea implements this in the next version, and that the next version comes out soon.
This is what I think:
1. The site owner should be able to configure number of items/section. e.g. 10 per section
2. The site owner should be able to configure how many sections…I, for instance, need only Today.
The above 2 are absolutely required functions yesterday.Once we have the above 2, I hope jeangalea also looks at
3. The site owner should be able to configure the maximum number of items from each individual feed that are allowed. e.g. Max 3 from NYTimes, max 1 from NBC, max 3 from BBC, etc
- The topic ‘[Plugin: WP RSS Aggregator] Limit Results’ is closed to new replies.