//open file common/settings.php
//add $settings[\'tpp\'] = $_POST[\'tpp\'];
function settings_page($args) {
if ($args[1] == \'save\') {
$settings[\'browser\'] = $_POST[\'browser\'];
$settings[\'gwt\'] = $_POST[\'gwt\'];
$settings[\'colours\'] = $_POST[\'colours\'];
$settings[\'reverse\'] = $_POST[\'reverse\'];
$settings[\'timestamp\'] = $_POST[\'timestamp\'];
$settings[\'hide_inline\'] = $_POST[\'hide_inline\'];
$settings[\'utc_offset\'] = (float)$_POST[\'utc_offset\'];
// add this
$settings[\'tpp\'] = $_POST[\'tpp\'];
//add this $content .= \'<p><label>Tweets per page (20-200):
$content .= \'<p><label>Tweets per page (20-200): <input type="text" id="tpp" name="tpp" value="\'.setting_fetch(\'tpp\', 20).\'" size="3" maxlength="3" class="minput" /></label></p><hr />\';
//open file common/twitter.php
//add $count = setting_fetch(\'tpp\', 20);
function twitter_replies_page() {
//this code
$count = setting_fetch(\'tpp\', 20);
$request = API_URL.\'statuses/mentions.json?page=\'.intval($_GET[\'page\']).\'&include_entities=true\';
$tl = twitter_process($request);
$tl = twitter_standard_timeline($tl, \'replies\');
$content = theme(\'status_form\');
$content .= theme(\'timeline\', $tl);
theme(\'page\', \'Replies\', $content);
}
function twitter_retweets_page() {
//this code
$count = setting_fetch(\'tpp\', 20);
$request = API_URL."statuses/retweeted_to_me.json?count=$count&page=".intval($_GET[\'page\']).\'&include_entities=true\';
$tl = twitter_process($request);
$tl = twitter_standard_timeline($tl, \'retweets\');
$content = theme(\'status_form\');
$content .= theme(\'timeline\', $tl);
theme(\'page\', \'Retweets\', $content);
}
function twitter_home_page() {
user_ensure_authenticated();
//this code
$count = setting_fetch(\'tpp\', 20);
//$request = API_URL."statuses/home_timeline.json?count=$count&include_rts=true&page=".intval($_GET[\'page\']);
$request = API_URL."statuses/home_timeline.json?count=$count&include_rts=true&include_entities=true";
if ($_GET[\'max_id\'])
{
$request .= \'&max_id=\'.$_GET[\'max_id\'];
}
if ($_GET[\'since_id\'])
{
$request .= \'&since_id=\'.$_GET[\'since_id\'];
}
//echo $request;
$tl = twitter_process($request);
$tl = twitter_standard_timeline($tl, \'friends\');
$content = theme(\'status_form\');
$content .= theme(\'timeline\', $tl);
theme(\'page\', \'Home\', $content);
}