[問題]Split topic type安裝疑問
發表於 : 2003-12-09 04:39
問題外掛:Split topic type (公告置頂分區)
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=16261
使用版本:phpBB 2.0.6
網站位置:
狀況描述:
我重下面開始都看不懂
請各位高手教教小弟怎麼安裝....拜托大家了...感恩
===============================================
#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
include_once($phpbb_root_path . 'includes/functions_topics_list.'. $phpEx);
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
//
// Okay, lets dump out the page ...
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
#************************************************************************************
# NOTE :
# ------
# /!\ Important : I strongly recommand to mute all the lines between the nexts
# --------- /* and */
# by adding // in front of each lines or by deleting all.
#
# ie: // if( $total_topics )
#
#************************************************************************************
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
// adjust the item id
for ($i=0; $i < count($topic_rowset); $i++)
{
$topic_rowset[$i]['topic_id'] = POST_TOPIC_URL . $topic_rowset[$i]['topic_id'];
}
// set the bottom sort option
$footer = $lang['Display_topics'] . ': ' . $select_topic_days . ' ' . ( !empty($s_display_order) ? $s_display_order : '') . '<input type="submit" class="liteoption" value="' . $lang['Go'] . '" name="submit" />';
// send the list
$allow_split_type = true;
$display_nav_tree = false;
topic_list('TOPICS_LIST_BOX', 'topics_list_box', $topic_rowset, '', $allow_split_type, $display_nav_tree, $footer);
//-- delete
/*
//---------------------------------------
//
// Note : all the code that was standing there stands now in functions_topics_list.php, topic_list() func
//
//---------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$topics_count -= $total_announcements;
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
*/
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
}
else
{
//
// No topics
//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- delete
/*
#
#-----[ FIND ]------------------------------------------------
#
//
// Parse the page and print
// \r
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
*/
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : mods settings ---------------------------------------------------------------------------
//-- mod : language settings -----------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
if ( !empty($userdata['user_lang']))
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : mods settings ---------------------------------------------------------------------------
//-- add
global $db, $mods, $list_yes_no, $userdata;
// get all the mods settings
$dir = @opendir($phpbb_root_path . 'includes/mods_settings');
while( $file = @readdir($dir) )
{
if( preg_match("/^mod_.*?\." . $phpEx . "$/", $file) )
{
include_once($phpbb_root_path . 'includes/mods_settings/' . $file);
}
}
@closedir($dir);
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
//
// Set up style
//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
}
if ( empty($template) )
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : topics list -----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
\n//-- mod : topics list -----------------------------------------------------------------------------
//-- add
$images['folder_global_announce'] = "$current_template_images/folder_announce.gif";
$images['folder_global_announce_new'] = "$current_template_images/folder_announce_new.gif";
$images['folder_global_announce_own'] = "$current_template_images/folder_announce_own.gif";
$images['folder_global_announce_new_own'] = "$current_template_images/folder_announce_new_own.gif";
$images['folder_own'] = "$current_template_images/folder_own.gif";
$images['folder_new_own'] = "$current_template_images/folder_new_own.gif";
$images['folder_hot_own'] = "$current_template_images/folder_hot_own.gif";
$images['folder_hot_new_own'] = "$current_template_images/folder_new_hot_own.gif";
$images['folder_locked_own'] = "$current_template_images/folder_lock_own.gif";
$images['folder_locked_new_own'] = "$current_template_images/folder_lock_new_own.gif";
$images['folder_sticky_own'] = "$current_template_images/folder_sticky_own.gif";
$images['folder_sticky_new_own'] = "$current_template_images/folder_sticky_new_own.gif";
$images['folder_announce_own'] = "$current_template_images/folder_announce_own.gif";
$images['folder_announce_new_own'] = "$current_template_images/folder_announce_new_own.gif";
//-- fin mod : topics list -------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<form method="post" action="{S_POST_DAYS_ACTION}">
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- mod : split topic type -->
#
#-----[ FIND ]------------------------------------------------
#
#
#************************************************************************************
# NOTE :
# ------
# The lines deleted here are reported in topics_list_box.tpl. You will probably
# want to customize topics_list_box.tpl the same way viewforum_body.tpl was if
# you use a particular template with other classes than the ones used by subSilver.
#
#************************************************************************************
<table
<tr>
<th
<th
<th
<th
<th
</tr>
<!-- BEGIN topicrow -->
<tr>
<td
<td
{topicrow.GOTO_PAGE}</span></td>
<td
<td
<td
<td
</tr>
<!-- END topicrow -->
<!-- BEGIN switch_no_topics -->
<tr>
<td
</tr>
<!-- END switch_no_topics -->
<tr>
<td class="catBottom"
<input type="submit" class="liteoption" value="{L_GO}" name="submit" />
</span></td>
</tr>
</table>
#
#-----[ REPLACE WITH ]----------------------------------------
#
{TOPICS_LIST_BOX}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
參考連結:http://phpbb-tw.net/phpbb/viewtopic.php?t=16261
使用版本:phpBB 2.0.6
網站位置:
狀況描述:
我重下面開始都看不懂
請各位高手教教小弟怎麼安裝....拜托大家了...感恩
===============================================
#
#-----[ OPEN ]------------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
include_once($phpbb_root_path . 'includes/functions_topics_list.'. $phpEx);
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
//
// Okay, lets dump out the page ...
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
#************************************************************************************
# NOTE :
# ------
# /!\ Important : I strongly recommand to mute all the lines between the nexts
# --------- /* and */
# by adding // in front of each lines or by deleting all.
#
# ie: // if( $total_topics )
#
#************************************************************************************
//-- mod : split topic type ------------------------------------------------------------------------
//-- add
// adjust the item id
for ($i=0; $i < count($topic_rowset); $i++)
{
$topic_rowset[$i]['topic_id'] = POST_TOPIC_URL . $topic_rowset[$i]['topic_id'];
}
// set the bottom sort option
$footer = $lang['Display_topics'] . ': ' . $select_topic_days . ' ' . ( !empty($s_display_order) ? $s_display_order : '') . '<input type="submit" class="liteoption" value="' . $lang['Go'] . '" name="submit" />';
// send the list
$allow_split_type = true;
$display_nav_tree = false;
topic_list('TOPICS_LIST_BOX', 'topics_list_box', $topic_rowset, '', $allow_split_type, $display_nav_tree, $footer);
//-- delete
/*
//---------------------------------------
//
// Note : all the code that was standing there stands now in functions_topics_list.php, topic_list() func
//
//---------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
$topics_count -= $total_announcements;
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
*/
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
}
else
{
//
// No topics
//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : split topic type ------------------------------------------------------------------------
//-- delete
/*
#
#-----[ FIND ]------------------------------------------------
#
//
// Parse the page and print
// \r
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
*/
//-- fin mod : split topic type --------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : mods settings ---------------------------------------------------------------------------
//-- mod : language settings -----------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
if ( $userdata['user_id'] != ANONYMOUS )
{
if ( !empty($userdata['user_lang']))
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : mods settings ---------------------------------------------------------------------------
//-- add
global $db, $mods, $list_yes_no, $userdata;
// get all the mods settings
$dir = @opendir($phpbb_root_path . 'includes/mods_settings');
while( $file = @readdir($dir) )
{
if( preg_match("/^mod_.*?\." . $phpEx . "$/", $file) )
{
include_once($phpbb_root_path . 'includes/mods_settings/' . $file);
}
}
@closedir($dir);
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
//
// Set up style
//
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
}
if ( empty($template) )
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
//-- mod : language settings -----------------------------------------------------------------------
//-- add
include($phpbb_root_path . './includes/lang_extend_mac.' . $phpEx);
//-- fin mod : language settings -------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/subSilver.cfg
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : topics list -----------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
\n//-- mod : topics list -----------------------------------------------------------------------------
//-- add
$images['folder_global_announce'] = "$current_template_images/folder_announce.gif";
$images['folder_global_announce_new'] = "$current_template_images/folder_announce_new.gif";
$images['folder_global_announce_own'] = "$current_template_images/folder_announce_own.gif";
$images['folder_global_announce_new_own'] = "$current_template_images/folder_announce_new_own.gif";
$images['folder_own'] = "$current_template_images/folder_own.gif";
$images['folder_new_own'] = "$current_template_images/folder_new_own.gif";
$images['folder_hot_own'] = "$current_template_images/folder_hot_own.gif";
$images['folder_hot_new_own'] = "$current_template_images/folder_new_hot_own.gif";
$images['folder_locked_own'] = "$current_template_images/folder_lock_own.gif";
$images['folder_locked_new_own'] = "$current_template_images/folder_lock_new_own.gif";
$images['folder_sticky_own'] = "$current_template_images/folder_sticky_own.gif";
$images['folder_sticky_new_own'] = "$current_template_images/folder_sticky_new_own.gif";
$images['folder_announce_own'] = "$current_template_images/folder_announce_own.gif";
$images['folder_announce_new_own'] = "$current_template_images/folder_announce_new_own.gif";
//-- fin mod : topics list -------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<form method="post" action="{S_POST_DAYS_ACTION}">
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
<!-- mod : split topic type -->
#
#-----[ FIND ]------------------------------------------------
#
#
#************************************************************************************
# NOTE :
# ------
# The lines deleted here are reported in topics_list_box.tpl. You will probably
# want to customize topics_list_box.tpl the same way viewforum_body.tpl was if
# you use a particular template with other classes than the ones used by subSilver.
#
#************************************************************************************
<table
<tr>
<th
<th
<th
<th
<th
</tr>
<!-- BEGIN topicrow -->
<tr>
<td
<td
{topicrow.GOTO_PAGE}</span></td>
<td
<td
<td
<td
</tr>
<!-- END topicrow -->
<!-- BEGIN switch_no_topics -->
<tr>
<td
</tr>
<!-- END switch_no_topics -->
<tr>
<td class="catBottom"
<input type="submit" class="liteoption" value="{L_GO}" name="submit" />
</span></td>
</tr>
</table>
#
#-----[ REPLACE WITH ]----------------------------------------
#
{TOPICS_LIST_BOX}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#