Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MB 273 posts 936 karma points
    Jun 08, 2017 @ 17:50
    MB
    0

    RSS Reader - show my DeviantArt images

    Greetings Umbraco'ers,

    I'm looking for a way to display my DeviantArt images in my Umbraco project, but the thing is... I don't know how to.

    I can see DeviantArt's API has a RSS feed here: https://www.deviantart.com/developers/rss

    I think this is what I need to display images in a specific folder/category but I'm not sure how to.

    Do you guys have any idéa about how I can achieve this?

    Regards

    (ps. Maybe it's the oEmbed I need to use?)

  • Marc Goodson 2155 posts 14408 karma points MVP 9x c-trib
    Jun 24, 2017 @ 22:10
    Marc Goodson
    0

    Hi MBE

    If you cut and paste the following

      <provider name="DeviantArt" type="Umbraco.Web.Media.EmbedProviders.OEmbedJson, umbraco">
        <urlShemeRegex><![CDATA[fav\.me/]]></urlShemeRegex>
        <apiEndpoint><![CDATA[http://backend.deviantart.com/oembed?url=]]></apiEndpoint>
        <requestParams type="Umbraco.Web.Media.EmbedProviders.Settings.Dictionary, umbraco"></requestParams>
      </provider>
    

    into /config/EmbeddedMedia.config

    you'll be able to embed images from DeviantArt into the rich text editor using the 'embed' icon in Umbraco:enter image description here

    or

    In terms of the RSS feed, you could use the following Umbraco package:

    https://our.umbraco.org/projects/backoffice-extensions/rss-feed-url/

    (disclaimer it's hacked together by me!)

    to add a property to a doctype that accepts the Url of the DeviantArt RSS Feed:

    eg enter image description here

    Pressing Preview gives you a glimpse of the feed contents in the backoffice:

    enter image description here

    Then you can loop through the contents of the feed in a view:enter image description here

    var rssFeed =Model.Content.GetPropertyValue<FeedResult>("rssFeedUrl");
    
    @foreach (var feedItem in rssFeed.SyndicationFeed.Items)
                    {
                        <div class="col-md-4"><h2>@feedItem.Title.Text</h2><h6 class="muted">@feedItem.PublishDate.ToTimeAgo()<br />@feedItem.PublishDate.ToString("hh:mmtt dddd, dd MMM yyyy")</h6><div>@Html.Raw(feedItem.Summary.Text)</div><a class="btn btn-primary" title="@feedItem.Title.Text" href="@feedItem.Links[0].Uri">Read more...</a></div>
     }
    

    The source of the package is on github, https://github.com/marcemarc/tooorangey.RssFeedUrl if you want to not use the property approach but still want to make a code request to the DeviantArt Rss Feed endpoints!

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jun 24, 2017 @ 22:20
  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jul 05, 2017 @ 20:26
    Nicholas Westby
    0

    Hi MBE,

    I was about to respond to your other thread, but it seems you've deleted it. Not sure why. Perhaps your issue has been solved?

Please Sign in or register to post replies

Write your reply to:

Draft