alttaki sql querryleri saorgulayın(phpmyadminden çalıştırın)
------------------------------------------------------------------------
ALTER TABLE `forum` ADD `showthanks` INT(1) DEFAULT '0' NOT NULL;
------------------------------------------------------------------------
ALTER TABLE `forum` ADD `showthanks_date` INT(1) DEFAULT '0' NOT NULL;
------------------------------------------------------------------------
CREATE TABLE `thanks` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`userid` INT(10) NOT NULL,
`username` VARCHAR(50) NOT NULL,
`date` INT(10) NOT NULL,
`threadid` INT(10) NOT NULL
);
------------------------------------------------------------------------
Sözcük% ve dillerden aşağıdaki cümleleri ekleyin
------------------------------------------------------------------------
Type : Forum related
Varname : show_thanks_button
Phrase : Display the 'Thank you' button
------------------------------------------------------------------------
Type : Control Panel Global
Varname : enable_disable_thankyou
Phrase : Thank you button
------------------------------------------------------------------------
Type : Forum related
Varname : show_thanks_date
Phrase : Display the date in the thanks post
------------------------------------------------------------------------
Type : GLOBAL
Varname : thanks
Phrase : Thank for this message !
------------------------------------------------------------------------
Type : Front-End Error Messages
Varname : already_thanks
Text : You have already thank this message !
------------------------------------------------------------------------
Type : Front-End Redirect Messages
Varname : thanks
Text : Thank you. Your choice was recorded, you will now be redirected to the thread.
------------------------------------------------------------------------
Type : GLOBAL
Varname : thanks_bot
Phrase : Thank you Bot
------------------------------------------------------------------------
Type : GLOBAL
Varname : thanks_title
Phrase : Thank you Bot
------------------------------------------------------------------------
Type : GLOBAL
Varname : thanks_1_install
Phrase : thanks {1} for this thread
------------------------------------------------------------------------
Type : GLOBAL
Varname : thanks_x_install
Phrase : thank {1} for this thread
------------------------------------------------------------------------
admincp/forum.php açın ve alttakini bulun :
------------------------------------------------------------------------
print_yes_no_row($vbphrase['show_forum_on_forum_jump'], 'options[showonforumjump]', $forum['showonforumjump']);
------------------------------------------------------------------------
altına aşağıdakini ekleyin :
------------------------------------------------------------------------
print_table_header($vbphrase['enable_disable_thankyou']);
print_yes_no_row($vbphrase['show_thanks_button'], 'forum[showthanks]', $forum['showthanks']);
print_yes_no_row($vbphrase['show_thanks_date'], 'forum[showthanks_date]', $forum['showthanks_date']);
------------------------------------------------------------------------
newreply.php alttakini bulun:
------------------------------------------------------------------------
// ############################### start post reply ###############################
if ($_POST['do'] == 'postreply')
{
------------------------------------------------------------------------
üstüne alttakini ekleyin :
------------------------------------------------------------------------
// ############################### Than you hack Grog6 ###############################
if ($_REQUEST['do'] == 'thanks')
{
globalize($_REQUEST, array('threadid' => INT));
if ($foruminfo[showthanks]==0 || $bbuserinfo[userid]==0)
print_no_permission();
else
{
$verif=$DB_site->query_first("SELECT userid FROM ". TABLE_PREFIX ."thanks WHERE threadid='$threadid' AND userid='$bbuserinfo[userid]'");
if ($verif[userid]==$bbuserinfo[userid])
eval(print_standard_error('error_already_thanks'));
else
{
$DB_site->query("
INSERT INTO ". TABLE_PREFIX ."thanks
(userid, username, date, threadid)
VALUES ('$bbuserinfo[userid]', '" . addslashes($bbuserinfo[username]) . "', " . TIMENOW . ", '$threadid')");
$url = "showthread.php?$session[sessionurl]t=$threadid";
eval(print_standard_redirect('redirect_thanks'));
}
}
}
------------------------------------------------------------------------
includes/functions_showthread.php allttakini bulun :
------------------------------------------------------------------------
// hide users in Coventry from non-staff members
if ($tachyuser = in_coventry($post['userid']) AND !can_moderate($thread['forumid']))
{
return;
}
------------------------------------------------------------------------
üstüne alttakini ekleyin :
------------------------------------------------------------------------
// thank you hack grog6
$cmpt=1;
if ($forum[showthanks] == 1 && $post[postcount]==1)
{
$thanks=$DB_site->query("SELECT * FROM ". TABLE_PREFIX ."thanks WHERE threadid='$thread[threadid]' ORDER BY username");
$nb=$DB_site->num_rows($thanks);
if ($nb>0)
{
while($thank=$DB_site->fetch_array($thanks))
{
if ($cmpt<$nb)
$virg=",";
else $virg="";
if ($forum[showthanks_date]==0)
$liste_user = $liste_user." <a href=\"member.php?u=$thank[userid]\">$thank[username]</a>$virg ";
else
{
$date_thank = vbdate($vboptions['dateformat'], $thank['date'], true);
$liste_user = $liste_user." <a href=\"member.php?u=$thank[userid]\">$thank[username]</a> ($date_thank)$virg ";
}
$date=$thank[date];
$cmpt++;
}
// format date/time
$post['postdate'] = vbdate($vboptions['dateformat'], $date, true);
$post['posttime'] = vbdate($vboptions['timeformat'], $date);
// user profil field
$username = "<b><font size=\"3\">$vbphrase[thanks_bot]</font></b>";
if ($nb<=1)
$thank_phrase = construct_phrase($vbphrase[thanks_1_install], $post[musername]);
else $thank_phrase = construct_phrase($vbphrase[thanks_x_install], $post[musername]);
if ($vboptions[legacypostbit]=="000")
eval('$thanks_post .= " ' . fetch_template('thanks_postbit') . '";');
else eval('$thanks_post = " ' . fetch_template('thanks_postbit_legacy') . '";');
}
}
// thank you hack grog6
------------------------------------------------------------------------
SHOWTHREAD templatinde,alttakini bul:
------------------------------------------------------------------------
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" ></if></a></td>
</if>
------------------------------------------------------------------------
alttakinle değiştir:
------------------------------------------------------------------------
<if condition="$show['largereplybutton']">
<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&noquote=1&p=$FIRSTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" ></if></a></td>
</if>
<td class="smallfont" align="right"><a href="newreply.php?do=thanks&threadid=$thread[threadid]">
<img src="$stylevar[imgdir_button]/thanks.gif" alt="$vbphrase[thanks]" border="0" >
</a></td>
------------------------------------------------------------------------
postbit ve postbit_legacy templatelerinde, en alta alttakini ekleyin:
------------------------------------------------------------------------
$thanks_post
------------------------------------------------------------------------
thanks_postbit isminde yeni template oluşturun ve alttaki kodları ekleyin:
------------------------------------------------------------------------
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="thead" $scrolltothis>
<div class="normal" style="float:$stylevar
">
</div>
<div class="normal">
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_old.gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate], $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</div>
</td>
</tr>
<tr>
<td class="alt2" style="padding:0px">
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<td nowrap="nowrap">
<div id="postmenu_$post[postid]">
$username </div>
</td>
<td width="100%"> </td>
<td valign="top" nowrap="nowrap">
<font class="smallfont"><div>$vbphrase[location_perm]: $vboptions[bbtitle]</font></div>
</td>
</tr>
</table>
<!-- / user info -->
</td>
</tr>
<tr>
<td class="alt1">
<!-- message, attachments, sig -->
<!-- icon and title -->
<div class="smallfont">
<img class="inlineimg" src="images/icons/icon1.gif" alt="Post" border="0" />
<strong>$vbphrase[thanks_title]</strong>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
<!-- message -->
<div>$liste_user $thank_phrase
<br /><br /></div>
<!-- / message -->
</td>
</tr>
</table>
</div>
$spacer_close
<!-- / post #$post[postid] -->
------------------------------------------------------------------------
thanks_postbit_legacy isminde yeni template oluşturun ve alttaik kodları ekleyin:
------------------------------------------------------------------------
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<td class="thead" style="font-weight:normal" $scrolltothis>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_old.gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate], $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar
">
</td>
</tr>
<tr valign="top">
<td class="alt2" width="175">
$username
<div class="smallfont">
<br />
<div>$vbphrase[location_perm]: $vboptions[bbtitle]</div> </div>
</td>
<td class="alt1">
<!-- icon and title -->
<div class="smallfont">
<img class="inlineimg" src="$post[iconpath]" alt="images/icons/icon1.gif" border="0" />
<strong>$vbphrase[thanks_title]</strong>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
<!-- message -->
<div>$liste_user $thank_phrase
<br /><br /></div>
</td>
</tr>
<tr>
<td class="alt2">
</td>
<td class="alt1" align="$stylevar
">
</td>
</tr>
</table>
$spacer_close
<!-- / post #$post[postid] -->
------------------------------------------------------------------------
son olarakta thanks.gif dosyasını images klasörüne upload edin