Hallo
In der
thanks.php
Suche
Füge danach ein
Suche
Füge danach ein
In der
viewtopic.php
Suche
Code: Alles auswählen
'WARN_IMG' => $user->img('icon_user_warn', 'WARN_USER'),
Füge danach ein
Code: Alles auswählen
'THANKS_IMG' => $user->img('icon_post_thanks', 'THANKS1'),
Suche
Code: Alles auswählen
if ($poster_id == ANONYMOUS)
{
$user_cache[$poster_id] = array(
'joined' => '',
'posts' => '',
//Begin Thank Post MOD
'thanks' => (isset($row['user_thanks'])) ? $row['user_thanks'] : '',
'thanked' => (isset($row['user_thanked'])) ? $row['user_thanked'] : '',
'thanks_post' => (isset($row['user_thanks_post'])) ? $row['user_thanks_post'] : '',
//End Thank Post MOD
'from' => '',
//Begin Thank Post MOD
'thanks' => (isset($row['user_thanks'])) ? $row['user_thanks'] : '',
'thanked' => (isset($row['user_thanked'])) ? $row['user_thanked'] : '',
'thanks_post' => (isset($row['user_thanks_post'])) ? $row['user_thanks_post'] : '',
//End Thank Post MOD
'sig' => '',
Ersetze mit
Code: Alles auswählen
if ($poster_id == ANONYMOUS)
{
$user_cache[$poster_id] = array(
'joined' => '',
'posts' => '',
'from' => '',
//Begin Thank Post MOD
'thanks' => (isset($row['user_thanks'])) ? $row['user_thanks'] : '',
'thanked' => (isset($row['user_thanked'])) ? $row['user_thanked'] : '',
'thanks_post' => (isset($row['user_thanks_post'])) ? $row['user_thanks_post'] : '',
//End Thank Post MOD
'sig' => '',
Suche
Code: Alles auswählen
$user_cache[$poster_id] = array(
'joined' => $user->format_date($row['user_regdate']),
'posts' => $row['user_posts'],
'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
Ersetze mit
Code: Alles auswählen
$user_cache[$poster_id] = array(
'joined' => $user->format_date($row['user_regdate']),
'posts' => $row['user_posts'],
//Begin Thank Post MOD
'thanks' => (isset($row['user_thanks'])) ? $row['user_thanks'] : '',
'thanked' => (isset($row['user_thanked'])) ? $row['user_thanked'] : '',
'thanks_post' => (isset($row['user_thanks_post'])) ? $row['user_thanks_post'] : '',
//End Thank Post MOD
'warnings' => (isset($row['user_warnings'])) ? $row['user_warnings'] : 0,
Suche
Code: Alles auswählen
//Begin Thank Post MOD
$sql = 'SELECT thanks_from
FROM ' . THANKS_TABLE . '
WHERE post_id = ' . $row['post_id'] .'
AND thanks_from = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
$give_thanks = $db->sql_fetchfield('thanks_from');
$db->sql_freeresult($result);
$sql_array = array(
'SELECT' => 'u.username, u.user_colour, t.*',
'FROM' => array(
USERS_TABLE => 'u',
THANKS_TABLE => 't'
),
'WHERE' => 't.post_id =' . $row['post_id'] . '
AND u.user_id = t.thanks_from',
'ORDER_BY' => 'u.username_clean'
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$thanks_list = '';
while ($row2 = $db->sql_fetchrow($result))
{
$thanks_user = get_username_string('full', $row2['thanks_from'], $row2['username'], $row2['user_colour'], $row2['username']);
$thanks_list = $thanks_list . ", " . $thanks_user;
}
$thanks_list = ltrim($thanks_list, ", ");
$postrow = array_merge($postrow, array(
'THANKS_LIST' => $thanks_list,
'U_THANKS' => (!$give_thanks) ? append_sid("{$phpbb_root_path}thanks.$phpEx", 'p=' . $row['post_id'] . '&mode=thanks') : append_sid("{$phpbb_root_path}thanks.$phpEx", 'p=' . $row['post_id'] . '&mode=remove'),
'S_GIVE_THANKS' => $give_thanks,
'S_FIRST_POST' => true,
'S_IS_OWN_POST' => ($poster_id == $user->data['user_id']) ? true : false
));
$db->sql_freeresult($result);
$template->assign_vars(array(
'THANKS_ENABLE' => ($topic_data['enable_thanks']) ? true : false));
//End Thank Post MOD
Ersetze mit
Code: Alles auswählen
//Begin Thank Post MOD
$sql = 'SELECT thanks_from
FROM ' . THANKS_TABLE . '
WHERE post_id = ' . $row['post_id'] .'
AND thanks_from = ' . $user->data['user_id'];
$result = $db->sql_query($sql);
$give_thanks = $db->sql_fetchfield('thanks_from');
$db->sql_freeresult($result);
$sql_array = array(
'SELECT' => 'u.username, u.user_colour, t.*',
'FROM' => array(
USERS_TABLE => 'u',
THANKS_TABLE => 't'
),
'WHERE' => 't.post_id =' . $row['post_id'] . '
AND u.user_id = t.thanks_from',
'ORDER_BY' => 'u.username_clean'
);
$sql = $db->sql_build_query('SELECT', $sql_array);
$result = $db->sql_query($sql);
$thanks_list = '';
while ($row2 = $db->sql_fetchrow($result))
{
$thanks_user = get_username_string('full', $row2['thanks_from'], $row2['username'], $row2['user_colour'], $row2['username']);
$thanks_list = $thanks_list . ", " . $thanks_user;
}
$thanks_list = ltrim($thanks_list, ", ");
$postrow = array_merge($postrow, array(
'THANKS_LIST' => $thanks_list,
'U_THANKS' => (!$give_thanks) ? append_sid("{$phpbb_root_path}thanks.$phpEx", 'p=' . $row['post_id'] . '&t=' . $topic_id .'&mode=thanks') : append_sid("{$phpbb_root_path}thanks.$phpEx", 'p=' . $row['post_id'] . '&mode=remove'),
'S_GIVE_THANKS' => $give_thanks,
'S_FIRST_POST' => true,
'S_IS_OWN_POST' => ($poster_id == $user->data['user_id']) ? true : false
));
$db->sql_freeresult($result);
$template->assign_vars(array(
'THANKS_ENABLE' => ($topic_data['enable_thanks']) ? true : false));
//End Thank Post MOD
Grüße: Mahony