I asked Mahony on the German support forums and he promised he'd join all bugfixes and improvements into a new version once he finds the time.ameisez wrote:Is this still in active development or nearly ABD?
for your informationMartectX wrote:I asked Mahony on the German support forums and he promised he'd join all bugfixes and improvements into a new version once he finds the time.ameisez wrote:Is this still in active development or nearly ABD?
Open includes/functions_user.phpspaceace wrote:found a small problem...
when a user has been deleted from the board and all posts are kept and you view one of that users posts, this error comes up
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1486: Undefined index: thanks
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1487: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1487: Undefined index: thanked
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1488: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 1488: Undefined index: thanks_post
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3840: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3842: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3843: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3844: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
Code: Select all
function user_delete($mode, $user_id, $post_username = false)
{
global $cache, $config, $db, $user, $auth;
global $phpbb_root_path, $phpEx;
Code: Select all
//Begin Thanks Post MOD
$sql = 'DELETE
FROM ' . THANKS_TABLE . '
WHERE thanks_from = ' . $user_id;
$db->sql_query($sql);
//End Thanks Post MOD
No, this is not planned.Hello! You may like to make a button thanks to work without reloading the page? Ie at javasript
thanks. one more question about this issue. the user that had been deleted, was deleted before i even had this mod installed, so that username would have never been in the thanks mod table. will this fix still correct that issue?Mahoney wrote:Hello
Open includes/functions_user.php
SearchAdd afterCode: Select all
function user_delete($mode, $user_id, $post_username = false) { global $cache, $config, $db, $user, $auth; global $phpbb_root_path, $phpEx;
Thus, the entries of a user in the table phpbb_thanks removed when the user is deleted.Code: Select all
//Begin Thanks Post MOD $sql = 'DELETE FROM ' . THANKS_TABLE . ' WHERE thanks_from = ' . $user_id; $db->sql_query($sql); //End Thanks Post MOD
that's not what i meanMahoney wrote:Hello
If the user has been deleted before you installed the fix, then manually delete the records of the user (in the table phpbb_thanks).
best regards Mahoney
Code: Select all
// Initial var setup
$forum_id = request_var('f', 0);
$topic_id = request_var('t', 0);
$post_id = request_var('p', 0);
Code: Select all
viewtopic.php?f=163&t=3538&view=unread#unread
Code: Select all
$sql = 'SELECT thanks_from
FROM ' . THANKS_TABLE . '
WHERE post_id = ' . $post_id . '
AND thanks_from = '. $user->data['user_id'];
Try thisAquariusPL wrote:so... if someone gave a 'thanks' will see hidden message
but... when he comes to the topic later and look up hidden message - is still hidden, cause
Code: Select all
ALTER TABLE `phpbb_thanks` ADD `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0';
Code: Select all
// Check if the topic viewer has posted in a topic
$unhide = false;
$sql = 'SELECT post_thanked
FROM ' . POSTS_TABLE . '
WHERE post_id = ' . $post_id;
$result = $db->sql_query($sql);
$post_thanked = $db->sql_fetchfield('post_thanked');
$db->sql_freeresult($result);
if ($user->data['user_id'] != ANONYMOUS)
{
// If moderator or admin, skip reply check, auto unhide
if ($auth->acl_get('m_', $forum_id))
{
$unhide = true;
}
else if ($post_thanked > 0)
{
$unhide = true;
}
else
{
$sql = "SELECT poster_id, topic_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND poster_id = " . $user->data['user_id'];
$result = $db->sql_query($sql);
$unhide = $db->sql_affectedrows($result) ? true : false;
$db->sql_freeresult($result);
}
}
Code: Select all
// Unhide Check
$unhide = false;
if ($user->data['user_id'] != ANONYMOUS)
{
// If moderator or admin, skip reply check, auto unhide
if ($auth->acl_get('m_', $forum_id))
{
$unhide = true;
}
else
{
// Check if the topic viewer has said thanks in that topic
$sql = "SELECT topic_id, thanks_from
FROM " . THANKS_TABLE . "
WHERE topic_id = $topic_id
AND thanks_from = " . $user->data['user_id'];
$result = $db->sql_query($sql);
$unhide = $db->sql_affectedrows($result) ? true : false;
$db->sql_freeresult($result);
// Check if the topic viewer has posted in that topic
if ($unhide == false)
{
$sql = "SELECT poster_id, topic_id
FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id
AND poster_id = " . $user->data['user_id'];
$result = $db->sql_query($sql);
$unhide = $db->sql_affectedrows($result) ? true : false;
$db->sql_freeresult($result);
}
}
}
Code: Select all
'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'),
Code: Select all
'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'),
Code: Select all
$post_id = request_var('p', 0);
Code: Select all
$topic_id = request_var('t', 0);
Code: Select all
'post_id' => $post_id,
Code: Select all
'topic_id' => $topic_id,
Clear the cache.I have enabled this MOD on all of my forums. I still cannot see the Thank Post image or anything.