MyBB.de Forum

Normale Version: Push Button
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2 3 4 5 6 7 8 9 10 11 12 13

TelCont@r

Code:
// eval bump
        if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $thread['uid'] == $mybb->user['uid'])
        {
            global $bumpthread, $templates, $tid;
            
             $query = $db->simple_select('threads', 'lastpostbump', 'tid='.$thread['tid']);
            $result = $db->fetch_array($query);

            if($thread['lastpostbump'] && (TIME_NOW - $mybb->settings['bumpthread_interval']*60) >= $result['lastpostbump'])
            {
            eval('$bumpthread = "'.$templates->get('tclose_yourselfd').'";');
            }
        }

So sieht mein Code aus und es funktioniert nicht.

Gruß
Setze mal noch $db bei den globalen Variablen ein. Vielleicht bringt das was, aber sollte eigentlich nicht notwendig sein.

Was ist denn das jetzt für ein Template "tclose_yourselfd"? Undecided Das ist gar nicht Bestandteil des Plugins von Zingaburga!

Du machst es einem nicht einfach, Dir zu helfen. Zeig mal Deinen Plugin-Code her (bitte als Anhang) und den Inhalt der von Dir genutzten Templates.

TelCont@r

dumbthread.php:
Code:
// eval bump
        if($mybb->usergroup['cancp'] == 1 || $mybb->usergroup['issupermod'] == 1 || $thread['uid'] == $mybb->user['uid'])
        {
            global $db, $bumpthread, $templates, $tid;
            
             $query = $db->simple_select('threads', 'lastpostbump', 'tid='.$thread['tid']);
            $result = $db->fetch_array($query);

            if($thread['lastpostbump'] && (TIME_NOW - $mybb->settings['bumpthread_interval']*60) >= $result['lastpostbump'])
            {
            eval('$bumpthread = "'.$templates->get('tclose_yourselfd').'";');
            }
        }

Themplate: tclose_yourself
Code:
<br /><br />
<span style="float: right; text-align:right;padding:3px;margin-bottom:3px;min-width:100px;background-color:#fff;border:#0F5C8E 1px solid">
        Mein Thema <a href="moderation.php?action=closety&tid={$thread['tid']}&my_post_key={$mybb->post_code}">
    schlie&szlig;en
    </a>
    </span>

<span style="float: right; text-align:right;padding:3px;margin-bottom:3px;min-width:100px;background-color:#fff;border:#0F5C8E 1px solid">
        Thema <a href="showthread.php?tid={$thread['tid']}&amp;action=bump">
    pushen
    </a>
    </span><br /><br />
Das ist aber nicht das komplette Plugin, oder? Hänge das bitte mal hier an, damit man Dein Problem nachvollziehen kann.

Heißt das Plugin nun bumpthread.php oder dumpthread.php? Du rufst das Template "tclose_yourselfd" auf, aber zeigst hier das Template "tclose_yourself". Was stimmt denn nun?

TelCont@r

bumpthread.php heißt die Datei. (siehe Anhang)

Themplate: tclose_yourself (an dieser Stelle ein Tippfehler)
Code:
<br /><br />
<span style="float: right; text-align:right;padding:3px;margin-bottom:3px;min-width:100px;background-color:#fff;border:#0F5C8E 1px solid">
        Mein Thema <a href="moderation.php?action=closety&tid={$thread['tid']}&my_post_key={$mybb->post_code}">
    schlie&szlig;en
    </a>
    </span>

<span style="float: right; text-align:right;padding:3px;margin-bottom:3px;min-width:100px;background-color:#fff;border:#0F5C8E 1px solid">
        Thema <a href="showthread.php?tid={$thread['tid']}&amp;action=bump">
    pushen
    </a>
    </span><br /><br />
(11.07.2014, 22:45)TelCont@r schrieb: [ -> ]Themplate: tclose_yourself (an dieser Stelle ein Tippfehler)
Den Du aber in Deinem Plugin immer noch drin hast. Du rufst dort das Template "tclose_yourselfd" auf!

TelCont@r

Ohhh Ok,.

nächste Fehlermeldung:
Code:
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
1054 - Unknown column 't.lastpostbumper' in 'field list'
Query:
SELECT t.subject,t.username,t.uid,t.tid,t.fid,t.lastpostbump,t.lastpostbumper,t.lastpostbumperuid,t.replies,t.visible,tr.uid AS truid,tr.dateline,tp.displaystyle AS styledprefix,f.name FROM mybb_threads t LEFT JOIN mybb_threadsread tr ON (tr.tid=t.tid AND tr.uid='1') LEFT JOIN mybb_threadprefixes tp ON (tp.pid = t.prefix) LEFT JOIN mybb_forums f ON (f.fid = t.fid) WHERE (t.visible = '1' OR '1'='1' ) AND t.closed NOT LIKE 'moved|%' AND t.visible != '-2' AND f.active = '1' ORDER BY t.lastpostbump DESC LIMIT 0,3
Dieses Plugin nutzt gar kein Variable mit dem Namen "lastpostbumper". Hast Du da evtl. noch ein anderes Plugin zum Pushen parallel am Laufen?

Es nutzt auch keine Variable mit dem Namen "lastpos​tbumperuid".

Generell kommt diese Art der Abfrage nicht in Deinem Plugin vor.....

TelCont@r

Ach ich gib hier auf. Ich hab kA mehr was ich hier treibe. Ich melde mich später nochmal. Mein ganze Code ist unübersichtlich geworden. Brauch erstmal nen Schlaf.
(11.07.2014, 22:58)TelCont@r schrieb: [ -> ]Ich hab kA mehr was ich hier treibe. ..... Mein ganze Code ist unübersichtlich geworden.
Das sind keine guten Voraussetzungen......
Seiten: 1 2 3 4 5 6 7 8 9 10 11 12 13