[phpbb]簡易子版面v1.0

網站架設,免費空間申請,架站技術交流區

ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

[phpbb]簡易子版面v1.0

文章ETERNAL » 2005-02-23 9:10 pm

我網站所使用的子分區,拿出來給大家分享 :wink:
有不好需要加強的地方,歡迎多指教

範例圖片
http://myweb.hinet.net/home4/iqstar/forum_sub.jpg

範例網站
http://bbs.et99.org


在phpbb2.0.4,2.0.11,2.0.12 測試過皆無問題


原本的安裝說明,所使用的圖檔是連到我的網頁空間
造成我的網頁流量增加不少,所以我改掉連結了,之前裝的人請見諒
請自行下載,放在自己的網頁空間上

外掛中所使用的圖檔下載網址
http://myweb.hinet.net/home4/iqstar/topnew.gif
http://myweb.hinet.net/home4/iqstar/ico ... t_lock.gif

代碼: 選擇全部
/*=====================================================
 Mod Title: 簡易子版面
 Author : ETERNAL<iqstar@ms24.hinet.net>
 Mod Version: 1.0
 Mod Date: 2005/2/21
 Demo Site : http://bbs.2233.idv.tw/
 Files To Edit: 11
===================================================== */

---------------------------------------------------------
加入sql語法

ALTER TABLE `phpbb_forums` ADD `forum_sub` SMALLINT( 5 ) UNSIGNED DEFAULT '0' NOT NULL ;
ALTER TABLE `phpbb_forums` ADD `sort_sub` SMALLINT( 5 ) UNSIGNED DEFAULT '0' NOT NULL ;
---------------------------------------------------------

=============打開 index.php============

找到===================
   $forum_data = array();
後面加上===============
   $forum_sub = array();
   $forum_sub2 = array();
找到===================
      $forum_data[] = $row;
後面加上===============
      if($row[forum_sub]>0)
      {
         if ( $row['forum_status'] == FORUM_LOCKED )
         {
            $forum_sub[$row['forum_sub']][$row['forum_id']] = '<a href='.append_sid('viewforum.'.$phpEx.'?' . POST_FORUM_URL .'='.$row['forum_id']).'>'. $row['forum_name'] . ' </a><img src="images/icon_minipost_lock.gif" alt="'.$lang['Forum_locked'].'" border="0">';
         }else
         {
            $forum_sub[$row['forum_sub']][$row['forum_id']]='<a href='.append_sid('viewforum.'.$phpEx.'?' . POST_FORUM_URL .'='.$row['forum_id']).'>'. $row['forum_name'] . ' </a>';
         }
         $forum_sub2[$row['forum_sub']][]=$row[forum_id];
      }
找到==============
                  if ( $is_auth_ary[$forum_id]['auth_view'] )
取代為============
                  if ( $is_auth_ary[$forum_id]['auth_view'] && $forum_data[$j]['forum_sub'] ==0)

找到==============
                        $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
                        $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
                     }
後面加上===========
//forum_sub start
                     for($k=0;$k<count($forum_sub2[$forum_id]);$k++)
                     {
                        $unread_topics = false;
                        $forum_id2=$forum_sub2[$forum_id][$k];
                        if ( $userdata['session_logged_in'] )
                        {
                           if ( !empty($new_topic_data[$forum_id2]) )
                           {
                              $forum_last_post_time = 0;
                              while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_id2]) )
                              {
                                 if ( empty($tracking_topics[$check_topic_id]) )
                                 {
                                    $unread_topics = true;
                                    $forum_last_post_time = max($check_post_time, $forum_last_post_time);
                                 }
                                 else
                                 {
                                    if ( $tracking_topics[$check_topic_id] < $check_post_time )
                                    {
                                       $unread_topics = true;
                                       $forum_last_post_time = max($check_post_time, $forum_last_post_time);
                                    }
                                    if($new_topic_data[$forum_id2][0])
                                    {
                                       $unread_topics = true;
                                    }
                                 }
                              }
                              if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
                              {
                                 if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
                                 {
                                    $unread_topics = false;
                                 }
                              }
                           }
                        }
                        if($is_auth_ary[$forum_id2]['auth_view'])
                        {
                           if($unread_topics)
                           {
                              $forum_sub[$forum_id][$forum_id2] = $forum_sub[$forum_id][$forum_id2].'<img src="images/topnew.gif" alt='.$lang['New_posts'].' border="0">';
                           }
                        }else
                        {
                           unset($forum_sub[$forum_id][$forum_id2]);
                        }
                     }
//forum_sub end


