## MOD History:
##
## 2008-05-13 - Version 0.1.2 beta
## - here we full use the native function: "get_username_string"
## to get the coloured/hyper-linked to its bumper profile's username
## IE: like the 'last edited by' msg
## - added a new function
##
## 2008-05-12 - Version 0.1.1 beta
## - fixed a bug (thx spacefish)
## - removed a redundant check that harms the intended behaviour of this MOD
##
## 2008-05-11 - Version 0.1.0 beta
## - first public release
##
Code: Select all
// -------------------------- BUMP IT! by 3Di --------------------------
// Bump information
if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($topic_data['topic_bumper']) )
{
$l_bumped_by = '<br /><br />' . sprintf($user->lang['BUMPED_BY'], id_to_username($topic_data['topic_bumper']), $user->format_date($topic_data['topic_last_post_time']));
}
else
{
$l_bumped_by = '';
}
// -------------------------- BUMP IT! by 3Di --------------------------
Code: Select all
// -------------------------- BUMP IT! by 3Di --------------------------
$sql = 'UPDATE ' . POSTS_TABLE . "
SET post_time = $current_time
WHERE post_id = {$post_data['topic_last_post_id']}
AND topic_id = $topic_id";
$db->sql_query($sql);
$sql = 'UPDATE ' . TOPICS_TABLE . "
SET topic_last_post_time = $current_time,
topic_bumped = 1,
topic_bumper = " . $user->data['user_id'] . "
WHERE topic_id = $topic_id";
$db->sql_query($sql);
// -------------------------- BUMP IT! by 3Di --------------------------
Code: Select all
Find:
// Check permission and make sure the last post was not already bumped
if (!$auth->acl_get('f_bump', $forum_id) || $topic_bumped)
{
return false;
}
Change to:
// Check permission and make sure the last post was not already bumped
if (!$auth->acl_get('f_bump', $forum_id))
{
return false;
}
Anytimespacefish wrote:Oh! Nice ... thanx!
Thanks.jesusm wrote:One suggestion ...
what about a warning message something like "your are bumping a XX days old message, are you sure you want to do that?"
I don't like the inability of bumping old posts, but neither those new users bumping really old messages without bearing in mind the oldness of posts.
thanks for your work
regards