예제 #1
0
파일: showforum.php 프로젝트: kawf/kawf
     if ($thread) {
         break;
     }
     $sth->closeCursor();
     $threadtable--;
 }
 if (!isset($indexes[$threadtable])) {
     break;
 }
 do {
     $skipthreads++;
     if (isset($threadshown[$thread['tid']])) {
         continue;
     }
     gen_thread_flags($thread);
     $messagestr = gen_thread($thread);
     if (!$messagestr) {
         continue;
     }
     /*
         if ($thread['state'] == 'Deleted')
           $tpl->set_var("CLASS", "drow" . ($numshown % 2));
         else if ($thread['state'] == 'Moderated')
           $tpl->set_var("CLASS", "mrow" . ($numshown % 2));
         else
     */
     if ($thread['flag']['Sticky']) {
         /* calculated by gen_thread_flags() */
         $tpl->set_var("CLASS", "srow" . $numshown % 2);
         if (is_thread_bumped($thread)) {
             $tthreadsshown++;
예제 #2
0
파일: showtracking.php 프로젝트: kawf/kawf
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;
}
예제 #3
0
파일: tracking.php 프로젝트: kawf/kawf
 $tpl->set_var("FORUM_SHORTNAME", $forum['shortname']);
 /* rebuild caches per forum */
 $indexes = build_indexes($forum['fid']);
 list($tthreads, $tthreads_by_tid) = build_tthreads($forum['fid']);
 $forumcount = $forumupdated = 0;
 $tpl->set_var("_row", "");
 $tpl->set_var("_hr", "");
 if (count($tthreads_by_tid)) {
     foreach ($tthreads_by_tid as $tthread) {
         $iid = tid_to_iid($tthread['tid']);
         /* 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++;