找到===============
                     if ( count($forum_moderators[$forum_id]) > 0 )
                     {
                        $l_moderators = ( count($forum_moderators[$forum_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
                        $moderator_list = implode(', ', $forum_moderators[$forum_id]);
                     }
                     else
                     {
                        $l_moderators = '&nbsp;';
                        $moderator_list = '&nbsp;';
                     }

後面加上===============

//forum_sub start
                     if ( count($forum_sub[$forum_id]) > 0 )
                     {
                        $forum_sub_list = implode(', ', $forum_sub[$forum_id]);
                     }
                     else
                     {
                        $forum_sub_list = '';
                     }
                     if(!empty($forum_sub_list))
                     {
                        $forum_sub_list="子版面 : ".$forum_sub_list;
                     }
//forum_sub end

找到===============
                        'FORUM_DESC' => $forum_data[$j]['forum_desc'],

後面加上==============
                        'FORUM_NAME_SUB' => $forum_sub_list,
                        
---------------------------------------------------------

打開 \includes\functions.php

找到=================
function make_jumpbox($action, $match_forum_id = 0)
{
....................
....................
....................
}

將整個 function make_jumpbox($action , $match_forum_id = 0) 取代為==========

//forum_sub start
function make_jumpbox($action,$match_forum_id=0)
{
   global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID,$is_auth;
   $sql="select cat_id,cat_title from ".CATEGORIES_TABLE." order by cat_order  ";
   if( !$result = $db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
   }
   $cat_data = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      $cat_data[] = $row;
   }
   $db->sql_freeresult($result);
   $sql = "SELECT cat_id,forum_id,forum_name,sort_sub,forum_sub,auth_view from ".FORUMS_TABLE."  ORDER BY cat_id,forum_order";
   if( !$result = $db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
   }
   $forum_data = array();
   $forum_sub = array();
   $forum_sub2 = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      $s="";
       
      if($row['auth_view'] <= AUTH_REG)
      {
         if($row[forum_sub]==0)
         {
            $forum_data[$row['cat_id']][] = $row;
         }
         else
         {
            if ($row[forum_id] == $match_forum_id)
            {
               $s = " selected=\"selected\"";
            }
            $forum_sub[$row['forum_sub']][] = "add_select('".$row[forum_id]."','".$row[forum_name]."','$s',".($row[sort_sub]+1).");";
            $forum_sub2[$row['forum_sub']][]=$row[forum_id];
         }
      }
   }
   $db->sql_freeresult($result);
   $sub_list="add_select('-1','".$lang['Select_forum']."','$s',0);";
   for( $i=0;$i<count($cat_data);$i++)
   {
      $s = "";
      $cat_id=$cat_data[$i][cat_id];
      $sub_list .="add_select('-1','&nbsp;','$s',0);";
      $sub_list .="add_select('-1','".$cat_data[$i][cat_title]."','$s',0);";
      for($j=0;$j<count($forum_data[$cat_id]);$j++)
      {
         $s = "";
         if ($forum_data[$cat_id][$j][forum_id] == $match_forum_id)
         {
            $s = " selected=\"selected\"";
         }
         $sub_list .= "add_select('".$forum_data[$cat_id][$j][forum_id]."','".$forum_data[$cat_id][$j][forum_name]."','$s',".($forum_data[$cat_id][$j][sort_sub]+1).");";
   if ( count($forum_sub[$forum_data[$cat_id][$j][forum_id]]) > 0 )
   {
      for($jj=0;$jj<count($forum_sub[$forum_data[$cat_id][$j][forum_id]]);$jj++)
      {
         $sub_list.= $forum_sub[$forum_data[$cat_id][$j][forum_id]][$jj];
         $sub_list.=sub_search($forum_sub2[$forum_data[$cat_id][$j][forum_id]][$jj],$forum_sub,$forum_sub2);
      }
   }
      }
   }
   $template->set_filenames(array(
      'jumpbox' => 'jumpbox.tpl')
   );
   $template->assign_vars(array(
      'L_GO' => $lang['Go'],
      'L_JUMP_TO' => $lang['Jump_to'],
      'L_SELECT_FORUM' => $lang['Select_forum'],
      'JUMP_NAME'=>POST_FORUM_URL,
      'S_JUMPBOX_SELECT' => $sub_list,
      'S_JUMPBOX_ACTION' => append_sid($action))
   );
   $template->assign_var_from_handle('JUMPBOX', 'jumpbox');
   return;
}

function sub_search($id,$forum_sub,$forum_sub2)
{
   if ( count($forum_sub[$id]) > 0 )
   {
      $list="";
      for($jj=0;$jj<count($forum_sub[$id]);$jj++)
      {
         $list.= $forum_sub[$id][$jj];
         $list.=sub_search($forum_sub2[$id][$jj],$forum_sub,$forum_sub2);
      }
   }
   return $list;
}
//forum_sub end

找到======================================
?>
前面加上==================================
function forum_path($forum_row,$forum_id)
{
   global $db,$phpEx;
   if($forum_row['forum_sub'] > 0)
   {
      $forum_path="-><a href=".append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id").">".$forum_row['forum_name']."</a>";
      $sql="select forum_id,forum_name,forum_sub from ".FORUMS_TABLE." where forum_id=".$forum_row['forum_sub'];
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
      }
      while($row = $db->sql_fetchrow($result))
      {
         $forum_path="-><a href=".append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=".$row[forum_id]).">".$row['forum_name']."</a>".$forum_path;
         if($row['forum_sub']==0)
         {
            break;
         }
         $sql="select forum_id,forum_name,forum_sub from ".FORUMS_TABLE." where forum_id=".$row['forum_sub'];
         if ( !($result = $db->sql_query($sql)) )
         {
            message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
         }
      }
   }else
   {
      $forum_path="-><a href=".append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id").">".$forum_row['forum_name']."</a>";
   }
   $db->sql_freeresult($result);
   unset($row);
   unset($forum_row);
   return $forum_path;
}
---------------------------------------------------------

