Mensagens recentes

Páginas: 1 2 3 [4] 5 6 ... 10
31
SMF 2.0.X / erro Connect standard MySQL port
« Última mensagem por candidosa2 em 06 de Julho de 2021, 22:25 »
Versão SMF: 2.0.18
Versão do servidor MySQL: 8.0.19

Estou tendo que usar o servidor MySQL em uma porta não padrão por enquanto, mas não consigo conectar o SMF. Eu verifiquei independentemente se o utilizador SMF pode se conectar ao base de dados, portanto, não é um problema de credenciais incorretas.

Citar
Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Problemas de conexão
Desculpe, SMF não conseguiu se conectar ao banco de dados. Isso pode ser causado pelo servidor estar ocupado. Por favor, tente novamente mais tarde.

Citar
$db_type = 'mysql';
$db_server = 'localhost';
$db_name = 'smfpt';
$db_user = '*****';
$db_passwd = '*****';
$ssi_db_user = '';
$ssi_db_passwd = '';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;

Unica coisa que fiz aqui e adicionar
a porta

$db_type = 'mysql';
$db_server = 'localhost';
$db_name = 'smfpt';
$db_user = '*****';
$db_passwd = '*****';
$ssi_db_user = '';
$ssi_db_passwd = '';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;
$db_port = 3306;

32
SMF 2.0.X / Erro na base de dados
« Última mensagem por candidosa2 em 06 de Julho de 2021, 22:21 »
Boa tarde.
Esta a criar um tópico depois de atualizar o php tive o erro
Estou a fazer este tópico para ajudar a comunidade
Eu atualizei meu fórum da versão 2.0.14 para 2.0.18.
Então eu atualizei meu servidor, de PHP5 para PHP7.4.

Eu verifico o fórum e aparentemente funciona, mas não, ao criar um novo tópico recebo este erro:

Erro na base de dados
Field 'edit_reason' doesn't have a default value
Ficheiro: /home/smf/public_html/comunidade/Sources/Subs-Post.php
Linha: 1852

Nota: Parece que a sua base de dados precisa de ser actualizada. Os ficheiros estão na versão SMF 2.0.16, enquanto a sua base de dados está na versão 2.0.10. O erro pode ser eliminado se executar a última versão de upgrade.php.


Assim Resolvi este erro
Vá para sua phpmyadmin -> Sua database -> smf_messages -> Structure -> Change "edit_reason" field ->Default: NULL
33
Aqui no SmfPt / asassas
« Última mensagem por candidosa2 em 06 de Julho de 2021, 22:10 »
sasa
34
SMF 1.1.X / Re: Geradores de tópico
« Última mensagem por candidosa2 em 21 de Agosto de 2020, 17:02 »
sim
e possível
35
Estatísticas / estatísticas do fórum
« Última mensagem por candidosa2 em 05 de Julho de 2020, 20:41 »

boardindex.template.php
pesquisar

Código: [Seleccione]
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}

// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline smalltext">';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
{
echo '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);

// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';
}

echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';

// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}

Código: [Seleccione]
// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<ul class="forum-static">
     <li><div class="fullimg icon-1"></div><div class="forum-konusal"><span>',$context['num_users_online'],'</span><strong><a href="' . $scripturl . '?action=who' . '"> Membro Online</a></strong></div></li>
     <li><div class="fullimg icon-2"></div><div class="forum-konusal"><span>', $context['common_stats']['total_members'], '</span><strong> Total de membros</strong></div></li>
     <li><div class="fullimg icon-3"></div><div class="forum-konusal"><span>', $context['common_stats']['total_topics'], '</span><strong> Total de tópicos</strong></div></li>
     <li><div class="fullimg icon-4"></div><div class="forum-konusal"><span>', $context['common_stats']['total_posts'], ' </span><strong> Total de postes</strong></div></li>
     <li><div class="fullimg icon-5"></div><div class="forum-konusal"><br/>Bem-vindo ao nosso último membro de registro<br/> <b>' . $context['common_stats']['latest_member']['link'] . '</b> </div></li>
    </ul>';
}

