We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11055 ☆ A M B ☆
    • 3,112 Posts
    This is an auto-generated topic for spiefeed 1.1-pl by goldsky.

    Brief Description:

    CHANGELOG:

    • fixed the decoding on the category
    • slimmed down the simplepie file contents

    The snippet based on SimplePie 1.2 which is already included in the package: https://github.com/simplepie/simplepie/tree/one-dot-two
    Basic call: [ [ ! spiefeed ] ]

    Documentation is here: http://rtfm.modx.com/display/ADDON/spieFeed
      Rico
      Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
      MODx is great, but knowing how to use it well makes it perfect!

      www.virtudraft.com

      Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

      Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

      Maintainter/contributor of Babel

      Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
      • 7243
      • 21 Posts
      goldsky I have to commend you on this, I know this is a bit late, but I just found the snippet and it works great, I love how you can pull the favicons to let people know where the original feed was from, with yahoo pipes it seems there is always one feed where a marketing firm is pumping out updates, essentially dominating the entire pipe. I was using getfeed with a pipe that had about twenty feeds, the load times were faster, but your snippet allows me so much more leeway on how to show the description content, images, favicons, etc, it’s just a kick but little extra.

      I do however have a couple questions, looking at the docs, i understand setItemLimit is to pull however many returns from each feed, which is excellent and I have already put it to use, but I don’t understand where I would have to edit in the snippet itself to limit the amount returned from the entire feed ($start and $length parameters to get_items()).
      You see I have about twenty feeds on one page and only 10 on another, but they time out, so I would still like to pull from all of these, but only show lets say the five most recent.

      It’s really slowing down the page loads times. could you give me some tips on how to configure $start and $length? I would forever be in your debt laugh
        • 11055 ☆ A M B ☆
        • 3,112 Posts
        Just hold on for a while, I need to fix one or two things.
        You just mentioned a bug. wink
          Rico
          Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
          MODx is great, but knowing how to use it well makes it perfect!

          www.virtudraft.com

          Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

          Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

          Maintainter/contributor of Babel

          Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
          • 11055 ☆ A M B ☆
          • 3,112 Posts
          I have a problem on updating the package.
          Here attached is the upcoming update.
          Just put it into your core/packages folder, scan locally the package through your package manager.

          What you ask is the implementation of getItemStart and getItemLength (not getItemEnd as written on the doc).
            Rico
            Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
            MODx is great, but knowing how to use it well makes it perfect!

            www.virtudraft.com

            Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

            Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

            Maintainter/contributor of Babel

            Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
            • 7243
            • 21 Posts
            thanks goldsky you are the best!
            the load times have improved dramatically,
            but I still can’t limit the returns, here’s the call
            [[!spieFeed? &setFeedUrl=`http://site.com/feed | http://anothersite.com/feed (repeat 20 times)` &stripComments=`1` &tpl=`nwo_frontend` &setItemLimit=`1` &stripHtmlTags="div" &getItemStart=`0` &getItemLength=`1`]]


            the &setItemLimit limits how many are returned from each feed?
            and I assume the &getItemLength is how far it will go into a particular feed?
            even looking at the docs I am not quite sure &getItemStart is for

            but what I wanted to do, is from however many feeds I have, have only the ten most recent returned...for example if I pull my twitter feed with get feed, I can limit it to show only three of my last tweets. I still show one for each feed listed in the &setFeedUrl parameter

            now, as most of my posts show, I tend to miss the obvious and waste people’s time, but I am not sure if I am doing this correctly.
            apart from that, the load times are great now, loads just dramatically, no time out errors (even though some bad feeds were causing the time outs, the page load times were really slow) and in general this is one of the top ten snippets out there, super useful, highly configurable, and just importantly for a designer, stylable...like I said, the ability to pull the favicon shows visitors where that content is coming from. It really empowers people from not having to use pipes, and google’s rss can only be used in non-commercial sites, and you know google, they interpret the way they want to interpret...heck even using text-indent is a no no according to them! sad
              • 11055 ☆ A M B ☆
              • 3,112 Posts
              FYI,
              I just succeeded uploading the update, so it’s already available from the Package Manager.

              [[!spieFeed?
              &setFeedUrl=`http://site.com/feed | http://anothersite.com/feed`    // <-- (repeat 20 times)
              &stripComments=`1`
              &tpl=`nwo_frontend`
              &setItemLimit=`1`
              &stripHtmlTags=`div`           // <-- Typo ??
              &getItemStart=`0`
              &getItemLength=`1`
              ]]
              


              Now talking about the limit, let’s say that in a date order, the feed comes as this:
              1. Foo
              2. Bar
              3. Baz

              &setItemLimit= `1` => makes the result only returns one item

              • 1. Foo

              &getItemStart=`2` => makes the result starts from number 2

              • 2. Bar
              • 3. Baz

              &getItemStart= `2` &getItemLength=`1` => makes the result starts from number 2 for 1 item

              • 2. Bar

              So if your site is fed by 2 sources, &getItemStart and &getItemLength will be applied to each of the feeds, but &setItemLimit will be applied to the all summary result.

              So in your case, I will use the &getItemStart to make the aggregating only retrieves the last 3.
              It will make it fast.
              Without this, spieFeed will always start by fetching ALL the feeds first, then check the &setItemLimit parameter to return the final result.

              Thanks to the Simple Pie, I only make the bridge. wink
                Rico
                Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                MODx is great, but knowing how to use it well makes it perfect!

                www.virtudraft.com

                Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                Maintainter/contributor of Babel

                Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                • 7243
                • 21 Posts
                actually the div wasn’t a typo, I was having problems with css and I wanted to see if I could avoid !important, I know, hence my many stupid questions.
                Thanks goldsky, you really and the others who have a handle on the real code of web development (css and html isn’t really were the magic happens, just eye candy) who make these extras so others, such as myself, can easily integrate this code into our projects.
                My many respects to all you guys!! it’s seemingly little things which make our life so easier, wrapped around a CMS that simply kicks butt and takes names!