From: <on...@us...> - 2002-09-26 17:26:13
|
Update of /cvsroot/xoops/xoops-current/html/modules/newbb In directory usw-pr-cvs1:/tmp/cvs-serv30031 Modified Files: index.php Log Message: no message Index: index.php =================================================================== RCS file: /cvsroot/xoops/xoops-current/html/modules/newbb/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.php 26 Sep 2002 17:17:26 -0000 1.8 --- index.php 26 Sep 2002 17:26:09 -0000 1.9 *************** *** 29,33 **** $xoopsOption['show_rblock'] =1; include(XOOPS_ROOT_PATH."/header.php"); ! //make_cblock(); echo "<br />"; }else{ --- 29,33 ---- $xoopsOption['show_rblock'] =1; include(XOOPS_ROOT_PATH."/header.php"); ! make_cblock(); echo "<br />"; }else{ *************** *** 67,70 **** --- 67,72 ---- $sql .= ' WHERE f.cat_id = '.$viewcat; $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename'])); + } else { + $xoopsTpl->assign('forum_index_title', ''); } $sql .= ' ORDER BY f.cat_id, f.forum_id'; *************** *** 76,143 **** } $cat_count = count($categories); ! for ( $i = 0; $i < $cat_count; $i++ ) { ! $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); ! if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { ! $xoopsTpl->append("categories", $categories[$i]); ! continue; ! } ! foreach ( $forums as $forum_row ) { ! unset($last_post); ! if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { ! if ($forum_row['post_time']) { ! //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); ! $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); ! $last_post_icon = '<a href="'.XOOPS_URL.'/modules/newbb/viewtopic.php?post_id='.$forum_row['forum_last_post_id'].'&topic_id='.$forum_row['topic_id'].'&forum='.$forum_row['forum_id'].'#'.$forum_row['forum_last_post_id'].'">'; ! if ( $forum_row['icon'] ) { ! $last_post_icon .= '<img src="'.XOOPS_URL.'/images/subject/'.$forum_row['icon'].'" border="0" alt="" />'; ! } else { ! $last_post_icon .= '<img src="'.XOOPS_URL.'/images/subject/icon1.gif" width="15" height="15" border="0" alt="" />'; ! } ! $last_post_icon .= '</a>'; ! $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; ! if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ ! $categories[$i]['forums']['forum_lastpost_user'][] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$forum_row['uid'].'">' . $myts->makeTboxData4Show($forum_row['uname']).'</a>'; ! } else { ! $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; ! } ! if ( $forum_row['forum_type'] == 1 ) { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['locked']; ! } elseif ( $forum_row['post_time'] > $last_visit && $last_post != _MD_NOPOSTS ) { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts']; ! } else { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['folder']; ! } ! } else { ! // no forums, so put empty values ! $categories[$i]['forums']['forum_lastpost_time'][] = ""; ! $categories[$i]['forums']['forum_lastpost_icon'][] = ""; ! $categories[$i]['forums']['forum_lastpost_user'][] = ""; ! if ( $forum_row['forum_type'] == 1 ) { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['locked']; } else { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['folder']; } ! } ! $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; ! $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); ! $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); ! $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; ! $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; ! $all_moderators = get_moderators($forum_row['forum_id']); ! $count = 0; ! $forum_moderators = ''; ! foreach ( $all_moderators as $mods) { ! foreach ( $mods as $mod_id => $mod_name) { ! if ( $count > 0 ) { ! $forum_moderators .= ', '; } - $forum_moderators .= '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$mod_id.'">'.$myts->makeTboxData4Show($mod_name).'</a>'; - $count = 1; } } - $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; } } ! $xoopsTpl->append("categories", $categories[$i]); } $xoopsTpl->assign("img_hotfolder", $bbImage['newposts']); --- 78,149 ---- } $cat_count = count($categories); ! if ($cat_count > 0) { ! for ( $i = 0; $i < $cat_count; $i++ ) { ! $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); ! if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { ! $xoopsTpl->append("categories", $categories[$i]); ! continue; ! } ! foreach ( $forums as $forum_row ) { ! unset($last_post); ! if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { ! if ($forum_row['post_time']) { ! //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); ! $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); ! $last_post_icon = '<a href="'.XOOPS_URL.'/modules/newbb/viewtopic.php?post_id='.$forum_row['forum_last_post_id'].'&topic_id='.$forum_row['topic_id'].'&forum='.$forum_row['forum_id'].'#'.$forum_row['forum_last_post_id'].'">'; ! if ( $forum_row['icon'] ) { ! $last_post_icon .= '<img src="'.XOOPS_URL.'/images/subject/'.$forum_row['icon'].'" border="0" alt="" />'; ! } else { ! $last_post_icon .= '<img src="'.XOOPS_URL.'/images/subject/icon1.gif" width="15" height="15" border="0" alt="" />'; ! } ! $last_post_icon .= '</a>'; ! $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; ! if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ ! $categories[$i]['forums']['forum_lastpost_user'][] = '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$forum_row['uid'].'">' . $myts->makeTboxData4Show($forum_row['uname']).'</a>'; ! } else { ! $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; ! } ! if ( $forum_row['forum_type'] == 1 ) { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['locked']; ! } elseif ( $forum_row['post_time'] > $last_visit && $last_post != _MD_NOPOSTS ) { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts']; ! } else { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['folder']; ! } } else { ! // no forums, so put empty values ! $categories[$i]['forums']['forum_lastpost_time'][] = ""; ! $categories[$i]['forums']['forum_lastpost_icon'][] = ""; ! $categories[$i]['forums']['forum_lastpost_user'][] = ""; ! if ( $forum_row['forum_type'] == 1 ) { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['locked']; ! } else { ! $categories[$i]['forums']['forum_folder'][] = $bbImage['folder']; ! } } ! $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; ! $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); ! $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); ! $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; ! $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; ! $all_moderators = get_moderators($forum_row['forum_id']); ! $count = 0; ! $forum_moderators = ''; ! foreach ( $all_moderators as $mods) { ! foreach ( $mods as $mod_id => $mod_name) { ! if ( $count > 0 ) { ! $forum_moderators .= ', '; ! } ! $forum_moderators .= '<a href="'.XOOPS_URL.'/userinfo.php?uid='.$mod_id.'">'.$myts->makeTboxData4Show($mod_name).'</a>'; ! $count = 1; } } + $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; } } + $xoopsTpl->append("categories", $categories[$i]); } ! } else { ! $xoopsTpl->append("categories", array()); } $xoopsTpl->assign("img_hotfolder", $bbImage['newposts']); |