MyBB Community Forums

Full Version: Bump Thread - 1.8
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This plugin was originally created by Zinga Burga.  

Attached is currently working for 1.8.

Changes:

Line 17 (Added compatibility for 1.6 and 1.8)

'compatibility' => '14*',
to
'compatibility' => '14*,16*,18*',


Line 34 (Personal changes to style the text into a button)

$new_template = ' <a href="showthread.php?tid={$tid}&amp;action=bump">Bump this thread.</a>';
to
$new_template = ' <a class="bump-button" href="showthread.php?tid={$tid}&amp;action=bump">Bump</a>';

Line 116-138 (hide error variable changed, added write_query, changed t.lastpost string to t.lastpost; because it was replacing "t.lastpost"er with t.lastbumper


function bumpthread_foruminject()
{
global $db;
eval('
class BumpThreadDummyDB extends '.get_class($db).'
{
function BumpThreadDummyDB(&$olddb)
{
$vars = get_object_vars($olddb);
foreach($vars as $var => $val)
$this->$var = $val;
}

function query($string, $hideerr=0)
{
$string = str_replace(\'t.lastpost\', \'t.lastpostbump\', $string);
return parent::query($string, $hideerr);
}
}
');
$db = new BumpThreadDummyDB($db);

}



to 


function bumpthread_foruminject()
{
    global $db;
    eval('
        class BumpThreadDummyDB extends '.get_class($db).'
        {
            function BumpThreadDummyDB(&$olddb)
            {
                $vars = get_object_vars($olddb);
                foreach($vars as $var => $val)
                    $this->$var = $val;
            }

            function query($string, $hide_errors = 0, $write_query = 0)
            {
                $string = str_replace(\'t.lastpost;\', \'t.lastpostbump\', $string);
                return parent::query($string, $hide_errors);
            }
        }
    ');
    $db = new BumpThreadDummyDB($db);


}

So far, I haven't ran into any new issues. Got help from a friend to update this, because I needed it for my forum and I seen people who used to want it updated. Unsure if anyone else still does, but if so, here ya go.
Thanks for sharing Smile
thanks....working fine, but is it possible to allow selected group or member to use this feature?
This should come with MyBB. Bumping threads is a standard feature of forum software.
Bumping this thread (lol Big Grin)

Using mybb 1.8.21 it seems to work, button on template works, bump check is working (you can't double bump) but the thread stays at it's position in the thread list. There's no actual bumping of the thread.

Anybody know what to fix ?

Thanks
Hi.
I rewrote this plugin about a year ago but it was only for me and a small group of people. Today you can download it from Gitlab:
https://gitlab.com/piotrdziubczynski/mybb-bump-thread

Enjoy it! Smile
^ Thank You for sharing Smile