Fitur Retweet Style untuk Dabr (Twitter Client)


Pertama masuk ke file /common/twitter.com

cari code

function theme_retweet($status)
{
$text = “RT @{$status->user->screen_name}: {$status->text}”;


ganti code diatas dengan

function theme_retweet($status)
{
if (setting_fetch(‘RT’, ‘on’) == ‘on’) {
$text = “RT @{$status->user->screen_name}: {$status->text}”;
}
if (setting_fetch(‘RT’, ‘off’) == ‘off’) {
$text = ” [Quote]@{$status->user->screen_name}: {$status->text}[/Quote]”;
}

masih di dalam file yang sama, cari code

if ($retweeted_by) // Show a diffrent retweet icon to indicate to the user this is an RT
{
$actions[] = theme(‘action_icon’, “retweet/{$status->id}”, ‘images/retweeted.png’, ‘RT’);
}
else
{
$actions[] = theme(‘action_icon’, “retweet/{$status->id}”, ‘images/retweet.png’, ‘RT’);
}

modif code di atas menjadi

if (setting_fetch(‘RT’, ‘on’) == ‘on’) {
if ($retweeted_by) // Show a diffrent retweet icon to indicate to the user this is an RT
{
$actions[] = theme(‘action_icon’, “retweet/{$status->id}”, ‘images/retweeted.png’, ‘RT’);
}
else
{
$actions[] = theme(‘action_icon’, “retweet/{$status->id}”, ‘images/retweet.png’, ‘RT’);
}
} else
if (setting_fetch(‘RT’, ‘off’) == ‘off’) {
if ($retweeted_by) // Show a diffrent retweet icon to indicate to the user this is an RT
{
$actions[] = theme(‘action_icon’, “retweet/{$status->id}”, ‘images/retweeted.png’, ‘Quote’);
}
else
{
$actions[] = theme(‘action_icon’, “retweet/{$status->id}”, ‘images/retweet.png’, ‘Quote’);
}
}

selanjutnya, masuk file /common/settings.php dan cari fungsi

function settings_page($args) {

dan tambahkan code di baha ini

$settings[‘RT’] = $_POST[‘RT’];

mash di dalam file yang sama, tambahkan fungsi

$RT = array(
‘on’ => ‘RT’,
‘off’ => ‘Quote’,
);

setelah fungsi :

$gwt = array(
‘off’ => ‘direct’,
‘on’ => ‘via GWT’,
);

terakhir, pasang code

$content .= ‘<p>Retweet Style:<br /><select name="RT">’;
$content .= theme(‘options’, $RT, setting_fetch(‘RT’));
$content .= ‘</select><small><br />Choose retweet style you like</small></p>’;

setelah code

$content .= ‘<p>External links go:<br /><select name="gwt">’;
$content .= theme(‘options’, $gwt, setting_fetch(‘gwt’, $GLOBALS[‘current_theme’] == ‘text’ ? ‘on’ : ‘off’));
$content .= ‘</select><small><br />Google Web Transcoder (GWT) converts third-party sites into small, speedy pages suitable for older phones and people with less bandwidth.</small></p>’;

Jangan lupa kunjungi & gunakan Twitter Client dari kami di alamat www.imorv.comūüôā

@fays_ozunu

Satu Tanggapan

  1. Parse error: syntax error, unexpected ‘@’ in /home/u233063945/public_html/blackberry/common/twitter.php on line 1302

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: