安裝此外掛時須先裝好 音樂模組 Music Online MOD
音樂模組 下載
代碼: 選擇全部
##############################################################
## MOD Title: Music Cat Views
## MOD Author: DB angel < angel@dbangel.net > http://www.dbangel.net
##
## MOD Description:在線上音樂模組(Music Online MOD)上增加各版區瀏覽次數
## MOD Version: 0.0.1
##
## Installation Level: Easy
## Installation Time: ~5 Minutes
## Files To Edit: music.php
## music_cat.php
## templates/subSilver/music_index_body.tpl
## language/lang_english/lang_main_music.php
## Included Files: n/a
##############################################################
## Author Notes:首先您必須安裝 Cf Manager 的音樂模組 (http://www.cfmanager.gate2vn.net/index.php)
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_music_cat ADD cat_views mediumint( 8 ) NOT NULL
#
#-----[ OPEN ]------------------------------------------
#
music_cat.php
#
#-----[ FIND ]------------------------------------------
#
$songrow = array();
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Update the music view counter
//
$sql = "UPDATE " . MUSIC_CAT_TABLE . "
SET cat_views = cat_views + 1
WHERE cat_id = $cat_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update music views.", '', __LINE__, __FILE__, $sql);
}
#
#-----[ OPEN ]------------------------------------------
#
music.php
#
#-----[ FIND ]------------------------------------------
#
'L_SONGS' => $lang['Songs'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_CAT_VIEWS' => $lang['Cat_Views'],
#
#-----[ FIND ]------------------------------------------
#
'CAT_DESC' => $catrows[$i]['cat_desc'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'CAT_VIEWS' => $catrows[$i]['cat_views'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/music_index_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<th width="60" class="thTop" nowrap="nowrap"> {L_SONGS} </th>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<th width="60" class="thTop" nowrap="nowrap"> {L_CAT_VIEWS} </th>
#
#-----[ FIND ]------------------------------------------
#
<td class="catLeft" colspan="3" height="28"><span class="cattitle">{L_PUBLIC_CATS}</span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------ \r
#
colspan="3"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
colspan="4"
#
#-----[ FIND ]------------------------------------------
#
<td class="row2" align="center"><span class="gensmall">{catrow.SONGS}</span></td>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<td class="row2" align="center"><span class="gensmall">{catrow.CAT_VIEWS}</span></td>
#
#-----[ FIND ]------------------------------------------
#
<td class="catbottom" colspan="3" height="28"><span class="cattitle"></span></td>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
colspan="3"
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
colspan="4"
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main_music.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Songs'] = 'Songs';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Cat_Views'] = 'Board Views';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM