timeAgo

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2353

    wrastler
    Participant

    Hi,

    I’ve got your SlideUp widget in the site I’m building and it’s working fine except I want to display the date in the timeAgo() format.
    I’ve looked through your code and found you have added this function but when I try to call it, it won’t display the tweets.

    I’ve tried a few things like, creating my own style that calls the timeAgo() but that’s not working. I then tried switching it to be style 2 but that didn’t display the tweets again.

    This is where I understand it should be being called:

    if (tweetscrollOptions.date_format == 'style1') {
                            tweetMonth = monthIndex + 1;
                            if (tweetMonth < 10) {
                                tweetMonth = '0' + tweetMonth;
                            }
                            $tweetList.find('.tweet_link_' + i).append('<small> ' + item.created_at.substr(8, 2) + '/' + tweetMonth + '/' + item.created_at.substr(26, 4) + ' ' + item.created_at.substr(11, 8) + ' </small>');
                        } else if (tweetscrollOptions.date_format == 'style2') {
                            tweetMonth = allMonths[monthIndex];
                            $tweetList.find('.tweet_link_' + i).append('<small> ' + tweetMonth + ' ' + item.created_at.substr(8, 2) + ', ' + item.created_at.substr(26, 4) + ' ' + item.created_at.substr(11, 8) + '</small>');
    						
                        } else {
                          relativeTime = timeAgo(item.created_at);
                          $tweetList.find('.tweet_link_' + i).append('<small> ' + relativeTime + '</small>');
                        }

    Is there something I’m missing?
    Any help is much appreciated.

    Thanks!
    Ben

    #2361

    Vladimir
    Keymaster

    Hi wrastler,

    The “timeAgo” function doesn’t exist in original version of the plugin. You downloaded plugin from WordPress repository?

    Vladimir

    #2362

    wrastler
    Participant

    HI Vladimir,

    Thanks for your reply.

    I didn’t download anything from WordPress as I’m not using WordPress to build the site.

    #2363

    Robert Kavgić
    Participant

    The Tweetscroll widget is developed to be used with WordPress. It can’t be used as standalone widget on your html template.

    Robert

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.