################################################################
## MOD Title:		Music Online Mod (Media Center)
## MOD Version:		2.0.6
## MOD Author:		Cf Manager < cf_manager@yahoo.com > (Son Thai)
## Support:		http://cfmanager.net.tf
##			http://cfmanager.gate2vn.net
## Demo:		http://cfmanager.gate2vn.net/music.php
##
## MOD Description:	This Mod allows you create the Music Online Page
##			where users can upload, listen, rate and comment on songs.
##			Beside that, users can link URL of the song from
##			the another server without uploading.
##			You will have Admin Panel to take control Music Online Page.
##
## Compatibility:	2.0.4 --> 2.0.10 (I tested on phpBB 2.0.6, 2.0.8 & 2.0.10)
##
## Features:
##	- Fully integrated with phpBB2 backend (DB, session, template, multi languages..)
##	- Powerful and handy AdminCP
##	- Multi-categories
##	- Powerfull and phpBB-like permissions system
##	- ModeratorCP
##	- Upload Quota
##	- Lyrics
##	- Top listen songs (can set number of songs viewed)
##	- Rate system
##	- Comment system
##	- Hotlink prevention (can set allowed domains)
##	- Listen counter
##	- Admin/Moderator song approval
##	- Probably uploadable in PHP Safe Mode
##	- Hide the URL of your songs
##	- Link URL of the song from the other server
##
## Bonus funtions:
##	- Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM
##	- Download song (Music Download Song Add-on)
##	- Song Image (Music Song Image Add-on)
##	- Search Song (Music Search Song Add-on)
##	- And more... (Plz look for at http://www.phpbbhacks.com)
##
## Requirements:
##	A running phpBB 2.0.x (recommend the lastest version)
##	HTTP File Upload Enabled (this MOD can work with PHP Safe-Mode in some cases)
##	MySQL 3.23.x
##
## Installation Level:	Advanced
## Installation Time:	15 minutes
## Files To Edit:	7
##	viewonline.php
##	admin/index.php
##	includes/constants.php
##	includes/page_header.php
##	language/lang_english/lang_main.php
##	templates/subSilver/overall_header.tpl
##	templates/subSilver/subSilver.cfg
##
## Included Files:	46
##	music.php
##	music_cat.php
##	music_comment.php
##	music_comment_edit.php
##	music_comment_delete.php
##	music_delete.php
##	music_edit.php
##	music_modcp.php
##	music_page.php
##	music_song.php
##	music_rate.php
##	music_upload.php
##	admin/admin_music_cat.php
##	admin/admin_music_config.php
##	admin/admin_music_moderators.php
##	music_mod/music_common.php
##	music_mod/music_constants.php
##	music_mod/music_functions.php
##	language/lang_english/lang_admin_music.php
##	language/lang_english/lang_main_music.php
##	templates/subSilver/music_cat_body.tpl
##	templates/subSilver/music_comment_body.tpl
##	templates/subSilver/music_edit_body.tpl
##	templates/subSilver/music_index_body.tpl
##	templates/subSilver/music_modcp_body.tpl
##	templates/subSilver/music_move_body.tpl
##	templates/subSilver/music_page_body.tpl
##	templates/subSilver/music_rate_body.tpl
##	templates/subSilver/music_upload_body.tpl
##	templates/subSilver/admin/music_auth_body.tpl
##	templates/subSilver/admin/music_cat_body.tpl
##	templates/subSilver/admin/music_cat_delete_body.tpl
##	templates/subSilver/admin/music_cat_new_body.tpl
##	templates/subSilver/admin/music_cat_select_body.tpl
##	templates/subSilver/admin/music_config_body.tpl
##	templates/subSilver/images/icon_mini_music.gif
##	templates/subSilver/images/lang_english/upload_song.gif
##
################################################################
## Author Notes:
## 	If you want to update from previous versions please read the 
##	documentation in update/*.
## 	Plz follow the Installation Instructions as strict as you can.
##	Plz visit my support site to get help if you have trouble and
##	get the latest version as well as more new Mods/Hack for it.
##
## 	Full support for this MOD can be obtained at: http://cfmanager.gate2vn.net
## 	This Mod was tested with the following databases: MySQL
##	At last, DO NOT REMOVE MY COPYRIGHT NOTICE!
################################################################
## This MOD is released under the GPL License.
################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################################
#-----[ OPEN ]--------------------------------------------------
#
viewonline.php

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

#
#-----[ AFTER, ADD ]--------------------------------------------
#
				case PAGE_MUSIC:
					$location = $lang['Music'];
					$location_url = "music.$phpEx";
					break;

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

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

#
#-----[ AFTER, ADD ]--------------------------------------------
#
						case PAGE_MUSIC:
							$location = $lang['Music'];
							$location_url = "index.$phpEx?pane=right";
							break;


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

#
#-----[ AFTER, ADD ]--------------------------------------------
#
					case PAGE_MUSIC:
						$location = $lang['Music'];
						$location_url = "index.$phpEx?pane=right";
						break;


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

#
#-----[ FIND ]--------------------------------------------------
#
if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}


#
#-----[ AFTER, ADD ]--------------------------------------------
#
// Music Online
include($phpbb_root_path . 'music_box/music_constants.' . $phpEx);


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

#
#-----[ FIND ]--------------------------------------------------
#
	'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

#
#-----[ AFTER, ADD ]--------------------------------------------
#
	// Music Online
	'L_MUSIC' => $lang['Music'],
	'U_MUSIC' => append_sid('music.'.$phpEx),


#
#-----[ OPEN ]--------------------------------------------------
# also for other templates
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]--------------------------------------------------
#
<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center"> 
	<tr> 
		<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr> 
				<td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
				<td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br />&nbsp; </span> 
				<table cellspacing="0" cellpadding="2" border="0">
					<tr> 
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> 


#
#-----[ AFTER, ADD ]--------------------------------------------
# this step will add a link into your header menu

&nbsp;<a href="{U_MUSIC}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_music.gif" width="12" height="13" border="0" alt="{L_MUSIC}" hspace="3" />{L_MUSIC}</a> &nbsp;



#
#-----[ OPEN ]--------------------------------------------------
# also for other templates
templates/subSilver/subSilver.cfg

#
#-----[ FIND ]--------------------------------------------------
#
?>

#
#-----[ BEFORE, ADD ]-------------------------------------------
#
$images['upload_song'] = "$current_template_images/{LANG}/upload_song.gif";



#
#-----[ OPEN ]--------------------------------------------------
# also for all other language packs
language/lang_english/lang_main.php

#
#-----[ FIND ]--------------------------------------------------
#
//
// Errors (not related to a
// specific failure on a page)
//
$lang['Information'] = 'Information';
$lang['Critical_Information'] = 'Critical Information';

#
#-----[ BEFORE, ADD ]-------------------------------------------
#
//
// Music Online
//
$lang['Music'] = 'Music Online'; // or Media Center

#
#-----[ COPY ]--------------------------------------------------
# Copy the following file and folder to root folder on your host

copy root/*.php to *.php
copy root/admin/*.php to admin/
copy root/music_box/*.* to music_box/
copy root/language/lang_english/*.php to language/lang_english/
copy root/templates/subSilver/*.* to templates/subSilver/
copy root/templates/subSilver/admin/*.* to templates/subSilver/admin/
copy root/templates/subSilver/images/*.* to templates/subSilver/images/
copy root/templates/subSilver/images/lang_english/*.* to templates/subSilver/images/lang_english/



#
#-----[ ACTION ]-----------------------------------------------
# Require for Unix-like host (you can use your FTP client to do this)
#
# CHMOD 777 music_box/upload


#
#-----[ SQL ]--------------------------------------------------
# This Music Online will add 5 tables into your database.
#
# Upload music_db_install.php and music_mysql.sql to your phpBB root
# directory then run music_db_install.php by typing on the browser
# After that, delete both files immediately
#
# If you do not want to run music_db_install.php you can run the SQL
# queries manually in music_mysql.sql
#
# At last, you can run music_db_uninstall.php if you don't want to
#  to use this mod anymore
#
# Notes: After completed, remember to delete music_db_install.php and
#  music_db_uninstall.php if you don't want to get the problems!
#
################################################################
################################################################
#
#-----[ HAVE FUN! ALL MY USERS ]--------------------------------
#
# EoM