打開viewforum.php

找到===============================
make_jumpbox('viewforum.'.$phpEx);
後面加上===========================
//forum_sub start
$forum_path=forum_path($forum_row,$forum_id);
//forum_sub end
找到===============================
   'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL ."=$forum_id"),
取代為=============================
   'FORUM_PATH' => $forum_path,
找到===============================
//
// End header
//
後面加上===========================
//forum_sub start
   $cat_id=$forum_row[cat_id];
   $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id,substring(pt.topic_title,1,18) as topic_title
      FROM ((( " . FORUMS_TABLE . " f
      LEFT JOIN " . POSTS_TABLE . " p ON p.post_id = f.forum_last_post_id )
      LEFT JOIN " . USERS_TABLE . " u ON u.user_id = p.poster_id )
      LEFT JOIN " . TOPICS_TABLE . " pt ON pt.topic_id  = p.topic_id  )
      where f.forum_sub =$forum_id or f.sort_sub = ".($forum_row[sort_sub]+2)."
      ORDER BY f.cat_id, f.forum_order";

   if ( !($result = $db->sql_query($sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
   }
   $temp_forum_id="";
   $forum_data = array();
   $forum_sub = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      if($row['sort_sub']==$forum_row['sort_sub']+1)
      {
         $forum_data[] = $row;
         $temp_forum_id.=",".$row[forum_id];
      }elseif($row['sort_sub']==$forum_row['sort_sub']+2)
      {
         if ( $row['forum_status'] == FORUM_LOCKED )
         {
            $forum_sub[$row['forum_sub']][$row['forum_id']] = '<a href='.append_sid('viewforum.'.$phpEx.'?' . POST_FORUM_URL .'='.$row['forum_id']).'>'. str_replace("<","",$row['forum_name']) . ' </a><img src="http://myweb.hinet.net/home4/iqstar/phpbb/phpbb/icon_minipost_lock.gif" alt="'.$lang['Forum_locked'].'" border="0">';
         }else
         {
            $forum_sub[$row['forum_sub']][$row['forum_id']]='<a href='.append_sid('viewforum.'.$phpEx.'?' . POST_FORUM_URL .'='.$row['forum_id']).'>'. str_replace("<","",$row['forum_name']) . ' </a>';
         }
      }
   }
   $db->sql_freeresult($result);

   $forum_moderators = array();
   if(!empty($temp_forum_id))
   {
      //
      // Find which forums are visible for this user
      //
      $is_auth_ary = array();
      $is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

      $temp_forum_id=substr($temp_forum_id,1,strlen($temp_forum_id));
      $sql = "SELECT aa.forum_id, u.user_id, u.username
            FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g, " . USERS_TABLE . " u
            WHERE aa.forum_id in ($temp_forum_id) and aa.auth_mod = " . TRUE . "
            AND g.group_single_user = 1
            AND ug.group_id = aa.group_id
            AND g.group_id = aa.group_id
            AND u.user_id = ug.user_id
            GROUP BY u.user_id, u.username, aa.forum_id
            ORDER BY aa.forum_id, u.user_id";
      if ( !($result = $db->sql_query($sql)) )
      {
         message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
      }
      while( $row = $db->sql_fetchrow($result) )
      {
         $forum_moderators[$row['forum_id']][] = '<option>'. $row['username'] . '</option>';
      }
      $db->sql_freeresult($result);


      if ( $userdata['session_logged_in'] )
      {
         $sql = "SELECT t.forum_id, t.topic_id, p.post_time
            FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
            WHERE p.post_id = t.topic_last_post_id and t.forum_id in ($temp_forum_id)
               AND p.post_time > " . $userdata['user_lastvisit'] . "
               AND t.topic_moved_id = 0";
         if ( !($result = $db->sql_query($sql)) )
         {
            message_die(GENERAL_ERROR, 'Could not query new topic information', '', __LINE__, __FILE__, $sql);
         }

         $new_topic_data = array();
         while( $topic_data = $db->sql_fetchrow($result) )
         {
            $new_topic_data[$topic_data['forum_id']][$topic_data['topic_id']] = $topic_data['post_time'];
         }
         $db->sql_freeresult($result);
      }
      for($j = 0; $j < count($forum_data); $j++)
      {
         $forum_sub_id = $forum_data[$j]['forum_id'];
         if ( $is_auth_ary[$forum_sub_id]['auth_view'] )
         {
            $template->assign_block_vars('sub_forum',array(
               'L_FORUM' => $lang['Forum'],
               'L_TOPICS' => $lang['Topics'],
               'L_POSTS' => $lang['Posts'],
               'L_LASTPOST' => $lang['Last_Post'],
               'L_MODERATOR' => $lang['Moderators'])
               );
            break;
         }
      }

      for($j = 0; $j < count($forum_data); $j++)
      {

                  $forum_sub_id = $forum_data[$j]['forum_id'];//display forum_sub start
                  if ( $is_auth_ary[$forum_sub_id]['auth_view'] )
                  {
                     if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
                     {
                        $folder_image = $images['forum_locked'];
                        $folder_alt = $lang['Forum_locked'];
                     }
                     else
                     {
                        $unread_topics = false;
                        if ( $userdata['session_logged_in'] )
                        {
                           if ( !empty($new_topic_data[$forum_sub_id]) )
                           {
                              $forum_last_post_time = 0;

                              while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_sub_id]) )
                              {
                                 if ( empty($tracking_topics[$check_topic_id]) )
                                 {
                                    $unread_topics = true;
                                    $forum_last_post_time = max($check_post_time, $forum_last_post_time);

                                 }
                                 else
                                 {
                                    if ( $tracking_topics[$check_topic_id] < $check_post_time )
                                    {
                                       $unread_topics = true;
                                       $forum_last_post_time = max($check_post_time, $forum_last_post_time);
                                    }
                                 }
                              }

                              if ( !empty($tracking_forums[$forum_sub_id]) )
                              {
                                 if ( $tracking_forums[$forum_sub_id] > $forum_last_post_time )
                                 {
                                    $unread_topics = false;
                                 }
                              }

                              if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
                              {
                                 if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
                                 {
                                    $unread_topics = false;
                                 }
                              }

                           }
                        }

                        $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
                        $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
                     }

                     $posts = $forum_data[$j]['forum_posts'];
                     $topics = $forum_data[$j]['forum_topics'];

                     if ( $forum_data[$j]['forum_last_post_id'] )
                     {
                        $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

                        $last_post = '<table width="100%" align="center"><tr><td align="right"><span class="genmed"><a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />'.$last_post_time . '<br />'.'by ';
                        $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> </span></td>';
                        $last_post .= '<td align="right" valign="middle"><img src="' . $images['icon_latest_reply'] . '" border="0" /></td></tr></table>';
                     }
                     else
                     {
                        $last_post = $lang['No_Posts'];
                     }

                     if ( count($forum_moderators[$forum_sub_id]) > 0 )
                     {
                        $l_moderators = ( count($forum_moderators[$forum_sub_id]) == 1 ) ? $lang['Moderator'] : $lang['Moderators'];
                        $moderator_list = implode(', ', $forum_moderators[$forum_sub_id]);
                     }
                     else
                     {
                        $l_moderators = '&nbsp;';
                        $moderator_list = '&nbsp;';
                     }

                     if ( count($forum_sub[$forum_sub_id]) > 0 )
                     {
                        $forum_sub_list = implode(', ', $forum_sub[$forum_sub_id]);
                     }
                     else
                     {
                        $forum_sub_list = '';
                     }
                     if(!empty($forum_sub_list))
                     {
                        $forum_sub_list="子版面 : ".$forum_sub_list;
                     }

                     $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
                     $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

                     $template->assign_block_vars('sub_forum.forumrow',   array(
                        'ROW_COLOR' => '#' . $row_color,
                        'ROW_CLASS' => $row_class,
                        'FORUM_FOLDER_IMG' => $folder_image,
                        'FORUM_NAME' => $forum_data[$j]['forum_name'],
                        'FORUM_DESC' => $forum_data[$j]['forum_desc'],
                        'FORUM_NAME_SUB' => $forum_sub_list,
                        'POSTS' => $forum_data[$j]['forum_posts'],
                        'TOPICS' => $forum_data[$j]['forum_topics'],
                        'LAST_POST' => $last_post,
                        'MODERATORS' => $moderator_list,

                        'L_MODERATOR' => $l_moderators,
                        'L_FORUM_FOLDER_ALT' => $folder_alt,

                        'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_sub_id"))
                     );
                  }//display forum_sub end
      }
   }
