function twitter_hashtag_page($query) { if (isset($query[1])) { $hashtag = '#' . $query[1]; $content = theme('status_form', $hashtag . ' '); $tl = twitter_search($hashtag); $content .= theme('timeline', $tl); theme('page', $hashtag, $content); } else { // Ugly cludge because @hash is a real user twitter_refresh('user/hash'); // theme('page', 'Hashtag', 'Hash hash!'); } }
function twitter_hashtag_page($query) { if (isset($query[1])) { $hashtag = '#' . $query[1]; $content = theme('status_form', $hashtag . ' '); $tl = twitter_search($hashtag); $content .= theme('timeline', $tl); theme('page', $hashtag, $content); } else { theme('page', 'Hashtag', 'Hash hash!'); } }
<?php //////////MUST INCLUDE TO WORK///////// /*************************************/ //include config file require_once "config/config.inc.php"; //include the dom class require_once "classes/dom.class.php"; //include twitter api class require_once "classes/twit.class.php"; //include the twitter API require_once "functions/twitter.standard.php"; //include the scrapper class require_once 'functions/scrape.php'; //include the sentiment analysis class require_once 'functions/sentiment.php'; /*************************************/ /* MAIN PROGRAM */ $result = 100; $search = htmlentities($_GET['q']); if ($search != NULL) { $search_output = twitter_search($search, $result); foreach ($search_output as $term) { sentimentAnalysis_1($term[tweet], $term[user], $search); } } else { echo "ERROR: you have entered a NULL search<br />"; }