index.css

Código: [Seleccione]
ul.forum-static {
    width: 100%;
    list-style: outside none none;
    margin: 0px;
    padding: 0px;
    display: inline-block;
}
ul.forum-static li {
    padding: 0px;
}
ul.forum-static li {
    float: left;
    width: 19%;
    height: 90px;
    display: inline-block;
    margin-left: 6px;
    background: #FFF none repeat scroll 0% 0%;
    position: relative;
}

ul.forum-static li .forum-konusal {
    position: relative;
    top: 0px;
    right: 0px;
    width: 120px;
    height: 90px;
    text-align: center;
}
ul.forum-static li .forum-konusal span {
    position: absolute;
    top: 25px;
    right: 0px;
    width: 120px;
    font-size: 24px;
    text-align: center;
    padding-bottom: 5px;
}
ul.forum-static li .forum-konusal strong {
    position: absolute;
    top: 55px;
    right: 5px;
    width: 105px;
    font-size: 14px;
    text-align: center;
    font-weight: normal;
    border-top: 1px dotted #CCC;
    padding: 3px 5px 0px;
}



.fullimg {
    background-image: url(../images/sprite.png);
    background-repeat: no-repeat;
    background-position: left top;
    background-attachment: scroll;
    position: absolute;
    top: 24px;
    left: 120px;
    width: 42px;
    height: 41px;
}

ul.forum-static li .icon-1 {
    background-position: 0px -92px;
}
ul.forum-static li .icon-2 {
    background-position: 0px -1px;
}
ul.forum-static li .icon-3 {
    background-position: -51px -46px;
}
ul.forum-static li .icon-4 {
    background-position: 0px -46px;
}
ul.forum-static li .icon-5 {
    background-position: -51px -1px;
}
36
Estatísticas / estatísticas top 5 completo
« Última mensagem por candidosa2 em 05 de Julho de 2020, 20:21 »

BoardIndex.template.php

Pesquisar po
Código: [Seleccione]
// This is the "Recent Posts" bar.
 if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
 {
 echo '
 <div class="title_barIC">
 <h4 class="titlebg">
 <span class="ie6_header floatleft">
 <a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
 ', $txt['recent_posts'], '
 </span>
 </h4>
 </div>
 <div class="hslice" id="recent_posts_content">
 <div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
 <div class="entry-content" style="display: none;">
 <a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
 </div>';

 // Only show one post.
 if ($settings['number_recent_posts'] == 1)
 {
 // latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
 echo '
 <strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
 <p id="infocenter_onepost" class="middletext">
 ', $txt['recent_view'], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
 </p>';
 }
 // Show lots of posts.
 elseif (!empty($context['latest_posts']))
 {
 echo '
 <dl id="ic_recentposts" class="middletext">';

 /* Each post in latest_posts has:
 board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
 subject, short_subject (shortened with...), time, link, and href. */
 foreach ($context['latest_posts'] as $post)
 echo '
 <dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
 <dd>', $post['time'], '</dd>';
 echo '
 </dl>';
 }
 echo '
 </div>';
 }

Trocar por

Código: [Seleccione]
echo '
<table class="fulltop" border="0" width="100%" cellspacing="1" cellpadding="2">
<tr class="titlebg">
<td width="20%"><span class="smalltext">' . $txt['Full1'] . '</span></td>
<td width="18%"><span class="smalltext">' . $txt['Full2'] . '</span></td>
<td width="18%"><span class="smalltext">' . $txt['Full3'] . '</span></td>
<td width="30%"><span class="smalltext">' . $txt['Full4'] . '</span></td>
<td width="14%"><span class="smalltext">' . $txt['Full5'] . '</span></td></tr>

