SMFPT - Suporte e Manutenção de Fórum em Português
		SMF 1.1.x (Móbulos Manual) => SMF 1.1.x Módulos Manual => Agradecimentos => Tópico iniciado por: candidosa2 em 16 de Novembro de 2008, 12:29
		
			
			- 
				[completo]Esta instalação é para a Versão 1.1.5,1.1.6,1.1.7[/completo]
 
 [informacao]Ponha o arquivo na pasta do fórum e para pode actualizar a base de dado. [/informacao]
 Arquivo: install_1.x.x.php
 
 os arquivos devem ser carregados para o destino determinado.
 
 Lista de Ficheiros Fonte:
 
 Arquivo: ThankYouPost.php cópia de Destino: $ sourcedir ( esta no anexo )
 
 Lista de Arquivos para Tema:
 
 Arquivo: thank_you_b.gif cópia de Destino: $ themedir / images / botões
 Arquivo: thank_you.gif cópia de Destino: $ themedir / images / portuguese_p
 Arquivo: thank_you_delete.gif cópia de Destino: $ themedir / images / portuguese_p
 Arquivo: thank_you_lock1.gif cópia de Destino: $ themedir / images / portuguese_p
 Arquivo: thank_you_lock2.gif cópia de Destino: $ themedir / images / portuguese_pt
 Arquivo: ThankYouPost.template.php cópia de Destino: $ themedir
 
 Lista de Língua Ficheiros:
 
 Arquivo: ThankYouPost.portuguese_pt.php cópia de Destino: $ languagedir
 
 Ta bem esta o ficheiro completo no Anexo ja em pt com Suporte Utf8
 
 
 $boarddir/index.php
 
 Pesquisar
 'theme' => array('Themes.php', 'ThemesMain'),
 Adicionar por Baixo
 'thankyou' => array('ThankYouPost.php', 'ThankYou'),
 'thankyoupostlock' => array('ThankYouPost.php', 'ThankYouPostLock'),
 'thankyoupostlist' => array('ThankYouPost.php', 'ThankYouPostListShow'),
 'thankyoupostdelete' => array('ThankYouPost.php', 'ThankYouPostDelete'),
 'thankyoupostdm' => array('ThankYouPost.php', 'ThankYouPostDeletePost'),
 'thankyoupostcloseall' => array('ThankYouPost.php', 'ThankYouPostCloseAll'),
 'thankyoupostunlockall' => array('ThankYouPost.php', 'ThankYouPostUnlockAllPosts'),
 'thankyoupostrecountall' => array('ThankYouPost.php', 'ThankYouPostRecountAll'),
 'thankyoupostrepairtable' => array('ThankYouPost.php', 'ThankYouPostRepairTable'),
 
 $boarddir/SSI.php
 
 Pesquisar
 // Check the passed ID_MEMBER/password.  If $is_username is true, treats $id as a username.
 Adicionar Substituindo
 // Shows the top Thank You Resive.
 function ssi_thankYouPostTopResived($topMembers = 5, $output_method = 'echo')
 {
 global $db_prefix, $txt, $scripturl, $modSettings;
 
 // Find the latest poster.
 $request = db_query("
 SELECT ID_MEMBER, realName, thank_you_post_became, thank_you_post_made
 FROM {$db_prefix}members
 ORDER BY thank_you_post_became DESC
 LIMIT $topMembers", __FILE__, __LINE__);
 $return = array();
 while ($row = mysql_fetch_assoc($request))
 $return[] = array(
 'id' => $row['ID_MEMBER'],
 'name' => $row['realName'],
 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
 'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
 'thank_you_post_became' => $row['thank_you_post_became'],
 'thank_you_post_made' => $row['thank_you_post_made']
 );
 mysql_free_result($request);
 
 if ($output_method != 'echo')
 return $return;
 
 if(empty($return))
 return;
 
 echo '
 <table class="ssi_table">
 <tr>
 <th align="left"></th>
 <th align="left">', $txt['thank_you_post_became_display'], '</th>
 <th align="left">', $txt['thank_you_post_made_display'], '</th>
 </tr>';
 foreach ($return as $temp)
 echo '
 <tr>
 <td align="left">
 ', $temp['link'], '
 </td>
 <td align="right">', $temp['thank_you_post_became'], '</td>
 <td align="right">', $temp['thank_you_post_made'], '</td>
 </tr>';
 echo '
 </table>';
 }
 
 // Shows the top Thank You Given.
 function ssi_thankYouPostTopGiven($topMembers = 5, $output_method = 'echo')
 {
 global $db_prefix, $txt, $scripturl, $modSettings;
 
 // Find the latest poster.
 $request = db_query("
 SELECT ID_MEMBER, realName, thank_you_post_became, thank_you_post_made
 FROM {$db_prefix}members
 ORDER BY thank_you_post_made DESC
 LIMIT $topMembers", __FILE__, __LINE__);
 $return = array();
 while ($row = mysql_fetch_assoc($request))
 $return[] = array(
 'id' => $row['ID_MEMBER'],
 'name' => $row['realName'],
 'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
 'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">' . $row['realName'] . '</a>',
 'thank_you_post_became' => $row['thank_you_post_became'],
 'thank_you_post_made' => $row['thank_you_post_made']
 );
 mysql_free_result($request);
 
 if ($output_method != 'echo')
 return $return;
 
 if(empty($return))
 return;
 
 echo '
 <table class="ssi_table">
 <tr>
 <th align="left"></th>
 <th align="left">', $txt['thank_you_post_made_display'], '</th>
 <th align="left">', $txt['thank_you_post_became_display'], '</th>
 </tr>';
 foreach ($return as $temp)
 echo '
 <tr>
 <td align="left">
 ', $temp['link'], '
 </td>
 <td align="right">', $temp['thank_you_post_made'], '</td>
 <td align="right">', $temp['thank_you_post_became'], '</td>
 </tr>';
 echo '
 </table>';
 }
 
 // Check the passed ID_MEMBER/password.  If $is_username is true, treats $id as a username.
 
 $boarddir/ssi_examples.php
 
 Pesquisar
 <?php ssi_recentEvents(); flush(); ?>
 
 <hr />
 
 Adicionar e Substituir por
 <?php ssi_recentEvents(); flush(); ?>
 
 <hr />
 
 <h3>Top Thank You Received Function: <?php ssi_thankYouPostTopResived(); ?></h3>
 <?php ssi_thankYouPostTopResived(); flush(); ?>
 
 <hr />
 
 <h3>Top Thank You Given Function: <?php ssi_thankYouPostTopGiven(); ?></h3>
 <?php ssi_thankYouPostTopGiven(); flush(); ?>
 
 <hr />
 
 $sourcedir/Display.php
 
 Pesquisar por
 t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.ID_LAST_MSG,
 Substituir por
 t.thank_you_post_locked,
 t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.ID_LAST_MSG,
 
 Pesquisar
 $context['is_hot'] = $topicinfo['numReplies'] >= $modSettings['hotTopicPosts']; 
 Substituir por
 $context['is_hot'] = $topicinfo['numReplies'] >= $modSettings['hotTopicPosts'];
 
 //Some Thanky You things ;)
 $context['is_thank_you_post_locked'] = $topicinfo['thank_you_post_locked'];
 $context['thank_you_lock_allowed'] = !empty($board_info['thank_you_post_enable']) && !$user_info['is_guest'] && (allowedTo('thank_you_post_lock_all_any') || (allowedTo('thank_you_post_lock_all_own') && $ID_MEMBER == $topicinfo['ID_MEMBER_STARTED']));
 $context['thank_you_post_enable'] = $board_info['thank_you_post_enable'];
 $context['thank_you_post_unlock_all'] = false;
 
 Pesquisar
 FROM {$db_prefix}messages
 WHERE ID_TOPIC = $topic
 ORDER BY ID_MSG " . ($ascending ? '' : 'DESC') . ($modSettings['defaultMaxMessages'] == -1 ? '' : "
 Adicionar
 ".($board_info['thank_you_post_enable'] ? ", thank_you_post" : "")."
 
 Pesquisar
 $messages = array();
 $posters = array();
 Adicionar
 $thank_you_posts = array();
 Pesquisar
 if (!empty($row['ID_MEMBER']))
 $posters[] = $row['ID_MEMBER'];
 $messages[] = $row['ID_MSG'];
 Adicionar
 if (!empty($row['thank_you_post']))
 $thank_you_posts[] = $row['ID_MSG'];
 Pesquisar
 // This is better than sorting it with the query...
 ksort($temp);
 
 foreach ($temp as $row)
 $attachments[$row['ID_MSG']][] = $row;
 }
 Adicionar
 $context['thank_you_post']['postet_thanks'] = array();
 $context['thank_you_post']['topic'] = null;
 
 //The user will a thank you list?
 if($board_info['thank_you_post_enable'] && (allowedTo('thank_you_post_show') || allowedTo('thank_you_post_post'))) {
 if(!empty($modSettings['thankYouPostPreview']) && !empty($thank_you_posts) && allowedTo('thank_you_post_show')) {
 //Should i gernerate a list? Need a extra query :)
 include($sourcedir.'/ThankYouPost.php');
 ThankYouPostList($thank_you_posts, true);
 }
 //Okay no preview so in need to load the data extra for this :)
 if(empty($modSettings['thankYouPostOnePerPost']) || (!empty($thank_you_posts) && !empty($ID_MEMBER) && allowedTo('thank_you_post_post'))) {
 //Search for one made or the made one in the thread ;)
 $thx = db_query("
 SELECT ID_THX_POST, ID_MSG
 FROM {$db_prefix}thank_you_post
 WHERE ID_TOPIC = $topic
 ".(!empty($modSettings['thankYouPostOnePerPost']) ? "AND ID_MSG IN (".implode(', ', $thank_you_posts).")" : "")."
 AND ID_MEMBER = $ID_MEMBER
 ".(empty($modSettings['thankYouPostOnePerPost']) ? "LIMIT 1" : ""), __FILE__, __LINE__);
 
 while($row = mysql_fetch_assoc($thx)) {
 $context['thank_you_post']['postet_thanks'][$row['ID_MSG']] = $row['ID_THX_POST'];
 }
 mysql_free_result($thx);
 
 $context['thank_you_post']['topic'] = $topic;
 
 //Okay Hide Tag Special Handling in Thank You Mod
 if(!empty($modSettings['thankYouPostDisableUnhide']))
 $context['user_post_avaible'] = 0;
 //Unhide all after one post?
 if(!empty($modSettings['thankYouPostThxUnhideAll']) && !empty($context['thank_you_post']['topic']))
 $context['user_post_avaible'] = 1;
 }
 }
 
 Pesquisar
 ID_MSG_MODIFIED < $topicinfo[new_from] AS isRead
 FROM {$db_prefix}messages
 Adicionar
 ".($board_info['thank_you_post_enable'] && allowedTo('thank_you_post_show') ? "thank_you_post, thank_you_post_counter," : "")."
 Pesquisar
 // Do the censor thang.
 censorText($message['body']);
 censorText($message['subject']);
 Adicionar
 Sonrasina Ekle
 //Second Option for unhide content, for special hide tag
 $disable_unhideafter = false;
 if(!empty($modSettings['thankYouPostUnhidePost']) && empty($context['user_post_avaible']) && isset($context['thank_you_post']['postet_thanks'][$message['ID_MSG']]) && empty($modSettings['thankYouPostThxUnhideAll'])) {
 $disable_unhideafter = true;
 $context['user_post_avaible'] = 1;
 }
 Pesquisar
 'can_see_ip' => allowedTo('moderate_forum') || ($message['ID_MEMBER'] == $ID_MEMBER && !empty($ID_MEMBER)),
 Adicionar
 'thank_you_post' => array(
 'post' => $context['thank_you_post_enable'] && empty($context['is_thank_you_post_locked']) && allowedTo('thank_you_post_post') && $ID_MEMBER != $message['ID_MEMBER'] && !isset($context['thank_you_post']['postet_thanks'][$message['ID_MSG']]) && !(empty($modSettings['thankYouPostOnePerPost']) && !empty($context['thank_you_post']['topic'])),
 'lock' => $context['thank_you_post_enable'] && empty($context['is_thank_you_post_locked']) && (allowedTo('thank_you_post_lock_any') || (allowedTo('thank_you_post_lock_own') && $ID_MEMBER == $message['ID_MEMBER'])),
 'delete' => $context['thank_you_post_enable'] && allowedTo('thank_you_post_delete_any') || (allowedTo('thank_you_post_delete_own') && $ID_MEMBER == $message['ID_MEMBER']),
 'counter' => $context['thank_you_post_enable'] && !empty($message['thank_you_post_counter']) ? $message['thank_you_post_counter'] : '0',
 'locked' => $context['thank_you_post_enable'] && !empty($message['thank_you_post']) && $message['thank_you_post'] > 1,
 'isThankYouPost' => $context['thank_you_post_enable'] && !empty($message['thank_you_post']) && $message['thank_you_post'] >= 1,
 'href' => $context['thank_you_post_enable'] ? $scripturl . '?action=thankyoupostlist;topic=' . $topic . '.0;msg='.$message['ID_MSG'] : '',
 ),
 Pesquisar
 if (empty($options['view_newest_first']))
 $counter++;
 else
 $counter--;
 
 Adicionar
 //This Options apear only if realy a thank you is in there, and one is locked *g*
 if($context['thank_you_post_enable'] && allowedTo('thank_you_post_unlock_all') && !empty($message['thank_you_post']) && $message['thank_you_post'] > 1)
 $context['thank_you_post_unlock_all'] = true;
 
 //Second Option for unhide content, for special hide tag
 if($disable_unhideafter)
 $context['user_post_avaible'] = 0;
 
 
 
 $sourcedir/Load.php
 
 Pesquisar
 b.ID_THEME, b.override_theme, b.permission_mode, b.countPosts
 Adicionar substituindo por este
 b.ID_THEME, b.override_theme, b.permission_mode, b.countPosts
 , thank_you_post_enable
 
 Pesquisar
 'posts_count' => empty($row['countPosts']),
 Adicionar substituindo por este
 'posts_count' => empty($row['countPosts']),
 'thank_you_post_enable' => empty($row['thank_you_post_enable']),
 Pesquisar
 mem.birthdate, mem.memberIP, mem.memberIP2, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin,
 mem.karmaGood, mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
 Adicionar
 mem.thank_you_post_made, mem.thank_you_post_became,
 Pesquisar
 mem.timeFormat, mem.secretQuestion, mem.is_activated, mem.additionalGroups, mem.smileySet, mem.showOnline,
 mem.totalTimeLoggedIn, mem.ID_POST_GROUP, mem.notifyAnnouncements, mem.notifyOnce, mem.notifySendBody,
 Adicionar
 mem.thank_you_post_made, mem.thank_you_post_became,
 
 Pesquisar
 mem.ID_MEMBER, mem.memberName, mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered,
 Adicionar
 mem.thank_you_post_made, mem.thank_you_post_became,
 Pesquisar
 'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),
 Adicionar
 'thank_you_post' => array(
 'made' => &$profile['thank_you_post_made'],
 'became' => &$profile['thank_you_post_became'],
 ),
 
 $sourcedir/ManageBoards.php
 
 Pesquisar
 'permission_mode' => 'normal',
 Adicionar
 'thank_you_post_enable' => 0,
 Pesquisar
 $boardOptions['posts_count'] = isset($_POST['count']);
 Adicionar
 $boardOptions['thank_you_post_enable'] = isset($_POST['thank_you_post_enable']);
 
 $sourcedir/ManagePermissions.php
 
 Pesquisar
 'profile_view_own',
 'profile_identity_own',
 Adicionar
 'thank_you_post_show',
 Pesquisar
 'report_any',
 'send_topic',
 Adicionar
 'thank_you_post_post',
 'thank_you_post_lock_own',
 'thank_you_post_lock_any',
 'thank_you_post_delete_own',
 'thank_you_post_delete_any',
 'thank_you_post_delete_mem_own',
 'thank_you_post_delete_mem_any',
 'thank_you_post_lock_all_own',
 'thank_you_post_lock_all_any',
 Pesquisar
 'notification' => array(
 'mark_any_notify' => false,
 'mark_notify' => false,
 ),
 Adicionar
 'thank_you_post' => array(
 'thank_you_post_post' => false,
 'thank_you_post_show' => false,
 'thank_you_post_delete' => true,
 'thank_you_post_lock' => true,
 'thank_you_post_lock_all' => true,
 'thank_you_post_unlock_all' => false,
 'thank_you_post_delete_mem' => true,
 ),
 
 Pesquisar
 'manage_bans',
 'send_mail',
 Adicionar
 'thank_you_post_post',
 'thank_you_post_lock',
 'thank_you_post_delete',
 'thank_you_post_delete_mem',
 'thank_you_post_lock_all',
 'thank_you_post_unlock_all',
 
 $sourcedir/ModSettings.php
 Pesquisar
 'layout' => 'ModifyLayoutSettings',
 Adicionar
 'thankyoupost' => 'ModifyThankYouPostSettings',
 Pesquisar
 'layout' => array(
 'title' => $txt['mods_cat_layout'],
 'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
 ),
 Adicionar
 'thankyoupost' => array(
 'title' => $txt['thankyouposttitle'],
 'href' => $scripturl . '?action=featuresettings;sa=thankyoupost;sesc=' . $context['session_id'],
 ),
 Pesquisar
 $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=karma';
 $context['settings_title'] = $txt['smf293'];
 
 prepareDBSettingContext($config_vars);
 }
 Pesquisar
 'layout' => 'ModifyLayoutSettings',
 Adicionar
 'thankyoupost' => 'ModifyThankYouPostSettings',
 Ou
 function ModifyThankYouPostSettings()
 {
 global $txt, $scripturl, $context, $settings, $sc;
 
 $config_vars = array(
 // Thank You Post, some Stanadard settings :)
 array('check', 'thankYouPostOnePerPost'),
 array('check', 'thankYouPostColors'),
 array('check', 'thankYouPostDisplayPage'),
 '',
 // Okay only the preview settings :)
 array('check', 'thankYouPostPreview'),
 array('int', 'thankYouPostPreviewHM'),
 array('select', 'thankYouPostPreviewOrder', explode('|', $txt['thankYouPostPreviewOrderSelect'])),
 '',
 // Okay only the Full List settings :)
 array('select', 'thankYouPostFullOrder', explode('|', $txt['thankYouPostFullOrderSelect'])),
 '',
 //Hmm it'S compatible to my Hide Mod... and have two options xD
 array('check', 'thankYouPostUnhidePost'),
 array('check', 'thankYouPostThxUnhideAll'),
 array('check', 'thankYouPostDisableUnhide'),
 );
 
 // Saving?
 if (isset($_GET['save']))
 {
 saveDBSettings($config_vars);
 redirectexit('action=featuresettings;sa=thankyoupost');
 }
 
 $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=thankyoupost';
 $context['settings_title'] = $txt['thankyouposttitle'];
 
 prepareDBSettingContext($config_vars);
 }
 $sourcedir/MoveTopic.php
 Pesquisar
 db_query("
 UPDATE {$db_prefix}calendar
 SET ID_BOARD = $toBoard
 WHERE ID_TOPIC $condition
 LIMIT $numTopics", __FILE__, __LINE__);
 Adicionar
 // Move the thank you's to the the new Board :)
 db_query("
 UPDATE {$db_prefix}thank_you_post
 SET ID_BOARD = $toBoard
 WHERE ID_TOPIC $condition", __FILE__, __LINE__);
 $sourcedir/Profile.php
 Pesquisar
 'website' => array(
 'title' => !isset($user_profile[$memID]['websiteTitle']) ? '' : $user_profile[$memID]['websiteTitle'],
 'url' => !isset($user_profile[$memID]['websiteUrl']) ? '' : $user_profile[$memID]['websiteUrl'],
 ),
 Adicionar
 'thank_you_post' => array(
 'made' => !isset($user_profile[$memID]['thank_you_post_made']) ? '0' : $user_profile[$memID]['thank_you_post_made'],
 'became' => !isset($user_profile[$memID]['thank_you_post_became']) ? '0' : $user_profile[$memID]['thank_you_post_became'],
 ),
 Pesquisar
 // Change the number of posts.
 if (isset($_POST['posts']) && allowedTo('moderate_forum'))
 $profile_vars['posts'] = $_POST['posts'] != '' ? (int) strtr($_POST['posts'], array(',' => '', '.' => '', ' ' => '')) : '\'\'';
 Adicionar
 // Change the Thank You Post settings :), something only the admin can do ;) or people who allowed to moderate the forum ;)
 if (isset($_POST['thank_you_post_made']) && allowedTo('moderate_forum'))
 $profile_vars['thank_you_post_made'] = $_POST['thank_you_post_made'] != '' ? (int) strtr($_POST['thank_you_post_made'], array(',' => '', '.' => '', ' ' => '')) : '\'\'';
 if (isset($_POST['thank_you_post_became']) && allowedTo('moderate_forum'))
 $profile_vars['thank_you_post_became'] = $_POST['thank_you_post_became'] != '' ? (int) strtr($_POST['thank_you_post_became'], array(',' => '', '.' => '', ' ' => '')) : '\'\'';
 
 
 $sourcedir/RemoveTopic.php
 Pesquisar
 UPDATE {$db_prefix}messages
 SET icon = 'recycled'
 Adicionar
 , thank_you_post = IF(thank_you_post = 1, 2, thank_you_post)
 Pesquisar
 // Mark recycled topic as read.
 Adicionar
 //Okay i changed above... it lock the thank you ;P so it's not possible to made more thanks in the junkyard
 Pesquisar
 // Make sure this message isn't getting deleted later on.
 Adicionar
 // Okay the thank you must be moved to the recycler too ;)
 db_query("
 UPDATE {$db_prefix}thank_you_post
 SET
 ID_TOPIC = $topicID,
 ID_BOARD = $modSettings[recycle_board]
 WHERE ID_MSG = $message", __FILE__, __LINE__);
 Pesquisar
 // Delete anything related to the topic.
 db_query("
 DELETE FROM {$db_prefix}messages
 WHERE ID_TOPIC $condition", __FILE__, __LINE__);
 Adicionar
 //Delete the Thank You Posts from this topics, before the message removed... i need the starter of the messages <<
 require_once($sourcedir.'/ThankYouPost.php');
 ThankYouPostRemoveTopics($topics);
 
 $sourcedir/Security.php
 Pesquisar
 'move_any',
 'send_topic',
 Adicionar
 'thank_you_post_post', 'thank_you_post_lock_own', 'thank_you_post_lock_any', 
 'thank_you_post_delete_own', 'thank_you_post_delete_any',
 'thank_you_post_delete_mem_own', 'thank_you_post_delete_mem_any',
 'thank_you_post_lock_all_own', 'thank_you_post_lock_all_any',
 'thank_you_post_unlock_all',
 
 $sourcedir/SplitTopics.php
 Pesquisar
 // Cache the new topics subject... we can do it now as all the subjects are the same!
 updateStats('subject', $split2_ID_TOPIC, $new_subject);
Adicionar
 //Move the Thank You Post over to the other topic... bäh this is work :(
 db_query("
 UPDATE {$db_prefix}thank_you_post
 SET
 ID_TOPIC = $split2_ID_TOPIC
 WHERE ID_MSG IN ($postList)", __FILE__, __LINE__);
 Pesquisar
 // Merge log topic entries.
 Adicionar
 // Change the Thank You post to the new board and topic ;D
 db_query("
 UPDATE {$db_prefix}thank_you_post
 SET
 ID_TOPIC = $ID_TOPIC,
 ID_BOARD = $target_board
 WHERE ID_TOPIC IN (" . implode(', ', $deleted_topics) . ")", __FILE__, __LINE__);
 $sourcedir/Subs.php
 Pesquisar
 if (isset($data['unreadMessages']))
 $data['unreadMessages'] = 'IF(' . $data['unreadMessages'] . ' < 0, 0, ' . $data['unreadMessages'] . ')';
Adicionar
 if (isset($data['thank_you_post_became']))
 $data['thank_you_post_became'] = 'IF(' . $data['thank_you_post_became'] . ' < 0, 0, ' . $data['thank_you_post_became'] . ')';
 if (isset($data['thank_you_post_made']))
 $data['thank_you_post_made'] = 'IF(' . $data['thank_you_post_made'] . ' < 0, 0, ' . $data['thank_you_post_made'] . ')';
 
 
 $sourcedir/Subs-Boards.php
 Pesquisar
 // This setting is a little twisted in the database...
 if (isset($boardOptions['posts_count']))
 $boardUpdates[] = 'countPosts = ' . ($boardOptions['posts_count'] ? '0' : '1');
 Adicionar
 // So enable or disable the Thank You Post in a board :D...
 if (isset($boardOptions['thank_you_post_enable']))
 $boardUpdates[] = 'thank_you_post_enable = ' . ($boardOptions['thank_you_post_enable'] ? '0' : '1');
 Pesquisar
 'posts_count' => true,
 Adicionar
 'thank_you_post_enable' => false,
 Pesquisar
 // Delete any message icons that only appear on these boards.
 db_query("
 DELETE FROM {$db_prefix}message_icons
 WHERE ID_BOARD IN (" . implode(', ', $boards_to_remove) . ')', __FILE__, __LINE__);
 Adicionar
 // Delete any Thank You Posts that only appear on these boards.
 db_query("
 DELETE FROM {$db_prefix}thank_you_post
 WHERE ID_BOARD IN (" . implode(', ', $boards_to_remove) . ')', __FILE__, __LINE__);
 Pesquisar
 b.boardOrder, b.countPosts, b.memberGroups, b.ID_THEME, b.override_theme,
 Adicionar
 thank_you_post_enable,
 Pesquisar
 'count_posts' => empty($row['countPosts']),
 Adicionar
 'thank_you_post_enable' => empty($row['thank_you_post_enable']),
 
 $themedir/Admin.template.php
 
 Pesquisar
 <a href="' . $scripturl . '?action=convertentities">' . $txt['entity_convert_title'] . '</a><br />' : '', '
 Adicionar
 $txt['maintain_thxpostrecount'] = 'Recalcular agradecimento estatiticas';
 $txt['maintain_thxpostrepair'] = 'Reparação e otimizar Agradecimento as tabelas';
 $themedir/Display.template.php
 Pesquisar
 else
 unset($normal_buttons['custom']);
Adicionar
 //Special Lock for the Thank You :)
 if($context['thank_you_lock_allowed'])
 if(empty($context['is_thank_you_post_locked']))
 $normal_buttons['thankyoupostlock'] = array('text' => 'thank_you_post_lock_all_b', 'image' => 'thank_you_lock1.gif', 'lang' => true, 'url' => $scripturl . '?action=thankyoupostcloseall;topic=' . $context['current_topic']);
 else
 $normal_buttons['thankyoupostlock'] = array('text' => 'thank_you_post_open_all_b', 'image' => 'thank_you_lock2.gif', 'lang' => true, 'url' => $scripturl . '?action=thankyoupostcloseall;topic=' . $context['current_topic']);
 Pesquisar
 $split_button = create_button('split.gif', 'smf251', 'smf251', 'align="middle"');
 Adicionar
 $thankyoupostpost_button = create_button('thank_you_b.gif', 'thank_you_post_post_b', 'thank_you_post_post_b', 'align="middle"');
 $thankyoupostlock_button = create_button('thank_you_b.gif', 'thank_you_post_lock_b', 'thank_you_post_lock_b', 'align="middle"');
 $thankyoupostopen_button = create_button('thank_you_b.gif', 'thank_you_post_open_b', 'thank_you_post_open_b', 'align="middle"');
 $thankyoupostdelete_button = create_button('thank_you_b.gif', 'thank_you_post_delete_b', 'thank_you_post_delete_b', 'align="middle"');
 Pesquisar
 // Show avatars, images, etc.?
 Adicionar
 if(!empty($modSettings['thankYouPostDisplayPage'])) {
 echo '
 ', $txt['thank_you_post_thx_display'], '<br />
 -', $txt['thank_you_post_made_display'], ': ', $message['member']['thank_you_post']['made'], '<br />
 -', $txt['thank_you_post_became_display'], ': ', $message['member']['thank_you_post']['became'], '<br />
 <br />';
 }
 Pesquisar
 // What about splitting it off the rest of the topic?
 if ($context['can_split'])
 echo '
 <a href="', $scripturl, '?action=splittopics;topic=', $context['current_topic'], '.0;at=', $message['id'], '">', $split_button, '</a>';
 Adicionar
 // Can do some Thank You Post things :)
 if ($message['thank_you_post']['post'] && !$message['thank_you_post']['locked'])
 echo '
 <a href="', $scripturl, '?action=thankyou;topic=', $context['current_topic'], '.0;msg=', $message['id'], '">', $thankyoupostpost_button, '</a>';
 
 if ($message['thank_you_post']['lock'] && $message['thank_you_post']['isThankYouPost'])
 echo '
 <a href="', $scripturl, '?action=thankyoupostlock;topic=', $context['current_topic'], '.0;msg=', $message['id'], '">', $message['thank_you_post']['locked'] ? $thankyoupostopen_button : $thankyoupostlock_button, '</a>';
 
 if ($message['thank_you_post']['delete'] && $message['thank_you_post']['isThankYouPost'])
 echo '
 <a href="', $scripturl, '?action=thankyoupostdelete;topic=', $context['current_topic'], '.0;msg=', $message['id'], ';sesc=', $context['session_id'], '" onclick="return confirm(\'', $txt['remove_thank_you_post'], '?\');">', $thankyoupostdelete_button, '</a>';
 Pesquisar
 echo '
 </td>
 </tr><tr>
 <td valign="bottom" class="smalltext" id="modified_', $message['id'], '">';
 Adicionar
 //Show the Thank You list or the link or.... nothing? XD
 if ($message['thank_you_post']['isThankYouPost']) {
 echo '
 </tr><tr class="ThankOMatic">
 <td colspan="2" class="smalltext" width="100%">
 <hr width="100%" size="1" class="hrcolor" />';
 if(!empty($context['thank_you_post'][$message['id']])) {
 echo '
 <p>'.$txt['followgiveathank'].'</p><p>';
 
 foreach($context['thank_you_post'][$message['id']]['fulllist'] as $thx)
 echo $thx['link'].(!empty($thx['deletelink']) ? $thx['deletelink'] : '').($thx['last'] ? '' : ', ');
 
 echo '
 </p>';
 }
 
 //Counter and Link to the direkt or complete list :)
 echo '
 <a href="'.$message['thank_you_post']['href'].'">
 '.$txt['thank_you_link_beforecounter'].' '.$message['thank_you_post']['counter'].' '.($message['thank_you_post']['counter'] == 1 ? $txt['thank_you_link_member'] : $txt['thank_you_link_members']).' '.$txt['thank_you_link_aftercounter'].'
 </a>';
 
 if($message['thank_you_post']['locked'])
 echo '<br />
 <span class="smalltext"><i>'.$txt['thank_you_is_locked'].'</i></span>';
 }
 Pesquisar
 if ($context['can_remove_post'] && !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1)
 $mod_buttons[] = array('text' => 'quickmod_delete_selected', 'image' => 'delete_selected.gif', 'lang' => true, 'custom' => 'onclick="return confirm(\'' . $txt['quickmod_confirm'] . '\');" id="quickmodSubmit"', 'url' => 'javascript:document.quickModForm.submit();');
 Adicionar
 if($context['thank_you_post_unlock_all'])
 $mod_buttons[] = array('text' => 'thank_you_post_unlock_all', 'image' => 'thankyoulock2.gif', 'lang' => true, 'url' => $scripturl . '?action=thankyoupostunlockall;topic=' . $context['current_topic'] . '.0');
 $themedir/ManageBoards.template.php
 
 Pesquisar
 // Finish off the table.
 echo '
 Adicionar
 // Add the Thank You Post Informations... Enable or Disable this option for a board :)
 echo '
 <tr>
 <td>
 <b>', $txt['mboards_thank_you_post_enable'], '</b><br />
 ', $txt['mboards_thank_you_post_enable_desc'], '<br /><br />
 </td>
 <td valign="top" align="right">
 <input type="checkbox" name="thank_you_post_enable" ', $context['board']['thank_you_post_enable'] ? ' checked="checked"' : '', ' class="check" />
 </td>
 </tr>';
 $themedir/Profile.template.php
 Pesquisar
 if (!empty($modSettings['userLanguage']))
 echo '
 <td><b>', $txt['smf225'], ':</b></td>
 <td>', $context['member']['language'], '</td>
 </tr><tr>';
 Adicionar
 //Thank You Infomations :)
 echo '
 <td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
 </tr><tr>
 <td colspan="2" align="center"><u><b>'.$txt['thankyoutitle'].'</b></u></td>
 </tr><tr>
 <td><b>', $txt['thankyoupostmade'], ':</b></td>
 <td>', $context['member']['thank_you_post']['made'], '</td>
 </tr><tr>
 <td><b>', $txt['thankyoupostbecame'], ':</b></td>
 <td>', $context['member']['thank_you_post']['became'], '</td>
 </tr><tr>';
 Pesquisar
 <tr>
 <td><b>', $txt[86], ': </b></td>
 <td><input type="text" name="posts" size="4" value="', $context['member']['posts'], '" /></td>
 </tr>';
 Adicionar
 <tr>
 <td><b>', $txt[86], ': </b></td>
 <td><input type="text" name="posts" size="4" value="', $context['member']['posts'], '" /></td>
 </tr>
 <tr>
 <td><b>', $txt['thankyoutitle'], ' ', $txt['thankyoupostmade'], ': </b></td>
 <td><input type="text" name="thank_you_post_made" size="4" value="', $context['member']['thank_you_post']['made'], '" /></td>
 </tr>
 <tr>
 <td><b>', $txt['thankyoutitle'], ' ', $txt['thankyoupostbecame'], ': </b></td>
 <td><input type="text" name="thank_you_post_became" size="4" value="', $context['member']['thank_you_post']['became'], '" /></td>
 </tr>';
 
 $languagedir/Admin.portuguese_pt.php ou admin.portuguese_pt-utf8.php
 Pesquisar
 ?>
 Adicionar
 $txt['maintain_thxpostrecount'] = 'Recalcular agradecimento estatiticas';
 $txt['maintain_thxpostrepair'] = 'Reparação e otimizar Agradecimento as tabelas';
 $languagedir/index.portuguese_pt.php
 Pesquisar
 ?>
 Adicionar antes
 $txt['thank_you_link_beforecounter'] = 'Para este poste,';
 $txt['thank_you_link_members'] = 'membros';
 $txt['thank_you_link_member'] = 'membro';
 $txt['thank_you_link_aftercounter'] = 'Dizer Obrigado!';
 $txt['thank_you_is_locked'] = 'Obrigado Trancado';
 $txt['thank_you_post_post_b'] = 'Obrigado';
 $txt['thank_you_post_delete_b'] = 'Apagar Obrigado';
 $txt['thank_you_post_lock_b'] = 'Trancar Obrigado';
 $txt['thank_you_post_open_b'] = 'Abrir Obrigado';
 $txt['thank_you_post_lock_all_b'] = 'Trancar todos Obrigados';
 $txt['thank_you_post_open_all_b'] = 'Abrir Todos Obrigados';
 $txt['remove_thank_you_post'] = 'Remover Obrigado';
 $txt['followgiveathank'] = 'diga aos membros que devem agradecer no seu poste:';
 $txt['thank_you_post_unlock_all'] = 'Destrancar postes de todos Obrigado';
 $txt['thankyoupostlist'] = 'Obrigado Poste lista (completa)';
 $txt['thankyouposterrorinscript'] = 'Erro no scirpt... De certa forma isso não deve acontecer!';
 $txt['thank_you_post_thx_display'] = 'Agradecimento';
 $txt['thank_you_post_made_display'] = 'Agradeceu';
 $txt['thank_you_post_became_display'] = 'Foi Agradecido';
 $languagedir/ManageBoards.portuguese_pt.php ou ManageBoards.portuguese_pt-utf8.php
 Pesquisar
 ?>
 Adicionar
 $txt['mboards_thank_you_post_enable'] = 'Abiltilar Obrigado';
 $txt['mboards_thank_you_post_enable_desc'] = 'Esta opção permitirá o "Thank You" no quadro de postes neste fórum';
 
 $languagedir/ManagePermissions.portuguese_pt.php ou ManagePermissions.portuguese_pt-utf8.php
 Pesquisar
 ?>
 Antes colocar  codigo
 $txt['permissiongroup_thank_you_post'] = 'Obrigado';
 $txt['permissionname_thank_you_post_show'] = 'Mostrar Obrigado aos membros no poste';
 $txt['permissionhelp_thank_you_post_show'] = 'Mostra a lista que disse obrigado';
 $txt['permissionname_thank_you_post_post'] = 'Dê Obrigado no poste';
 $txt['permissionhelp_thank_you_post_post'] = 'Com este um membro tem permissão para adicionar um agradecimento a cada poste no quadro permitidos';
 $txt['permissionname_thank_you_post_lock'] = 'Trancar o poste Obrigado';
 $txt['permissionhelp_thank_you_post_lock'] = 'Trancar o "Thank You" Por isso não se pode fazer qualquer Agradecimento.';
 $txt['permissionname_thank_you_post_lock_own'] = 'Proprio Obrigado';
 $txt['permissionname_thank_you_post_lock_any'] = 'Qualquer Obrigado';
 $txt['permissionname_thank_you_post_delete'] = 'Apagar Obrigado no poste';
 $txt['permissionhelp_thank_you_post_delete'] = 'Apagar o Obrigado da lista Postes no fórum.';
 $txt['permissionname_thank_you_post_delete_own'] = 'Proprio Obrigado';
 $txt['permissionname_thank_you_post_delete_any'] = 'Qualquer Obrigado';
 $txt['permissionname_thank_you_post_delete_mem'] = 'Apgar Obrigado do Membro';
 $txt['permissionhelp_thank_you_post_delete_mem'] = 'Apgar o agradecimento na lista.';
 $txt['permissionname_thank_you_post_delete_mem_own'] = 'Proprio Membro';
 $txt['permissionname_thank_you_post_delete_mem_any'] = 'Qualquer Membro';
 $txt['permissionname_thank_you_post_lock_all'] = 'Trancar/Desbloqueiar Obrigado';
 $txt['permissionhelp_thank_you_post_lock_all'] = 'Trancar/Desbloqueiar todos "Thank You" Opções na linha de modo que ninguém pode fazer qualquer um ou iniciar um novo Agradecimento.';
 $txt['permissionname_thank_you_post_lock_all_own'] = 'Proprio tópico';
 $txt['permissionname_thank_you_post_lock_all_any'] = 'Qualquer tópico';
 $txt['permissionname_thank_you_post_unlock_all'] = 'Desbloquear todos os postes do Obrigado Thread';
 $txt['permissionhelp_thank_you_post_unlock_all'] = 'Desbloquear todos num único "Thank You" Poste, você pode usar este depois de um tópico é transferido do lixo de volta ao quadro normal, ou por algum outro motivo ;)';
 $languagedir/Errors.portuguese_pt.php our  Errors.portuguese_pt-utf8.php
 
 Pesquisar
 ?>
 
 Adicionar
 $txt['cannot_thank_you_post_show'] = "Você não  está autorizado a ver esta List de Agradecimento!";
 $txt['cannot_thank_you_post_post'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_lock_own'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_lock_any'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_delete_own'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_delete_any'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_delete_mem_own'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_delete_mem_any'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_lock_all_own'] = "Você não  está autorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_lock_all_any'] = "Você não  estáautorizado a usar Opções de Agradecimento!";
 $txt['cannot_thank_you_post_unlock_all'] = "Você não está autorizado a usar Opções de Agradecimento!";
 $languagedir/ModSettings.portuguese_pt.php our ModSettings.portuguese_pt-utf8.php
 Pesquisar
 ?>
 Adicionar
 $txt['thankyouposttitle'] = 'Agradecimeno';
 $txt['thankYouPostColors'] = 'Activar cor aos membros da lista.';
 $txt['thankYouPostOnePerPost'] = 'O membro pode enviar mensagens para cada poste de Agradecimento<br />
 <span class="smalltext">Se esta desativada, o membro pode postar apenas um agradecimento por thread.</span>';
 $txt['thankYouPostPreview'] = '	Activar Lista Preview  no poste no devido tópico index.';
 $txt['thankYouPostPreviewHM'] = 'Quantos itens devem ser mostrados no previewlist?<br /><span class="smalltext"><strong>(0 = all)</strong></span></';
 $txt['thankYouPostPreviewOrder'] = 'O despacho do previewlist';
 $txt['thankYouPostPreviewOrderSelect'] = 'THX antigas primeiro | Últimas THX primeiro';
 $txt['thankYouPostFullOrder'] = 'The order of the Fulllist';
 $txt['thankYouPostFullOrderSelect'] = 'THX antigas primeiro | Últimas THX primeiro | Membros Nomes';
 $txt['thankYouPostHideExtraInfo'] = '<br /><span class="smalltext"><a href="http://mods.simplemachines.org/index.php?mod=118">(Requere Mod especial para esconderl)</a></span>';//Por Favor Não esqueca .$txt['thankYouPostHideExtraInfo'] Apos o texto!
 $txt['thankYouPostUnhidePost'] = 'Exibir Conteúdo da Pós após Agradecimento "Thank You" para este poste
 <br /><span class="smalltext">Este exibir somente o poste que fez a agradecer-lhe, mas se omembro normal pós-lo exibir todos</span>'.$txt['thankYouPostHideExtraInfo'];
 $txt['thankYouPostThxUnhideAll'] = 'Em agradecimento exibir todos, escondido conteúdo!
 <br /><span class="smalltext">Exibir todos os conteúdos após postar um agradecimento a qualquer lugar (Desativar Opção 1)</span>'.$txt['thankYouPostHideExtraInfo'];
 $txt['thankYouPostDisableUnhide'] = 'Desativar a opção exibir conteúdo, após destacamento real, apenas agradecer você pode exibir ela!
 <br /><span class="smalltext">Você deve publicar um agradecimento para exibir o conteúdo, dependem Opção 1/2 quantos se exibir</span>'.$txt['thankYouPostHideExtraInfo'];
 $txt['thankYouPostDisplayPage'] = 'Mostrar Obrigado no Poste dado e recebido no Tópico Mostrado';
 $languagedir/Profile.portuguese_pt.php our Profile.portuguese_pt-utf8.php
 
 Adicionar
 $txt['thankyoutitle'] = 'Obrigado no Poste';
 $txt['thankyoupostmade'] = 'Agradeceu:';
 $txt['thankyoupostbecame'] = 'Foi Agradecido:';
 Conforme o Demo aqui disponivel  Demo Mod Agradecimento (http://smfmz.joomlamz.com/index.php/topic,1.0.html)
 
 
 
 
- 
				instalei o mod mais nao sai os botoes ...
			
- 
				qual e o nome do themes que esta a usar a versao.. smf
			
- 
				Olá amigos,
 
 Todos os anexos dão erro: "404 ficheiro não encontrado!"
 Um abraço!
- 
				Obrigado
 Ja esta Update
 
- 
				Olá amigo,
 
 O problema é que parece estar a acontecer em todos os tópicos e não só neste!
 Neste acontece o mesmo: http://comunidade.smfpt.net/index.php/topic,4012.0.html
 E estava mesmo a tentar adaptar esse no meu SMF, mas sem imagens nada feito!
 
 Um abraço!
- 
				Esta Update no primeiro tópico
 
- 
				Obrigado amigo, wink
 
 Um abraço!