[整理]偽子分區功能介紹 !

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

bokie 寫:http://rapidshare.de/files/909528/fake_ ... 2.rar.html <---這個連結已經不能下載了...
請問有大大還可以供下載嗎?
感激萬分!!
檔案還在呀
煩請再自行確認一下

DL
竹貓忠實會員
竹貓忠實會員
文章: 717
註冊時間: 2005-03-05 15:29

文章 DL »

and4amy 寫:恩,不過發現有個小問題
就是如果子分區裡面有些是限制某些特定會員才可以觀看的版面\r
就會變成所有人都可以看到\r
能請倉衣老大把權限的考量加入這個外掛嗎?
就是說,如果子分區裡有某些會員不能看到的區塊
那就不會被看到\r
有勞了,我看了些其他外掛的加法還是一頭霧水
不知道要如何加進去比較好
不會出現這個問題的阿!檢視的權限要設定給誰看!

bokie
星球公民
星球公民
文章: 69
註冊時間: 2003-11-20 08:06
來自: 香港
聯繫:

文章 bokie »

~倉木麻衣~ 寫:
bokie 寫:http://rapidshare.de/files/909528/fake_ ... 2.rar.html <---這個連結已經不能下載了...
請問有大大還可以供下載嗎?
感激萬分!!
檔案還在呀
煩請再自行確認一下
下載到了,原來瓖再按free進去才有的^^"thx
●架設環境:付費空間 [Unix]
●上網方式:香港區網 [和記]
●phpBB2 版本:phpBB 2.0.16
●MySQL 版本 4.0.17
●phpMyAdmin 2.5.6
●PHP 版本: 4.3.10

bokie
星球公民
星球公民
文章: 69
註冊時間: 2003-11-20 08:06
來自: 香港
聯繫:

文章 bokie »

倉木麻衣大大~
我安裝了後,沒有任何錯誤訊息出現,在首頁的"最後發表"欄位上會顯示"沒有文章"
而且圖示方面有新文章的分區也沒有改變做有新文章的圖示...是否我安裝的問題呢?
(我已重新查過檔案多次了... :oops: )
請大大幫幫忙 :cry:
●架設環境:付費空間 [Unix]
●上網方式:香港區網 [和記]
●phpBB2 版本:phpBB 2.0.16
●MySQL 版本 4.0.17
●phpMyAdmin 2.5.6
●PHP 版本: 4.3.10

DL
竹貓忠實會員
竹貓忠實會員
文章: 717
註冊時間: 2005-03-05 15:29

文章 DL »

於偽子分區的附屬版面發言後,並沒有像你所說的有新文章圖示...究竟是哪裡出錯了?

~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

bokie 寫:倉木麻衣大大~
我安裝了後,沒有任何錯誤訊息出現,在首頁的"最後發表"欄位上會顯示"沒有文章"
而且圖示方面有新文章的分區也沒有改變做有新文章的圖示...是否我安裝的問題呢?
(我已重新查過檔案多次了... :oops: )
請大大幫幫忙 :cry:
嗯~看起來確實怪怪的
感覺像是沒抓到分區內的資料
能提供一下您的index.php嗎?

DL
竹貓忠實會員
竹貓忠實會員
文章: 717
註冊時間: 2005-03-05 15:29

文章 DL »

bokie 寫:倉木麻衣大大~
我安裝了後,沒有任何錯誤訊息出現,在首頁的"最後發表"欄位上會顯示"沒有文章"
而且圖示方面有新文章的分區也沒有改變做有新文章的圖示...是否我安裝的問題呢?
(我已重新查過檔案多次了... :oops: )
請大大幫幫忙 :cry:
主頁→a分區→a版面→b版面、c版面\r

由於a版面是偽子分區,因為無需知道該區有否新文章,最重要的是要知道b及c版面。

DL
竹貓忠實會員
竹貓忠實會員
文章: 717
註冊時間: 2005-03-05 15:29

文章 DL »


~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

DL 寫:主頁→a分區→a版面→b版面、c版面\r

由於a版面是偽子分區,因為無需知道該區有否新文章,最重要的是要知道b及c版面。
沒錯~
但是bokie版上的情況是偽子分區(a版面)及被隱藏起來的版面(b、c版面)裡皆有文章
然而文章總計卻僅有計算偽子分區(a版面)~而未將b、c版面納入\r
最後發表欄位則是完全沒抓到的感覺~
只要是有建立偽子分區的~其最後發表那一欄全數為「沒有新文章」
會出現此訊息只有在該版面裡完全沒有任何的主題
所以才會說情況有些怪異\r
若沒誤會您的意思~那麼這個與您所提出來的連結是沒有關聯的~