//forum_sub end
---------------------------------------------------------

打開 viewtopic.php

找到==================================
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments " . $count_sql . "

在, f.auth_attachments後面加上==================================
,f.forum_sub

找到==================================

$forum_id = intval($forum_topic_data['forum_id']);

後面加上==================================

//forum_sub start
$forum_path=forum_path($forum_topic_data,$forum_id);
//forum_sub end

找到==================================

'FORUM_ID' => $forum_id,

後面加上==================================

'FORUM_PATH' => $forum_path,

---------------------------------------------------------

打開admin/admin_forums.php

找到========================================
   return($catlist);
}

後面加上=====================================
//forum_sub start
function get_sub_list($id)
{
   global $db;
   $sql="select cat_id,cat_title from ".CATEGORIES_TABLE." order by cat_order  ";
   if( !$result = $db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
   }
   $cat_data = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      $cat_data[] = $row;
   }
   $db->sql_freeresult($result);
   $sql = "SELECT cat_id,forum_id,forum_name,sort_sub,forum_sub,main_sub from ".FORUMS_TABLE."  ORDER BY cat_id,forum_order";
   if( !$result = $db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, "Couldn't get list of Categories/Forums", "", __LINE__, __FILE__, $sql);
   }
   $forum_data = array();
   $forum_sub = array();
   $forum_sub2 = array();
   while( $row = $db->sql_fetchrow($result) )
   {
      $s="";
      if($row[forum_sub]==0)
      {
         $forum_data[$row['cat_id']][] = $row;
      }
      else
      {
         if ($row[forum_id] == $id)
         {
            $s = " selected=\"selected\"";
         }
         $forum_sub[$row['forum_sub']][] = "add_select('".$row[cat_id].",".$row[forum_id].",".$row[sort_sub].",".$row[main_sub]."','".$row[forum_name]."','$s',".($row[sort_sub]+1).");";
         $forum_sub2[$row['forum_sub']][]=$row[forum_id];
      }
   }
   $db->sql_freeresult($result);
   $sub_list="";
   for( $i=0;$i<count($cat_data);$i++)
   {
      $s = "";
      $cat_id=$cat_data[$i][cat_id];
      $sub_list .="add_select('".$cat_id.",0,0,0','".$cat_data[$i][cat_title]."','$s',0);";
      for($j=0;$j<count($forum_data[$cat_id]);$j++)
      {
         $s = "";
         if ($forum_data[$cat_id][$j][forum_id] == $id)
         {
            $s = " selected=\"selected\"";
         }
         $sub_list .= "add_select('".$forum_data[$cat_id][$j][cat_id].",".$forum_data[$cat_id][$j][forum_id].",".$forum_data[$cat_id][$j][sort_sub].",".$forum_data[$cat_id][$j][forum_id]."','".$forum_data[$cat_id][$j][forum_name]."','$s',".($forum_data[$cat_id][$j][sort_sub]+1).");";

         if ( count($forum_sub[$forum_data[$cat_id][$j][forum_id]]) > 0 )
         {
            for($jj=0;$jj<count($forum_sub[$forum_data[$cat_id][$j][forum_id]]);$jj++)
            {
               $sub_list.= $forum_sub[$forum_data[$cat_id][$j][forum_id]][$jj];
               $sub_list.=sub_search($forum_sub2[$forum_data[$cat_id][$j][forum_id]][$jj],$forum_sub,$forum_sub2);
            }
         }
      }
   }
   return $sub_list;
}
//forum_sub end

