MyBB.de Forum

Normale Version: Bump Thread
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Eine neue Erweiterung wurde veröffentlicht: Bump Thread

Zitat:This plugin allows thread starters, administrators and super moderators to "bump" a thread without replying to it.

Note that this plugin only works if the sort order on forumdisplay is sorted by last post time.


This plugin adds an option in the AdminCP which allows admins to specify the minimum time between bumps.
Was muss ich umschreiben am Code das diese Funktion nur von Mods und Admins aber für alle Thread möglich ist (also nicht nur für eigene)?

Gruß
Alex
Du suchst in der Datei bumbthreads.php folgenden Code:
PHP-Code:
function bumpthread_run()
{
    global 
$mybb$thread$db;
    if(
$mybb->input['action'] == 'bump')
    {
        if(
$mybb->usergroup['cancp'] != && $mybb->usergroup['issupermod'] != && $thread['uid'] != $mybb->user['uid'])
            
error_no_permission();
        
        if(
$thread['lastpostbump'] + intval($mybb->settings['bumpthread_interval'])*60 TIME_NOW)
            
error('You cannot bump this thread within '.intval($mybb->settings['bumpthread_interval']).' minute(s) of its last bump.');
        
        
$db->update_query('threads', array('lastpostbump' => TIME_NOW), 'tid='.$thread['tid']);
        
redirect('showthread.php?tid='.$thread['tid'], 'Thread Bumped');
    }
    else
    {
        
// eval bump
        
if($mybb->usergroup['cancp'] == || $mybb->usergroup['issupermod'] == || $thread['uid'] == $mybb->user['uid'])
        {
            global 
$bumpthread$templates$tid;
            eval(
'$bumpthread = "'.$templates->get('showthread_bumpthread').'";');
        }
    }


und ersetzt in durch:

PHP-Code:
function bumpthread_run()
{
    global 
$mybb$thread$db;
    if(
$mybb->input['action'] == 'bump')
    {
        if(
$mybb->usergroup['cancp'] != && $mybb->usergroup['issupermod'] != )
            
error_no_permission();
        
        if(
$thread['lastpostbump'] + intval($mybb->settings['bumpthread_interval'])*60 TIME_NOW)
            
error('You cannot bump this thread within '.intval($mybb->settings['bumpthread_interval']).' minute(s) of its last bump.');
        
        
$db->update_query('threads', array('lastpostbump' => TIME_NOW), 'tid='.$thread['tid']);
        
redirect('showthread.php?tid='.$thread['tid'], 'Thread Bumped');
    }
    else
    {
        
// eval bump
        
if($mybb->usergroup['cancp'] == || $mybb->usergroup['issupermod'] == )
        {
            global 
$bumpthread$templates$tid;
            eval(
'$bumpthread = "'.$templates->get('showthread_bumpthread').'";');
        }
    }


MfG Megaleecher
Danke dir. Es klappt Exclamation