1 頁 (共 1 頁)

[推薦] RSS機制,我正在裝當然會有一些問題大家討論吧!

發表於 : 2005-04-25 13:17
無敵肉腳
參考頁面: http://phpbb-tw.net/phpbb/viewtopic.php ... hlight=RSS
檔案下載: http://www.phpbb.com/phpBB/viewtopic.php?t=144548

使用翻譯軟體翻的rss.config.php設定檔內容

代碼: 選擇全部

<?php
// rss_config.php
// RSS Feed configuration file - part of RSS Feed MOD ver. 2.2.2+
// Copyright (c) 2004-2005, Egor Naklonyaeff
if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

define('CACHE_TIME', 300);	    	// 隱藏所 RSS 的時間 sec 的飼養,假設值的 5 分鐘
									// 開始歸零使隱藏所失去能力。(不 recomendated).
define('AUTOSTYLED',false);			// 使用假設值的 MSIE 的 XSLT 轉形\r
define('CACHE_TO_FILE', false);		// 用隱藏所 dir 貯藏 defaul 頁。 你一定要首先將 777 設定為那 dir 
define('UPDATE_VIEW_COUNT',false);	// 為非作者不詳的使用者更新看的主題計數 
									// 如果組到錯誤的使誰失去能力也看了主題更新\r
define('AUTO_WVT_MOD', true);    	//  誰看了一個主題 [2.0.6/EM]
define('LV_MOD_INSTALLED',false);	// 最後參觀 [2.0.10/EM]  http://mods.db9.dk/
define('DEFAULT_ITEMS',25);			// 項目在假設值的飼養中剖析多少
define('MAX_ITEMS',100);			// 剖析的項目最大數字
define('AUTOLOGIN',true);			// 試到 autologin 使用餅乾如果使用者不設定’登錄’或’ uid’調音 
define('SEE_MODIFYED',true);		// 在飼養中包括除了新的紀錄之外從最後拜訪被修正紀錄 
define('MAX_WEEKS_AGO',2);			// 在時間之前限制 RSS 飼養。最重要的在大論壇中(!) 
									// 如果你不想要使用這未來,開始歸零\r
$show_time=true;					// 在 RSS 意見中顯示總手寫體時間.
$unauthed='0';						// 逗點分開了 unauthed 論壇的目錄。 因為 ex.: '0,1,11';

$cache_root = 'cache/';				// 貯藏 dir 
$cache_filename="rss_feed.xml";

// Config Page generation method
define('SMARTOR_STATS',false);    // 設定到真實的如果你使用頁世代時間 mod 
?>

發表於 : 2005-04-25 13:24
無敵肉腳
上述檔案裡有附一些功能\r

附加功能原文

代碼: 選擇全部

############################################################## 
## MOD Title: RSS Feed Page Add-On for RSS Feed 2.x 
## MOD Author: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A 
## MOD Description: View who read RSS feed online. 
## MOD Version: 1.0.2 
## 
## Installation Level: Easy 
## Installation Time: 5 Minutes 
## Files To Edit: 5 
##    includes/constants.php 
##   language/lang_english/lang_main.php 
##   language/lang_russian/lang_main.php 
##   viewonline.php 
##   admin/index.php 
## Included Files: n/a 
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
################################################################  
## Author Notes: You must install RSS Feed MOD before use this MOD
################################################################
## MOD History: 
## 
##   2005-03-25 - Version 1.0.2
##      - remove Russian part of code from MOD 
##   2005-03-10 - Version 1.0.1 
##      - change PAGE_RSS code to new value given to phpbbguru.net   
##   2005-01-10 - Version 1.0.0 
##      - initial release 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 


# 
#-----[ OPEN ]------------------------------------------------------- 
# 
includes/constants.php 

# 
#-----[ FIND ]---------------------------------------- 
# 
define('PAGE_TOPIC_OFFSET', 5000); 

# 
#-----[ AFTER, ADD ]---------------------------------- 
# 
define('PAGE_RSS', -1169);    // RSS Feed Mod 

# 
#-----[ OPEN ]------------------------------------------------------- 
# 
language/lang_english/lang_main.php 

# 
#-----[ FIND ]---------------------------------------- 
# 
$lang['Viewing_FAQ'] = 'Viewing FAQ'; 

# 
#-----[ AFTER, ADD ]---------------------------------- 
# 
$lang['Viewing_RSS'] = 'RSS feed';         // RSS Feed Mod 

# 
#-----[ OPEN ]------------------------------------------------------- 
# 
viewonline.php 

# 
#-----[ FIND ]---------------------------------------- 
# 
            case PAGE_FAQ: 
               $location = $lang['Viewing_FAQ']; 
               $location_url = "faq.$phpEx"; 
               break; 

# 
#-----[ AFTER, ADD ]---------------------------------- 
# 
            // Start add - RSS Feed MOD 
            case PAGE_RSS: 
               $location = $lang['Viewing_RSS']; 
               $location_url = "rss.$phpEx"; 
               break; 
            // End add - RSS Feed MOD 

# 
#-----[ OPEN ]------------------------------------------------------- 
# 
admin/index.php 

# 
#-----[ FIND ]---------------------------------------- 
# 
                  case PAGE_FAQ: 
                     $location = $lang['Viewing_FAQ']; 
                     $location_url = "index.$phpEx?pane=right"; 
                     break; 

# 
#-----[ AFTER, ADD ]---------------------------------- 
# 
            // Start add - RSS Feed MOD 
                  case PAGE_RSS: 
                     $location = $lang['Viewing_RSS']; 
                     $location_url = "index.$phpEx?pane=right"; 
                     break; 
            // End add - RSS Feed MOD 
# 
#-----[ FIND ]---------------------------------------- 
# 
               case PAGE_FAQ: 
                  $location = $lang['Viewing_FAQ']; 
                  $location_url = "index.$phpEx?pane=right"; 
                  break; 

# 
#-----[ AFTER, ADD ]---------------------------------- 
# 
            // Start add - RSS Feed MOD 
               case PAGE_RSS: 
                  $location = $lang['Viewing_RSS']; 
                  $location_url = "index.$phpEx?pane=right"; 
                  break; 
            // End add - RSS Feed MOD 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
翻譯軟體後的解釋

代碼: 選擇全部

############################################################## 
## 外掛標題: 為 RSS 飼養 2.x 的 RSS 飼養頁資料片
## 外掛作者: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A 
## 外掛描述: 看誰閱讀 RSS 在線上餵. 
## 外掛版本: 1.0.2 
## 
## Installation Level: 簡單 
## Installation Time: 5 Minutes 
## Files To Edit: 5 
##    includes/constants.php 
##   language/lang_english/lang_main.php 
##   language/lang_russian/lang_main.php 
##   viewonline.php 
##   admin/index.php 
## Included Files: n/a 
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
################################################################  
## Author Notes: You must install RSS Feed MOD before use this MOD
################################################################
## MOD History: 
## 
##   2005-03-25 - Version 1.0.2
##      - remove Russian part of code from MOD 
##   2005-03-10 - Version 1.0.1 
##      - change PAGE_RSS code to new value given to phpbbguru.net   
##   2005-01-10 - Version 1.0.0 
##      - initial release 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 


# 
#-----[ 打開 ]------------------------------------------------------- 
# 
includes/constants.php 

# 
#-----[ 尋找 ]---------------------------------------- 
# 
define('PAGE_TOPIC_OFFSET', 5000); 

# 
#-----[ 在,之後增加]---------------------------------- 
# 
define('PAGE_RSS', -1169);    // RSS Feed Mod 

# 
#-----[ 打開 ]------------------------------------------------------- 
# 
language/lang_english/lang_main.php 

# 
#-----[ 尋找 ]---------------------------------------- 
# 
$lang['Viewing_FAQ'] = 'Viewing FAQ'; 

# 
#-----[ 在,之後增加 ]---------------------------------- 
# 
$lang['Viewing_RSS'] = 'RSS feed';         // RSS Feed Mod 

# 
#-----[ 打開 ]------------------------------------------------------- 
# 
viewonline.php 

# 
#-----[ 尋找 ]---------------------------------------- 
# 
            case PAGE_FAQ: 
               $location = $lang['Viewing_FAQ']; 
               $location_url = "faq.$phpEx"; 
               break; 

# 
#-----[ 在,之後增加 ]---------------------------------- 
# 
            // Start add - RSS Feed MOD 
            case PAGE_RSS: 
               $location = $lang['Viewing_RSS']; 
               $location_url = "rss.$phpEx"; 
               break; 
            // End add - RSS Feed MOD 

# 
#-----[ 打開 ]------------------------------------------------------- 
# 
admin/index.php 

# 
#-----[ 尋找 ]---------------------------------------- 
# 
                  case PAGE_FAQ: 
                     $location = $lang['Viewing_FAQ']; 
                     $location_url = "index.$phpEx?pane=right"; 
                     break; 

# 
#-----[ 在,之後增加 ]---------------------------------- 
# 
            // Start add - RSS Feed MOD 
                  case PAGE_RSS: 
                     $location = $lang['Viewing_RSS']; 
                     $location_url = "index.$phpEx?pane=right"; 
                     break; 
            // End add - RSS Feed MOD 
# 
#-----[ 尋找 ]---------------------------------------- 
# 
               case PAGE_FAQ: 
                  $location = $lang['Viewing_FAQ']; 
                  $location_url = "index.$phpEx?pane=right"; 
                  break; 

# 
#-----[ 在,之後增加 ]---------------------------------- 
# 
            // Start add - RSS Feed MOD 
               case PAGE_RSS: 
                  $location = $lang['Viewing_RSS']; 
                  $location_url = "index.$phpEx?pane=right"; 
                  break; 
            // End add - RSS Feed MOD 

# 
#-----[ 存檔/關閉所有檔案]------------------------------------------ 
# 
# EoM 

發表於 : 2005-04-25 13:29
無敵肉腳
另外的一個功能\r
看不懂這要作什麼...等我試了後再說吧!

原文

代碼: 選擇全部

############################################################## 
## MOD Title: RSS Autodiscovery Add-On for RSS Feed 2.x 
## MOD Author: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A 
## MOD Description: RSS Autodiscovery using <link> tag in HTTP <head> section 
## MOD Version: 1.0.1
## 
## Installation Level: Easy 
## Installation Time: 3 Minutes 
## Files To Edit: 1 
##    includes/page_header.php 
## Included Files: n/a 
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: Compatible with RSS Feed MOD and RSS Content Syndicator MOD
##############################################################
## MOD History: 
## 
##   2005-01-14 - Version 1.0.1 
##      - fix missing quote in string after "else" 
##   2005-01-10 - Version 1.0.0 
##      - initial release 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------------------- 
# 
includes/page_header.php 

# 
#-----[ FIND ]---------------------------------------- 
# 
// 
// Parse and show the overall header. 
// 

# 
#-----[ BEFORE, ADD ]---------------------------------- 
# 
// BEGIN RSS autodiscovery 
$rss_forum_id =( isset($HTTP_GET_VARS[POST_FORUM_URL]))? intval($HTTP_GET_VARS[POST_FORUM_URL]): 0; 
$rss_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); 
$rss_script = ( $rss_path != '' ) ? $rss_path . '/rss.' . $phpEx : 'rss.'. $phpEx; 
$rss_server_name = trim($board_config['server_name']); 
$rss_server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; 
$rss_server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; 
$rss_url=$rss_server_protocol . $rss_server_name . $rss_server_port . $rss_script; 
if($rss_forum_id!=0){ 
      $rss_link='<link rel="alternate" type="application/rss+xml" title="RSS" href="'.$rss_url.'?f='.$rss_forum_id.'" />'."
"; 
      $rss_link.='<link rel="alternate" type="application/atom+xml" title="Atom" href="'.$rss_url.'?atom&f='.$rss_forum_id.'" />'."
"; 
} 
else 
{ 
       $rss_link='<link rel="alternate" type="application/rss+xml" title="RSS" href="'.$rss_url.'" />'."
"; 
      $rss_link.='<link rel="alternate" type="application/atom+xml" title="Atom" href="'.$rss_url.'?atom'.'" />'."
"; 
} 
// END RSS autodiscovery 

