I tried that. It didn't work.Mahoney wrote:Hello
AquariusPL 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
Try this
[/size]
- SQL:
Code: Select all
ALTER TABLE `phpbb_thanks` ADD `topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0';
- open viewtopic.php
- Search:
Replace withCode: 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); } } }
- Search:
Replace with: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'),
- thanks.php öffnen.
- Search:
Add after:Code: Select all
$post_id = request_var('p', 0);
Code: Select all
$topic_id = request_var('t', 0);
- Search:
Add after: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.
best regards Mahoney