Hemen hemen vb benzeri birşey diyebilirim..Modu paket halinde yüklemek isteyenler ekten alabilirler..manuel kuracaksanız ekteki tşkdb.zip dosyasını admin panelden paketlere girip yükleyin.(db için)Forum anadizinindeki index.php de
bul
modifykarma' => array('Karma.php', 'ModifyKarma'),altına ekle
'modifywthanx' => array('Karma.php', 'ModifyWthanx'),sources/Display.php de
bul
// Get each post and poster in this topic.üstüne ekle
// Get the Wthanx data
$context['wt_goster'] = $modSettings['wthanx_sh'];
$context['wk_goster'] = $modSettings['wkarma_sh'];
$request = db_query("
SELECT s.*,m.memberName FROM {$db_prefix}wthanx AS s
LEFT JOIN {$db_prefix}members AS m ON (s.WID_MEMBER = m.ID_MEMBER)
WHERE s.WID_TOPIC = $topic
ORDER BY WTIME DESC
",__FILE__,__LINE__);
$context['wthanx'] = array();
while ($row = mysql_fetch_assoc($request))
{
if (!empty($row['WID_MEMBER']))
$context['wthanx'][$row['WID_MSG']][] = $row;
}
mysql_free_result($request);bul
'can_report_moderator' => 'report_any',altına ekle
'can_tesekkur_sil' => 'wt_tesh_sil',
'can_tesekkur_et' => 'wt_tesh',
'can_karma_ver' => 'wt_karma',bul
// Do the censor thang.üstüne ekle
// WThanks
@getMemberThanxDetay($message['ID_MEMBER']);bul
'modified' => array(
'time' => timeformat($message['modifiedTime']),
'timestamp' => forum_time(true, $message['modifiedTime']),
'name' => $message['modifiedName']
),altına ekle
'wthanx' => @wtFormat($context['wthanx'][$message['ID_MSG']]),
'wtdetay' => $context['wt_data'],bul
?>üstüne ekle
function wtFormat($data)
{
global $settings, $txt, $modSettings, $scripturl, $options, $user_info;
global $memberContext, $context, $messages_request, $topic, $ID_MEMBER, $attachments;
$ct = 0;
$ck = 0;
$tsk = false;
foreach ($data as $key => $value) {
if ($value['WTESH'] == '1') {
$text_thanx[] = '<a href="'.$scripturl.'?action=profile;u='.$value['WID_MEMBER'].'">'.$value['memberName'].'</a>
<span class="smalltext">('.timeformat($value['WTIME']).')</span>';
$ct++;
}
if ($value['WTESH'] == '1' && $value['WID_MEMBER'] == $ID_MEMBER) $tsk = true;
if (!empty($value['WKARMA'])) {
$text_karma[] = '<a href="'.$scripturl.'?action=profile;u='.$value['WID_MEMBER'].'">'.$value['memberName'].'</a>
<span class="smalltext">['.$value['WKARMA'].']('.timeformat($value['WTIME']).')</span>';
$ck++;
}
}
if(!empty($text_karma))
$goster = $modSettings['wthanx_show'];
if (isset($goster) && count($text_thanx) > $goster) {
$text_thanx = array_slice($text_thanx,0,$goster);
$text_thanx[] = "...";
}
$goster = $modSettings['wkarma_show'];
if (isset($goster) && count($text_karma) > $goster) {
$text_karma = array_slice($text_karma,0,$goster);
$text_karma[] = "...";
}
if(!empty($text_thanx))
$text_thanx = implode(', ',$text_thanx);
if(!empty($text_karma))
$text_karma = implode(', ',$text_karma);
$text = array(
'text_thanx' => $text_thanx,
'text_karma' => $text_karma,
'thanx_num' => $ct,
'tsk_etmis' => $tsk,
'karma_num' => $ck,
);
return $text;
}sources/Load.php de
bul
?>üstüne ekle
function getMemberThanxDetay($id)
{
global $context, $db_prefix;
// Get the Wthanx data
$request = db_query(
"SELECT * FROM {$db_prefix}wthanx
WHERE WID ='$id' AND WTESH ='1'",__FILE__,__LINE__);
$thanx_say = 0;
$karma_say = 0;
while ($row = mysql_fetch_assoc($request))
{
$thanx_say++;
if (!empty($row['WID_MSG']))
$wtbt[$row['WID_MSG']] = $row['WID_MSG'];
}
mysql_free_result($request);
$request = db_query(
"SELECT * FROM {$db_prefix}wthanx
WHERE WID ='$id' AND WKARMA !=''",__FILE__,__LINE__);
while ($row = mysql_fetch_assoc($request))
{
$karma_say++;
if (!empty($row['WID_MSG']))
$wtbk[$row['WID_MSG']] = $row['WID_MSG'];
}
mysql_free_result($request);
$wtbk = count($wtbk);
$wtbt = count($wtbt);
$context['wt_data'] = array(
'wtx' => $thanx_say,
'wtk' => $karma_say,
'wtbt' => $wtbt,
'wtbk' => $wtbk
);
return $context['wt_data'];
}sources/ManagePermissions.php de
bul
'pm' => array(üstüne ekle
'tesh' => array(
'wt_tesh' => false,
'wt_tesh_sil' => false,
'wt_karma' => false,
),sources/ModSettings.php de
bul
'layout' => array(
'title' => $txt['mods_cat_layout'],
'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
),değiştir
'layout' => array(
'title' => $txt['mods_cat_layout'],
'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
),
'teshturk' => array(
'title' => $txt['wt_settings_title'],
'href' => $scripturl . '?action=featuresettings;sa=teshturk;sesc=' . $context['session_id'],
),bul
'layout' => 'ModifyLayoutSettings',değiştir
'layout' => 'ModifyLayoutSettings',
'teshturk' => 'ModifyTeshTurkSettings',bul
'layout' => 'ModifyLayoutSettings',değiştir
'layout' => 'ModifyLayoutSettings',
'teshturk' => 'ModifyTeshTurkSettings',bul
$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=karma';
$context['settings_title'] = $txt['smf293'];
prepareDBSettingContext($config_vars);
}altına ekle
function ModifyTeshTurkSettings()
{
global $txt, $scripturl, $context, $settings, $sc;
$config_vars = array(
array('check','wthanx_sh'),
array('check','wkarma_sh'),
'',
array('int', 'wthanx_show'),
array('int', 'wkarma_show'),
);
// Saving?
if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=featuresettings;sa=teshturk');
}
$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=teshturk';
$context['settings_title'] = $txt['wt_settings_title'];
prepareDBSettingContext($config_vars);
}themes/Display.template.php de
bul
// This shows the popular messaging icons.üstüne ekle
// Show The Wthanx Detayý
if (!empty($message['wtdetay']['wtx']) && !empty($message['wtdetay']['wtbt']))
echo '
<br />',sprintf($txt['wt_tesh'],$message['wtdetay']['wtbt'],$message['wtdetay']['wtx']),'<br />';
// Show The Wthanx Detayý
if (!empty($message['wtdetay']['wtk']) && !empty($message['wtdetay']['wtbk']))
echo '
<br />',sprintf($txt['wt_karma'],$message['wtdetay']['wtbk'],$message['wtdetay']['wtk']),'<br />';bul
// Maybe they want to report this post to the moderator(s)?üstüne ekle
// Belki adam teþekkür edebiliyodur :)
if (!$message['wthanx']['tsk_etmis'] && ($message['member']['id'] != $context['user']['id']) && $context['can_tesekkur_et'])
echo '
<a href="', $scripturl, '?action=modifywthanx;sa=et;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="', $settings['images_url'], '/tesekkur.jpg" alt="" border="0" /></a>';
// Belki adam teþekkür etmiþtir
if ($message['wthanx']['tsk_etmis'] && ($message['member']['id'] != $context['user']['id']) && $context['can_tesekkur_et'])
echo '
<a href="', $scripturl, '?action=modifywthanx;sa=sil;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="', $settings['images_url'], '/tesekkur_del.jpg" alt="" border="0" /></a>';bul
echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
}değiştir
echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>
<tr>
<td>';
if ($message['wthanx']['thanx_num'] > 0 && $context['wt_goster'])
echo '<div class="tborder">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="table-layout: fixed;">
<tr>
<td width="16%" class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', '" valign="top"><span class="smalltext"><b>
',sprintf($txt['wt_tesh_two'],$message['member']['name']),($message['wthanx']['thanx_num'] > 1?$message['wthanx']['thanx_num']." ".$txt['wt_tekil']:$txt['wt_cogul']),'
</span></b></td>
<td width="84%" class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', '" valign="top">',$message['wthanx']['text_thanx'],'</td>
</tr>
</table></div>';
if ($message['wthanx']['karma_num'] > 0 && $context['wk_goster'])
echo '<div class="tborder">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="table-layout: fixed;">
<tr>
<td width="16%" class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', '" valign="top"><b><span class="smalltext">
',sprintf($txt['wt_karma_two'],$message['member']['name']),($message['wthanx']['karma_num'] > 1?$message['wthanx']['karma_num']." ".$txt['wt_tekil']:$txt['wt_cogul']),'
</span></b></td>
<td width="84%" class="', $message['alternate'] == 0 ? 'windowbg' : 'windowbg2', '" valign="top">',$message['wthanx']['text_karma'],'</td>
</tr>
</table></div>';
}sources/Profile.php de
bul
// They haven't even been registered for a full day!?üstüne ekle
// WtDetay
@getMemberThanxDetay($memID);theme/Profile.template.php de
bul
// Messenger type information.üstüne ekle
// Show The Wthanx Detayý
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>
<tr><td><fieldset><b>
',sprintf($txt['wt_tesh'],$context['wt_data']['wtbt'],$context['wt_data']['wtx']),'
</b></fieldset></td>';
// Show The Wthanx Detayý
echo '<td><fieldset><b>
',sprintf($txt['wt_karma'],$context['wt_data']['wtbk'],$context['wt_data']['wtk']),'
</b></fieldset></td></tr>';sources/Karma.php de
bul
?>üstüne ekle
function ModifyWthanx()
{
global $modSettings, $db_prefix, $txt, $ID_MEMBER, $user_info, $topic;
is_not_guest();
isAllowedTo('wt_tesh');
checkSession('get');
$dir = $_REQUEST['sa'] != 'et' ? -1 : 1;
if ($dir != 1) isAllowedTo('wt_tesh_sil');
//Wthanx Teþekkürü yazalým
if (isset($topic) && isset($_REQUEST['m']) && isset($_REQUEST['uid']) && ($_REQUEST['uid'] != $ID_MEMBER)) {
$result = db_query("SELECT WKARMA,WTESH
FROM {$db_prefix}wthanx
WHERE WID_MSG = '$_REQUEST[m]' AND WID_MEMBER = '$ID_MEMBER'", __FILE__, __LINE__);
$row = mysql_fetch_row($result);
mysql_free_result($result);
db_query("
REPLACE INTO {$db_prefix}wthanx
(WID_TOPIC, WID_MSG, WID_MEMBER, WTESH, WKARMA, WTIME, WID)
VALUES ($topic, $_REQUEST[m], $ID_MEMBER, "
.($dir == 1 ? "'1'" : "'0'").", '$row[0]', ". time(). ", $_REQUEST[uid])", __FILE__, __LINE__);
}
// Figure out where to go back to.... the topic?
if (isset($topic))
redirectexit('topic=' . $topic . '.' . $_REQUEST['start'] . '#msg' . $_REQUEST['m']);
// JavaScript as a last resort.
else
{
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>...</title>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
history.go(-1);
// ]]></script>
</head>
<body>«</body>
</html>';
obExit(false);
}
}bul
// Change by one.
updateMemberData($_REQUEST['uid'], array($dir == 1 ? 'karmaGood' : 'karmaBad' => '+'));altına ekle
//Wthanx
if (isset($topic) && isset($_REQUEST['m']) && isset($_REQUEST['uid']) && ($_REQUEST['uid'] != $ID_MEMBER) && allowedTo('wt_karma')) {
$result = db_query("SELECT WKARMA,WTESH
FROM {$db_prefix}wthanx
WHERE WID_MSG = '$_REQUEST[m]' AND WID_MEMBER = '$ID_MEMBER'", __FILE__, __LINE__);
$row = mysql_fetch_row($result);
mysql_free_result($result);
db_query("
REPLACE INTO {$db_prefix}wthanx
(WID_TOPIC, WID_MSG, WID_MEMBER, WKARMA, WTESH, WTIME, WID)
VALUES ($topic, $_REQUEST[m], $ID_MEMBER, "
.($dir == 1 ? "'+'" : "'-'").", '$row[1]', ". time(). ", $_REQUEST[uid])", __FILE__, __LINE__);
}bul
// It was recently changed the OTHER way... so... reverse it!
if ($dir == 1)
updateMemberData($_REQUEST['uid'], array('karmaGood' => '+', 'karmaBad' => '-'));
else
updateMemberData($_REQUEST['uid'], array('karmaBad' => '+', 'karmaGood' => '-'));altına ekle
//Wthanx
if (isset($topic) && isset($_REQUEST['m']) && isset($_REQUEST['uid']) && ($_REQUEST['uid'] != $ID_MEMBER) && allowedTo('wt_tesh')) {
$result = db_query("SELECT WKARMA,WTESH
FROM {$db_prefix}wthanx
WHERE WID_MSG = '$_REQUEST[m]' AND WID_MEMBER = '$ID_MEMBER'", __FILE__, __LINE__);
$row = mysql_fetch_row($result);
mysql_free_result($result);
db_query("
REPLACE INTO {$db_prefix}wthanx
(WID_TOPIC, WID_MSG, WID_MEMBER, WKARMA, WTESH, WTIME, WID)
VALUES ($topic, $_REQUEST[m], $ID_MEMBER, "
.($dir == 1 ? "'+'" : "'-'").", '$row[1]', ". time(). ", $_REQUEST[uid])", __FILE__, __LINE__);
}languages/Modifications.turkish.php de
bul
?>üstüne ekle
// TeshTurk
$txt['wt_settings_title'] = 'TeshTurk';
$txt['wt_karma'] = "%d Mesajýna Toplam<br /> %d Kere Karma Verildi";
$txt['wt_tesh'] = "%d Mesajýna Toplam<br /> %d Kere Teþekkür Edildi";
$txt['wt_karma_two'] = "%s Nickli Üyemize Karma Veren ";
$txt['wt_tesh_two'] = "%s Nickli Üyemize Teþekkür Eden ";
$txt['wt_tekil'] = "Kullanýcý:";
$txt['wt_cogul'] = "Kullanýcý:";
$txt['permissiongroup_tesh'] = 'TeshTurk';
$txt['permissionname_wt_tesh']= 'Mesajý Yazana Teþekkür Edebilir';
$txt['permissionname_wt_tesh_sil']= 'Ettiði Teþekkürü Silebilir';
$txt['permissionname_wt_karma'] = 'Mesajý Yazana Karma Verdiðinde Altta Ýsmi Gözükür';
$txt['cannot_wt_tesh'] = 'Mesaja Teþekkür Etmeniz Ýçin Yetkiniz Yok!!';
$txt['cannot_wt_tesh_sil'] = 'Üzgünüm Teþekkürünüzü Silemezsiniz ;(';
$txt['wthanx_sh'] = 'Mesajlarda Teþekkür Edenler Görünsünmü';
$txt['wthanx_show'] = 'Mesajlarda Görünecek Teþekkür Edenler Sayýsý';
$txt['wkarma_sh'] = 'Mesajlarda Karma Verenler Görünsünmü';
$txt['wkarma_show'] = 'Mesajlarda Görünecek Karma Verenler Sayýsý';ekteki iki adet jpeg resimlerini temanız/images klasörüne atın (manuel kuranlar için)
Forum seçeneklerinden teshturk (teşekkür) ayarlarınızı aktifleştirin..
display.template de hata alanlar hangi modla çakıştığını bulamadım..o yüzden display.template.php mi neredeyse sıfırladım bu mod için

mod hakkında:
TeshTurk Mod 1.00 By War©hild
Bu mod üyenin yazdığı mesajlara diğer üyelerin teşekkür etmesini sağlar.
Ayrıca O mesajda karma verenleride gösterir.
Profil ekranında kaç mesajına kaç teşekkür aldığını ve kaç karma verildiğini gösterir
Admin panelinden etkinleştirilmesi ve üyelere izin verilmesi gereklidir !!
Speacial Thanks To SiveroN www.ZeBix.Com
AcatSoft® 2007
Alıntıdır: