• If you would like to use advanced search operators in newstweet, edit the file newstweet-ajax.php and replace

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

    with

    $nt_search = urlencode($_POST['searchterm']);
            $nt_search = str_replace("%3D","=",$nt_search);
            $nt_search = str_replace("%26","&",$nt_search);
    
            $url = 'http://search.twitter.com/search.json?q='.$nt_search.'&rpp=3';

    In the widget fill in the search word and the advanced search operators in url style. Like this:

    lees&ands=lees&phrase=&ors=&nots=&tag=&lang=nl&from=robertbuzink&to=&ref=&since=&until=&filter=links&source=&lang=nl

    You can find out which operator does what by using the advanced search of twitter.com and taking a look at the resulting url. But beware, never use the ‘near’, ‘within’ and ‘units’ operators, not even empty! They don’t work in the twitter-api and will break the request. Use the geocode operator instead

  • The topic ‘Newstweet hack- advaced search operators’ is closed to new replies.