christianvuerings / jquery-lifestream

Show a stream of your online activity with jQuery
https://christianvuerings.github.io/jquery-lifestream/
MIT License
760 stars 133 forks source link

lost timeago functioning #103

Closed iLPdev closed 12 years ago

iLPdev commented 12 years ago

Looks like we lost the timeago functionality? I do not see it working on any installations, including example.html.

christianvuerings commented 12 years ago

@iLP You're right - probably caused by a feed that isn't loading correctly

iLPdev commented 12 years ago

i went through various feeds, one at a time, and even with any one single feed, timeago is not displaying

christianvuerings commented 12 years ago

@iLP for me it started working when I removed the gimmebar service - it seems like they made a change to their API so I updated that.

Screenshot: http://cl.ly/GDJR

iLPdev commented 12 years ago

@christianv interestingly, it does not appear to have resolved the issue permanently in the example.html, nor in my various implementations. not sure what is at issue.

christianvuerings commented 12 years ago

@iLP which browser are you using?

iLPdev commented 12 years ago

@christianv mozilla, chrome, and IE... timeago stamp does not appear in example.html

christianvuerings commented 12 years ago

Just made a video of me testing it in Firefox and Google chrome. You do have to wait until all the feeds are loaded though - http://screencast.com/t/BXVtFE6UCn

iLPdev commented 12 years ago

Sorry for the belated response. At approximately 5:30pm PST, the example.html started displaying properly. I was definitely waiting until the feeds had loaded, and had cleared my caches, so I have not a clue why it was not displaying after the gimmebar fix. Regardless, thank you for everything, especially resolving this timeago issue.

On Apr 27, 2012, at 10:40 PM, Christian Vueringsreply@reply.github.com wrote:

Just made a video of me testing it in Firefox and Google chrome. You do have to wait until all the feeds are loaded though - http://screencast.com/t/BXVtFE6UCn


Reply to this email directly or view it on GitHub: https://github.com/christianv/jquery-lifestream/issues/103#issuecomment-5394589

ronilaukkarinen commented 10 years ago

I didn't get this to work at all... which service is breaking it? I'm not using gimmebar service.

christianvuerings commented 10 years ago

@ronilaukkarinen probably the twitter service, can you verify? See #172

ronilaukkarinen commented 10 years ago

@christianv I'm not using Twitter, since I noticed it's broken. Here's my code:

(function(){

      var count = 0,
      list = [
        {
          service: 'delicious',
          user: 'rollex'
        },
        {
          service: 'dribbble',
          user: 'rolle'
        },
        {
          service: 'facebook_page',
          user: '569702083062696'
        },
        {
          service: 'facebook_page',
          user: '569702083062696'
        },
        {
          service: 'facebook_page',
          user: '115627098466807'
        },
        {
          service: 'facebook_page',
          user: '128416057191530'
        },
        {
          service: 'facebook_page',
          user: '540347485'
        },
        {
          service: 'pocket',
          user: 'rolle-'
        },
        {
          service: 'github',
          user: 'ronilaukkarinen'
        },
        {
          service: 'bitbucket',
          user: 'ronilaukkarinen'
        },
        {
          service: 'lastfm',
          user: 'rolle-'
        },
        {
          service: 'linkedin',
          user: 'rolle'
        },
        {
          service: 'tumblr',
          user: 'rolle'
        },
        {
          service: 'vimeo',
          user: 'rollex'
        },
        {
          service: 'wordpress',
          user: 'rolleweb'
        },
        {
          service: 'youtube',
          user: 'rollex2'
        },
        {
          service: 'rss',
          user: 'http://www.rollemaa.org/feed/'
        },
        {
          service: 'rss',
          user: 'http://www.rollemaa.org/pikkuinen/feed/'
        },
        {
          service: 'rss',
          user: 'http://unet.rollemaa.org/feed/'
        },
        {
          service: 'rss',
          user: 'http://www.pulina.fi/feed/'
        },
        {
          service: 'rss',
          user: 'http://www.huurteinen.fi/feed/'
        },
        {
          service: 'rss',
          user: 'http://www.problemsolv.in/feed/'
        },
        {
          service: 'rss',
          user: 'http://www.dude.fi/blogi/feed/'
        },
        {
          service: 'rss',
          user: 'http://letterboxd.com/rolle/rss/'
        }
      ];

      Date.prototype.toISO8601 = function(date) {
          var pad = function (amount, width) {
              var padding = "";
              while (padding.length < width - 1 && amount < Math.pow(10, width - padding.length - 1))
                  padding += "0";
              return padding + amount.toString();
          }
          date = date ? date : new Date();
          var offset = date.getTimezoneOffset();
          return pad(date.getFullYear(), 4)
              + "-" + pad(date.getMonth() + 1, 2)
              + "-" + pad(date.getDate(), 2)
              + "T" + pad(date.getHours(), 2)
              + ":" + pad(date.getMinutes(), 2)
              + ":" + pad(date.getUTCSeconds(), 2)
              + (offset > 0 ? "-" : "+")
              + pad(Math.floor(Math.abs(offset) / 60), 2)
              + ":" + pad(Math.abs(offset) % 60, 2);
      };

      $("#lifestream").lifestream({
        limit: 30,
        list: list,
        feedloaded: function(){
          count++;
          // Check if all the feeds have been loaded
          if( count === list.length + 1 ){
            $("#lifestream li").each(function(){
              var element = $(this),
                  date = new Date(element.data("time"));
              element.append(' <abbr class="timeago" title="' + date.toISO8601(date) + '">' + date + "</abbr>");
            })
            $("#lifestream .timeago").timeago();
          }
        }
      });
    })();
christianvuerings commented 10 years ago

@ronilaukkarinen It actually does seem to be working for me: http://cl.ly/VVC9

ronilaukkarinen commented 10 years ago

Okay, something strange in my all.js minified file. Double checked grunt again and after I ran it it seems to work fine http://rolle.io. Thanks a bunch @christianv!

christianvuerings commented 10 years ago

@ronilaukkarinen glad it worked out!

Also added your site to the Used By section. See cbf5bd696b24b19dedb62a32883a8d8c489ddecb