DL
竹貓忠實會員
竹貓忠實會員
文章: 717
註冊時間: 2005-03-05 15:29

文章 DL »

我的問題是b和c是有右邊的新文章通知,但在版面說明裡的版面連結旁卻沒有出現小圖示,那是為什麼?

bokie
星球公民
星球公民
文章: 69
註冊時間: 2003-11-20 08:06
來自: 香港
聯繫:

文章 bokie »

~倉木麻衣~ 寫: 嗯~看起來確實怪怪的
感覺像是沒抓到分區內的資料
能提供一下您的index.php嗎?
這是我的index.php,請大大幫忙看看 :oops:

代碼: 選擇全部

<?php
/***************************************************************************
 *                                index.php
 *                            -------------------
 *   begin                : Saturday, Feb 13, 2001
 *   copyright            : (C) 2001 The phpBB Group
 *   email                : support@phpbb.com
 *
 *   $Id: index.php,v 1.99.2.3 2004/07/11 16:46:15 acydburn Exp $
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
color_groups_setup_list();

$viewcat = ( !empty($HTTP_GET_VARS[POST_CAT_URL]) ) ? $HTTP_GET_VARS[POST_CAT_URL] : -1;

if( isset($HTTP_GET_VARS['mark']) || isset($HTTP_POST_VARS['mark']) )
{
	$mark_read = ( isset($HTTP_POST_VARS['mark']) ) ? $HTTP_POST_VARS['mark'] : $HTTP_GET_VARS['mark'];
}
else
{
	$mark_read = '';
}

//
// Handle marking posts
//
if( $mark_read == 'forums' )
{
	if( $userdata['session_logged_in'] )
	{
		setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
	}

	$template->assign_vars(array(
		"META" => '<meta http-equiv="refresh" content="0;url='  .append_sid("index.$phpEx") . '">')
	);

	$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

	message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
	$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
	$l_total_post_s = $lang['Posted_article_total'];
}
else
{
	$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
	$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
	$l_total_user_s = $lang['Registered_user_total'];
}
else
{
	$l_total_user_s = $lang['Registered_users_total'];
}


//
// Start page proper
//
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
	FROM " . CATEGORIES_TABLE . " c 
	ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}

$category_rows = array();
while( $category_rows[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);

if( ( $total_categories = count($category_rows) ) )
{
	//
	// Define appropriate SQL
	//
	switch(SQL_LAYER)
	{
		case 'postgresql':
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
				WHERE p.post_id = f.forum_last_post_id 
					AND u.user_id = p.poster_id  
					UNION (
						SELECT f.*, NULL, NULL, NULL, NULL
						FROM " . FORUMS_TABLE . " f
						WHERE NOT EXISTS (
							SELECT p.post_time
							FROM " . POSTS_TABLE . " p
							WHERE p.post_id = f.forum_last_post_id  
						)
					)
					ORDER BY cat_id, forum_order";
			break;

		case 'oracle':
			$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id 
				FROM " . FORUMS_TABLE . " f, " . POSTS_TABLE . " p, " . USERS_TABLE . " u
				WHERE p.post_id = f.forum_last_post_id(+)
					AND u.user_id = p.poster_id(+)
				ORDER BY f.cat_id, f.forum_order";
			break;

		default:
		       $sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_last_post_id " . 
         " 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 . " t ON t.topic_last_post_id = p.post_id ) " . 
         " ORDER BY f.cat_id, f.forum_order"; 
      break; 
   } 
   if ( !($result = $db->sql_query($sql)) ) 
   { 
      message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql); 
   } 

   $forum_data = array(); 
   $topic_last_ary = array(); 
   $i=0; 
   while( $row = $db->sql_fetchrow($result) ) 
   { 
      if (!in_array($row['topic_last_post_id'], $topic_last_ary) || $row['topic_last_post_id']==0) { 
         $topic_last_ary[i]=$row['topic_last_post_id']; 
         $i++; 
         $forum_data[] = $row; 
      } 
   } 
   unset($topic_last_ary); 
   if ( !($total_forums = count($forum_data)) ) 
   { 
      message_die(GENERAL_MESSAGE, $lang['No_forums']); 
   } 
    
   // 
   // Filter topic_title not allowed to read 
   // 
   if ( !($userdata['user_level'] == ADMIN && $userdata['session_logged_in']) ) { 
      $auth_read_all = array(); 
      $auth_read_all=auth(AUTH_READ, AUTH_LIST_ALL, $userdata, $forum_data); 
      $auth_data = ''; 
      for($i=0; $i<count($forum_data); $i++) 
      { 
         if (!$auth_read_all[$forum_data[$i]['forum_id']]['auth_read']) { 
            $forum_data[$i]['topic_title']=''; 
         } 
      } 
   } 

   // 
   // Define censored word matches 
   // 
   $orig_word = array(); 
   $replacement_word = array(); 
   obtain_word_list($orig_word, $replacement_word); 

   // 
   // Obtain a list of topic ids which contain
	// posts made since user last visited
	//
	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 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);
	}

	//
	// Obtain list of moderators of each forum
	// First users, then groups ... broken into two queries
	//
	$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.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);
	}

	$forum_moderators = array();
	while( $row = $db->sql_fetchrow($result) )
	{
		$forum_moderators[$row['forum_id']][] = color_group_colorize_name($row['user_id']);
	}
	$db->sql_freeresult($result);

	$sql = "SELECT aa.forum_id, g.group_id, g.group_name 
		FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g 
		WHERE aa.auth_mod = " . TRUE . " 
			AND g.group_single_user = 0 
			AND g.group_type <> " . GROUP_HIDDEN . "
			AND ug.group_id = aa.group_id 
			AND g.group_id = aa.group_id 
		GROUP BY g.group_id, g.group_name, aa.forum_id 
		ORDER BY aa.forum_id, g.group_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']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
	}
	$db->sql_freeresult($result);

	//
	// Find which forums are visible for this user
	//
	$is_auth_ary = array();
	$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);

	//
	// Start output of page
	//
	define('SHOW_ONLINE', true);
	$page_title = $lang['Index'];
	include($phpbb_root_path . 'includes/page_header.'.$phpEx);

	$template->set_filenames(array(
		'body' => 'index_body.tpl')
	);
    //
    // START MOD: Avatar On Index  - AbelaJohnB
    //
    $avatar_img = '';
    if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
    {
        switch( $userdata['user_avatar_type'] )
        {
            case USER_AVATAR_UPLOAD:
                $avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_REMOTE:
                $avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
            case USER_AVATAR_GALLERY:
                $avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" alt="" border="0" />' : '';
                break;
        }
    }
    if ($avatar_img == '')
    {
        //
        // Set up style
        //
        if ( !$board_config['override_user_style'] )
        {
            if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 )
            {
                $template_name = get_template_name($board_config['default_style']);
                $avatar_img = '<img src="'. $phpbb_root_path . 'templates/' . $template_name . '/images/whosonline.gif" >';
            }
        }
        else
        {
            $avatar_img = '<img src="templates/Solaris/images/whosonline.gif" >';
        }
    }
    // Check For Anonymous User
    if ($userdata['user_id'] != '-1')
    {
        $name_link = color_group_colorize_name($userdata['user_id']);
    }
    else
    {
        $name_link = $lang['Guest'];
    }
    //
    // END MOD: Avatar On Index  - AbelaJohnB
    //

	$template->assign_vars(array(
		'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
		'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
		'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), 

		'FORUM_IMG' => $images['forum'],
		'FORUM_NEW_IMG' => $images['forum_new'],
		'FORUM_LOCKED_IMG' => $images['forum_locked'],
        //
        // START MOD: Avatar On Index  - AbelaJohnB
        //
        'L_NAME_WELCOME' => $lang['Welcome'],
        'U_NAME_LINK' => $name_link,
        'AVATAR_IMG' => $avatar_img,
        //
        // END MOD: Avatar On Index  - AbelaJohnB
        //

		'L_FORUM' => $lang['Forum'],
		'L_TOPICS' => $lang['Topics'],
		'L_REPLIES' => $lang['Replies'],
		'L_VIEWS' => $lang['Views'],
		'L_POSTS' => $lang['Posts'],
		'L_LASTPOST' => $lang['Last_Post'], 
		'L_NO_NEW_POSTS' => $lang['No_new_posts'],
		'L_NEW_POSTS' => $lang['New_posts'],
		'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'], 
		'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'], 
		'L_ONLINE_EXPLAIN' => $lang['Online_explain'], 

		'L_MODERATOR' => $lang['Moderators'], 
		'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
		'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'], 

		'U_MARK_READ' => append_sid("index.$phpEx?mark=forums"))
	);

	//
	// Okay, let's build the index
	//
	for($i = 0; $i < $total_categories; $i++)
	{
		$cat_id = $category_rows[$i]['cat_id'];

		//
		// Should we display this category/forum set?
		//
		$display_forums = false;
		for($j = 0; $j < $total_forums; $j++)
		{
			if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id )
			{
				$display_forums = true;
			}
		}

		//
		// Yes, we should, so first dump out the category
		// title, then, if appropriate the forum list
		//
		if ( $display_forums )
		{
			$template->assign_block_vars('catrow', array(
				'CAT_ID' => $cat_id,
				'CAT_DESC' => $category_rows[$i]['cat_title'],
				'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
			);
			$sql = "SELECT fc.*, f.forum_desc
				FROM " . FORUMS_CONTROL_TABLE . " AS fc, " . FORUMS_TABLE . " AS f
				WHERE fc.show_forums = f.forum_id";

			if(!$q_forums = $db->sql_query($sql))
			{
				message_die(GENERAL_ERROR, "Could not query forums information", "", __LINE__, __FILE__, $sql);
			}
			while( $row = $db->sql_fetchrow($q_forums) )
			{
				$forums_control[$row['show_forums']]['hide_forums'] = $row['hide_forums'];
				$forums_control[$row['show_forums']]['unread_topic'] = false;
				$forums_control[$row['show_forums']]['forum_desc'] = $row['forum_desc'];
				$forums_control[$row['show_forums']]['topics'] = 0;
				$forums_control[$row['show_forums']]['posts'] = 0;
				$forums_control[$row['show_forums']]['forum_last_post_id'] =0;
				$forums_control[$row['show_forums']]['post_time'] = 0;
				$forums_control[$row['show_forums']]['user_id'] = 0;
				$forums_control[$row['show_forums']]['post_username'] = '';
				$forums_control[$row['show_forums']]['username'] = '';
				$end_keys = $row['show_forums'];
			}
			$db->sql_freeresult($q_forums);
			if ( $viewcat == $cat_id || $viewcat == -1 )
			{
				for($j = 0; $j < $total_forums; $j++)
				{
					$found=false;
					if ( $forum_data[$j]['cat_id'] == $cat_id )
					{
						$forum_id = $forum_data[$j]['forum_id'];

						if ( $is_auth_ary[$forum_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_id]) )
									{
										$forum_last_post_time = 0;

										while( list($check_topic_id, $check_post_time) = @each($new_topic_data[$forum_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_id]) )
										{
											if ( $tracking_forums[$forum_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']; 
							}
							for ($keys = 1; $keys <= $end_keys; $keys++)
							{
								if (!$forums_control[$keys]['hide_forums'])
								{
									continue;
								}
								if (preg_match("/\b$forum_id\b/",$forums_control[$keys]['hide_forums']))
								{
									if ($unread_topics)
									{
										$forums_control[$keys]['unread_topic'] = true;
										$patten = '/(\?f=' . $forum_id . '[\'"]?.*?>)/i';
										$forums_control[$keys]['forum_desc']=preg_replace($patten,'$1<img src="' . $images['icon_minipost_new'] . '" border="0" alt="' . $lang['New_post'] . '">' , $forums_control[$keys]['forum_desc']);
									}
									$found=true;
									$forums_control[$keys]['topics'] += $forum_data[$j]['forum_topics'];
									$forums_control[$keys]['posts'] += $forum_data[$j]['forum_posts'];
									if ($forums_control[$keys]['post_time'] < $forum_data[$j]['post_time'])
									{
										$forums_control[$keys]['forum_last_post_id'] = $forum_data[$j]['forum_last_post_id'];
										$forums_control[$keys]['post_time'] = $forum_data[$j]['post_time'];
										$forums_control[$keys]['user_id'] = $forum_data[$j]['user_id'];
										$forums_control[$keys]['post_username'] = $forum_data[$j]['post_username'];
										$forums_control[$keys]['username'] = $forum_data[$j]['username'];
									}
									break;
								}
							}
							if ($found)
							{
								continue;
							}
							elseif($forums_control[$forum_id]['hide_forums'])
							{
								$folder_image = ( $forums_control[$forum_id]['unread_topic'] ) ? $images['forum_new'] : $images['forum']; 
								$folder_alt = ( $forums_control[$forum_id]['unread_topic'] ) ? $lang['New_posts'] : $lang['No_new_posts'];
							}
							$posts = $forum_data[$j]['forum_posts'];
							$topics = $forum_data[$j]['forum_topics'];
							if ($forums_control[$forum_id]['hide_forums'])
							{
								$forum_data[$j]['forum_desc'] = ($userdata['session_logged_in'])? $forums_control[$forum_id]['forum_desc'] : $forum_data[$j]['forum_desc'];
								$forum_data[$j]['forum_posts'] += $forums_control[$forum_id]['posts'];
								$forum_data[$j]['forum_topics'] += $forums_control[$forum_id]['topics'];
								$forum_data[$j]['forum_last_post_id'] = $forums_control[$forum_id]['forum_last_post_id'];
								$forum_data[$j]['post_time'] = $forums_control[$forum_id]['post_time'];
								$forum_data[$j]['user_id'] = $forums_control[$forum_id]['user_id'];
								$forum_data[$j]['post_username'] = $forums_control[$forum_id]['post_username'];
								$forum_data[$j]['username'] = $forums_control[$forum_id]['username'];
							}

							if ( $forum_data[$j]
['forum_last_post_id'] ) 
   { 
      $topic_title = $forum_data[$j]['topic_title']; 
      $topic_title2 = $forum_data[$j]['topic_title']; 
       
      // 
      // Censor topic title 
      // 
      if ( count($orig_word) ) 
      { 
         $topic_title = preg_replace($orig_word, $replacement_word, $topic_title); 
         $topic_title2 = preg_replace($orig_word, $replacement_word, $topic_title2); 
      } 
                               
      if (strlen($topic_title)>27) { 
         $topic_title = substr($topic_title,0,24) . '...'; 
      } 

      $last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']); 
      $last_post = '<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $topic_title2 . '">' . $topic_title . '</a><br>'; 
      $last_post .= $last_post_time . '&nbsp;<a href="' . append_sid("viewtopic.$phpEx?"  . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '"></a><br>' . $lang['by'] . '&nbsp;'; 
      $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : color_group_colorize_name($forum_data[$j]['user_id']); 
   }
							else
							{
								$last_post = $lang['No_Posts'];
							}

							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;';
							}

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

							$template->assign_block_vars('catrow.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'],
								'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_id"))
							);
						}
					}
				}
			}
		}
	} // for ... categories

}// if ... total_categories
else
{
	message_die(GENERAL_MESSAGE, $lang['No_forums']);
}

//
// Generate the page
//
$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
●架設環境:付費空間 [Unix]
●上網方式:香港區網 [和記]
●phpBB2 版本:phpBB 2.0.16
●MySQL 版本 4.0.17
●phpMyAdmin 2.5.6
●PHP 版本: 4.3.10

~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

v 2.0.1版完成

代碼: 選擇全部

##		2005-05-03
##			Version 2.0.1 版釋出\r
##			嘗試修正偽子分區的版面id不可小於欲隱藏版面的最大id。
##			意即您可隨意?#93;定被隱藏版面及偽子分區的版面,而不需要
##			考?#123;其大小關係。
##			偽子分區版面的新文章通知納入最後發表欄位。若只有版面\r
##			左方有出?#123;新文章的大圖示,而版面說明裡並未出?#123;新文章
##			小圖示,則代表僅有該偽子分區版面裡有新文章。
老實說~先前的版本限制過多~造成使用上的不方便
請使用上有問題的人改用此版試看看

按我下載
MD5:
1d6c4a751805d7d22f44847dfd847ab7  fake_forums_v201.rar


ps.
bokie及DL請先更換至此版本看看~謝謝 :)
最後由 ~倉木麻衣~ 於 2005-05-23 14:12 編輯,總共編輯了 3 次。

bokie
星球公民
星球公民
文章: 69
註冊時間: 2003-11-20 08:06
來自: 香港
聯繫:

文章 bokie »

感謝大大~
先安裝新版看看^^
●架設環境:付費空間 [Unix]
●上網方式:香港區網 [和記]
●phpBB2 版本:phpBB 2.0.16
●MySQL 版本 4.0.17
●phpMyAdmin 2.5.6
●PHP 版本: 4.3.10

bokie
星球公民
星球公民
文章: 69
註冊時間: 2003-11-20 08:06
來自: 香港
聯繫:

文章 bokie »

安裝好了,不過不知道怎樣隱藏起子版面呢?
虐過用"註冊會員(隱藏)"的權限,但原本的版面也會跑出來...
●架設環境:付費空間 [Unix]
●上網方式:香港區網 [和記]
●phpBB2 版本:phpBB 2.0.16
●MySQL 版本 4.0.17
●phpMyAdmin 2.5.6
●PHP 版本: 4.3.10

~倉木麻衣~
竹貓忠實會員
竹貓忠實會員
文章: 1405
註冊時間: 2004-03-21 21:00

文章 ~倉木麻衣~ »

bokie 寫:安裝好了,不過不知道怎樣隱藏起子版面呢?
虐過用"註冊會員(隱藏)"的權限,但原本的版面也會跑出來...
您的安裝步驟?
有執行過db_update.php了嗎?

主題已鎖定

回到「外掛問題討論」