Exemple #1
0
        */
        if ($thread['flag']['Sticky']) {
            /* calculated by gen_thread_flags() */
            $tpl->set_var("CLASS", "srow" . $numshown % 2);
            if (is_thread_bumped($thread)) {
                $tthreadsshown++;
            }
        } else {
            if (is_thread_bumped($thread)) {
                $tpl->set_var("CLASS", "trow" . $numshown % 2);
                $tthreadsshown++;
            } else {
                $tpl->set_var("CLASS", "row" . $numshown % 2);
            }
        }
        $threadlinks = gen_threadlinks($thread);
        $tpl->set_var("MESSAGES", $messagestr);
        $tpl->set_var("THREADLINKS", $threadlinks);
        $tpl->parse("_row", "row", true);
        $numshown++;
    } while ($thread = $sth->fetch());
    $sth->closeCursor();
}
if (!process_tthreads(true)) {
    $tpl->set_var("tracked_threads", "");
}
if (!$tthreadsshown) {
    $tpl->set_var("update_all", "");
}
if (!$numshown) {
    $tpl->set_var($table_block, "<font size=\"+1\">No messages in this forum</font><br>");
Exemple #2
0
function parse_row($yatt, $block, $class, $thread, $collapse = false)
{
    $messages = gen_thread($thread, $collapse);
    if (!$messages) {
        return false;
    }
    $yatt->set('class', $class);
    $yatt->set('messages', $messages);
    $yatt->set('threadlinks', gen_threadlinks($thread, $collapse));
    $yatt->parse("{$block}.row");
    return true;
}
Exemple #3
0
         /* tstamp is LOCALTIME of SQL server, unixtime is seconds since epoch */
         $thread = db_query_first("select *, UNIX_TIMESTAMP(tstamp) as unixtime from f_threads{$iid} where tid = ?", array($tthread['tid']));
         if (!$thread) {
             continue;
         }
         $messagestr = gen_thread($thread, true);
         if (!isset($messagestr)) {
             continue;
         }
         if (is_thread_bumped($thread)) {
             $tpl->set_var("CLASS", "trow" . $forumcount % 2);
             $forumupdated++;
         } else {
             $tpl->set_var("CLASS", "row" . $forumcount % 2);
         }
         $threadlinks = gen_threadlinks($thread, true);
         $tpl->set_var("MESSAGES", $messagestr);
         $tpl->set_var("THREADLINKS", $threadlinks);
         $tpl->parse("_row", "row", true);
         $forumcount++;
         $numshown++;
     }
 }
 if ($forumcount > 0) {
     if ($forumupdated) {
         $tpl->parse("_update_all", "update_all");
     } else {
         $tpl->set_var("_update_all", "");
     }
 }
 if ($forumcount) {