Original e Download Link:http://custom.simplemachines.org/mods/index.php?mod=1587
Modo Nome: Contributions in Boards
Criado por: M-DVD
Última versão: 1.3
Compatível com: 1.1.x, 2.0 rc4
Pacote de instalação: O link original
Instalação Manual: Sim / Por Candidosa2
Demo Imagem
http://custom.simplemachines.org/mods/index.php?action=download;mod=1587;id=81703;imagehttp://custom.simplemachines.org/mods/index.php?action=download;mod=1587;id=81705;imagehttp://custom.simplemachines.org/mods/index.php?action=download;mod=1587;id=81715;imagehttp://custom.simplemachines.org/mods/index.php?action=download;mod=1587;id=93991;image./Sources/
Display.php $posters = array_unique($posters);
// Load Contributions in Display
if ($modSettings['contributionsinTopic'] || $modSettings['contributionsinPost'])
{
$arr3 = $modSettings['contributionsinPost'] ? $posters : array($context['topic_starter_id']);
foreach ($arr3 as $member)
{
$request = db_query("
SELECT
m.ID_MEMBER, m.ID_TOPIC, m.subject, b.ID_BOARD, b.name
FROM {$db_prefix}messages AS m
INNER JOIN {$db_prefix}topics AS t ON (t.ID_FIRST_MSG = m.ID_MSG)
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
WHERE t.ID_MEMBER_STARTED = {$member}
AND b.contributionsEnable
ORDER BY " . ($modSettings['contributionsinRand'] ? 'RAND()' : 't.ID_TOPIC DESC') . '
LIMIT ' . $modSettings['contributionsinList']
, __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
$context['contributions'][$row['ID_MEMBER']][] =
array (
'board' => '<a href="' . $scripturl . '?board=' . $row['ID_BOARD'] . '.0">' . $row['name'] . '</a>',
'topic' => '<a href="' . $scripturl . '?topic=' . $row['ID_TOPIC'] . '.0">' . $row['subject'] . '</a>',
);
mysql_free_result($request);
}
}
./Sources/
Profile.php $context['profile_areas']['info']['areas']['showPosts'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=showPosts">' . $txt['showPosts'] . '</a>';
$context['profile_areas']['info']['areas']['showPosts;contributions'] = '<a href="' . $scripturl . '?action=profile;u=' . $memID . ';sa=showPosts;contributions">' . $txt['showPosts;contributions'] . '</a>';
// If just deleting a message, do it and then redirect back.
// Are we just viewing topics?
$context['is_topics'] = isset($_GET['contributions']);
$context['page_index'] = constructPageIndex($scripturl . '?action=profile;u=' . $memID . ';sa=showPosts'
$context['page_index'] = constructPageIndex($scripturl . '?action=profile;u=' . $memID . ';sa=showPosts' . (isset($_GET['contributions']) ? ';contributions' : '')
// Find this user's posts. The left join on categories somehow makes this faster, weird as it looks.
if (isset($_GET['contributions']))
$context['page_title'] = $txt['latest_contributions'] . ' ' . $user_profile[$memID]['realName'];
ORDER BY m.ID_MSG " . ($reverse ? 'ASC' : 'DESC') . "
" . (isset($_GET['contributions']) ? '
AND b.contributionsEnable' : '') . "
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT)
FROM {$db_prefix}messages AS m
INNER JOIN {$db_prefix}topics AS t ON (" . ($context['is_topics'] ? 't.ID_FIRST_MSG = m.ID_MSG' : 't.ID_TOPIC = m.ID_TOPIC') . ")
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT)
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
WHERE m.ID_MEMBER = $memID
AND b.ID_BOARD = m.ID_BOARD
AND $user_info[query_see_board]", __FILE__, __LINE__);
FROM {$db_prefix}messages AS m
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = m.ID_BOARD)" . ($context['is_topics'] ? "
INNER JOIN {$db_prefix}topics AS t ON (t.ID_TOPIC = m.ID_TOPIC AND t.ID_FIRST_MSG = m.ID_MSG)" : '') . "
WHERE m.ID_MEMBER = $memID" . (isset($_GET['contributions']) ? '
AND b.contributionsEnable' : '') . "
AND $user_info[query_see_board]", __FILE__, __LINE__);
./Sources/
ManageBoards.php 'override_theme' => 0,
'contributionsEnable' => 0,
$boardOptions['override_theme'] = isset($_POST['override_theme']);
$boardOptions['contributionsEnable'] = isset($_POST['contributionsEnable']);
./Sources/
ManagePosts.php // Should the board theme override the user preferred theme?
if (isset($boardOptions['override_theme']))
$boardUpdates[] = 'override_theme = ' . ($boardOptions['override_theme'] ? '1' : '0');
// Topics in this Board are Contributions?
if (isset($boardOptions['contributionsEnable']))
$boardUpdates[] = 'contributionsEnable = ' . ($boardOptions['contributionsEnable'] ? '1' : '0');
b.boardOrder, b.countPosts, b.memberGroups, b.ID_THEME, b.override_theme,
b.boardOrder, b.countPosts, b.memberGroups, b.ID_THEME, b.override_theme, b.contributionsEnable,
'override_theme' => $row['override_theme'],
'contributionsEnable' => $row['contributionsEnable'],
./Themes/default/
Admin.template.php <td valign="top">
<input type="text" name="edit_disable_time" id="edit_disable_time_input" value="', empty($modSettings['edit_disable_time']) ? '0' : $modSettings['edit_disable_time'], '" size="5" /> ', $txt['manageposts_minutes'], '
</td>
</tr>
<tr class="windowbg2">
<td colspan="2"><hr /></td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="contributionsinTopic">', $txt['contributionsinTopic'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['contributionsinTopic_sub'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="contributionsinTopic" id="contributionsinTopic"', empty($modSettings['contributionsinTopic']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="contributionsinPost">', $txt['contributionsinPost'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['contributionsinPost_sub'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="contributionsinPost" id="contributionsinPost"', empty($modSettings['contributionsinPost']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="contributionsinList">', $txt['contributionsinList'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['contributionsinList_sub'], '</div>
</th>
<td valign="top">
<input type="text" name="contributionsinList" id="contributionsinList" value="', empty($modSettings['contributionsinList']) ? '0' : $modSettings['contributionsinList'], '" size="5" /> ', $txt['manageposts_posts'], '
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="contributionsinRand">', $txt['contributionsinRand'], '</label>:
<div class="smalltext" style="font-weight: normal;">', $txt['contributionsinRand_sub'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="contributionsinRand" id="contributionsinRand"', empty($modSettings['contributionsinRand']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
./Themes/default/
ManageBoards.template.php <input type="checkbox" name="override_theme"', $context['board']['override_theme'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';
echo '<tr>
<td>
<b>', $txt['mboards_contributionsEnable'], '</b><br />
', $txt['mboards_contributionsEnable_desc'], '<br /><br />
</td>
<td valign="top" align="right">
<input type="checkbox" name="contributionsEnable"', $context['board']['contributionsEnable'] ? ' checked="checked"' : '', ' class="check" />
</td>
</tr>';
./Themes/default/
Profile.template.php // Loop through every area, displaying its name as a header.
// Change the menu_item_selected.
if (isset($_GET['contributions']))
$context['menu_item_selected'] = 'showPosts;contributions';
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts">', $txt[460], ' ', $txt[461], '.</a><br />
<a href="', $scripturl, '?action=profile;u=', $context['member']['id'], ';sa=showPosts;contributions">', $txt[460], ' ', $txt['mod_show_member_contributions'], '.</a><br />
function template_showPosts()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
if (isset($_GET['contributions']))
$txt['showPosts'] = $txt['showPosts;contributions'];
./Themes/default/
Display.template.php // Show the member's signature?
// Show Minilist of Contributions
if (isset($context['contributions'][$message['member']['id']]))
{
echo '
<div class="contributions">
<div style="padding: 4px" class="titlebg2"><b>', $txt['my_contributions'], '</b></div>';
foreach ($context['contributions'][$message['member']['id']] as $contri)
echo '
<p>', $contri['board'], ' > ', $contri['topic'], '</p>';
echo '
</div>';
}
./Themes/default/
style.css?>
/* Minilist of Contributions */
.contributions {
width: 60%;
margin: auto;
padding: 1px;
border: 1px solid #696969;
background-color: #FFFFFF;
}
.contributions p { margin: 4px; font-weight: bold }
./Themes/default/languages/
Modifications.english.php?>
// MOD Contributions in Boards
$txt['mod_show_member_contributions'] = 'contributions of this person';
$txt['showPosts;contributions'] = 'Show Contributions';
$txt['my_contributions'] = 'My Contributions';
$txt['latest_contributions'] = 'Latest contributions of:';
$txt['show_member_contributions'] = 'View Member Contributions';
$txt['mboards_contributionsEnable'] = 'Enable Contributions';
$txt['mboards_contributionsEnable_desc'] = 'The Topics in this Board will be Contributions';
$txt['contributionsinTopic']= 'Minilist Contributions for Topic Starter';
$txt['contributionsinTopic_sub']= 'Show list in the signature for topic starter';
$txt['contributionsinPost']= 'Minilist Contributions for All Posters';
$txt['contributionsinPost_sub']= 'Show list in the signature for all posters';
$txt['contributionsinList']= 'Topics to show on Minilist Contributions';
$txt['contributionsinList_sub']= 'Number of contributions in minilist';
$txt['contributionsinRand']= 'Show Contributions in order random';
$txt['contributionsinRand_sub']= 'Otherwise always show the latest contributions';
./Themes/default/languages/
Modifications.teuidioma.php?>
// MOD Contributions in Boards - Translation by DeviDarkL
$txt['mod_show_member_contributions'] = 'contribuições deste membro';
$txt['showPosts;contributions'] = 'Mostrar Contribuições';
$txt['showContributions'] = 'Contribuições';
$txt['my_contributions'] = 'Algumas das minhas Contribuições';
$txt['latest_contributions'] = 'Últimas Contribuições de:';
$txt['show_member_contributions'] = 'Ver Contribuições deste membro';
$txt['member_contributionscount'] = 'Contribuições';
$txt['mboards_contributionsEnable'] = 'Activar Contribuições';
$txt['mboards_contributionsEnable_desc'] = 'Os tópicos deste quadro serão Contribuições';
$txt['manageposts_contributions_settings'] = 'Config. Contribuições';
$txt['manageposts_contributions_settings_description'] = 'Aqui, podes configurar todas as preferências referentes às Contribuições.';
$txt['contributionsinTopic']= 'Contribuições, em ponto pequeno, para o Iniciante do Tópico';
$txt['contributionsinTopic_sub']= 'Mostrar a lista na assinatura para o Iniciante do Tópico';
$txt['contributionsinPost']= 'Contribuições, em ponto pequeno, para todos os Utilizadores';
$txt['contributionsinPost_sub']= 'Mostrar a lista na assinatura para todos os Utilizadores';
$txt['contributionsinBoard']= 'Mostrar a Minilist nos quadros de Contribuições';
$txt['contributionsinBoard_sub']= 'Ou então, mostrar a minilist em TODOS os quadros';
$txt['contributionsinList']= 'Tópicos a mostrar nas Contribuições, em ponto pequeno';
$txt['contributionsinList_sub']= 'Número de Contribuições, em ponto pequeno, a mostrar';
$txt['contributionsinRand']= 'Mostrar as Contribuições de maneira aleatória';
$txt['contributionsinRand_sub']= 'Ou então mostrar sempre as últimas Contribuições';
$txt['contributionsonCount']= 'Mostrar a Contagem de Contribuições';
$txt['contributionsonCount_sub']= 'Mostrar a contagem de contribuições ao exibir mensagens';
Nota-1 Esta instalação manual e para membros que tiveram problemas na instalação automática por isso fica aqui disponível.
Nota-2 O Mod de instalação manual serve também que esta a usar outro tema diferente alem do padrão se tiver dificuldades como colocar a Funcionar.
Nota-3 se o modo não funciona após a instalação manual esqueça de fazer refresh pressione as teclas Ctrl + F5