找到======================
          $catlist = get_list('category', $cat_id, TRUE);
取代為======================
         $catlist = get_sub_list($row['forum_id']);
找到======================
         while( list($field, $value) = each($forum_auth_ary) )
         {
            $field_sql .= ", $field";
            $value_sql .= ", $value";
         }
後面加上==================
//forum_sub start
         $forum_set=$HTTP_POST_VARS[POST_CAT_URL];
         if(empty($forum_set))
         {
            message_die(GENERAL_ERROR, "設定錯誤");
         }
         else
         {
            $temp=split(",",$forum_set);
            $c=intval($temp[0]);
            $forum_sub=intval($temp[1]);
            if($forum_sub >0 && intval($HTTP_POST_VARS[POST_FORUM_URL])!= $forum_sub)
            {
               $sort_sub=intval($temp[2])+1;
            }else
            {
               $sort_sub=intval($temp[2]);
            }
         }
//forum_sub end

找到======================
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

取代為=====================
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status,forum_sub,sort_sub, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . $c . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " .$forum_sub.",".$sort_sub.",". intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";


找到========================
         $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
取代為======================
//forum_sub start
         $forum_set=$HTTP_POST_VARS[POST_CAT_URL];
         if(empty($forum_set))
         {
            message_die(GENERAL_ERROR, "設定錯誤");
         }
         else
         {
            $sql = "select count(forum_sub) as id from " . FORUMS_TABLE . " WHERE forum_sub = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
            if( !$result = $db->sql_query($sql) )
            {
               message_die(GENERAL_ERROR, "設定錯誤");
            }
            $get_sub_Id = $db->sql_fetchrow($result);
            if($get_sub_Id[id]>0)
            {
               message_die(GENERAL_ERROR, "此版面有其他子版面相連,無法設定成子版面");
            }
            $temp=split(",",$forum_set);
            $c=intval($temp[0]);
            $forum_sub=intval($temp[1]);
            if(intval($HTTP_POST_VARS[POST_FORUM_URL])== $forum_sub)
            {
               $sort_sub=intval($temp[2]);
               $sql = "UPDATE " . FORUMS_TABLE . "
                     SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
                     WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
            }else
            {
               if(intval($temp[1])>0)
               {
                  $sort_sub=intval($temp[2])+1;
               }else
               {
                  $sort_sub=intval($temp[2]);
               }
               $sql = "UPDATE " . FORUMS_TABLE . "
                     SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . $c . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
                     ,forum_sub=".$forum_sub.",sort_sub=".$sort_sub."
                     WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
            }
         }
         if( !$result = $db->sql_query($sql) )
         {
            message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
         }
//forum_sub end

