Forums

[Plugin: NewsTweet] More tweet posts & editing updates.. (2 posts)

  1. BeerLuver
    Member
    Posted 8 months ago #

    Anyone know how to have this plugin display more than 3 tweet posts?

    Also, any way of altering or editing the update rate as well?

    Thanks :)

  2. jafahrky
    Member
    Posted 7 months ago #

    I was able to do this, but it took a few steps to do so.

    First the querystring must be changed to get more posts. This is found in the newstweet-ajax.php file line 8:

    $url = 'http://search.twitter.com/search.json?q='.urlencode($_POST['searchterm']).'&rpp=3&lang=en';

    Change rpp=x to be the number of posts you want to get. You can paste this into your web browser to see the results.

    Next, I don't think that the new results will all appear (though) I'm still not clear on this.

    In the news-tweet-utils.js file, you need to add the items to show. See line 82+.

    jQuery(document).ready(function(){
    
    jQuery(".x").show();
    
    jQuery(".0").fadeIn(2000);
    jQuery(".1").fadeIn(1250);
    jQuery(".2").fadeIn(500);
    
    //add similar code below to show extra items.
    jQuery(".3").fadeIn(0);
    jQuery(".4").fadeIn(0);
    jQuery(".5").fadeIn(0);
    jQuery(".6").fadeIn(0);
    jQuery(".7").fadeIn(0);
    jQuery(".8").fadeIn(0);
    jQuery(".9").fadeIn(0);

    That should do it.

    As for your update rate, the setInterval code needs to be changed in newstweet.php.

    var si = setInterval('gotoPoll()',60000);

    60000 is milliseconds, equal to 60 seconds. So change that accordingly, but be advised you could really slow your page down.

Reply

You must log in to post.

About this Topic

Tags