Autor Tópico: Thank-O-Matic  (Lida 17574 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Online candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5073
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Thank-O-Matic
« 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
Código: [Seleccione]
'theme' => array('Themes.php', 'ThemesMain'),
Adicionar por Baixo
Código: [Seleccione]
'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
Código: [Seleccione]
// Check the passed ID_MEMBER/password.  If $is_username is true, treats $id as a username.
Adicionar Substituindo
Código: [Seleccione]
// 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
Código: [Seleccione]
<?php ssi_recentEvents(); flush(); ?>

<hr />


Adicionar e Substituir por
Código: [Seleccione]
<?php ssi_recentEvents(); flush(); ?>

<hr />

<h3>Top Thank You Received Function: &lt;?php ssi_thankYouPostTopResived(); ?&gt;</h3>
<?php ssi_thankYouPostTopResived(); flush(); ?>

<hr />

<h3>Top Thank You Given Function: &lt;?php ssi_thankYouPostTopGiven(); ?&gt;</h3>
<?php ssi_thankYouPostTopGiven(); flush(); ?>

<hr />


$sourcedir/Display.php

Pesquisar por
Código: [Seleccione]
t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.ID_LAST_MSG,
Substituir por
Código: [Seleccione]
t.thank_you_post_locked,
t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.ID_LAST_MSG,


Pesquisar
Citar
$context['is_hot'] = $topicinfo['numReplies'] >= $modSettings['hotTopicPosts'];

Substituir por
Código: [Seleccione]
$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
Código: [Seleccione]
FROM {$db_prefix}messages
WHERE ID_TOPIC = $topic
ORDER BY ID_MSG " . ($ascending ? '' : 'DESC') . ($modSettings['defaultMaxMessages'] == -1 ? '' : "

Adicionar
Código: [Seleccione]
".($board_info['thank_you_post_enable'] ? ", thank_you_post" : "")."

Pesquisar
Código: [Seleccione]
$messages = array();
$posters = array();

Adicionar
Código: [Seleccione]
$thank_you_posts = array();
Pesquisar
Código: [Seleccione]
if (!empty($row['ID_MEMBER']))
$posters[] = $row['ID_MEMBER'];
$messages[] = $row['ID_MSG'];

Adicionar
Código: [Seleccione]
if (!empty($row['thank_you_post']))
$thank_you_posts[] = $row['ID_MSG'];

Pesquisar
Código: [Seleccione]
// This is better than sorting it with the query...
ksort($temp);

foreach ($temp as $row)
$attachments[$row['ID_MSG']][] = $row;
}

Adicionar
Código: [Seleccione]
$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
Código: [Seleccione]
ID_MSG_MODIFIED < $topicinfo[new_from] AS isRead
FROM {$db_prefix}messages

Adicionar
Código: [Seleccione]
".($board_info['thank_you_post_enable'] && allowedTo('thank_you_post_show') ? "thank_you_post, thank_you_post_counter," : "")."
Pesquisar
Código: [Seleccione]
// Do the censor thang.
censorText($message['body']);
censorText($message['subject']);

Adicionar
Código: [Seleccione]
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
Código: [Seleccione]
'can_see_ip' => allowedTo('moderate_forum') || ($message['ID_MEMBER'] == $ID_MEMBER && !empty($ID_MEMBER)),
Adicionar
Código: [Seleccione]
'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
Código: [Seleccione]
if (empty($options['view_newest_first']))
$counter++;
else
$counter--;


Adicionar
Código: [Seleccione]
//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
Código: [Seleccione]
b.ID_THEME, b.override_theme, b.permission_mode, b.countPosts
Adicionar substituindo por este
Código: [Seleccione]
b.ID_THEME, b.override_theme, b.permission_mode, b.countPosts
, thank_you_post_enable


Pesquisar
Código: [Seleccione]
'posts_count' => empty($row['countPosts']),
Adicionar substituindo por este
Código: [Seleccione]
'posts_count' => empty($row['countPosts']),
'thank_you_post_enable' => empty($row['thank_you_post_enable']),

Pesquisar
Código: [Seleccione]
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
Código: [Seleccione]
mem.thank_you_post_made, mem.thank_you_post_became,
Pesquisar
Código: [Seleccione]
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
Código: [Seleccione]
mem.thank_you_post_made, mem.thank_you_post_became,

Pesquisar
Código: [Seleccione]
mem.ID_MEMBER, mem.memberName, mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered,
Adicionar
Código: [Seleccione]
mem.thank_you_post_made, mem.thank_you_post_became,
Pesquisar
Código: [Seleccione]
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),
Adicionar
Código: [Seleccione]
'thank_you_post' => array(
'made' => &$profile['thank_you_post_made'],
'became' => &$profile['thank_you_post_became'],
),


$sourcedir/ManageBoards.php

Pesquisar
Código: [Seleccione]
'permission_mode' => 'normal',
Adicionar
Código: [Seleccione]
'thank_you_post_enable' => 0,
Pesquisar
Código: [Seleccione]
$boardOptions['posts_count'] = isset($_POST['count']);
Adicionar
Código: [Seleccione]
$boardOptions['thank_you_post_enable'] = isset($_POST['thank_you_post_enable']);

$sourcedir/ManagePermissions.php

Pesquisar
Código: [Seleccione]
'profile_view_own',
'profile_identity_own',

Adicionar
Código: [Seleccione]
'thank_you_post_show',
Pesquisar
Código: [Seleccione]
'report_any',
'send_topic',

Adicionar
Código: [Seleccione]
'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
Código: [Seleccione]
'notification' => array(
'mark_any_notify' => false,
'mark_notify' => false,
),

Adicionar
Código: [Seleccione]
'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
Código: [Seleccione]
'manage_bans',
'send_mail',

Adicionar
Código: [Seleccione]
'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
Código: [Seleccione]
'layout' => 'ModifyLayoutSettings',
Adicionar
Código: [Seleccione]
'thankyoupost' => 'ModifyThankYouPostSettings',
Pesquisar
Código: [Seleccione]
'layout' => array(
'title' => $txt['mods_cat_layout'],
'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
),

Adicionar
Código: [Seleccione]
'thankyoupost' => array(
'title' => $txt['thankyouposttitle'],
'href' => $scripturl . '?action=featuresettings;sa=thankyoupost;sesc=' . $context['session_id'],
),

Pesquisar
Código: [Seleccione]
$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=karma';
$context['settings_title'] = $txt['smf293'];

prepareDBSettingContext($config_vars);
}

Pesquisar
Código: [Seleccione]
'layout' => 'ModifyLayoutSettings',
Adicionar
Código: [Seleccione]
'thankyoupost' => 'ModifyThankYouPostSettings',
Ou
Código: [Seleccione]
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
Código: [Seleccione]
db_query("
UPDATE {$db_prefix}calendar
SET ID_BOARD = $toBoard
WHERE ID_TOPIC $condition
LIMIT $numTopics", __FILE__, __LINE__);

Adicionar
Código: [Seleccione]
// 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
Código: [Seleccione]
'website' => array(
'title' => !isset($user_profile[$memID]['websiteTitle']) ? '' : $user_profile[$memID]['websiteTitle'],
'url' => !isset($user_profile[$memID]['websiteUrl']) ? '' : $user_profile[$memID]['websiteUrl'],
),

Adicionar
Código: [Seleccione]
'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
Código: [Seleccione]
// Change the number of posts.
if (isset($_POST['posts']) && allowedTo('moderate_forum'))
$profile_vars['posts'] = $_POST['posts'] != '' ? (int) strtr($_POST['posts'], array(',' => '', '.' => '', ' ' => '')) : '\'\'';

Adicionar
Código: [Seleccione]
// 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
Código: [Seleccione]
UPDATE {$db_prefix}messages
SET icon = 'recycled'

Adicionar
Código: [Seleccione]
, thank_you_post = IF(thank_you_post = 1, 2, thank_you_post)
Pesquisar
Código: [Seleccione]
// Mark recycled topic as read.
Adicionar
Código: [Seleccione]
//Okay i changed above... it lock the thank you ;P so it's not possible to made more thanks in the junkyard
Pesquisar
Código: [Seleccione]
// Make sure this message isn't getting deleted later on.
Adicionar
Código: [Seleccione]
// 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
Código: [Seleccione]
// Delete anything related to the topic.
db_query("
DELETE FROM {$db_prefix}messages
WHERE ID_TOPIC $condition", __FILE__, __LINE__);

Adicionar
Código: [Seleccione]
//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
Código: [Seleccione]
'move_any',
'send_topic',

Adicionar
Código: [Seleccione]
'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
Código: [Seleccione]
// 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
Código: [Seleccione]
//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
Código: [Seleccione]
// Merge log topic entries.
Adicionar
Código: [Seleccione]
// 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
Código: [Seleccione]
if (isset($data['unreadMessages']))
$data['unreadMessages'] = 'IF(' . $data['unreadMessages'] . ' < 0, 0, ' . $data['unreadMessages'] . ')';
Adicionar
Código: [Seleccione]
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
Código: [Seleccione]
// This setting is a little twisted in the database...
if (isset($boardOptions['posts_count']))
$boardUpdates[] = 'countPosts = ' . ($boardOptions['posts_count'] ? '0' : '1');

Adicionar
Código: [Seleccione]
// 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
Código: [Seleccione]
'posts_count' => true,
Adicionar
Código: [Seleccione]
'thank_you_post_enable' => false,
Pesquisar
Código: [Seleccione]
// 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
Código: [Seleccione]
// 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
Código: [Seleccione]
b.boardOrder, b.countPosts, b.memberGroups, b.ID_THEME, b.override_theme,
Adicionar
Código: [Seleccione]
thank_you_post_enable,
Pesquisar
Código: [Seleccione]
'count_posts' => empty($row['countPosts']),
Adicionar
Código: [Seleccione]
'thank_you_post_enable' => empty($row['thank_you_post_enable']),

$themedir/Admin.template.php

Pesquisar
Código: [Seleccione]
<a href="' . $scripturl . '?action=convertentities">' . $txt['entity_convert_title'] . '</a><br />' : '', '
Adicionar
Código: [Seleccione]
$txt['maintain_thxpostrecount'] = 'Recalcular agradecimento estatiticas';
$txt['maintain_thxpostrepair'] = 'Repara&ccedil;&atilde;o e otimizar Agradecimento as tabelas';

$themedir/Display.template.php
Pesquisar
Código: [Seleccione]
else
unset($normal_buttons['custom']);
Adicionar
Código: [Seleccione]
//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
Código: [Seleccione]
$split_button = create_button('split.gif', 'smf251', 'smf251', 'align="middle"');
Adicionar
Código: [Seleccione]
$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
Código: [Seleccione]
// Show avatars, images, etc.?
Adicionar
Código: [Seleccione]
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
Código: [Seleccione]
// 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
Código: [Seleccione]
// 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
Código: [Seleccione]
echo '
</td>
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">';

Adicionar
Código: [Seleccione]
//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
Código: [Seleccione]
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
Código: [Seleccione]
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
Código: [Seleccione]
// Finish off the table.
echo '

Adicionar
Código: [Seleccione]
// 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
Código: [Seleccione]
if (!empty($modSettings['userLanguage']))
echo '
<td><b>', $txt['smf225'], ':</b></td>
<td>', $context['member']['language'], '</td>
</tr><tr>';

Adicionar
Código: [Seleccione]
//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
Código: [Seleccione]
<tr>
<td><b>', $txt[86], ': </b></td>
<td><input type="text" name="posts" size="4" value="', $context['member']['posts'], '" /></td>
</tr>';

Adicionar
Código: [Seleccione]
<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
Código: [Seleccione]
?>
Adicionar
Código: [Seleccione]
$txt['maintain_thxpostrecount'] = 'Recalcular agradecimento estatiticas';
$txt['maintain_thxpostrepair'] = 'Repara&ccedil;&atilde;o e otimizar Agradecimento as tabelas';

$languagedir/index.portuguese_pt.php
Pesquisar
Código: [Seleccione]
?>
Adicionar antes
Código: [Seleccione]
$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&atilde;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
Código: [Seleccione]
?>
Adicionar
Código: [Seleccione]
$txt['mboards_thank_you_post_enable'] = 'Abiltilar Obrigado';
$txt['mboards_thank_you_post_enable_desc'] = 'Esta op&ccedil;&atilde;o permitir&aacute; o "Thank You" no quadro de postes neste f&oacute;rum';


$languagedir/ManagePermissions.portuguese_pt.php ou ManagePermissions.portuguese_pt-utf8.php
Pesquisar
Código: [Seleccione]
?>
Antes colocar  codigo
Código: [Seleccione]
$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&ecirc; Obrigado no poste';
$txt['permissionhelp_thank_you_post_post'] = 'Com este um membro tem permiss&atilde;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&atilde;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&oacute;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&ccedil;&otilde;es na linha de modo que ningu&eacute;m pode fazer qualquer um ou iniciar um novo Agradecimento.';
$txt['permissionname_thank_you_post_lock_all_own'] = 'Proprio t&oacute;pico';
$txt['permissionname_thank_you_post_lock_all_any'] = 'Qualquer t&oacute;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 &uacute;nico "Thank You" Poste, voc&ecirc; pode usar este depois de um t&oacute;pico &eacute; 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
Código: [Seleccione]
?>

Adicionar
Código: [Seleccione]
$txt['cannot_thank_you_post_show'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a ver esta List de Agradecimento!";
$txt['cannot_thank_you_post_post'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_lock_own'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_lock_any'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_delete_own'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_delete_any'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_delete_mem_own'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_delete_mem_any'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_lock_all_own'] = "Voc&ecirc; n&atilde;o  est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_lock_all_any'] = "Voc&ecirc; n&atilde;o  est&aacute;autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";
$txt['cannot_thank_you_post_unlock_all'] = "Voc&ecirc; n&atilde;o est&aacute; autorizado a usar Op&ccedil;&otilde;es de Agradecimento!";

$languagedir/ModSettings.portuguese_pt.php our ModSettings.portuguese_pt-utf8.php
Pesquisar
Código: [Seleccione]
?>
Adicionar
Código: [Seleccione]
$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&oacute;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 | &Uacute;ltimas THX primeiro';
$txt['thankYouPostFullOrder'] = 'The order of the Fulllist';
$txt['thankYouPostFullOrderSelect'] = 'THX antigas primeiro | &Uacute;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&atilde;o esqueca .$txt['thankYouPostHideExtraInfo'] Apos o texto!
$txt['thankYouPostUnhidePost'] = 'Exibir Conteúdo da P&oacute;s ap&oacute;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&oacute;s-lo exibir todos</span>'.$txt['thankYouPostHideExtraInfo'];
$txt['thankYouPostThxUnhideAll'] = 'Em agradecimento exibir todos, escondido conteúdo!
<br /><span class="smalltext">Exibir todos os conte&uacute;dos ap&oacute;s postar um agradecimento a qualquer lugar (Desativar Op&ccedil;&atilde;o 1)</span>'.$txt['thankYouPostHideExtraInfo'];
$txt['thankYouPostDisableUnhide'] = 'Desativar a op&ccedil;&atilde;o exibir conte&uacute;do, ap&oacute;s destacamento real, apenas agradecer voc&ecirc; pode exibir ela!
<br /><span class="smalltext">Voc&ecirc; deve publicar um agradecimento para exibir o conte&uacute;do, dependem Opç&atilde;o 1/2 quantos se exibir</span>'.$txt['thankYouPostHideExtraInfo'];
$txt['thankYouPostDisplayPage'] = 'Mostrar Obrigado no Poste dado e recebido no T&oacute;pico Mostrado';

$languagedir/Profile.portuguese_pt.php our Profile.portuguese_pt-utf8.php

Adicionar
Código: [Seleccione]
$txt['thankyoutitle'] = 'Obrigado no Poste';
$txt['thankyoupostmade'] = 'Agradeceu:';
$txt['thankyoupostbecame'] = 'Foi Agradecido:';

Conforme o Demo aqui disponivel  Demo Mod Agradecimento



« Última modificação: 23 de Agosto de 2009, 14:54 por candidosa2 »

Offline Alyen

  • Iniciar SmfPt
  • *
  • Mensagens: 15
  • Rank: 0
Re:Thank-O-Matic
« Responder #1 em: 08 de Agosto de 2009, 12:30 »
instalei o mod mais nao sai os botoes ...

Online candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5073
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re:Thank-O-Matic
« Responder #2 em: 09 de Agosto de 2009, 03:58 »
qual e o nome do themes que esta a usar a versao.. smf

Offline pass25

  • Iniciar SmfPt
  • *
  • Mensagens: 64
  • Rank: 5
Re:Thank-O-Matic
« Responder #3 em: 23 de Agosto de 2009, 14:16 »
Olá amigos,

Todos os anexos dão erro: "404 ficheiro não encontrado!"
Um abraço!

Online candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5073
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re:Thank-O-Matic
« Responder #4 em: 23 de Agosto de 2009, 14:56 »
Obrigado
Ja esta Update

Offline pass25

  • Iniciar SmfPt
  • *
  • Mensagens: 64
  • Rank: 5
Re:Thank-O-Matic
« Responder #5 em: 23 de Agosto de 2009, 15:09 »
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!

Online candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5073
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Re:Thank-O-Matic
« Responder #6 em: 23 de Agosto de 2009, 15:41 »
Esta Update no primeiro tópico

Offline pass25

  • Iniciar SmfPt
  • *
  • Mensagens: 64
  • Rank: 5
Re:Thank-O-Matic
« Responder #7 em: 23 de Agosto de 2009, 16:56 »
Obrigado amigo, wink

Um abraço!