Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Bump Thread
#1
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.
Zitieren
#2
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
Zitieren
#3
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
Zitieren
#4
Danke dir. Es klappt Exclamation
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Bump Absorber MyBB.de Bot 3 832 08.12.2023, 13:45
Letzter Beitrag: MyBB.de Bot
  Bump Thread MyBB.de Bot 0 756 19.11.2019, 02:10
Letzter Beitrag: MyBB.de Bot