找到====================
         if ($forum_rows[$j]['cat_id'] == $cat_id)
         {
後面加上================
            if($forum_rows[$j]['forum_sub']>0)
            {
               $forum_sub="<br>子版面";
            }
找到====================
               'U_FORUM_MOVE_DOWN' => append_sid("admin_forums.$phpEx?mode=forum_order&amp;move=15&amp;" . POST_FORUM_URL . "=$forum_id"),

後面加上=================
               'FORUM_SUB' =>$forum_sub,
---------------------------------------------------------

打開 posting.php

找到=================
   $forum_name = $post_info['forum_name'];
後面加上===============
   $forum_path=forum_path($post_info,$forum_id);
找到=================
   'L_POST_A' => $page_title,
   'L_POST_SUBJECT' => $lang['Post_subject'],
後面加上===============
   'FORUM_PATH' => $forum_path,

---------------------------------------------------------
打開 \templates\subSilver\index_body.tpl

找到==================================
{catrow.forumrow.FORUM_DESC}
取代為================================
{catrow.forumrow.FORUM_DESC}<br>{catrow.forumrow.FORUM_NAME_SUB}
---------------------------------------------------------

打開 \templates\subSilver\jumpbox.tpl

找到====================================
<form method="get" name="jumpbox" action="{S_JUMPBOX_ACTION}" onSubmit="if(document.jumpbox.f.value == -1){return false;}"><table cellspacing="0" cellpadding="0" border="0">
前面加上=================================
<script language="JavaScript">
function add_select(val,na,s,sort)
{
   var temp="";
   if(sort>0)
   {
      na="→ "+na
   }
   for(var i=0;i<sort;i++)
   {
      temp+=" ";
   }
   document.write('<option value="'+val+'" '+s+'>'+temp+na+'</option>');
}
</script>
找到======================================
{S_JUMPBOX_SELECT}
取代為=====================================
<script language="JavaScript">{S_JUMPBOX_SELECT}</script>
---------------------------------------------------------

打開 viewforum_body.tpl

找到=======================================
 -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
取代為=====================================
 {FORUM_PATH}
 
找到=======================================
  <table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
   <tr>
     <th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
     <th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
     <th width="100" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
     <th width="50" align="center" class="thTop" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
     <th width="190" align="center" class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
   </tr>
前面加上=====================================
  <!-- BEGIN sub_forum -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
  <tr>
   <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
   <th width="50" class="thTop" nowrap="nowrap">&nbsp;{L_POSTS}&nbsp;</th>
   <th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
  </tr>
  <!-- BEGIN forumrow -->
  <tr>
   <td class="row1" align="center" valign="middle" height="50"><img src="{sub_forum.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{sub_forum.forumrow.L_FORUM_FOLDER_ALT}" title="{sub_forum.forumrow.L_FORUM_FOLDER_ALT}" /></td>
   <td class="row1" width="70%" height="50"><span class="forumlink"> <a href="{sub_forum.forumrow.U_VIEWFORUM}" class="forumlink">{sub_forum.forumrow.FORUM_NAME}</a><br />
     </span> <span class="genmed">{sub_forum.forumrow.FORUM_DESC}<br />
     </span><span class="gensmall">{sub_forum.forumrow.L_MODERATOR} {sub_forum.forumrow.MODERATORS}</span></td>
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{sub_forum.forumrow.TOPICS}</span></td>
   <td class="row2" align="center" valign="middle" height="50"><span class="gensmall">{sub_forum.forumrow.POSTS}</span></td>
   <td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{sub_forum.forumrow.LAST_POST}</span></td>
  </tr>
  <!-- END forumrow -->
</table>
  <!-- END sub_forum --> 
---------------------------------------------------------

打開 \templates\subSilver\viewtopic_body.tpl

找到=================
 -> <a class="nav" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>
取代為===============
 {FORUM_PATH}
---------------------------------------------------------

打開 \templates\subSilver\posting_body.tpl

找到=================
-> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a>
取代為===============
 {FORUM_PATH}

---------------------------------------------------------

打開 \templates\subSilver\admin\forum_admin_body.tpl

找到==============
{L_MOVE_DOWN}</a>
後面加上===========
{catrow.forumrow.FORUM_SUB}
---------------------------------------------------------

打開 \templates\subSilver\admin\forum_edit_body.tpl

找到==================
<p>{L_FORUM_EXPLAIN}</p>
後面加上===============
<script language="JavaScript">
function add_select(val,na,s,sort)
{
   var temp="";
   if(sort>0)
   {
      na="→ "+na
   }
   for(var i=0;i<sort;i++)
   {
      temp+=" ";
   }
   document.write('<option value="'+val+'" '+s+'>'+temp+na+'</option>');
}
</script>
找到=====================
{S_CAT_LIST}
取代為===================
<script language="JavaScript">{S_CAT_LIST}</script>


安裝完畢!!

#####################################################################

若您安裝過的外掛,有更改過admin/admin_forums.php的內容
在admin/admin_forums.php的修改過程中
有兩個步驟請注意
代碼: 選擇全部
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";


代碼: 選擇全部
         $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);


建議修改方式如下

找到==================================
代碼: 選擇全部
         $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";


