

Aşağıdaki sql döngüyü çalıştırın;
PHP:
ALTER TABLE thread ADD `reason` VARCHAR(255) NOT NULL;
SHOWTHREAD template'ni açıp alttakini bul;
PHP:
<if condition="$show['popups']">
<!-- popup menu contents -->
Hemen üstüne aşağıdakini ekle;
PHP:
<if condition="$show['closethread']">
<script type="text/javascript">
<!--
function get_reason()
{
if (document.getElementById('ao_oct').checked == true)
{
var answer = prompt('What is your reason for closing this thread?', '');
document.threadadminform.reason.value = answer;
}
}
// -->
</script>
</if>
alttakini bul;
PHP:
<input type="hidden" name="pollid" value="$pollid" />
hemen altına ekle;
PHP:
<input type="hidden" name="reason" value="" />
alttakini bul;
PHP:
<form action="postings.php" method="post" name="threadadminform">
Alttaki ile değiştir;
PHP:
<form action="postings.php" method="post" name="threadadminform"<if condition="$show['closethread']"> onsubmit="return get_reason()"</if>>
alttakini bul;
PHP:
<form action="postings.php" method="post" name="adminoptionsform">
Alttaki ile değiştir;
PHP:
<form action="postings.php" method="post" name="adminoptionsform"<if condition="$show['closethread']"> onsubmit="return get_reason()"</if>>
alttakini bul;
PHP:
<option value="openclosethread" selected="selected"><if condition="$show['closethread']">$vbphrase[close_thread]<else />$vbphrase[open_thread]</if></option>
Alttaki ile değiştir;
PHP:
<option value="openclosethread" id="ao_oct" selected="selected"><if condition="$show['closethread']">$vbphrase[close_thread]<else />$vbphrase[open_thread]</if></option>
alttakini bul;
PHP:
<!-- / toolbar -->
Hemen altına ekle;
PHP:
$reason
showthread.php dosyasını açıp alttaki kodu bul;
PHP:
// #############################################################################
// output page
üstüne ekle;
PHP:
if (!empty($thread['reason']))
{
eval('$reason = "' .fetch_template('showthread_reason') . '";');
}
postings.php dosyasını açıp alttaki kodu bul;
PHP:
$action = $vbphrase['opened'];
hemen altına ekle;
PHP:
$_POST['reason'] = null;
alttakini bul;
PHP:
$action = $vbphrase['closed'];
hemen altına ekle;
PHP:
if($_POST['reason'] == 'null') $_POST['reason'] = null;
Alttakini bul;
PHP:
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET open = $threadinfo[open] WHERE threadid = $threadid");
Alttaki ile değiştir;
PHP:
$DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET open = $threadinfo[open], reason = '" . addslashes($_POST[reason]) . "' WHERE threadid = $threadid");
showthread_reason adında yeni bir template oluştur içine alttaki kodları koy;
PHP:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" style="border-bottom-width:0px">
<tr>
<td class="alt1" width="100%">
<b>Reason thread was closed:</b> <br />
<div class="smallfont">
$thread[reason]
</div>
</td>
</tr>
</table>