# 
#-----[ FIND ]---------------------------------------- 
# 
// 
// The following assigns all _common_ variables that may be used at any point 
// in a template. 

# 
#-----[ BEFORE, ADD ]---------------------------------- 
# 
$nav_links_html.=$rss_link; //  RSS autodiscovery 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
翻譯軟體翻譯後

代碼: 選擇全部

############################################################## 
## 外掛標題: 為 RSS 飼養 2.x 的 RSS Autodiscovery 資料片 
## 外掛作者: chyduskam < chuduskam@debilarius.ru > (Egor Naklonyaeff) N/A 
## 外掛描述: 使用連結的 RSS Autodiscovery 在 HTTP 頭部分中附以籤條
## MOD Version: 1.0.1
## 
## Installation Level: 簡單 
## Installation Time: 3 Minutes 
## Files To Edit: 1 
##    includes/page_header.php 
## Included Files: n/a 
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: Compatible with RSS Feed MOD and RSS Content Syndicator MOD
##############################################################
## MOD History: 
## 
##   2005-01-14 - Version 1.0.1 
##      - fix missing quote in string after "else" 
##   2005-01-10 - Version 1.0.0 
##      - initial release 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ 打開 ]------------------------------------------------------- 
# 
includes/page_header.php 

# 
#-----[ 尋找 ]---------------------------------------- 
# 
// 
// Parse and show the overall header. 
// 

# 
#-----[ 之前,增加 ]---------------------------------- 
# 
// BEGIN RSS autodiscovery 
$rss_forum_id =( isset($HTTP_GET_VARS[POST_FORUM_URL]))? intval($HTTP_GET_VARS[POST_FORUM_URL]): 0; 
$rss_path = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); 
$rss_script = ( $rss_path != '' ) ? $rss_path . '/rss.' . $phpEx : 'rss.'. $phpEx; 
$rss_server_name = trim($board_config['server_name']); 
$rss_server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; 
$rss_server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; 
$rss_url=$rss_server_protocol . $rss_server_name . $rss_server_port . $rss_script; 
if($rss_forum_id!=0){ 
      $rss_link='<link rel="alternate" type="application/rss+xml" title="RSS" href="'.$rss_url.'?f='.$rss_forum_id.'" />'."
"; 
      $rss_link.='<link rel="alternate" type="application/atom+xml" title="Atom" href="'.$rss_url.'?atom&f='.$rss_forum_id.'" />'."
"; 
} 
else 
{ 
       $rss_link='<link rel="alternate" type="application/rss+xml" title="RSS" href="'.$rss_url.'" />'."
"; 
      $rss_link.='<link rel="alternate" type="application/atom+xml" title="Atom" href="'.$rss_url.'?atom'.'" />'."
"; 
} 
// END RSS autodiscovery 

# 
#-----[ 尋找 ]---------------------------------------- 
# 
// 
// The following assigns all _common_ variables that may be used at any point 
// in a template. 

# 
#-----[ 之前,增加 ]---------------------------------- 
# 
$nav_links_html.=$rss_link; //  RSS autodiscovery 

# 
#-----[ 存檔/關閉所有檔案]------------------------------------------ 
# 
# EoM

發表於 : 2005-04-25 13:44
無敵肉腳
可以運作了
http://playgame.no-ip.org/phpbb/rss.php
現在...將rss的連結放到首頁上..
會不會自動更新...還不知道
附註:上面是展示用....(還沒開張)....
至於rss閱讀器....請自行去尋找\r
我用的rss瀏覽器是要安裝
安裝微軟的.NET Framework 1.1翻譯器

發表於 : 2005-06-28 12:20
天霜
訂閱的RSS若只是要顯示文章主題就好, 而不要顯示文章內容, 在 rss_config.php 裡要怎麼設呢?

