• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Limit number of items returned from feed

EasyTarget

Well-known member
#1
In the file,
XenForo/Model/Feed.php
line 26: protected static $_maxEntriesPerImport = 5;

Change this so that we can limit the number of entries per feed. i.e. allow some feeds to have 2, some 3, some 12; user select able.
Most likely in the table xf_feed you will need to add a column to store the value.

in the function _limitEntries(array $entries, $maxEntries = 0)
array_slice is used to grab the first 5 entries, this is assuming that the first entry is listed in the rss feed is the newest, some rss feeds screw it up and do it backwards,
since the array has the field of date_modified, can you add an array_sort on the date_modified field before doing the array_slice

Thanks
Related to: http://xenforo.com/community/threads/limit-number-of-items-returned-from-feed.23175/#post-287811
 

mauzao9

Well-known member
#2
I do agree with this. I hate in moderation see 5 on a time waiting for be posted, it floods the forum, I would like to choose how many gona RSS Feed to get for once a while it posts one new, and not 5 in a row.