IN LINE FIND / 在行內找到======================
代碼: 選擇全部
, prune_enable

IN LINE BEFORE ADD / 在該行之前加入 ======================
代碼: 選擇全部
,forum_sub,sort_sub

IN LINE FIND / 在行內找到======================
代碼: 選擇全部
.",". intval($HTTP_POST_VARS['prune_enable'])

IN LINE BEFORE ADD / 在該行之前加入 ======================
代碼: 選擇全部
. ", " .$forum_sub.",".$sort_sub.","



找到==================================
代碼: 選擇全部
         $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);


前面加上=====================================
代碼: 選擇全部
//forum_sub start
         $forum_set=$HTTP_POST_VARS[POST_CAT_URL];
         if(empty($forum_set))
         {
            message_die(GENERAL_ERROR, "設定錯誤");
         }
         else
         {
            $sql = "select count(forum_sub) as id from " . FORUMS_TABLE . " WHERE forum_sub = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
            if( !$result = $db->sql_query($sql) )
            {
               message_die(GENERAL_ERROR, "設定錯誤");
            }
            $get_sub_Id = $db->sql_fetchrow($result);
            if($get_sub_Id[id]>0)
            {
               message_die(GENERAL_ERROR, "此版面有其他子版面相連,無法設定成子版面");
            }
            $temp=split(",",$forum_set);
            $c=intval($temp[0]);
            $forum_sub=intval($temp[1]);
            if(intval($HTTP_POST_VARS[POST_FORUM_URL])== $forum_sub)
            {
               $sort_sub=intval($temp[2]);

後面加上=====================================
代碼: 選擇全部
            }else
            {
               if(intval($temp[1])>0)
               {
                  $sort_sub=intval($temp[2])+1;
               }else
               {
                  $sort_sub=intval($temp[2]);
               }

IN LINE FIND / 在行內找到======================
代碼: 選擇全部
intval($HTTP_POST_VARS[POST_CAT_URL])

替換成======================
代碼: 選擇全部
$c

IN LINE FIND / 在行內找到======================
代碼: 選擇全部
, prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "

IN LINE AFTER ADD / 在該行之後加入 ======================
代碼: 選擇全部
                     ,forum_sub=".$forum_sub.",sort_sub=".$sort_sub."

後面加上===============
代碼: 選擇全部
            }
         }
         if( !$result = $db->sql_query($sql) )
         {
            message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
         }
//forum_sub end



最後由 ETERNAL 於 2005-07-11 9:37 pm 編輯,總共編輯了 8 次。

chfj
 
文章: 2
註冊時間: 2005-03-18 12:21 am

文章chfj » 2005-03-18 4:18 pm

2個問題想請教

1.如圖
圖檔

當我將所有文章設成已閱讀後 這個new還是存在 有辦法解決嗎

2.如圖
圖檔
圖檔

在同一區內真正的新文章應該是子分區
但是在首頁上的最新文章不是顯示子分區內的

先謝謝您的回答囉




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-03-21 10:32 am

1.剛剛去測試後,真的有這個問題,等有空在來解決這個問題

2.前幾天有人傳訊息問過,我轉貼一下

來自: ETERNAL
收件人: 心靈捕手
發表於: 2005-03-17 11:41 PM
主題: Re: [建議]與[請教]

假設原版面 A, 底下設有一個子版面 B;
而在" 最後發表" 一欄中, 只會顯示版面 A, 最後發表的發表人(文章),
並無法顯示版面 B, 最後發表的發表人(文章).

請教您該做如何的修改呢?



你的意思是說
要在A版面顯示B版面最後一篇文章嗎?
我覺得這一點很難,以前有想過
假如你A版面下面有B,C,D數個子版面 你要顯示哪一個子版的最後一篇文章
萬一B,C,D下面還有數個子版,光是想像就頭大了




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-03-26 11:33 pm

你反應的第一個問題
在index.php中
尋找
代碼: 選擇全部
                           }
                        }
                        if($is_auth_ary[$forum_id2]['auth_view'])
                        {
                           if($unread_topics)
                           {
                              $forum_sub[$forum_id][$forum_id2] = $forum_sub[$forum_id][$forum_id2].'<img src="http://www.233.idv.tw/phpbb/topnew.gif" alt='.$lang['New_posts'].' border="0">';
                           }
                        }else
                        {
                           unset($forum_sub[$forum_id][$forum_id2]);
                        }


在前面加上
代碼: 選擇全部
                              if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
                              {
                                 if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time )
                                 {
                                    $unread_topics = false;
                                 }
                              }





chfj
 
文章: 2
註冊時間: 2005-03-18 12:21 am

文章chfj » 2005-03-28 1:52 pm

謝謝囉




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-04-02 2:51 pm

水色論壇 http://www.et99.net
簡恩峻分享

訪客
 

文章訪客 » 2005-04-10 2:47 am


YUANYU
 

文章YUANYU » 2005-04-10 2:48 am

不好意思上面那一篇是小弟發的
再提供清楚的資訊

請問改完簡易子版面v1.0後新增一個子版面後整個框框都變大了
要從哪修改才會正常呢?

