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

XF 1.1 Limit number of items returned from feed

Discussion in 'XenForo Questions and Support' started by EasyTarget, Nov 14, 2011.

  1. EasyTarget

    EasyTarget Well-Known Member

    Is there any way to limit the number of items the registered feed posts?

    I really only want it to post 1 or 2 items per day. And when it cycles around I want it to grab the latest 1 or 2 items, so it may need to skip 5 or 10 items.
     
  2. mrGTB

    mrGTB Well-Known Member

    If I'm right it only grabs about 5 items at a time anyway. So you could set the time for checking for new feeds to be pulled in at every 12 hours (maximum setting allowed). Then you would at most only get 10 feeds pulled in a day. Not 100% sure on that, but I did take notice when pulling feeds in from the BBC news it seems only 5 at a time gets pulled on checking.
     
  3. EasyTarget

    EasyTarget Well-Known Member

    Yes, I know it will pull a max of 5, and twice a day is too often also. Really only want 1 or 2 items per day.
    It's kind of funny they have everything set up but they didn't implement it.
    in the file XenForo --> Model --> Feed.php
    26: protected static $_maxEntriesPerImport = 5;

    and then they have the fx
    409: protected function _limitEntries(array $entries, $maxEntries = 0)

    Shouldn't be a huge leap for them to implement item limitations.
     
    I am David likes this.
  4. mrGTB

    mrGTB Well-Known Member

    I suppose your looking for a proper feature fix on this one, but for now could you not just change that $_maxEntriesPerImport = 5; to (1) instead and then import every 12 hours..
     
  5. I am David

    I am David Member

    awesome... This should be a default setting within the administration page
     

Share This Page