<tr>
<td width="20%" valign="top"><table width="100%"><tr>
<td width="75%"><span class="smalltext"><b>' . $txt['Full6'] . '</b></span></td>
<td width="25%" align="right"><span class="smalltext"><b>' . $txt['Full7'] . '</b></span></td></tr>';
foreach ($context['top_posters'] as $poster)
{echo '
<tr><td width="75%"><div style="background-position: 0px 0px;"></div><span class="smalltext">', $poster['link'], '</span></td>
<td width="25%" align="right"><p class="fmavi"><span class="fmavi1">', $poster['num_posts'], '</span></p></td></tr>';
}echo '</table></td>

<td width="18%" valign="top"><table width="100%"><tr>
<td width="75%"><span class="smalltext"><b>' . $txt['Full6'] . '</b></span></td>
<td width="25%" align="right"><span class="smalltext"><b>' . $txt['Full8'] . '</b></span></td></tr>';
foreach ($context['repkarma'] as $member)
{echo '
<tr><td width="75%" valign="top"><div style="background-position: 0px -22px;"></div><span class="smalltext">', $member['link'], '</span></td>
<td width="25%" align="right" valign="top"><p class="fmavi"><span class="fmavi1">', $member['karma'], '</span></p></td></tr>';
}echo '</table></td>

<td width="18%" valign="top"><table width="100%"><tr>
<td width="75%"><span class="smalltext"><b>' . $txt['Full6'] . '</b></span></td>
<td width="25%" align="right"><span class="smalltext"><b>' . $txt['Full9'] . '</b></span></td></tr>';
foreach ($context['top_starters'] as $poster)
{echo '
<tr><td width="75%" valign="top"><div style="background-position: 0px -44px;"></div><span class="smalltext">', $poster['link'], '</span></td>
<td width="25%" align="right" valign="top"><p class="fmavi"><span class="fmavi1">', $poster['num_topics'], '</span></p></td></tr>';
}echo '</table></td>

<td width="30%" valign="top"><table width="100%"><tr>
<td width="80%"><span class="smalltext"><b>' . $txt['Full9'] . '</b></span></td>
<td width="20%" align="right"><span class="smalltext"><b>' . $txt['Full10'] . '</b></span></td></tr>';
foreach ($context['top_topics_views'] as $topic)
{
echo '
<tr><td width="80%" valign="top"><div style="background-position: 0px -198px;"></div><span class="smalltext">', $topic['link'], '</span></td>
<td width="20%" align="right" valign="top"><p class="fmavi"><span class="fmavi1">', $topic['num_views'], '</span></p></td></tr>';
}
echo '</table></td>
<td width="14%" valign="top"><table width="100%"><tr>
<td width="100%"><span class="smalltext"><b>' . $txt['Full6'] . '</b></span></td></tr>';
foreach ($context['new_members'] as $poster)
{echo '
<tr><td width="100%" valign="top"><div style="background-position: 0px -88px;"></div><span class="smalltext">',$poster['link'], '</span></td></tr>';
}echo '</table></td></tr>
<tr>
<td width="100%" colspan="5" height="0"><table width="100%">
<tr class="titlebg">
<td width="30%"><span class="smalltext"><b>' . $txt['Full11'] . '</b></span></td>
<td width="30%"><span class="smalltext"><b>' . $txt['Full12'] . '</b></span></td>
<td width="17%"><span class="smalltext"><b>' . $txt['Full13'] . '</b></span></td>
<td width="23%"><span class="smalltext"><b>' . $txt['Full14'] . '</b></span>' . $txt['Full15'] . '</td></tr></table>
<table  cellspacing="1" width="100%" cellpadding="0"  border="0">';
if (!empty($context['latest_posts']))
foreach ($context['latest_posts'] as $post)
echo '
<tr><td valign="top" width="30%"><div style="background-position: 0px -110px;"></div><span class="smalltext">', $post['board']['link'],  '</span></td>
<td valign="top" width="30%"><div style="background-position: 0px -132px;"></div><span class="smalltext"><a href="',$post['href'],'">', $post['short_subject'], '</a></span></td>
<td valign="top" width="17%"><div style="background-position: 0px -154px;"></div><span class="smalltext">', $post['poster']['link'],'</span></td>
<td valign="top" width="23%"><div style="background-position: 0px -176px;"></div><span class="smalltext">', $post['time'], '</span></td></tr>';
echo '</table></td></tr></table>';