另外在最後發表的一個三角icon也不能點選(是哪出了問題?)

還有在首面的版面也都變高了,能改低一點嗎?

謝謝

phpbb:2.0.13
os:linux
快整程式:無
風格iCGstation




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-04-10 8:05 am

YUANYU 寫:不好意思上面那一篇是小弟發的
再提供清楚的資訊

請問改完簡易子版面v1.0後新增一個子版面後整個框框都變大了
要從哪修改才會正常呢?

另外在最後發表的一個三角icon也不能點選(是哪出了問題?)

還有在首面的版面也都變高了,能改低一點嗎?

謝謝

phpbb:2.0.13
os:linux
快整程式:無
風格iCGstation


1.我看很正常,什麼地方框框變大?

2.
改viewforum.php
看你首頁三角icon怎麼改,這部分就怎麼改
代碼: 選擇全部
                     if ( $forum_data[$j]['forum_last_post_id'] )
                     {
                        $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);

                        $last_post = '<table width="100%" align="center"><tr><td align="right"><span class="genmed"><a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"> '.$forum_data[$j]['topic_title'].' </a>'.'<br />'.$last_post_time . '<br />'.'by ';
                        $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . '='  . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> </span></td>';
                        $last_post .= '<td align="right" valign="middle"><img src="' . $images['icon_latest_reply'] . '" border="0" /></td></tr></table>';
                     }


首面的版面變高是你頁面風格的問題吧,這需要你自己來調整
如果你用phpbb原本的樣子,就不會變高了



訪客
 

文章訪客 » 2005-04-10 12:02 pm

問題外掛:簡易子版面v1.0
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=33019
使用版本:phpBB 2.0.13)
網站位置:還在自己電腦上面測試
狀況描述:
當我設定好一各# 天堂討論專區 Lineage #
# 天堂討論專區 Lineage #裡面設定兩個天堂 訐譙洩氣和天堂 訐譙洩氣2的討論區
可是當# 天堂討論專區 Lineage #裡面沒發表文章時會顯示出

代碼: 選擇全部
這個版面目前沒有文章
請按下發表新主題的按鈕發表新的文章主題


之後上面的會出現天堂 訐譙洩氣和天堂 訐譙洩氣2,就無法看到(如圖二),因該正常來說顯示出上面的字串加上子分區兩各討論區出來

圖一
圖檔

圖二
圖檔


補充:
目前剛裝好2.0.13版的PHPBB
修正過多國語系修正




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-04-10 12:17 pm

天堂討論專區 Lineage 裡面沒有文章
當然會出現

這個版面目前沒有文章
請按下發表新主題的按鈕發表新的文章主題


就算沒有裝子版面,也是這樣
感覺不出什麼地方奇怪 :?



訪客
 

文章訪客 » 2005-04-10 12:26 pm

ETERNAL 寫:天堂討論專區 Lineage 裡面沒有文章
當然會出現

這個版面目前沒有文章
請按下發表新主題的按鈕發表新的文章主題


就算沒有裝子版面,也是這樣
感覺不出什麼地方奇怪 :?


問題一:
可能是我的表達方式有問題
意思是說,當我裝完子分區
之後我設定好兩個子分區
當天堂討論專區 Lineage這裡面沒有發表任何一篇文章
就不會顯示出那兩個子分區出來

問題二:
我若再子分區裡面的分區討論設定某一各版主
他會出現

版面管理員 可樂

這各可樂會沒有辦法連結版主的資料
在天堂討論專區 Lineage這邊設定便會有連結版主的資料

不知道我改成這樣說明是否更清楚




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-04-10 1:03 pm

第一個問題
我沒注意到,謝謝你的告知
修改方式如下
在viewforum.php檔案裡面

代碼: 選擇全部
//forum_sub start
   $cat_id=$forum_row[cat_id];

一直到
代碼: 選擇全部
                  }//display forum_sub end
      }
   }
//forum_sub end


搬移到
代碼: 選擇全部
//
// End header
//

//
// Okay, lets dump out the page ...
//


中間
像這樣
代碼: 選擇全部
//
// End header
//
    [color=blue]<---搬到這裡面[/color]
//
// Okay, lets dump out the page ...
//



你說的第二個問題我不太懂 :?



訪客
 

文章訪客 » 2005-04-10 1:07 pm

感謝站長的解答

第二各問題就是

分區1
--分區2
--分區3

當我分區1設定版主為我或其他版友時
會顯示出 版面管理員 basang <-----這邊點basang,會有連結個人資料
但是進去分區2設定版主
會顯示出 版面管理員 basang <-----這邊點basang,但是這邊只出現一般的文字而已,basang這邊無法連結進去看版主的資訊




ETERNAL
 
文章: 2937
註冊時間: 2003-12-03 11:08 pm
性別: 男生

文章ETERNAL » 2005-04-10 1:37 pm

版面管理員: Martinet <---你的意思是這個地方嗎

正在瀏覽此區的會員: 沒有
水色論壇-FFA WOG 首頁 ->科技資訊區->架站討論區



下一頁

回到 架站討論

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 8 位訪客

cron