[討論]song chart mod
發表於 : 2004-02-04 14:36
song chart mod
請各位大大幫忙測試一下.
然後大家一起修改.
lang_charts.php
請各位大大幫忙測試一下.
然後大家一起修改.
代碼: 選擇全部
#################################################################
## Mod Title: Chart mod
## Mod Version: 0.7 (beta)
## Author: dzidzius - dzidzius@forumbest.now.pl (send all sugestions to
## help improving that mod)
##
## Description:
##
## This mod add chart to your forum. It's based on users votes. User can rate song
## using hot-not notation. Position on list is based on diffrence beetrwens number of hot
## and not rates. During one week user can rate every song only one time, next
## week he can vote again. Admin can end week using administration panel, there can
## also delete or modify song. New song can be added by every user. I thin thats all of
## features of that mod. I will be very gratfull everyone who send me some suggestions
## about everything (idea, functions, abilities, visualisations) to help improving that mod.
## Two language version are included: Polish & English
##
## Installation Level: easy
## Installation Time: 5
## Files To Edit:
##
## templates\subSilver\overall_header.tpl,
## includes\constants.php
## Included Files:
##
## charts.php,
## admin_charts.php,
## charts_aedit_body.tpl,
## charts_alist_body.tpl,
## charts_list_body.tpl,
## charts_new_body.tpl,
## language\lang_polish\lang_charts.php,
## language\lang_english\lang_charts.php,
##
#################################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
#################################################################
## 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/
#################################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
##
## History:
## ---------
##
## v0.7 - first release
##
#################################################################
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_charts (
chart_id mediumint(8) NOT NULL auto_increment,
chart_song_name varchar(80) NOT NULL,
chart_artist varchar(80) NOT NULL,
chart_album varchar(80) default '',
chart_poster_id varchar(80) NOT NULL,
chart_hot mediumint(8) default '0',
chart_not mediumint(8) default '0',
chart_curr_pos mediumint(8) default '0',
chart_last_pos mediumint(8) default '0',
chart_best_pos mediumint(8) default '0',
PRIMARY KEY (chart_id)
) TYPE=MyISAM;
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE phpbb_charts_voters (
vote_id mediumint(8) NOT NULL auto_increment,
vote_user_id mediumint(8) NOT NULL,
vote_chart_id mediumint(8) NOT NULL,
vote_rate smallint(2) NOT NULL,
PRIMARY KEY (vote_id),
FOREIGN KEY (vote_chart_id) REFERENCES phpbb_charts(chart_id)
) TYPE=MyISAM;
#
#-----[ SQL ]------------------------------------------
#
INSERT INTO phpbb_config VALUES('charts_week_num','1');
#
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\charts.php
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\admin\admin_charts.php
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\templates\subSilver\admin\charts_aedit_body.tpl
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\templates\subSilver\admin\charts_alist_body.tpl
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\templates\subSilver\charts_list_body.tpl
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\templates\subSilver\charts_new_body.tpl
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\language\lang_polish\lang_charts.php //if needed
#
#-----[ COPY ]------------------------------------------
#
# Included
#
# phpBB2\language\lang_english\lang_charts.php //if needed
#
#-----[ OPEN ]------------------------------------------
#
# templates\subSilver\overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
# {L_LOGIN_LOGOUT}</a>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<a href="charts.php?action=all_list" class="mainmenu"><img
src="templates/subSilver/images/icon_mini_members.gif"
width="12" height="13" border="0" alt="Chart" hspace="3"
/>Chart</a>
#
#-----[ OPEN ]------------------------------------------
#
# includes\constants.php
#
#-----[ FIND ]------------------------------------------
#
# ?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
define('CHARTS_TABLE', $table_prefix.'charts');
define('CHARTS_VOTERS_TABLE', $table_prefix.'charts_voters');
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoMlang_charts.php
代碼: 選擇全部
<?php
/*
* Charts Mod - english language file
*
*/
$lang['Title'] = 'Charts';
$lang['All_Charts'] = 'Show All Songs';
$lang['Top_Ten'] = 'Show Top Ten';
$lang['New_Song'] = 'Add new song';
$lang['Chart_Sql_Error'] = 'Could not execute query.';
$lang['Chart_Sql_Base_Error'] = 'Could not modify database.';
$lang['Chart_Hot'] = 'Hot';
$lang['Chart_Not'] = 'Not';
$lang['Chart_New_Song'] = 'New Song';
$lang['Chart_Best_Pos'] = 'Best';
$lang['Chart_Week'] = 'Week';
$lang['Chart_Name'] = 'Forum Best Charts';
$lang['Chart_Curr_Pos'] = 'Position';
$lang['Chart_Last_Pos'] = 'Last Week';
$lang['Chart_Song_Artist'] ='Song(Artist)';
$lang['Chart_Song_Name'] = 'Title';
$lang['Chart_Artist_Name'] = 'Artist';
$lang['Chart_Album_Name'] = 'Album';
$lang['Chart_Added_By'] = 'Added by:';
$lang['Chart_Info'] = 'Info';
$lang['Chart_Rate'] = 'Rate';
$lang['Chart_vote_add'] = 'You vote has been added.';
$lang['Chart_click_link'] = 'Click %sHere%s to go back to Charts.';
$lang['Chart_Rate_Err'] = 'You have already rate this song.';
$lang['Chart_Login_Err'] = 'You must log in to vote.';
$lang['Chart_Vote_Err'] = 'You must rate song.';
$lang['Chart_Choose_Err'] = 'You must choose song.';
$lang['Chart_VLogin_Err'] = 'You must log in to add song.';
$lang['Chart_Fields_Err'] = 'You must enter Song Name and Artist.';
$lang['Chart_Song_Err'] = 'Cannot add song.';
$lang['Chart_Song_Add'] = 'Song have been added.';
$lang['Chart_SLog_Err'] = 'You must log in to add chart.';
$lang['Chart_No_Arguments'] = 'Parameters are missing';
//Administrations language constants
$lang['Chart_Page_Desc'] = 'Here you can delete or modify songs.';
$lang['Chart_Page_Title'] = 'Chart Administration';
$lang['Chart_Edit'] = 'Song edit';
$lang['Chart_DBase_Ok'] = 'Database updated succesfully.';
$lang['Chart_Click_Return'] = 'Click %sHere%s to return to Chart Administration';
$lang['Chart_SQL_Del'] = 'Cannot delete rows.';
$lang['Chart_End_Week'] = 'End Week';
$lang['Chart_Ask_Week'] ='Are you sure you want to end week?';
?>