sources/BoardIndex.php

Código: [Seleccione]
$context['page_title'] = sprintf($txt['forum_index'], $context['forum_name']);
Trocar por

Código: [Seleccione]
$context['page_title'] = sprintf($txt['forum_index'], $context['forum_name']);
 global $context, $smcFunc, $txt, $db_prefix, $scripturl, $modSettings;
   $members_result =  $smcFunc['db_query']('', '  SELECT id_member, real_name, posts   FROM {db_prefix}members   ORDER BY id_member DESC   LIMIT 5',array());$context['new_members'] = array();
   while ($row_members = $smcFunc['db_fetch_assoc']($members_result)){$context['new_members'][] = array('name' => $row_members['real_name'],'id' => $row_members['id_member'],'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>' );} $smcFunc['db_free_result']($members_result);$members_result = $smcFunc['db_query']('', '  SELECT id_member, real_name, karma_good   FROM {db_prefix}members   ORDER BY karma_good DESC LIMIT 5');$context['repkarma'] = array();while ($row_members = $smcFunc['db_fetch_assoc']($members_result)){$context['repkarma'][] = array('name' => $row_members['real_name'],'id' => $row_members['id_member'], 'karma' => $row_members['karma_good'], 'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>' );} $smcFunc['db_free_result']($members_result);if (empty($context['repkarma']))return;$members_result = $smcFunc['db_query']('', ' SELECT id_member, real_name, posts FROM {db_prefix}members WHERE posts > {int:no_posts} ORDER BY posts DESC LIMIT 5',array('no_posts' => 0,));$context['top_posters'] = array();$max_num_posts = 1;$context['MemberColor_ID_MEMBER'] = array();
 while ($row_members = $smcFunc['db_fetch_assoc']($members_result)){$context['top_posters'][] = array('name' => $row_members['real_name'],'id' => $row_members['id_member'],'num_posts' => $row_members['posts'],'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>');if ($max_num_posts < $row_members['posts'])$max_num_posts = $row_members['posts'];if (!empty($modSettings['MemberColorStats']) && !empty($row_members['id_member']))$context['MemberColor_ID_MEMBER'][$row_members['id_member']] = $row_members['id_member'];}$smcFunc['db_free_result']($members_result);foreach ($context['top_posters'] as $i => $poster){$context['top_posters'][$i]['post_percent'] = round(($poster['num_posts'] * 100) / $max_num_posts);$context['top_posters'][$i]['num_posts'] = comma_format($context['top_posters'][$i]['num_posts']);}$boards_result = $smcFunc['db_query']('', ' SELECT id_board, name, num_posts FROM {db_prefix}boards AS b WHERE {query_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? ' AND b.id_board != {int:recycle_board}' : '') . ' AND b.redirect = {string:blank_redirect} ORDER BY num_posts DESC LIMIT 5',array('recycle_board' => $modSettings['recycle_board'],'blank_redirect' => '',));$context['top_boards'] = array();$max_num_posts = 1;
 while ($row_board = $smcFunc['db_fetch_assoc']($boards_result)){$context['top_boards'][] = array('id' => $row_board['id_board'],'name' => $row_board['name'],'num_posts' => $row_board['num_posts'],'href' => $scripturl . '?board=' . $row_board['id_board'] . '.0','link' => '<a href="' . $scripturl . '?board=' . $row_board['id_board'] . '.0">' . $row_board['name'] . '</a>');if ($max_num_posts < $row_board['num_posts'])$max_num_posts = $row_board['num_posts'];}
 $smcFunc['db_free_result']($boards_result);
 foreach ($context['top_boards'] as $i => $board){$context['top_boards'][$i]['post_percent'] = round(($board['num_posts'] * 100) / $max_num_posts);$context['top_boards'][$i]['num_posts'] = comma_format($context['top_boards'][$i]['num_posts']);}
 if ($modSettings['totalMessages'] > 100000){$request = $smcFunc['db_query']('', ' SELECT id_topic FROM {db_prefix}topics WHERE num_replies != {int:no_replies}' . ($modSettings['postmod_active'] ? ' AND approved = {int:is_approved}' : '') . ' ORDER BY num_replies DESC LIMIT 100',array('no_replies' => 0,'is_approved' => 1,));
 $topic_ids = array();while ($row = $smcFunc['db_fetch_assoc']($request))$topic_ids[] = $row['id_topic'];$smcFunc['db_free_result']($request);} else $topic_ids = array();
 $topic_view_result = $smcFunc['db_query']('', ' SELECT m.subject, t.num_views, t.id_board, t.id_topic, b.name FROM {db_prefix}topics AS t INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg) INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? ' AND b.id_board != {int:recycle_board}' : '') . ') WHERE {query_see_board}' . (!empty($topic_ids) ? ' AND t.id_topic IN ({array_int:topic_list})' : ($modSettings['postmod_active'] ? ' AND t.approved = {int:is_approved}' : '')) . ' ORDER BY t.num_views DESC LIMIT 5',array('topic_list' => $topic_ids,'recycle_board' => $modSettings['recycle_board'],'is_approved' => 1,));
 $context['top_topics_views'] = array();$max_num_views = 1;
 while ($row_topic_views = $smcFunc['db_fetch_assoc']($topic_view_result))
 {censorText($row_topic_views['subject']);
    $row_topic_views['subject'] = shorten_subject($row_topic_views['subject'], 20);$context['top_topics_views'][] = array('id' => $row_topic_views['id_topic'],'board' => array('id' => $row_topic_views['id_board'],'name' => $row_topic_views['name'],'href' => $scripturl . '?board=' . $row_topic_views['id_board'] . '.0','link' => '<a href="' . $scripturl . '?board=' . $row_topic_views['id_board'] . '.0">' . $row_topic_views['name'] . '</a>'),'subject' => $row_topic_views['subject'],'num_views' => $row_topic_views['num_views'],'href' => $scripturl . '?topic=' . $row_topic_views['id_topic'] . '.0','link' => '<a href="' . $scripturl . '?topic=' . $row_topic_views['id_topic'] . '.0">' . $row_topic_views['subject'] . '</a>');
 if ($max_num_views < $row_topic_views['num_views'])$max_num_views = $row_topic_views['num_views'];}
 $smcFunc['db_free_result']($topic_view_result);
 foreach ($context['top_topics_views'] as $i => $topic)
 {$context['top_topics_views'][$i]['post_percent'] = round(($topic['num_views'] * 100) / $max_num_views);$context['top_topics_views'][$i]['num_views'] = comma_format($context['top_topics_views'][$i]['num_views']);}
 if (($members = cache_get_data('stats_top_starters', 360)) == null)
 {$request = $smcFunc['db_query']('', 'SELECT id_member_started, COUNT(*) AS hits FROM {db_prefix}topics' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? ' WHERE id_board != {int:recycle_board}' : '') . ' GROUP BY id_member_started ORDER BY hits DESC LIMIT 5', array('recycle_board' => $modSettings['recycle_board'],));$members = array();
 while ($row = $smcFunc['db_fetch_assoc']($request))$members[$row['id_member_started']] = $row['hits'];$smcFunc['db_free_result']($request);cache_put_data('stats_top_starters', $members, 360);}
 if (empty($members))$members = array(0 => 0);
 $members_result = $smcFunc['db_query']('', 'SELECT id_member, real_name FROM {db_prefix}members WHERE id_member IN ({array_int:member_list}) ORDER BY FIND_IN_SET(id_member,{string:top_topic_posters})LIMIT 5',array('member_list' => array_keys($members),'top_topic_posters' => implode(',', array_keys($members)),));
 $context['top_starters'] = array();
 $max_num_topics = 1;while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
 {$context['top_starters'][] = array('name' => $row_members['real_name'],'id' => $row_members['id_member'],'num_topics' => $members[$row_members['id_member']],'href' => $scripturl . '?action=profile;u=' . $row_members['id_member'],'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>');
 if ($max_num_topics < $members[$row_members['id_member']])$max_num_topics = $members[$row_members['id_member']];if (!empty($modSettings['MemberColorStats']))$context['MemberColor_ID_MEMBER'][$row_members['id_member']] = $row_members['id_member'];}
 $smcFunc['db_free_result']($members_result);
 foreach ($context['top_starters'] as $i => $topic){$context['top_starters'][$i]['post_percent'] = round(($topic['num_topics'] * 100) / $max_num_topics);$context['top_starters'][$i]['num_topics'] = comma_format($context['top_starters'][$i]['num_topics']);}
   if (!empty($modSettings['MemberColorLinkInstalled']) && !empty($context['MemberColor_ID_MEMBER'])) {$colorDatas = load_onlineColors($context['MemberColor_ID_MEMBER']);$cmemcolid = null;
      if (!empty($modSettings['MemberColorStats'])) {
         foreach($context['top_posters'] as $key => $value)
 {$cmemcolid = $context['top_posters'][$key]['id'];if(!empty($colorDatas[$cmemcolid]['colored_link']))$context['top_posters'][$key]['link'] = $colorDatas[$cmemcolid]['colored_link'];}
         foreach($context['top_starters'] as $key => $value) {$cmemcolid = $context['top_starters'][$key]['id'];if(!empty($colorDatas[$cmemcolid]['colored_link']))$context['top_starters'][$key]['link'] = $colorDatas[$cmemcolid]['colored_link'];}
         foreach($context['new_members'] as $key => $value) {$cmemcolid = $context['new_members'][$key]['id'];if(!empty($colorDatas[$cmemcolid]['colored_link']))$context['new_members'][$key]['link'] = $colorDatas[$cmemcolid]['colored_link'];}
         foreach($context['repkarma'] as $key => $value) {$cmemcolid = $context['repkarma'][$key]['id'];if(!empty($colorDatas[$cmemcolid]['colored_link']))$context['repkarma'][$key]['link'] = $colorDatas[$cmemcolid]['colored_link'];}}
      if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {if(!empty($colorDatas[$modSettings['latestMember']]['colored_link']))$context['latest_member']['link'] = $colorDatas[$modSettings['latestMember']]['colored_link'];}}

