We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17717
    • 433 Posts
    Does anybody know how to specify how many images are shown from flickr?

    Thanks
    Lee
      http://www.blend.uk.com | Web Design by Blend
      • 14050
      • 788 Posts
      You could probably use this in your template to do this for now:

      http://modxcms.com/forums/index.php/topic,12657.msg84107.html#msg84107

      Although, I have already made a feature request for the parameter $maxItems.
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 17717
        • 433 Posts
        Thanks jesster444,

        I did see your request, I will try the temporary work around.

        Thanks loads,

        Lee
          http://www.blend.uk.com | Web Design by Blend
          • 17717
          • 433 Posts
          Here is my channel.tpl file:

          {{ITEM(0,6)->item}}

          I have about a dozen public images in flickr, for some reason, the above only seems to display 4 thumbnail images from flickr.

          Thanks
          Lee
            http://www.blend.uk.com | Web Design by Blend
            • 1932
            • 137 Posts
            Quote from: jesster444 at Mar 03, 2007, 08:27 AM

            @Brian, would it be possible to add the following parameters:


            • $maxItems - Limit the amount of items returned to this number.
            • $skipItems - Skip this many items and start displaying the one after this number.
            • $tplPresetFirst - The TPL for the first item
            • $tplPresetLast - The TPL for the last item
            • $tplPresetOdd - The TPL for an Odd item
            • $tplPresetEven - The TPL for an Even item

            I understand that I can template using ITEM array, but these templates parametes would be nice.

            Also, if you want to add my templates as an option in your package for GoogleCalendar, feel free.

            As stated before, max and skip are both options inside your template. The problem with specifying them as snippet parameters is that it has no way of knowing which items you are referring to. I could make the parameters enforce a hard limit/offset on any child items... but the offset would also include calls like {{RSS->...}} which would end up messing things up. Alternatively I could have the limit set in the config like this:

            &maxItems=`ITEM(6),...`
            &tplPresetOdd=`ITEM->oddChunk`

            Let me know what you think and your recommendations for configuration syntax.
            In the future, It would be cool to add item sorting or randomization for repeating elements... I would also like to add a filter parameter of some kind.

            Also, I don’t know why your Flickr is showing up as non-RSS2, take a look at my example below... undecided



            @Kylej:

            I think there will always be a need for a standalone google events system because of the ability to have a calendar view and finely tune the navigation system. You could also combine multiple calendars for collaboration, etc. wink



            @lw-d:

            Your template looks good, you could also format it like ITEM(6) since the offset is optional. I’m not sure why it would only be displaying 4, what are you using for your snippet call?

            http://brianstanback.com/feedx.html

            [!FeedX? &url=`http://api.flickr.com/services/feeds/photos_public.gne|xq|format|xe|rss2` &cacheTime=`1800` &tplPreset=`flickr` &cacheType=`0` &tplBuilder=`0`!]
              • 17717
              • 433 Posts
              just a simple:

              [!FeedX? &url=`http://api.flickr.com/services/feeds/photos_public.gne|xq|id|xe|1111111@N00|xa|format|xe|rss2 ` &tplPreset=`flickr`!]


              Thanks,
              Lee
                http://www.blend.uk.com | Web Design by Blend
                • 17717
                • 433 Posts
                Hmmm, seems to work now, not sure why it didn’t first time round smiley
                  http://www.blend.uk.com | Web Design by Blend
                  • 1932
                  • 137 Posts
                  Cool, good to hear it works. It may have been a caching issue..
                    • 17717
                    • 433 Posts
                    Thanks, I’m loving the functionality this has added to my site. I have just added the extra parameters that you had in your snippet call.

                    Thanks,
                    Lee
                      http://www.blend.uk.com | Web Design by Blend
                      • 14050
                      • 788 Posts
                      As stated before, max and skip are both options inside your template. The problem with specifying them as snippet parameters is that it has no way of knowing which items you are referring to. I could make the parameters enforce a hard limit/offset on any child items... but the offset would also include calls like {{RSS->...}} which would end up messing things up. Alternatively I could have the limit set in the config like this:

                      &maxItems=`ITEM(6),...`
                      &tplPresetOdd=`ITEM->oddChunk`

                      Let me know what you think and your recommendations for configuration syntax.
                      In the future, It would be cool to add item sorting or randomization for repeating elements... I would also like to add a filter parameter of some kind.

                      Also, I don’t know why your Flickr is showing up as non-RSS2, take a look at my example below...

                      I think that &maxItems=`ITEM(6),...` would be a nice addition and I would change it from &maxItems to &maxElements, and the same for &skipElements. I think the &tplPresetOdd=`ITEM->oddChunk` would work nicely too. The sorting would be really cool and maybe could be configured like &sortBy=`elementName` here.

                      For example with the Google Calendar...&sortBy=`GD:WHEN.STARTTIME`

                      Pasting in your snippet call worked, which is weird because all it changed from the default values your snippet sets was the cache time, and I know I waited over the 15 minute default cache time with the same results. Any how, it is working here in the sandbox:

                      http://www.cmssandbox.com/MODx095/index.php?id=72
                        Jesse R.
                        Consider trying something new and extraordinary.
                        Illinois Wine

                        Have you considered donating to MODx lately?
                        Donate now. Every contribution helps.