$sourcedir/Admin.php
Localizar o ficheiro
Adicione antes:
'relatedtopics' => array(
'label' => $txt['admin_related_topic'],
'file' => 'RelatedTopics.php',
'function' => 'RelatedTopicsAdmin',
'subsections' => array(
'main' => array($txt['admin_related_topics_information']),
'settings' => array($txt['admin_related_topics_settings']),
'methods' => array($txt['admin_related_topics_methods']),
),
),
Pesquisar
// Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
Adicionar
'related' => array($txt['admin_related_topic']),
$sourcedir/RemoveTopic.php
Pesquisar
// Recycle topics that aren't in the recycle board...
Adicione antes
// Added by Related Topics
require_once($sourcedir . '/Subs-Related.php');
relatedRemoveTopics($topics);
// Related Topics END
$sourcedir/Subs-Post.php
Pesquisar
$topicOptions['id'] = $smcFunc['db_insert_id']('{db_prefix}topics', 'id_topic');
Adicionar depois
// Added by Related Topics
global $sourcedir;
require_once($sourcedir . '/Subs-Related.php');
relatedUpdateTopics($topicOptions['id']);
// Related Topics END
Pesquisar
if ($smcFunc['db_num_rows']($request) == 1)
updateStats('subject', $topicOptions['id'], $msgOptions['subject']);
Alterar por
if ($smcFunc['db_num_rows']($request) == 1)
{
updateStats('subject', $topicOptions['id'], $msgOptions['subject']);
// Added by Related Topics
global $sourcedir;
require_once($sourcedir . '/Subs-Related.php');
relatedUpdateTopics($topicOptions['id']);
// Related Topics END
}
$sourcedir/Display.php
Pesquisar
$topicinfo = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);
Adicionar depois
// Added by Related Topics
if (!empty($modSettings['relatedTopicsEnabled']))
{
require_once($sourcedir . '/Subs-Related.php');
loadRelated($topic);
}
$themedir/Display.template.php
Pesquisar
if ($context['show_spellchecking'])
echo '
<form action="', $scripturl, '?action=spellcheck" method="post" accept-charset="', $context['character_set'], '" name="spell_form" id="spell_form" target="spellWindow"><input type="hidden" name="spellstring" value="" /></form>
Adicione antes
// Added by Related Topics
if (!empty($context['related_topics'])) // TODO: Have ability to display no related topics?
{
echo '
<br /><span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
', $context['subject'], ' ', $txt['related_topics'], '
</h3>
</div>
<div class="tborder topic_table" id="messageindex">
<table class="table_grid" cellspacing="0">
<thead>
<tr>
<td></td>
</tr>
</thead>
<tbody>';
foreach ($context['related_topics'] as $topic)
{
echo '
<tr>
<td class="alt1" align="left">
', $topic['first_post']['link'],'<br />
<div style="font-size:13px; margin-top:5px;">
', $topic['first_post']['preview'],'
', $topic['first_post']['devam'],'
</div><br />
<div style="margin-top: 0px;"><span class="smalltext">
<img src="', $settings['default_theme_url'], '/images/view.gif" alt="" border="0" />
', $txt['views'], ': ', $topic['views'], ' -
<img src="', $settings['default_theme_url'], '/images/comments.gif" alt="" border="0" />
', $txt['replies'], ': ', $topic['replies'], ' -
<img src="', $settings['default_theme_url'], '/images/user.gif" alt="" border="0" />
', $txt['started_by'], ':', $topic['first_post']['member']['link'], '
</span></div>
</td>
</tr>';
}
echo '</tbody>
</table>
</div>
</div></div>
<span class="lowerframe"><span></span></span>
<br />';
}
// related topics end
$boarddir/index.php
Pesquisar
'register2' => array('Register.php', 'Register2'),
Adicionar antes
'related' => array('Subs-Related.php', 'Related'),
Ficheiros do pacote tem que colocar nos devidos Lugares
SMF-2.0/Sources/RelatedTopics.php
SMF-2.0/Sources/Subs-Related.php
SMF-2.0/Sources/Subs-RelatedFulltext.php
SMF-2.0/Themes/default/images/comments.gif
SMF-2.0/Themes/default/images/user.gif
SMF-2.0/Themes/default/images/view.gif
SMF-2.0/Themes/default/RelatedTopicsAdmin.template.php
Modifications.portuguese_pt
// Added by Related Topics translate by candidosa2
$txt['admin_related_topic'] = 'Tópicos relacionados';
$txt['admin_related_topics_information'] = 'Informação';
$txt['admin_related_topics_settings'] = 'Definições';
$txt['admin_related_topics_methods'] = 'Métodos';
$txt['related_topics_admin_title'] = 'Tópicos relacionados';
$txt['related_topics_admin_desc'] = '';
$txt['related_latest_news'] = 'Últimas Notícias';
$txt['related_news_unable_to_connect'] = 'Incapaz de conectar a <a href="http://www.smfarcade.info">SMFArcade.info</a> para o Últimas notícias..';
$txt['related_version_info'] = 'Informações sobre a versão';
$txt['related_installed_version'] = 'Instalado Versão';
$txt['related_latest_version'] = 'Versão mais recente';
$txt['related_topics_ignored_boards'] = 'Quadro Ignorado';
$txt['related_topics_methods_title'] = 'Métodos';
$txt['related_topics_methods'] = 'Escolha métodos dos utilizados para determinar tópicos relacionados<div class="smalltext">Reconstruir do índice é exigido após alterar estas definições</div>';
$txt['related_topics_index'] = 'Index';
$txt['related_topics_rebuild'] = 'Reconstruir índices';
$txt['related_topics_rebuild_desc'] = 'Utilize esta configuração ou após a mudança para a construção inicial cache';
$txt['relatedFulltext'] = 'Fulltext';
$txt['related_topics_settings_title'] = 'Tópicos relacionados';
$txt['relatedTopicsEnabled'] = 'Activar Tópicos relacionados';
$txt['relatedTopicsCount'] = 'Quantos tópicos relacionados a mostrar';
$txt['no_methods_selected'] = 'Você não selecionou quais os métodos a utilizar para determinar os tópicos relacionados';
$txt['related_topics'] = 'Tópicos relacionados';
// END Added by Related Topics