Bump Thread - 1.8
#1
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.
Reply
#2
Thanks for sharing Smile
Reply
#3
thanks....working fine, but is it possible to allow selected group or member to use this feature?
Reply
#4
This should come with MyBB. Bumping threads is a standard feature of forum software.
Reply
#5
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
Reply
#6
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
Best regards, Peter.
PHP Developer.


#gitlab #myplugins
Reply
#7
^ Thank You for sharing Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)