Öncelikle Benzer Konular - Related Topics - Konu - SMF Destek Sitesinden kuruyoruz. [url=https://custom.simplemachines.org/mods/index.php?mod=189]Tıklayın[/url]
Display.template.php Bul:
[code]// Assuming there are attachments...[/code]
Üstüne ekle: [code]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>'; }[/code]
Bul: [code]// 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%"> </th> <th class="smalltext" colspan="3"><strong>', $txt['msg_alert_none'], '</strong></th> <th scope="col" class="smalltext last_th" width="8%"> </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'] ? ' <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 />'; }[/code]
Değiştir: [code]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>'; }[/code]
index.css en alta ekle: [code]ul.related_topics {padding-left: 30px; margin-top: -10px;} .related_topics li {margin-bottom: -10px; } .related_topics_right{width: 50%; }[/code]
index.css Bul: [code]fieldset { border: 1px solid #c4c4c4; padding: 1em; margin: 0 0 0.5em 0; }[/code]
Değiştir: [code]fieldset{border:1px solid #c4c4c4;padding:1em;margin:0 0 0.5em 0; border-radius: 5px;}[/code]
Kurulum sonrası aşağıdaki hata mesajını alanlar:
[code]Table 'chmbilis_smf.smf_related_subjects' doesn't exist Dosya: /home/chm/public_html/Sources/Subs-RelatedFulltext.php[/code]
Sources/Subs-RelatedFulltext.php
Bul: [code])',[/code]
Değiştir: [code])ENGINE=MyISAM',[/code]
|