發表於 : 2005-06-28 14:46
~倉木麻衣~
天霜 寫:訂閱的RSS若只是要顯示文章主題就好, 而不要顯示文章內容, 在 rss_config.php 裡要怎麼設呢?
印象中rss_config.php裡沒法這樣子設\r
不過倒是有兩種方法可以做到\r
  1. 修改rss.php, 將內文的部份註解起來

    代碼: 選擇全部

    #
    #--------[ OPEN ]----------------
    #
    rss.php
    
    #
    #--------[ FIND ]----------------
    #
    'POST_TEXT' => htmlspecialchars(preg_replace('|[\x00-\x08\x0B\x0C\x0E-\x1f]|','',$message)),
    
    #
    #--------[ IN-LINE FIND ]----------------
    #
    'POST_TEXT' =>
    
    #
    #--------[ IN-LINE BEFORE, ADD ]----------------
    #
    //
    
    #
    #--------[ SAVE/CLOSE ALL FILES ]----------------
    #
    # EoM
  2. 修改rss_body.tpl, 將內文部份的變數刪除\r

    代碼: 選擇全部

    #
    #--------[ OPEN ]----------------
    #
    templates/yor_templates/rss_body.tpl
    
    #
    #--------[ FIND ]----------------
    #
    {post_item.POST_TEXT}{post_item.USER_SIG}
    
    #
    #--------[ DELETE ]----------------
    #
    {post_item.POST_TEXT}{post_item.USER_SIG}
    
    #
    #--------[ SAVE/CLOSE ALL FILES ]----------------
    #
    # EoM
不過上面兩種方法實際上還是會去查詢posts_text資料表

發表於 : 2005-06-28 15:14
赤兔
此機制是否會增加伺服器負荷?

Re: [推薦] RSS機制,我正在裝當然會有一些問題大家討論吧!

發表於 : 2005-06-28 19:01
smartpig
無敵肉腳 寫:參考頁面: http://phpbb-tw.net/phpbb/viewtopic.php ... hlight=RSS
檔案下載: http://www.phpbb.com/phpBB/viewtopic.php?t=144548

使用翻譯軟體翻的rss.config.php設定檔內容

代碼: 選擇全部

<?php
// rss_config.php
// RSS Feed configuration file - part of RSS Feed MOD ver. 2.2.2+
// Copyright (c) 2004-2005, Egor Naklonyaeff
if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

define('CACHE_TIME', 300);	    	// 隱藏所 RSS 的時間 sec 的?#125;養,假?#93;值的 5 分鐘
									// ?#125;始歸零使隱藏所失去能力。(不 recomendated).
define('AUTOSTYLED',false);			// 使用假?#93;值的 MSIE 的 XSLT 轉形\r
define('CACHE_TO_FILE', false);		// 用隱藏所 dir 貯藏 defaul 頁。 你一定要首先將 777 ?#93;定為那 dir 
define('UPDATE_VIEW_COUNT',false);	// 為非作者不詳的使用者更新看的主題計數 
									// 如果組到錯誤的使誰失去能力?#93;看了主題更新\r
define('AUTO_WVT_MOD', true);    	//  誰看了一個主題 [2.0.6/EM]
define('LV_MOD_INSTALLED',false);	// 最後參?#91; [2.0.10/EM]  http://mods.db9.dk/
define('DEFAULT_ITEMS',25);			// 項目在假?#93;值的?#125;養中剖析多少
define('MAX_ITEMS',100);			// 剖析的項目最大數字
define('AUTOLOGIN',true);			// 試到 autologin 使用餅乾如果使用者不?#93;定’登錄’或’ uid’調音 
define('SEE_MODIFYED',true);		// 在?#125;養中?#93;括除了新的紀錄之外從最後拜訪被修正紀錄 
define('MAX_WEEKS_AGO',2);			// 在時間之前限制 RSS ?#125;養。最重要的在大論壇中?#93;!) 
									// 如果你不想要使用這未來,?#125;始歸零\r
$show_time=true;					// 在 RSS 意見中顯示總手寫體時間.
$unauthed='0';						// 逗點分?#125;了 unauthed 論壇的目錄。 ?#93;為 ex.: '0,1,11';

$cache_root = 'cache/';				// 貯藏 dir 
$cache_filename="rss_feed.xml";

// Config Page generation method
define('SMARTOR_STATS',false);    // ?#93;定到真實的如果你使用頁世代時間 mod 
?>
...........................................................................................
請問高手我已全部installed ,可是要怎摸操作??
請講詳細一點..它好像沒有圖示或由後臺操作.....
第一次遇到這種不知從何下手....請幫幫忙...