Benzer Konular Modifikasyonu (Related Topics) Kurulumu ve Sorunları

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı D®agon

  • Ezberletmez Öğretir
  • *******
  • Join Date: Mar 2008
  • Yer: Ankara
  • 11656
  • +524/-0
  • Cinsiyet: Bay
    • Arif Hocam
Öncelikle Benzer Konular - Related Topics - Konu -
SMF Destek Sitesinden kuruyoruz.  You are not allowed to view links. Register or Login

Display.template.php
Bul:

Kod: You are not allowed to view links. Register or Login
// Assuming there are attachments...
Üstüne ekle:
Kod: You are not allowed to view links. Register or Login
if ($message['id'] == $context['topic_first_message'] and (!empty($context['related_topics'])) )
{
echo '
<div class="related_topics_right">
<fieldset>
   <legend class="smalltext">

         <b><font color="#FF0000">', $txt['related_topics'], '</font></b>

   </legend> ';
// Added by Related Topics
if (!empty($context['related_topics'])) // TODO: Have ability to display no related topics?
{
foreach ($context['related_topics'] as $topic)
{
echo ' <div><ul class="related_topics"><li class="related_topics">', $topic['first_post']['link'], ' </li></ul></div>';
}
}
    echo '
</fieldset>
</div>';
    }

Bul:
Kod: You are not allowed to view links. Register or Login
// Added by Related Topics
if (!empty($context['related_topics'])) // TODO: Have ability to display no related topics?
{
echo '

<div class="tborder topic_table" id="messageindex">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">';

// Are there actually any topics to show?
if (!empty($context['related_topics']))
{
echo '
<th scope="col" class="smalltext first_th" width="8%" colspan="2">', $txt['related_topics'], '</th>
<th scope="col" class="smalltext"> </th>
<th scope="col" class="smalltext center" width="14%">', $txt['replies'], '</th>
<th scope="col" class="smalltext last_th" width="22%">', $txt['last_post'], '</th>';
}
// No topics.... just say, "sorry bub".
else
echo '
<th scope="col" class="smalltext first_th" width="8%">&nbsp;</th>
<th class="smalltext" colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th>
<th scope="col" class="smalltext last_th" width="8%">&nbsp;</th>';

echo '
</tr>
</thead>
';

foreach ($context['related_topics'] as $topic)
{
// Is this topic pending approval, or does it have any posts pending approval?
if ($topic['board']['can_approve_posts'] && $topic['unapproved_posts'])
$color_class = !$topic['approved'] ? 'approvetbg' : 'approvebg';
// We start with locked and sticky topics.
elseif ($topic['is_sticky'] && $topic['is_locked'])
$color_class = 'stickybg locked_sticky';
// Sticky topics should get a different color, too.
elseif ($topic['is_sticky'])
$color_class = 'stickybg';
// Locked topics get special treatment as well.
elseif ($topic['is_locked'])
$color_class = 'lockedbg';
// Last, but not least: regular topics.
else
$color_class = 'windowbg';

// Some columns require a different shade of the color class.
$alternate_class = $color_class . '2';

echo '
<tr>
<td class="icon1 ', $color_class, '">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>
<td class="subject ', $alternate_class, '">
<div ', (!empty($topic['quick_mod']['modify']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\', \'' . $context['session_var'] . '\');"' : ''), '>
', $topic['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$topic['board']['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</strong>' : '' ;

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

echo '

</div>
</td>
<td class="stats ', $color_class, '">
', $topic['replies'], ' ', $txt['replies'], '
/
', $topic['views'], ' ', $txt['views'], '
</td>
<td class="lastpost ', $alternate_class, '">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" /></a>
', $topic['last_post']['time'], '
</td>
</tr>';
}

echo '
</table>
</div><br />';
}

Değiştir:
Kod: You are not allowed to view links. Register or Login
if (!empty($context['related_topics']))
{
echo '
<fieldset>
   <legend class="smalltext">

         <b><font color="#FF0000">', $txt['related_topics'], '</font></b>

   </legend>';
if (!empty($context['related_topics']))
{
foreach ($context['related_topics'] as $topic)
{
echo ' <div><ul class="related_topics"><li class="related_topics">', $topic['first_post']['link'], ' </li></ul></div>';
}
}
    echo '
</fieldset>';
}

index.css en alta ekle:
Kod: You are not allowed to view links. Register or Login
ul.related_topics {padding-left: 30px; margin-top: -10px;}
.related_topics li {margin-bottom: -10px; }
.related_topics_right{width: 50%; }

index.css
Bul:
Kod: You are not allowed to view links. Register or Login
fieldset
{
border: 1px solid #c4c4c4;
padding: 1em;
margin: 0 0 0.5em 0;
}

Değiştir:
Kod: You are not allowed to view links. Register or Login
fieldset{border:1px solid #c4c4c4;padding:1em;margin:0 0 0.5em 0; border-radius: 5px;}
Kurulum sonrası aşağıdaki hata mesajını alanlar:

Kod: You are not allowed to view links. Register or Login
Table 'chmbilis_smf.smf_related_subjects' doesn't exist
Dosya: /home/chm/public_html/Sources/Subs-RelatedFulltext.php


Sources/Subs-RelatedFulltext.php

Bul:
Kod: You are not allowed to view links. Register or Login
)',
Değiştir:
Kod: You are not allowed to view links. Register or Login
)ENGINE=MyISAM',