Modifications.portuguese_pt.php

Adicionar antes <?

Código: [Seleccione]
txt['Full'] = 'Top 5 Estatísticas completa';
$txt['Full1'] = 'Top 5 Mensagem';
$txt['Full2'] = 'Top 5 Karma';
$txt['Full3'] = 'Top 5 tópico';
$txt['Full4'] = 'Top 5 Tópico Popular';
$txt['Full5'] = 'Novos membros';
$txt['Full6'] = 'Membro';
$txt['Full7'] = 'Mensagem';
$txt['Full8'] = 'Karma';
$txt['Full9'] = 'Tópico';
$txt['Full10'] = 'Interesse';
$txt['Full11'] = 'Categoria respondida';
$txt['Full12'] = 'Tópico Respondido';
$txt['Full13'] = 'Remetente';
$txt['Full14'] = 'História';
$txt['Full15'] = '<a style="float:right;" href="http://comunidade.smfpt.net/" title="smfpt"><small>smfpt</small></a><div style="float:right;background-position: 0px -66px;"></div>';

index.css

Adicionar

Código: [Seleccione]
.fulltop div{background:url(../images/fulltop.png); width: 12px; height: 12px; float: left; margin-top: 2px;}
 .fmavi {position: relative;}
 .fmavi1 {
    position: absolute;
    right: 0px;
    top: 0px;
    max-width: 2.5em;
    min-width: 1.2em;
    height: 1.2em;
    line-height: 1.2em;
    text-align: center;
    font-family: Arial;
    font-weight: bold;
    color: #FFF;
    text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15);
    box-shadow: 0px 1px 0px rgba(255, 255, 255, 0.35) inset, 0px 1px 1px rgba(0, 0, 0, 0.2);
    border-radius: 4em;
    transition: top 0.3s ease-in 0s, opacity 0.3s ease-in 0s;
    background-image: linear-gradient(#09F, #557EA0);
    border: 1px solid #557EA0;
}

37
Link / Anúncios Como o Advertising
« Última mensagem por candidosa2 em 05 de Julho de 2020, 19:15 »

index.template.php Pesquisar
Código: [Seleccione]
// The main content should go here.
echo '
<div id="content_section"><div class="frame">
<div id="main_content_section">';

adicionar acima da pesquisa

Código: [Seleccione]
cho '
<br />
    <table border="0" width="100%" class="tborder" cellspacing="' , ($context['browser']['is_ie'] || $context['browser']['is_opera6']) ? '1' : '0' , '" cellpadding="4" style="margin-bottom: 2ex;">
        <tr>
            <td class="catbg">Publicidades by smfpt.net</td>       
</tr>
        <tr>
            <td valign="middle" align="center" height="60">';
echo'

O código do anúncio será colocado aqui.
</td></tr>
</table>';
38
Link / Anúncio de subtópico (adicionando anúncio para o primeiro tópico)
« Última mensagem por candidosa2 em 05 de Julho de 2020, 19:03 »

Display.template.php

Pesquisar
Código: [Seleccione]
echo '
</div>
<div class="smalltext reportlinks">';

Adicionar acima

Código: [Seleccione]
// Início do anúncio de texto subtópico smfpt.net
     if ($message['id'] == $context['first_message'])

echo ' Google adicione anúncios ou códigos de um site de anúncios diferente aqui.


       <br /><br />';
// Fim do anúncio com texto da smfpt.net
39
Assunto / ocultando a primeira mensagem do assunto para visitante
« Última mensagem por candidosa2 em 05 de Julho de 2020, 16:08 »
Para quem quiser ocultar para os visitante


Conforme o seu tema mais fiz teste com default

tema/Display.template.php
Pesquisar por
Código: [Seleccione]
<div class="approve_post">
 ', $txt['post_awaiting_approval'], '
 </div>';
 echo '
 <div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
 </div>';

Alterar por
Código: [Seleccione]
<div class="approve_post">
', $txt['post_awaiting_approval'], '
</div><div class="inner" id="msg_', $message['id'], '"', '>';
if ($context['first_message']==$message['id'])
{
if ($context['user']['is_guest'])
    {
echo'
<div id="registarapl">
<img class="detailresim" src="' . $settings['images_url'] . '/registarapl.png" alt="*" />
<span><b>'.$txt['registarapl1'].'</b><br />'.$txt['registarapl2'].'</span>
</div>';
    }
    else{echo '', $message['body'], '';}
    }
else{echo '', $message['body'], '';}
echo '</div></div>';

Adicione na parte inferior do ficheiro index.css do seu tema
Código: [Seleccione]
div#registarapl
{
 float:left;
 padding:25px;
 margin:0 25px;
 font-size: 1em;
 margin:10px;
 text-align:center;
 margin-bottom: 1em;
 display:block;
 background:url(../images/aplfundo.png) 3% 100% no-repeat;
}
div#registarapl span
{
 margin-left:150px;
 margin-right:100px;
 padding:25px 10px 25px 10px;
 display:block;
 color:#333;
 font-family:Calibri;
 font-size:18px;
 font-weight:bold;
 border: 1px solid #005875;
 background: #C1E0FF;
 border-radius:15px;
 -moz-border-radius:15px;
 -o-border-radius:15px;
 -webkit-border-radius:15px;
 line-height:40px;
}
div#registarapl span a
{
 padding:2px 4px;
 color:#FFF;
 font-size:18px;
 font-weight:bold;
 border: 1px solid #005875;
 border-radius:5px;
 -moz-border-radius:5px;
 -o-border-radius:5px;
 -webkit-border-radius:5px;
 line-height:18px;
 background-color: #0E5F85;
}
div#registarapl span a:hover
{
 color: #0E5F85;
 background-color:#FFF;
}
div#registarapl span b
{
 padding-left:10px;
 color:#005875;
 font-family:Calibri;
 font-size:24px;
}

