TRForumcu.NeTWebmaster / Web Dizayn Scriptler / Programlama DilleriPHP / ASP WeB SiSTeMLeRi SMF (Moderatör: Gondolin)Konuyu Okumuş Olanlar
Konu Bilgileri
Konu Başlığı Konuyu Okumuş Olanlar
Cevaplar 0
Sonraki Sonraki Konu
Görüntüleyenler0 Üye ve 1 Ziyaretçi konuyu incelemekte.
Görüntülenme 184
Önceki Önceki Konu
Sayfa: [1]   Aşağı git
Yazdır
Konu Derecelendirme: 0 Bookmark and Share
Konu: Konuyu Okumuş Olanlar  (Okunma Sayısı 184 defa) EkleBunu Sosyal Paylaşım Butonu
Gondolin
Bölüm Sorumlusu
*


Mesaj : 1.169
Forum Para : 7896.00 YTL
« : 22 Haziran 2008, 15:46:25 »


Bu ipucu sayesinde konuyu kimin okumuş olduğunu görüntüleyebileceğiz.

../Sources/Display.php

Bul:

fatal_lang_error('smf232', false);

Değiştir:

fatal_lang_error('smf232', false);

if(!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'log') {
DisplayLog();
}

Bul:

?>

Değiştir:

function DisplayLog()
{
global $context, $scripturl, $db_prefix, $topic;

$request = db_query("
SELECT
lt.ID_MEMBER, lt.ID_TOPIC, mem.realName
FROM {$db_prefix}log_topics AS lt
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lt.ID_MEMBER)
WHERE ID_TOPIC = $topic", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
{
// Build the array.
$context['logs'][] = array(
'member' => array(
'id' => $row['ID_MEMBER'],
'name' => $row['realName'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
),
);
}
mysql_free_result($request);

$context['sub_template'] = 'displaylog';
}

?>

../Themes/default/Display.template.php

Bul:

?>

Değiştir:

function template_displaylog()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

echo '
<table border="0" cellpadding="0" cellspacing="0" style="padding-top: 1ex;" align="center">
<tr class="titlebg">
<td>Konuyu Kimler Okumuş</td>
</tr>';

foreach($context['logs'] as $log) {
echo '
<tr class="windowbg">
<td>', $log['member']['link'], '</td>
</tr>';
}

echo '
</table>';
}

?>

Bul:

<div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div>

Değiştir:

<div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div>';
echo '
<a href="' . $scripturl . '?topic='. $context['current_topic'] . '.0;sa=log">Konuyu Okumuş Olanlar</a>';
echo '



Tamamiyle [SiNaN] yapımıdır.

Smf 2.0 İçin


../Sources/Display.php

Bul:

   fatal_lang_error('no_board', false);

Değiştir:

   fatal_lang_error('no_board', false);

   if(!empty($_REQUEST['sa']) && $_REQUEST['sa'] == 'log') {
   DisplayLog();
   }

Bul:

?>

Değiştir:
function DisplayLog()
{
   global $context, $scripturl, $topic, $smcFunc;

    $request = $smcFunc['db_query']('', "
   SELECT
   lt.ID_MEMBER, lt.id_topic, mem.real_name
   FROM {db_prefix}log_topics AS lt
   LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = lt.id_member)
   WHERE id_topic = {int:topic}"
   array(
'topic' => $topic,
   )
    );
   while ($row = $smcFunc['db_fetch_assoc']($request))
   {
   // Build the array.
   $context['logs'][] = array(
  'member' => array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>',
'href' => $scripturl . '?action=profile;u=' . $row['id_member'],
  ),
   );
   }
   $smcFunc['db_free_result']($request);

   $context['sub_template'] = 'displaylog';
}

?>

../Themes/default/Display.template.php

Bul:

?>

Değiştir:

function template_displaylog()
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings;

   echo '
   <table border="0" cellpadding="0" cellspacing="0" style="padding-top: 1ex;" align="center">
   <tr class="titlebg">
  <td>Konuyu Kimler Okumuş</td>
   </tr>';

   foreach($context['logs'] as $log) {
   echo '
   <tr class="windowbg">
  <td>', $log['member']['link'], '</td>
   </tr>';
   }
   echo '
   </table>';
}

?>

Bul:

  <div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div>

Değiştir:

  <div class="nav" style="margin-bottom: 2px;"> ', $context['previous_next'], '</div>';
   echo '
  <a href="' . $scripturl . '?topic='. $context['current_topic'] . '.0;sa=log">Konuyu Okumuş Olanlar</a>';
   echo '
Yağız'a teşekkürler.

Logged
 
Sayfa: [1]   Yukarı git
Yazdır