[2.0.4]Favorite Topics MOD
發表於 : 2003-06-08 22:26
這個MODS的功用是在於允許論壇使用者建立自己最喜歡的主題的清單,方便使用者得以迅速的回覆自己關注的文章或是重點
PhpBB官方網站的下載區在:
http://www.phpbb.com/phpBB/catdb.php?cat=9
PhpBB官方網站的討論區在:
http://www.phpbb.com/phpBB/viewtopic.php?t=73503
作者的資料在:
http://www.phpbb.com/phpBB/profile.php? ... le&u=24004
http://www.danielt.com
PhpBB官方下載點:
http://www.phpbb.com/phpBB/catdb.php?mo ... &id=431370
[php]<?php
##############################################################
## MOD Title: Favorites Mod
## MOD Author: DanielT < mods@danielt.com > (Daniel Taylor) http://www.danielt.com
## MOD Description: Allows users the build a favorite topics list
## 允許論壇使用者建立最喜歡的主題列表清單\r
## MOD Version: 1.0.2
##
## Installation Level: moderate
## Installation Time: 5 Minutes
## Files To Edit: viewtopic.php
## includes/page_header.php
## templates/subSilver/overall_header.tpl
## templates/subSilver/viewtopic_body.tpl
## language/lang_english/lang_main.php
## Included Files: favorites.php, fav_body.tpl
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ 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/downloads/
##############################################################
## Author Notes: Updates From 1.0.1:
## Added Simple Post Icon
## Added 'Views and 'Replies'
## Stoped double 'fav adding'
##
## How to update from 101 to 102:
## Re-upload:
## favorites.php
## fav_body.tpl
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#Where 'phpbb_' is your table prefix
CREATE TABLE `phpbb_favorites` (
`fav_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL default '0',
`topic_id` int(11) NOT NULL default '0',
PRIMARY KEY (`fav_id`)
)
#
#-----[ COPY ]------------------------------------------
#
copy favorites.php TO favorites.php
copy fav_body.tpl TO templates/subSilver/fav_body.tpl
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//Fav Mod
$lang['remove_fav_data'] = 'Could not remove data from favorites table';
$lang['insert_fav_data'] = 'Could not insert data into favorites table';
$lang['no_fav_topic'] = 'No topic to set as favorite was set';
$lang['favorites'] = 'Favorites';
$lang['add_fav'] = 'Add To Favorites';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//Fav Mod
$lang['remove_fav_data'] = '不能從最愛主題清單中移除資料';
$lang['insert_fav_data'] = 'ㄒ能新增資料在最愛主題清單';
$lang['no_fav_topic'] = '最愛清單中的主題未被設置';
$lang['favorites'] = '我的最愛';
$lang['add_fav'] = '增加到最愛清單中';
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
'S_WATCH_TOPIC_IMG' => $s_watching_topic_img,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_FAV' => append_sid("favorites.$phpEx?t=" . $topic_id . "&mode=add"),
'L_FAV' => $lang['add_fav'],
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_FAV' => $lang['favorites'],
#
#-----[ FIND ]------------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_FAV' => append_sid('favorites.'.$phpEx),
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<a href="{U_FAV}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_FAV}" hspace="3" />{L_FAV}</a>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{S_WATCH_TOPIC}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<br><a href="{U_FAV}">{L_FAV}</a>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
?>[/php]
正體中文化語系:
[php]<?php
#
#-----[ OPEN ]------------------------------------------
#
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//Fav Mod
$lang['remove_fav_data'] = '不能從最愛主題清單中移除資料';
$lang['insert_fav_data'] = 'ㄒ能新增資料在最愛主題清單';
$lang['no_fav_topic'] = '最愛清單中的主題未被設置';
$lang['favorites'] = '我的最愛';
$lang['add_fav'] = '增加到最愛清單中';
?>[/php]
losswing提供的增強模組:
http://phpbb-tw.net/phpbb/viewtopic.php?t=16393
PhpBB官方網站的下載區在:
http://www.phpbb.com/phpBB/catdb.php?cat=9
PhpBB官方網站的討論區在:
http://www.phpbb.com/phpBB/viewtopic.php?t=73503
作者的資料在:
http://www.phpbb.com/phpBB/profile.php? ... le&u=24004
http://www.danielt.com
PhpBB官方下載點:
http://www.phpbb.com/phpBB/catdb.php?mo ... &id=431370
[php]<?php
##############################################################
## MOD Title: Favorites Mod
## MOD Author: DanielT < mods@danielt.com > (Daniel Taylor) http://www.danielt.com
## MOD Description: Allows users the build a favorite topics list
## 允許論壇使用者建立最喜歡的主題列表清單\r
## MOD Version: 1.0.2
##
## Installation Level: moderate
## Installation Time: 5 Minutes
## Files To Edit: viewtopic.php
## includes/page_header.php
## templates/subSilver/overall_header.tpl
## templates/subSilver/viewtopic_body.tpl
## language/lang_english/lang_main.php
## Included Files: favorites.php, fav_body.tpl
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ 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/downloads/
##############################################################
## Author Notes: Updates From 1.0.1:
## Added Simple Post Icon
## Added 'Views and 'Replies'
## Stoped double 'fav adding'
##
## How to update from 101 to 102:
## Re-upload:
## favorites.php
## fav_body.tpl
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#Where 'phpbb_' is your table prefix
CREATE TABLE `phpbb_favorites` (
`fav_id` int(11) NOT NULL auto_increment,
`user_id` int(11) NOT NULL default '0',
`topic_id` int(11) NOT NULL default '0',
PRIMARY KEY (`fav_id`)
)
#
#-----[ COPY ]------------------------------------------
#
copy favorites.php TO favorites.php
copy fav_body.tpl TO templates/subSilver/fav_body.tpl
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//Fav Mod
$lang['remove_fav_data'] = 'Could not remove data from favorites table';
$lang['insert_fav_data'] = 'Could not insert data into favorites table';
$lang['no_fav_topic'] = 'No topic to set as favorite was set';
$lang['favorites'] = 'Favorites';
$lang['add_fav'] = 'Add To Favorites';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//Fav Mod
$lang['remove_fav_data'] = '不能從最愛主題清單中移除資料';
$lang['insert_fav_data'] = 'ㄒ能新增資料在最愛主題清單';
$lang['no_fav_topic'] = '最愛清單中的主題未被設置';
$lang['favorites'] = '我的最愛';
$lang['add_fav'] = '增加到最愛清單中';
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
'S_WATCH_TOPIC_IMG' => $s_watching_topic_img,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_FAV' => append_sid("favorites.$phpEx?t=" . $topic_id . "&mode=add"),
'L_FAV' => $lang['add_fav'],
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_FAV' => $lang['favorites'],
#
#-----[ FIND ]------------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'U_FAV' => append_sid('favorites.'.$phpEx),
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<a href="{U_FAV}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_FAV}" hspace="3" />{L_FAV}</a>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{S_WATCH_TOPIC}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<br><a href="{U_FAV}">{L_FAV}</a>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
?>[/php]
正體中文化語系:
[php]<?php
#
#-----[ OPEN ]------------------------------------------
#
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//Fav Mod
$lang['remove_fav_data'] = '不能從最愛主題清單中移除資料';
$lang['insert_fav_data'] = 'ㄒ能新增資料在最愛主題清單';
$lang['no_fav_topic'] = '最愛清單中的主題未被設置';
$lang['favorites'] = '我的最愛';
$lang['add_fav'] = '增加到最愛清單中';
?>[/php]
losswing提供的增強模組:
http://phpbb-tw.net/phpbb/viewtopic.php?t=16393