div#registarapl img
{
 float:left;
 padding-bottom:25px;
}


Adicionar modifications.portuguese_pt.php tem no anexo

Código: [Seleccione]
$txt['registarapl'] = 'inscrever-se';
$txt['registarapl1'] = 'Percebemos que você não é nosso membro registado...';
$txt['registarapl2'] = 'Para fazer melhor uso do nosso site <a href="'.$scripturl.'?action=register" title="Registo">Registar</a> Você deve ser...';

Jogue imagens anexadas na pasta da sua imagem
40
Mensagem / Re: Thank-O-Matic Manual 2.0RC5
« Última mensagem por candidosa2 em 21 de Junho de 2020, 21:23 »
Se não aparecer no admin em que adicionar

Sources/Admin.php
For Configuration>Thank-O-Matic
Pesquisar:
Código: [Seleccione]
'serversettings' => array(
'label' => $txt['admin_server_settings'],
'file' => 'ManageServer.php',
'function' => 'ModifySettings',
'icon' => 'server.gif',
'subsections' => array(
'general' => array($txt['general_settings']),
'database' => array($txt['database_paths_settings']),
'cookie' => array($txt['cookies_sessions_settings']),
'cache' => array($txt['caching_settings']),
'loads' => array($txt['load_balancing_settings']),
),
),


Adicionar por baixo:
Código: [Seleccione]
'thankyoupostsettings' => array(
'label' => $txt['thankyouposttitle'],
'file' => 'ManageThankYouPost.php',
'function' => 'ManageThankYouPost',
'icon' => 'thank_you_settings.gif',
'subsections' => array(
'general' => array($txt['general_settings']),
'layout' => array($txt['mods_cat_layout']),
'permission' => array($txt['edit_permissions'], 'enabled' => allowedTo('manage_permissions')),
'boards' => array($txt['admin_boards']),
'modrelated' => array($txt['thxmodification']),
),
),

and for Maintenance>Maintaince Thank-O-Matic

Pesquisar:
Código: [Seleccione]
'reports' => array(
'enabled' => in_array('rg', $context['admin_features']),
'label' => $txt['generate_reports'],
'file' => 'Reports.php',
'function' => 'ReportsMain',
'icon' => 'reports.gif',
),

Adicionar por Baixo:
Código: [Seleccione]
'maintainThankYouPost' => array(
'label' => $txt['maintain_thxpost'],
'file' => 'ThankYouPost-Maintaince.php',
'icon' => 'thank_you_maintain.gif',
'function' => 'ManageMaintenanceThankYouPost',
'subsections' => array(
'maintain' => array($txt['maintain_thank_you_post_maintainaince'], 'admin_forum'),
'recount' => array($txt['maintain_thank_you_post_recount'], 'admin_forum'),
),
),
Páginas: 1 2 3 [4] 5 6 ... 10