Hızlı cevabın altında görüntülenen benzer konular listesini daha sade hale getirir ve konunun ilk iletisinde de görüntülenmesini sağlar.

ışlem Basamakları:
Öncelikle Benzer Konular - Related Topics - Konu - SMF Destek modu kurulu değilse kurulur.

Display.template.php
Bul:
Kod:

// Assuming there are attachments...


Üstüne ekle:
Kod:

if ($message['id'] == $context['topic_first_message'] and (!empty($context['related_topics'])) )
{
echo '




', $txt['related_topics'], '

';
// Added by Related Topics
if (!empty($context['related_topics'])) // TODO: Have ability to display no related topics?
{
foreach ($context['related_topics'] as $topic)
{
echo '
  • ', $topic['first_post']['link'], '


';
}
}
echo '


';
}


Bul:
Kod:

// Added by Related Topics
if (!empty($context['related_topics'])) // TODO: Have ability to display no related topics?
{
echo '


', $txt['related_topics'], ' ', $txt['replies'], ' ', $txt['last_post'], ' ', $txt['msg_alert_none'], '



', $topic['is_sticky'] ? '' : '', '', $topic['first_post']['link'], (!$topic['board']['can_approve_posts'] && !$topic['approved'] ? ' (' . $txt['awaiting_approval'] . ')' : ''), '', $topic['is_sticky'] ? '' : '' ;

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
';

echo '



', $topic['replies'], ' ', $txt['replies'], '
/
', $topic['views'], ' ', $txt['views'], '

', $topic['last_post']['time'], '



';
}


Değiştir:
Kod:

if (!empty($context['related_topics']))
{
echo '



', $txt['related_topics'], '

';
if (!empty($context['related_topics']))
{
foreach ($context['related_topics'] as $topic)
{
echo '
  • ', $topic['first_post']['link'], '


';
}
}
echo '
';
}


index.css en alta ekle:
Kod:

ul.related_topics {padding-left: 30px; margin-top: -10px;}
.related_topics li {margin-bottom: -10px; }
.related_topics_right{width: 50%; }


Bul
Kod:

fieldset
{
border: 1px solid #c4c4c4;
padding: 1em;
margin: 0 0 0.5em 0;
}


Değiştir:
Kod:

fieldset{border:1px solid #c4c4c4;padding:1em;margin:0 0 0.5em 0; border-radius: 5px;}


Orjinakonu: Benzer Konular - Related Topics - Edit - 2.0 Modifikasyonlar

Kaynak: Benzer Konular - Related Topics - Edit