Update of /cvsroot/mxbb/mx_music/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367 Added Files: modx.subsilver.en.xsl music_install.txt music_install.xml mx_mod_install.php mx_mod_readme.txt mx_mod_uninstall.php Log Message: upgrade --- NEW FILE: mx_mod_uninstall.php --- <?php /** * * @package phpBB2 Mod - mx mod * @version $Id: mx_mod_uninstall.php,v 1.1 2008/09/18 07:43:28 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } $page_title = 'Mx Mod'; switch (PORTAL_BACKEND) { case 'internal': case 'phpbb2': include($phpbb_root_path . 'includes/page_header.'.$phpEx); $modtemplate = new mx_Template($mx_mod_path . 'styles'); $modtemplate->set_filenames( array( // # 'body' => 'install_body.html', )); $modtemplate->assign_vars( array( //# 'CSS_COLOR_H1' => 'color: #767676;', 'CSS_CONTENT_H1' => 'color: #115098;', )); break; case 'phpbb3': $template->set_custom_template($mx_mod_path . 'styles/prosilver', 'mx_mod'); $template->set_filenames( array( 'header' => 'install_header.html', 'body' => 'install_body.html', 'footer' => 'install_footer.html' )); $template->assign_var('CSS_STYLESHEET', $phpbb_root_path . 'adm/style/admin.css'); break; } $template->assign_vars( array( 'L_MX_MOD_INSTALL_TITLE' => $page_title, 'L_MX_MOD_TITLE' => 'Installing/Upgrading', 'MX_MOD_PATH' => $mx_mod_path, )); $message = "<b>This will uninstall the mod!</b><br/><br/>"; $sql = array( "DROP TABLE " . $table_prefix . "mx_config " ); $message .= mx_do_install_upgrade($sql); /* echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . mx_do_install_upgrade( $sql ) . "</span></td></tr>"; echo "</table><br />"; */ switch (PORTAL_BACKEND) { case 'internal': case 'phpbb2': $modtemplate->assign_var('INSTALL_MESSAGE', $message); $modtemplate->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); break; case 'phpbb3': $template->assign_var('INSTALL_MESSAGE', $message); $template->display('header'); $template->display('body'); $template->display('footer'); //page_footer(); break; } ?> --- NEW FILE: music_install.xml --- <?xml version="1.0" encoding="utf-8" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="modx.subsilver.en.xsl"?> <!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/--> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd"> <header> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <title lang="en-gb">Media Center (MXP Addon Integration)</title> <description lang="en-gb"><![CDATA[This Mod allows you create the Music Center Page where users can upload, listen, rate and comment on media files. Beside that, users can link URL of the song from the another server without uploading. Youtube videos are supported. You will have Admin Panel to take control Music Center Page. Compatibility: 2.0.21 --> 2.0.23 (I tested on phpBB 2.0.22) 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, FLV - Download song (Music Download Song Add-on) - Song Image (Music Song Image Add-on) - Search Song (Music Search Song Add-on) - Sub-Categories (Music Online Sub-Categories) - YouTube and Google Video (Media Center FLV Support) - And more... Requirements: A running phpBB 2.0.x (recommend the lastest version) The mxBB Mod "include/" folder that can be found in this mod "contrib/" folder The eXtreme Styles MOD is required for this mod to have all features enabled HTTP File Upload Enabled (this MOD can work with PHP Safe-Mode in some cases) MySQL 4.3.3+ ]]></description> <author-notes lang="en-gb">Please remember that this MOD requires the mxBB Mod "include" folder that can be found in the "contrib" folder, and the eXtreme Styles MOD. If you want to update from previous versions please deleate all releated files, upload the new files and do upgrade the database using music_install.php /*. Plz follow the Installation Instructions as strict as you can. This Mod was tested with the following databases: MySQL At last, DO NOT REMOVE MY COPYRIGHT NOTICE!</author-notes> <author-group> <author> <realname>Florin Bodin Ciprian</realname> <email>ory...@rd...</email> <username>orynider</username> <homepage>http://www.publisher.com/</homepage> <contributions /> </author> <author> <realname>Son Thai</realname> <email>cf_...@ya...</email> <username>Cf Manager</username> <homepage>http://cfmanager.net.tf/</homepage> <contributions /> </author> </author-group> <mod-version> <major>2</major> <minor>1</minor> <revision>0</revision> </mod-version> <installation> <level>easy</level> <time>598</time> <target-version> <target-primary>2.9.4</target-primary> <target-major allow="exact">2</target-major> <target-minor allow="exact">9</target-minor> </target-version> </installation> <meta name="generator" content="Phpbb.ModTeam.Tools (c#)" /> </header> <action-group> <sql> CREATE TABLE IF NOT EXISTS `phpbb_music` ( `song_id` int(11) unsigned NOT NULL auto_increment, `song_filename` varchar(255) NOT NULL default '', `song_filetype` varchar(255) NOT NULL default '', `song_imagename` varchar(255) NOT NULL default '', `song_title` varchar(255) NOT NULL default '', `song_url` varchar(255) NOT NULL default '', `song_desc` text, `song_singer` varchar(255) NOT NULL default '', `song_user_id` mediumint(8) NOT NULL default '0', `song_username` varchar(32) default NULL, `song_user_ip` varchar(8) NOT NULL default '0', `song_time` int(11) unsigned NOT NULL default '0', `song_cat_id` mediumint(8) unsigned NOT NULL default '1', `song_view_count` int(11) unsigned NOT NULL default '0', `song_lock` tinyint(3) NOT NULL default '0', `song_approval` tinyint(3) NOT NULL default '1', `song_download_count` varchar(255) NOT NULL default '', PRIMARY KEY (`song_id`), KEY `song_cat_id` (`song_cat_id`), KEY `song_user_id` (`song_user_id`), KEY `song_time` (`song_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_cat` ( `cat_id` mediumint(8) unsigned NOT NULL auto_increment, `cat_parent` mediumint(8) unsigned NOT NULL default '0', `cat_type` tinyint(4) NOT NULL default '0', `cat_title` varchar(255) NOT NULL default '', `cat_desc` text, `cat_order` mediumint(8) NOT NULL default '0', `cat_views` mediumint(8) NOT NULL default '0', `cat_view_level` tinyint(3) NOT NULL default '-1', `cat_upload_level` tinyint(3) NOT NULL default '0', `cat_rate_level` tinyint(3) NOT NULL default '0', `cat_comment_level` tinyint(3) NOT NULL default '0', `cat_edit_level` tinyint(3) NOT NULL default '0', `cat_delete_level` tinyint(3) NOT NULL default '2', `cat_view_groups` varchar(255) default NULL, `cat_upload_groups` varchar(255) default NULL, `cat_rate_groups` varchar(255) default NULL, `cat_comment_groups` varchar(255) default NULL, `cat_edit_groups` varchar(255) default NULL, `cat_delete_groups` varchar(255) default NULL, `cat_moderator_groups` varchar(255) default NULL, `cat_approval` tinyint(3) NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_order` (`cat_order`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_comment` ( `comment_id` int(11) unsigned NOT NULL auto_increment, `comment_song_id` int(11) unsigned NOT NULL default '0', `comment_user_id` mediumint(8) NOT NULL default '0', `comment_username` varchar(32) default NULL, `comment_user_ip` varchar(8) NOT NULL default '', `comment_time` int(11) unsigned NOT NULL default '0', `comment_text` text, `comment_edit_time` int(11) unsigned default NULL, `comment_edit_count` smallint(5) unsigned NOT NULL default '0', `comment_edit_user_id` mediumint(8) default NULL, PRIMARY KEY (`comment_id`), KEY `comment_song_id` (`comment_song_id`), KEY `comment_user_id` (`comment_user_id`), KEY `comment_user_ip` (`comment_user_ip`), KEY `comment_time` (`comment_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` varchar(255) NOT NULL default '', PRIMARY KEY (`config_name`) ); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_songs', '1024'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('user_songs_limit', '50'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mod_songs_limit', '250'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_file_size', '3145728'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page', '20'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('top', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_method', 'song_time'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_order', 'DESC'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mp3_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wav_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wma_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wmv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mid_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('ram_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('au_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mpeg_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('avi_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('swf_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('qt_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rm_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('desc_length', '512000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_prevent', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate_scale', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('comment', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('music_version', '.1.0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_size', '1024000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_width', '800'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_height', '600'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('download', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('enable_integration', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('override_default_pages', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('index', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('xs_enabled', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('img_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('flv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('show_index_subcats', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_media', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_media', '1'); -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `phpbb_music_rate` ( `rate_song_id` int(11) unsigned NOT NULL default '0', `rate_user_id` mediumint(8) NOT NULL default '0', `rate_user_ip` char(8) NOT NULL default '', `rate_point` tinyint(3) unsigned NOT NULL default '0', KEY `rate_song_id` (`rate_song_id`), KEY `rate_user_id` (`rate_user_id`), KEY `rate_user_ip` (`rate_user_ip`), KEY `rate_point` (`rate_point`) ); </sql> <copy> <file from="root/*.php" to="*.php" /> <file from="root/admin/*.php" to="admin/*.php" /> <file from="root/music_box/music_common.php" to="music_box/music_common.php" /> <file from="root/music_box/includes/*.php" to="music_box/includes/*.php" /> <file from="root/music_box/language/lang_english/*.php" to="music_box/language/lang_english/*.php" /> <file from="root/music_box/modules/*.php" to="music_box/modules/*.php" /> <file from="root/templates/subSilver/*.tpl" to="templates/subSilver/*.tpl" /> <file from="root/templates/subSilver/admin/*.tpl" to="templates/subSilver/admin/*.tpl" /> <file from="root/templates/subSilver/music.cfg" to="templates/subSilver/music.cfg" /> <file from="root/templates/subSilver/images/*.gif" to="templates/subSilver/images/*.gif" /> <file from="root/templates/subSilver/images/lang_english/upload_song.gif" to="templates/subSilver/images/lang_english/upload_song.gif" /> </copy> <open src="templates/subSilver/overall_header.tpl"> <edit> <find><![CDATA[<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a> ]]></find> <inline-edit> <inline-find><![CDATA[<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> ]]></inline-find> <inline-action type="after-add"><![CDATA[ <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> ]]></inline-action> </inline-edit> </edit> </open> <open src="viewonline.php"> <edit> <find> case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "faq.$phpEx"; break; </find> <action type="after-add"> case PAGE_MUSIC: $location = $lang['Music']; $location_url = "music.$phpEx"; break;</action> </edit> </open> <open src="admin/index.php"> <edit> <find> case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "index.$phpEx?pane=right"; break; </find> <action type="after-add"> case PAGE_MUSIC: $location = $lang['Music']; $location_url = "index.$phpEx?pane=right"; break; </action> </edit> </open> <open src="includes/page_header.php"> <edit> <find><![CDATA[ 'U_GROUP_CP' => append_sid('groupcp.'.$phpEx), ]]></find> <action type="after-add"><![CDATA[ // Music Online 'L_MUSIC' => $lang['Music'], 'U_MUSIC' => append_sid('music.'.$phpEx), ]]></action> </edit> </open> <open src="language/lang_english/lang_main.php"> <edit> <find>$lang['Moderators'] = 'Moderators'; </find> <action type="after-add">// // Music Online // $lang['Music'] = 'Media Center'; // or Music Online </action> </edit> </open> <diy-instructions lang="en-gb">. CHMOD 777 music_box/upload . </diy-instructions> </action-group> </mod> --- NEW FILE: music_install.txt --- ################################################################ ## MOD Title: Media Center (MXP Addon Integration) ## ## MOD Author: orynider < ory...@rd... > (Florin Bodin Ciprian) http://www.publisher.com/ ## MOD Author: Cf Manager < cf_...@ya... > (Son Thai) http://cfmanager.net.tf/ ## ## MOD Description: This Mod allows you create the Music Center Page ## where users can upload, listen, rate and comment on media files. ## Beside that, users can link URL of the song from ## the another server without uploading. Youtube videos are supported. ## You will have Admin Panel to take control Music Center Page. ## ## Compatibility: 2.0.21 --> 2.0.23 (I tested on phpBB 2.0.23) ## ## 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, FLV ## - Download song (Music Download Song Add-on) ## - Song Image (Music Song Image Add-on) ## - Search Song (Music Search Song Add-on) ## - Sub-Categories (Music Online Sub-Categories) ## - YouTube and Google Video (Media Center FLV Support) ## - And more... ## ## Requirements: ## A running phpBB 2.0.x (recommend the lastest version) ## The mxBB Mod "include/" folder that can be found in this mod "contrib/" folder ## The eXtreme Styles MOD is required for this mod to have all features enabled ## HTTP File Upload Enabled (this MOD can work with PHP Safe-Mode in some cases) ## MySQL 4.3.3+ ## ## MOD Version: 2.9.4 ## ## Installation Level: (Easy) ## Installation Time: 9 Minutes ## Files To Edit: (4) ## viewonline.php, ## includes/page_header.php, ## language/lang_english/lang_main.php, ## templates/subSilver/overall_header.tpl ## ## Included Files: 50 ## root/music.php ## root/music_db_install.php ## root/music_db_uninstall.php ## root/admin/admin_music_cfg.php ## root/admin/admin_music_auth.php ## root/admin/admin_music_cat.php ## root/music_box/music_common.php ## root/music_box/includes/music_constants.php ## root/music_box/includes/music_functions.php ## root/music_box/includes/music_integration.php ## root/music_box/includes/music_player.swf ## root/music_box/language/lang_english/lang_admin.php ## root/music_box/language/lang_english/lang_admin_music.php ## root/music_box/language/lang_english/lang_main_music.php ## root/music_box/modules/music_cat.php ## root/music_box/modules/music_comment.php ## root/music_box/modules/music_comment_edit.php ## root/music_box/modules/music_comment_delete.php ## root/music_box/modules/music_delete.php ## root/music_box/modules/music_edit.php ## root/music_box/modules/music_modcp.php ## root/music_box/modules/music_page.php ## root/music_box/modules/music_rate.php ## root/music_box/modules/music_rss.php ## root/music_box/modules/music_song.php ## root/music_box/modules/music_stream.php ## root/music_box/modules/music_upload.php ## root/templates/subSilver/music_cat_body.tpl ## root/templates/subSilver/music_cat_xs.tpl ## root/templates/subSilver/music_comment_body.tpl ## root/templates/subSilver/music_edit_body.tpl ## root/templates/subSilver/music_index_body.tpl ## root/templates/subSilver/music_media_cat_body.tpl ## root/templates/subSilver/music_modcp_body.tpl ## root/templates/subSilver/music_move_body.tpl ## root/templates/subSilver/music_page_body.tpl ## root/templates/subSilver/music_pic_cat_body.tpl ## root/templates/subSilver/music_rate_body.tpl ## root/templates/subSilver/music_upload_body.tpl ## root/templates/subSilver/admin/music_admin_body_ext.tpl ## root/templates/subSilver/admin/music_auth_body.tpl ## root/templates/subSilver/admin/music_cat_body.tpl ## root/templates/subSilver/admin/music_cat_delete_body.tpl ## root/templates/subSilver/admin/music_cat_new_body.tpl ## root/templates/subSilver/admin/music_cat_select_body.tpl ## root/templates/subSilver/admin/music_config_body.tpl ## root/templates/subSilver/music.cfg ## root/templates/subSilver/images/icon_mini_music.gif ## root/templates/subSilver/images/no_image.gif ## root/templates/subSilver/images/lang_english/upload_song.gif ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## Please remember that this MOD requires the mxBB Mod "include" folder ## that can be found in the "contrib" folder, and the eXtreme Styles MOD. ## If you want to update from previous versions please deleate ## all releated files, upload the new files and do upgrade the database ## using music_install.php /*. ## Plz follow the Installation Instructions as strict as you can. ## ## 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 ################################################################ # #-----[ COPY ]-------------------------------------------------- # Copy the following file and folder to root folder on your host copy root/*.php to *.php copy root/admin/*.php to admin/*.php copy root/music_box/music_common.php to music_box/music_common.php copy root/music_box/includes/*.php to music_box/includes/*.php copy root/music_box/language/lang_english/*.php to music_box/language/lang_english/*.php copy root/music_box/modules/*.php to music_box/modules/*.php copy root/templates/subSilver/*.tpl to templates/subSilver/*.tpl copy root/templates/subSilver/admin/*.tpl to templates/subSilver/admin/*.tpl copy root/templates/subSilver/music.cfg to templates/subSilver/music.cfg copy root/templates/subSilver/images/*.gif to templates/subSilver/images/*.gif copy root/templates/subSilver/images/lang_english/upload_song.gif to templates/subSilver/images/lang_english/upload_song.gif # #-----[ DIY INSTRUCTIONS ]------------------------------------ # # Require for Unix-like host (you can use your FTP client to do this) # . CHMOD 777 music_box/upload . # #-----[ SQL ]------------------------------------------------- # # Copy "music_db_install.php" to your phpBB root and execute it from your browser when you're logged in with admin rights # At last, you can run music_db_uninstall.php if you don't want 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! # CREATE TABLE IF NOT EXISTS `phpbb_music` ( `song_id` int(11) unsigned NOT NULL auto_increment, `song_filename` varchar(255) NOT NULL default '', `song_filetype` varchar(255) NOT NULL default '', `song_imagename` varchar(255) NOT NULL default '', `song_title` varchar(255) NOT NULL default '', `song_url` varchar(255) NOT NULL default '', `song_desc` text, `song_singer` varchar(255) NOT NULL default '', `song_user_id` mediumint(8) NOT NULL default '0', `song_username` varchar(32) default NULL, `song_user_ip` varchar(8) NOT NULL default '0', `song_time` int(11) unsigned NOT NULL default '0', `song_cat_id` mediumint(8) unsigned NOT NULL default '1', `song_view_count` int(11) unsigned NOT NULL default '0', `song_lock` tinyint(3) NOT NULL default '0', `song_approval` tinyint(3) NOT NULL default '1', `song_download_count` varchar(255) NOT NULL default '', PRIMARY KEY (`song_id`), KEY `song_cat_id` (`song_cat_id`), KEY `song_user_id` (`song_user_id`), KEY `song_time` (`song_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_cat` ( `cat_id` mediumint(8) unsigned NOT NULL auto_increment, `cat_parent` mediumint(8) unsigned NOT NULL default '0', `cat_type` tinyint(4) NOT NULL default '0', `cat_title` varchar(255) NOT NULL default '', `cat_desc` text, `cat_order` mediumint(8) NOT NULL default '0', `cat_views` mediumint(8) NOT NULL default '0', `cat_view_level` tinyint(3) NOT NULL default '-1', `cat_upload_level` tinyint(3) NOT NULL default '0', `cat_rate_level` tinyint(3) NOT NULL default '0', `cat_comment_level` tinyint(3) NOT NULL default '0', `cat_edit_level` tinyint(3) NOT NULL default '0', `cat_delete_level` tinyint(3) NOT NULL default '2', `cat_view_groups` varchar(255) default NULL, `cat_upload_groups` varchar(255) default NULL, `cat_rate_groups` varchar(255) default NULL, `cat_comment_groups` varchar(255) default NULL, `cat_edit_groups` varchar(255) default NULL, `cat_delete_groups` varchar(255) default NULL, `cat_moderator_groups` varchar(255) default NULL, `cat_approval` tinyint(3) NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_order` (`cat_order`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_comment` ( `comment_id` int(11) unsigned NOT NULL auto_increment, `comment_song_id` int(11) unsigned NOT NULL default '0', `comment_user_id` mediumint(8) NOT NULL default '0', `comment_username` varchar(32) default NULL, `comment_user_ip` varchar(8) NOT NULL default '', `comment_time` int(11) unsigned NOT NULL default '0', `comment_text` text, `comment_edit_time` int(11) unsigned default NULL, `comment_edit_count` smallint(5) unsigned NOT NULL default '0', `comment_edit_user_id` mediumint(8) default NULL, PRIMARY KEY (`comment_id`), KEY `comment_song_id` (`comment_song_id`), KEY `comment_user_id` (`comment_user_id`), KEY `comment_user_ip` (`comment_user_ip`), KEY `comment_time` (`comment_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` varchar(255) NOT NULL default '', PRIMARY KEY (`config_name`) ); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_songs', '1024'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('user_songs_limit', '50'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mod_songs_limit', '250'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_file_size', '3145728'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page', '20'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('top', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_method', 'song_time'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_order', 'DESC'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mp3_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wav_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wma_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wmv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mid_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('ram_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('au_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mpeg_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('avi_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('swf_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('qt_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rm_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('desc_length', '512000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_prevent', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate_scale', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('comment', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('music_version', '.1.0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_size', '1024000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_width', '800'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_height', '600'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('download', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('enable_integration', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('override_default_pages', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('index', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('xs_enabled', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('img_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('flv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('show_index_subcats', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_media', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_media', '1'); -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `phpbb_music_rate` ( `rate_song_id` int(11) unsigned NOT NULL default '0', `rate_user_id` mediumint(8) NOT NULL default '0', `rate_user_ip` char(8) NOT NULL default '', `rate_point` tinyint(3) unsigned NOT NULL default '0', KEY `rate_song_id` (`rate_song_id`), KEY `rate_user_id` (`rate_user_id`), KEY `rate_user_ip` (`rate_user_ip`), KEY `rate_point` (`rate_point`) ); # #-----[ OPEN ]------------------------------------------ # templates/subSilver/overall_header.tpl # #-----[ FIND ]------------------------------------------ # <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><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 FIND ]------------------------------------------ # <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # <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> # #-----[ 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; # #-----[ 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 all other language packs language/lang_english/lang_main.php # #-----[ FIND ]-------------------------------------------------- # $lang['Moderators'] = 'Moderators'; # #-----[ AFTER, ADD ]------------------------------------------- # // // Music Online // $lang['Music'] = 'Media Center'; // or Music Online # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM --- NEW FILE: modx.subsilver.en.xsl --- <?xml version="1.0" encoding="UTF-8" ?> <!-- MODX by the phpBB MOD Team XSL file v1.0 copyright 2005-2006 the phpBB MOD Team. $Id: modx.subsilver.en.xsl,v 1.1 2008/09/18 07:43:27 orynider Exp $ --> <!DOCTYPE xsl:stylesheet[ <!ENTITY nbsp " "> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:mod="http://www.phpbb.com/mods/xml/modx-1.0.xsd"> <xsl:output method="html" omit-xml-declaration="no" indent="yes" /> <xsl:variable name="title" select="mod:mod/mod:header/mod:title" /> <xsl:variable name="version"> <xsl:for-each select="mod:mod/mod:header/mod:mod-version"> <xsl:call-template name="give-version"> </xsl:call-template> </xsl:for-each> </xsl:variable> <xsl:template match="mod:mod"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-GB" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> /* Style for a "Recommendation" */ /* Copyright 1997-2003 W3C (MIT, ERCIM, Keio). All Rights Reserved. The following software licensing rules apply: http://www.w3.org/Consortium/Legal/copyright-software */ /* $Id: modx.subsilver.en.xsl,v 1.1 2008/09/18 07:43:27 orynider Exp $ */ /* Updated by Jon Stanley for use in phpBB XML MOD */ /* Updated by David Smith to look subSilvery for phpBB */ html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: black; background: #E5E5E5; background-position: top left; background-attachment: fixed; background-repeat: no-repeat; } :link { color : #006699; background: transparent } :visited { color : #006699; background: transparent } a:active { color : #006699; background: transparent } a:hover { text-decoration: underline; color : #DD6900; } a:link img, a:visited img { border-style: none } /* no border on img links */ a img { color: white; } /* trick to hide the border in Netscape 4 */ @media all { /* hide the next rule from Netscape 4 */ a img { color: inherit; } /* undo the color change above */ } th, td { /* ns 4 */ font-family: sans-serif; } h1, h2, h3, h4, h5, h6 { text-align: left } /* background should be transparent, but WebTV has a bug */ h1, h2, h3 { color: #006699 } h1 { font: 170% sans-serif } h2 { font: 140% sans-serif } h3 { font: 120% sans-serif } h4 { font: bold 100% sans-serif } h5 { font: italic 100% sans-serif } h6 { font: small-caps 100% sans-serif } .hide { display: none } div.head { margin-bottom: 1em } div.head h1 { margin-top: 2em; clear: both } div.head table { margin-left: 2em; margin-top: 2em } p.copyright { font-size: small } p.copyright small { font-size: small } @media screen { /* hide from IE3 */ a[href]:hover { background: #ffa } } pre { margin-left: 2em } /* p { margin-top: 0.6em; margin-bottom: 0.6em; } */ dt, dd { margin-top: 0; margin-bottom: 0 } /* opera 3.50 */ dt { font-weight: bold } pre, code { font-family: monospace } /* navigator 4 requires this */ ul.toc { list-style: disc; /* Mac NS has problem with 'none' */ list-style: none; } @media aural { h1, h2, h3 { stress: 20; richness: 90 } .hide { speak: none } p.copyright { volume: x-soft; speech-rate: x-fast } dt { pause-before: 20% } pre { speak-punctuation: code } } /* Additional styles */ div.editFile {border: 2px solid #333333; margin: 0em 0em 2em; padding: 1em 1em; background: #D1D7DC;} div.editFile h2 { font-size: 170%; margin: 0.4em 0em; } div.action { border: 2px solid #DD6900; padding: 1em; background: #DEE3E7; margin: 1em 0em; } div.action p { font-weight: normal; margin-top: 0px; margin-bottom: 0px; font-size: 0.8em; } div.action h3 { margin-top: 0px; margin-bottom: 0px; } div.action pre { padding: 0.2em; background: #EFEFEF; border: 2px solid #006699; overflow: scroll; width: 95%; } div.editFile pre { padding: 0.2em; background: #EFEFEF; border: 2px solid #006699; overflow: scroll; width: 95%; } #pageBody { background-color: #FFFFFF; border: 1px #98AAB1 solid; padding: 1em 1em;} hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} strong.red { color: red; } </style> <script type="text/javascript"><![CDATA[<!--]]> var i = 0; var box = new Array(); <xsl:for-each select="mod:action-group/mod:open/mod:edit"> <xsl:for-each select="mod:find|mod:action"> box[i] = '<xsl:value-of select="generate-id()"/>'; i += 1; </xsl:for-each> <xsl:for-each select="mod:inline-edit"> <xsl:for-each select="mod:inline-find|mod:inline-action"> box[i] = '<xsl:value-of select="generate-id()"/>'; i += 1; </xsl:for-each> </xsl:for-each> </xsl:for-each> <![CDATA[ var selectedElement = -1; var boxes = box.length; var pre_count = 0; // The following line from http://www.ryancooper.com/resources/keycode.asp document.onkeydown = mod_doKeyPress; function SXBB_IsIEMac() { // Any better way to detect IEMac? var ua = String(navigator.userAgent).toLowerCase(); if( document.all && ua.indexOf("mac") >= 0 ) { return true; } return false; } function select_text(id) { var o = document.getElementById(id); if( !o ) { return; } var r, s; if( document.selection && !SXBB_IsIEMac() ) { // Works on: IE5+ // To be confirmed: IE4? / IEMac fails? r = document.body.createTextRange(); r.moveToElementText(o); r.select(); } else if( document.createRange && (document.getSelection || window.getSelection) ) { // Works on: Netscape/Mozilla/Konqueror/Safari // To be confirmed: Konqueror/Safari use window.getSelection ? r = document.createRange(); r.selectNodeContents(o); s = window.getSelection ? window.getSelection() : document.getSelection(); s.removeAllRanges(); s.addRange(r); } find_selected(id); return o; } function find_selected(id) { for( x = 0; x < box.length; x++ ) { if ( box[x] == id ) { selectedElement = x; } } } // function findPosY taken from http://www.quirksmode.org/js/findpos.html function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) { curtop += obj.y; } return curtop; } function selectNextBox() { selectedElement += 1; if (selectedElement >= boxes) selectedElement = 0; obj = select_text(box[selectedElement]); window.scrollTo(0, findPosY(obj) - 100); } function selectPrevBox() { selectedElement -= 1; if (selectedElement < 0) selectedElement = boxes - 1; obj = select_text(box[selectedElement]); window.scrollTo(0, findPosY(obj) - 100); } function selectFirstBox() { selectedElement = 0; obj = select_text(box[selectedElement]); window.scrollTo(0, findPosY(obj) - 100); } function mod_doKeyPress(e) { /* section from w3 schools starts here http://www.w3schools.com/jsref/jsref_onkeypress.asp */ var keynum; /* section from w3 schools ends here */ // The following line from http://www.ryancooper.com/resources/keycode.asp if (window.event) keynum = window.event.keyCode; else if (e) keynum = e.which; if (keynum == 84) selectNextBox(); //if (keynum == 9) selectNextBox(); //tab //if (keynum == 13) selectNextBox(); //enter/return //if (keynum == 32) selectNextBox(); //space if (keynum == 40) selectNextBox(); //down key if (keynum == 38) selectPrevBox(); //up key if (keynum == 83 || keynum == 37) { selectFirstBox(); } return false; } //-->]]></script> <title>phpBB MOD » <xsl:value-of select="$title" /></title> </head> <body> <div id="pageBody"> <div id="modInfo"> <xsl:for-each select="mod:header"> <xsl:call-template name="give-header"></xsl:call-template> </xsl:for-each> <div id="modInstructions"> <xsl:for-each select="mod:action-group"> <xsl:call-template name="give-actions"></xsl:call-template> </xsl:for-each> </div> <hr /> <div class="endMOD"> <h1>Save all files. End of MOD.</h1> <p>You have finished the installation for this MOD. Upload all changed files to your website. If the installation went bad, simply restore your backed up files.</p> </div> </div> </div> <p class="copyright" style="text-align: center; font-size: 10px;">MOD UA XSLT File Copyright © 2006 The phpBB Group, this MOD is copyright to the author<xsl:if test="count(author) > 1">s</xsl:if> listed above.</p> </body> </html> </xsl:template> <xsl:template name="give-header"> <h1>Installation instructions for '<xsl:value-of select="$title" />' Version <xsl:value-of select="$version" /></h1> <h2>About this MOD</h2> <dl> <dt>Title:</dt> <dd> <xsl:if test="count(mod:title) > 1"> <dl id="title"> <xsl:for-each select="mod:title"> <dl id="{generate-id()}"> <dt> <xsl:value-of select="@lang" /> </dt> <dd style='white-space:pre;'> <xsl:value-of select="current()" /> </dd> </dl> </xsl:for-each> </dl> </xsl:if> <xsl:if test="count(mod:title) = 1"> <xsl:value-of select="mod:title" /> </xsl:if> </dd> <dt>Description:</dt> <dd> <xsl:if test="count(mod:description) > 1"> <dl id="description"> <xsl:for-each select="mod:description"> <dl id="{generate-id()}"> <dt> <xsl:value-of select="@lang" /> </dt> <dd> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="current()" /> </xsl:with-param> </xsl:call-template> </dd> </dl> </xsl:for-each> </dl> </xsl:if> <xsl:if test="count(mod:description) = 1"> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="mod:description" /> </xsl:with-param> </xsl:call-template> </xsl:if> </dd> <dt>Version:</dt> <dd> <xsl:for-each select="mod:mod-version"> <xsl:call-template name="give-version"></xsl:call-template> </xsl:for-each> </dd> <xsl:for-each select="mod:installation"> <xsl:call-template name="give-installation"></xsl:call-template> </xsl:for-each> </dl> <xsl:for-each select="mod:author-group"> <h2>Author<xsl:if test="count(mod:author) > 1">s</xsl:if></h2> <xsl:call-template name="give-authors"></xsl:call-template> </xsl:for-each> <h2>Files To Edit</h2> <xsl:for-each select="../mod:action-group"> <xsl:call-template name="give-files-to-edit"></xsl:call-template> </xsl:for-each> <h2>Included Files</h2> <xsl:if test="count(../mod:action-group/mod:copy/mod:file) = 0"> <p>No files have been included with this MOD.</p> </xsl:if> <xsl:for-each select="../mod:action-group"> <xsl:call-template name="give-files-included"></xsl:call-template> </xsl:for-each> <hr /> <div id="modDisclaimer"> <h1>Disclaimer</h1> <p>For Security Purposes, Please Check: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> 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: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p> <h2>Author Notes</h2> <xsl:if test="count(mod:author-notes) > 1"> <dl id="author-notes"> <xsl:for-each select="mod:author-notes"> <dl id="{generate-id()}"> <dt> <xsl:value-of select="@lang" /> </dt> <dd> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="current()" /> </xsl:with-param> </xsl:call-template> </dd> </dl> </xsl:for-each> </dl> </xsl:if> <xsl:if test="count(mod:author-notes) = 1"> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="mod:author-notes" /> </xsl:with-param> </xsl:call-template> </xsl:if> <xsl:for-each select="mod:history"> <xsl:call-template name="give-mod-history"></xsl:call-template> </xsl:for-each> <h3>License</h3> <p>This MOD has been licensed under the following license:</p> <p style='white-space:pre;'> <xsl:value-of select="mod:license" /> </p> <h3>Other Notes</h3> <p>Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD</p> <p>This MOD was designed for phpBB<xsl:value-of select="mod:installation/mod:target-version/mod:target-primary" /> and may not function as stated on other phpBB versions. MODs for phpBB3.0 will <strong>not</strong> work on phpBB2.0 and vice versa.</p> <xsl:if test="./mod:mod-version/mod:minor mod 2 != 0 or ./mod:mod-version/mod:major = 0"> <p> <strong class="red">This MOD is development quality. It is not recommended that you install it on a live forum.</strong> </p> </xsl:if> </div> <hr /> </xsl:template> <xsl:template name="give-authors"> <xsl:for-each select="mod:author"> <xsl:call-template name="give-author"></xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="give-author"> <dl> <dt>Username:</dt> <dd> <a href="http://www.phpbb.com/phpBB/profile.php?mode=viewprofile&un={mod:username}"> <xsl:value-of select="mod:username" /> </a> </dd> <xsl:if test="mod:email != 'N/A' and mod:email != 'n/a' and mod:email != ''"> <dt>Email:</dt> <dd> <a href="mailto:{mod:email}"> <xsl:value-of select="mod:email" /> </a> </dd> </xsl:if> <dt>Realname:</dt> <dd> <xsl:value-of select="mod:realname" /> </dd> <xsl:if test="mod:homepage != 'N/A' and mod:homepage != 'n/a' and mod:homepage!=''"> <dt>WWW:</dt> <dd> <a href="{mod:homepage}"> <xsl:value-of select="mod:homepage" /> </a> </dd> </xsl:if> </dl> <br /> </xsl:template> <xsl:template name="give-version"><xsl:value-of select="concat(mod:major, '.', mod:minor, '.', mod:revision, mod:release)" /></xsl:template> <xsl:template name="give-installation"> <dt>Installation Level:</dt> <dd> <xsl:if test="mod:level='easy'">Easy</xsl:if> <xsl:if test="mod:level='intermediate'">Intermediate</xsl:if> <xsl:if test="mod:level='hard'">Hard</xsl:if> </dd> <dt>Installation Time:</dt> <dd>~<xsl:value-of select="floor(mod:time div 60)" /> minutes</dd> </xsl:template> <xsl:template name="give-mod-history"> <xsl:if test="count(mod:entry)>1"> <h2>MOD History</h2> <dl> <xsl:for-each select="mod:entry"> <xsl:call-template name="give-history-entry"></xsl:call-template> </xsl:for-each> </dl> </xsl:if> </xsl:template> <xsl:template name="give-history-entry"> <dt><xsl:value-of select="substring(mod:date,1,10)" /> - Version <xsl:for-each select="mod:rev-version"> <xsl:call-template name="give-version"></xsl:call-template> </xsl:for-each></dt> <dd> <xsl:if test="count(mod:changelog) > 1"> <xsl:for-each select="mod:changelog"> <xsl:call-template name="give-history-entry-changelog"></xsl:call-template> </xsl:for-each> </xsl:if> <xsl:if test="count(mod:changelog) = 1"> <xsl:for-each select="mod:changelog"> <xsl:call-template name="give-history-entry-changelog-single"></xsl:call-template> </xsl:for-each> </xsl:if> </dd> </xsl:template> <xsl:template name="give-history-entry-changelog"> <dl> <dt> <xsl:value-of select="@lang" /> </dt> <dd> <ul> <xsl:for-each select="mod:change"> <li> <xsl:value-of select="current()" /> </li> </xsl:for-each> </ul> </dd> </dl> </xsl:template> <xsl:template name="give-history-entry-changelog-single"> <ul> <xsl:for-each select="mod:change"> <li> <xsl:value-of select="current()" /> </li> </xsl:for-each> </ul> </xsl:template> <xsl:template name="give-files-to-edit"> <ul> <xsl:for-each select="mod:open"> <xsl:call-template name="give-file"></xsl:call-template> </xsl:for-each> </ul> </xsl:template> <xsl:template name="give-files-included"> <ul> <xsl:for-each select="mod:copy"> <xsl:call-template name="give-file-copy"></xsl:call-template> </xsl:for-each> </ul> </xsl:template> <xsl:template name="give-file"> <li> <xsl:value-of select="@src" /> <xsl:if test="position()!=last()">,</xsl:if> </li> </xsl:template> <xsl:template name="give-file-copy"> <xsl:for-each select="mod:file"> <li> <xsl:value-of select="@from" /> <xsl:if test="position()!=last()">,</xsl:if> </li> </xsl:for-each> </xsl:template> <xsl:template name="give-actions"> <xsl:if test="count(mod:sql) > 0"> <h1 onclick="select_text('sql');">SQL</h1> </xsl:if> <div id="sql"> <xsl:for-each select="mod:sql"> <xsl:call-template name="give-sql"></xsl:call-template> </xsl:for-each> </div> <xsl:if test="count(mod:copy) > 0"> <h1>File Copy</h1> </xsl:if> <xsl:for-each select="mod:copy"> <xsl:call-template name="give-filez"></xsl:call-template> </xsl:for-each> <h1>Edits</h1> <p>Click on the action name or in the code box to select the code. You may also hit '<em>s</em>' on your keyboard to go to the first code box and the <em>up</em> and <em>down</em> arrows to scroll through the code boxes.</p> <xsl:for-each select="mod:open"> <xsl:call-template name="give-fileo"></xsl:call-template> </xsl:for-each> <xsl:call-template name="give-manual"></xsl:call-template> </xsl:template> <xsl:template name="give-sql"> <div class="action"> <pre> <xsl:value-of select="current()" /> </pre> </div> </xsl:template> <xsl:template name="give-manual"> <xsl:for-each select="mod:diy-instructions"> <div class="editFile"> <h2 onClick="select_text('{generate-id()}')">DIY Instructions<xsl:if test="count(../mod:diy-instructions) > 1"> (<xsl:value-of select="@lang" />)</xsl:if></h2> <p>These are manual instructions that cannot be performed automatically. You should follow these instructions carefully.</p> <pre id="{generate-id()}"> <xsl:value-of select="current()" /> </pre> </div> </xsl:for-each> </xsl:template> <xsl:template name="give-fileo"> <div class="editFile"> <h2>Open: <xsl:value-of select="@src" /></h2> <xsl:for-each select="mod:edit"> <div class="action"> <xsl:for-each select="mod:find|mod:action|mod:inline-edit|mod:comment"> <xsl:if test="name() = 'find'"> <h3 onClick="select_text('{generate-id()}')">Find</h3> <p><strong>Tip:</strong> This may be a partial find and not the whole line. <xsl:if test="@type = 'regex'"> <br /> <em>This find contains an advanced feature known as regular expressions, click here to learn more.</em> </xsl:if> </p> <pre id="{generate-id()}"> <xsl:value-of select="current()" /> </pre> </xsl:if> <xsl:if test="name() = 'action'"> <xsl:if test="@type = 'after-add'"> <h3 onClick="select_text('{generate-id()}')">Add after</h3> <p><strong>Tip:</strong> Add these lines on a new blank line after the preceding line(s) to find.</p> </xsl:if> <xsl:if test="@type = 'before-add'"> <h3 onClick="select_text('{generate-id()}')">Add before</h3> <p><strong>Tip:</strong> Add these lines on a new blank line before the preceding line(s) to find.</p> </xsl:if> <xs... [truncated message content] |