Flickr album media provider or BBcode

  • Hello,


    I'd like to display a slideshow for a Flickr album. I found this BBcode for WBB 4.1 in this thread. I tested on WSC 3.0 but got a fatal error so I uninstalled it.


    com.woltlab.bbcode.flickralbum.tar


    Anyway, I was wondering if it would be possible to create a media provider or make the BBcode compatible with the Suite (although I think the attached package uses flash :rolleyes:).


    From Flickr website the code for embedding the album looks like this:


    HTML: Flickr
    <a data-flickr-embed="true" href="https://www.flickr.com/photos/sylvainmessier/albums/72157678252356904" title="... 90k"><img src="https://c1.staticflickr.com/1/773/33348872436_e8440e878d_b.jpg" width="1024" height="768" alt="... 90k"></a><script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>


    Short URL for the album:


    https://flic.kr/s/aHskRhNpkf


    Long URL for the album:


    https://www.flickr.com/photos/sylvainmessier/albums/72157678252356904


    So far I have this RegEX for the long URL (I don't think the short URL would be useful but I'm not an expert...) :


    https?://(?:www\.)?flickr.com/photos/(?<AUTHOR>[a-zA-Z0-9_-]+)/albums/(?<ID>[a-zA-Z0-9_-]+)/?$


    But I don't know how to get the URL of the first picture (not sure if it's the first picture or the cover of the album) from the album URL.

    My styles and plugins in the Plugin-Store.

    ♪Quiero robarle los minutos a las horas pa' que mis padres nunca se me pongan viejos...♫

  • create a new media bbcode


    name flickr album



    regular expression

    Code
    https://www.flickr.com/photos/(?<ID1>[a-zA-Z0-9]+)/albums/+(?<ID2>[0-9]+)


    htlm expression


    Code
    <iframe src="https://www.flickr.com/photos/{$ID1}/sets/{$ID2}/player/" width="800" height="600" webkitAllowFullScreen mozallowfullscreen allowFullScreen>></iframe>


    and you can use


    Code
    https://www.flickr.com/photos/sylvainmessier/albums/72157678252356904
  • Thank you :). I modified my RegEx and your HTML gave an idea:


    https?://(?:www\.)?flickr.com/photos/(?<AUTHOR>[a-zA-Z0-9]+)/albums/(?<ID>[0-9]+)


    HTML: Flickr Album
    <div class="videoContainer flickrSlideshow">
    <iframe src="https://www.flickr.com/photos/{$AUTHOR}/sets/{$ID}/player/" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
    </div>


    I wrapped the iframe in a div with the existing class videoContainer (used for YouTube videos), so the width of the iframe is 100%.

    My styles and plugins in the Plugin-Store.

    ♪Quiero robarle los minutos a las horas pa' que mis padres nunca se me pongan viejos...♫