please consider this requestsharathu7 wrote:thanks a lot... waiting for this... please make this to work with simple hide bbcode mod ( a request.. please consider if possible)....
It must still be retrieving the name from the first post.wearethebigsize wrote:What happen to this can you fix it !
[snip]http://img2.putfile.com/main/7/19308251422.jpg[/snip]
Code: Select all
// Check if the topic viewer has posted in a topic
$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 if (already_thanked($post_id, $user->data['user_id']))
{
$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);
}
In viewtopic.php findwearethebigsize wrote:What happen to this can you fix it !
Code: Select all
'THANKS_FROM' => sprintf($user->lang['THANKS_FROM'], get_username_string('full', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour'])),
Code: Select all
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
Code: Select all
'THANKS_FROM' => sprintf($user->lang['THANKS_FROM'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])), // GSX
Code: Select all
{THANKS_FROM}
Code: Select all
{postrow.THANKS_FROM}
Ofcource, all phpBB3 mods here will work under 3.0.2.antivirus_B wrote:Will it work under phpbb 3.0.2?
Search in viewtopic.phpusenet2you wrote: to works with the simple hide bbcode. How with this mod idiotnesia?
Code: Select all
// Check if the topic viewer has posted in a topic
$unhide = false;
if ($user->data['user_id'] != ANONYMOUS)
{
$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
// 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);
}
}
Download Link doesn't existidiotnesia wrote:Title: Thanks first post
Author: idiotnesia
Version: 0.0.1
Description:
After installing this mod, user can give thank for useful posts
Author notes:Requests:
- This is the first beta release, bugs expected. If you found bugs plz report here soon.
- After deleting posts/topics thanks count will not decrease, so you need to synchronize manually. For the next release I will try to add automatic synchronize. If someone can help me with this issue plz let me know.
Planned features:
- Thanks icon for prosilver and subsilver2.
- Rephrasing the language
Sorry, I'm not good at EnglishScreenshoot:
- Subsilver2 Support
- Automatic synchronize thanks count after deleting posts/topics
- ACP Configuration
- User permissions to give/receive thanks
- Enable/disable thanks post in certain forum
- Enable/disable thanks counts
- Change the name of this mod to Advanced Thanks Posts
Download:
http://www.forumkomputer.web.id/downloa ... view&id=26
------------------------------------
Some users asking me about the possibility to thanks all posts not only the 1st posts. It quite easy to implement this.
Thanks All Post
note: You need to install the mod first
Open: thanks.php
FINDREPLACE-WITHCode: Select all
WHERE p.post_id = ' . $post_id . ' AND p.post_id = t.topic_first_post_id';
Open: viewtopic.phpCode: Select all
WHERE p.post_id = ' . $post_id;
FINDREPLACE-WITHCode: Select all
'S_FIRST_POST' => ($row['post_id'] == $topic_data['topic_first_post_id']) ? true : false,
FINISH!!!!Code: Select all
'S_FIRST_POST' => true,