Selasa, 11 September 2012

0 Feature Autotext for Dabr (Twitter Client)


How to make it?
In common folder, Create a file (eg: autotext.php):
code:
<?php
$autotext= array(
‘:haha:’ => ‘HªªHªª’,
‘:haahaa:’ => ‘=DË?â?¢Ë?=)) Ð&frac12;ªªË?°Ë?Ð&frac12;ªªË?°Ë?Ð&frac12;ªªË?°Ë? =))Ë?â?¢Ë?=D’,
‘:hahaha:’ => ‘Ħαªâ?ºÄ¦Î±Âªâ?ºÄ¦Î±Âªâ?ºâ?¦Â°Ë?â?º’,
);

still in folder same too, Create a file (eg: autotext_page.html):
code:
<div class="menu"><center><span style="display:block;float:left;width:40%"><font color="white">Code</font></span> <span style="display:block;float:left;width:20%"> &nbsp; &nbsp;</span> <span style="display:block;float:left;width:40%"><font color="white">Conversion</font></span></center></div>
<div><center><span style="display:block;float:left;width:40%">:haha:</span> <span style="display:block;float:left;width:20%"> => </span> <span style="display:block;float:left;width:40%">HªªHªª</span></center></div>
<div><center><span style="display:block;float:left;width:40%">:haahaa:</span> <span style="display:block;float:left;width:20%"> => </span><span style="display:block;float:left;width:40%">=DË?â?¢Ë?=)) Ð&frac12;ªªË?°Ë?Ð&frac12;ªªË?°Ë?Ð&frac12;ªªË?°Ë? =))Ë?â?¢Ë?=D</span></center></div>
<div><center><span style="display:block;float:left;width:40%">:hahaha:</span> <span style="display:block;float:left;width:20%"> => </span><span style="display:block;float:left;width:40%">Ħαªâ?ºÄ¦Î±Âªâ?ºÄ¦Î±Âªâ?ºâ?¦Â°Ë?â?º</span></center></div>
And edit the common/twitter.php file to add this line
code:
<?php
menu_register(array(
‘autotext’ => array(
‘security’ => true,
‘callback’ => ‘twitter_autotext_page’,
),
));
next, go to file common/twitter.php
after:
twitter_ensure_post_action();
$status = twitter_url_shorten(stripslashes(trim($_POST['status'])));
before:
if ($status) {
Add the code
code
require ‘autotext.php’;
foreach($autotext as $kode => $emo) {
$status = str_replace($kode, $emo, $status);
}
in common/twitter.php , add function autotext_page
code
function twitter_autotext_page() {
$content = theme(‘status_form’);
$content .= file_get_contents(‘common/autotext_page.html’);
theme(‘page’, ‘Autotext’, $content);
}

0 Comments

Bagaimana Pendapat Anda ?