You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: OryNider <ory...@us...> - 2007-06-06 20:32:36
|
Update of /cvsroot/mxbb/mx_music In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6104 Added Files: db_install.php db_uninstall.php db_upgrade.php music.php music_center.pak mx_install_readme.htm release.txt Log Message: --- NEW FILE: release.txt --- [b][Release][mx_music]: Music Center[/b] [b][Authors]: Cf Manager, OryNider[/b] [b][Version]: 2.0.6 [/b] [b]Designed for mxBB Version: 2.8.0[/b] [b][Support]:[/b] [u]Here[/u] [b][DEMO]:[/b] [url=http://atcer.ministry.ro/board/?page=16]Here[/url] [b][Note]:[/b] [color=red]If you upgrade from 2.7.x and you have mx_musiconline, the posibility of migration to mx_music it's just teoretical with unknown rezult, and you do it at your own risc!!! A mx_musiconline module for 2.8.0 may be relesed by Selven.[/color] [b][Description]:[/b] This Module allows you create the Music Center Page/Block 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 have an admin panel that allows you to manage the features of the module. Some modifications on the original MODS have been applied to make this package more integrated, flexible and multilanguage. Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM and others. [b]Additionaly:[/b] [list] [*][u]Music Song Image[/u] - You can add the Song Image to the section of each song. (Maybe CD Cover, Artist Photo or any image you want ;) ) Maximum image size is configurable in adminCP :D [*][u]Music Search Song[/u] - is helping you find the song by Song Title, Singer or Song Poster quickly and easily. [*][u]Music Cat Views[/u] - is adding a viewed counter of each Category; [*][u]Music Download Song[/u] - alows users to directly download the song to their computer.[/list] [b]Special Note:[/b] [color=blue] In version 2.0.2 and above if you are posting a radio stream that ends with "/listen.pls" on music_page will be swiched to music_stream mode and will make traffic on your website, but if it's submited like a normal url with no "/listen.pls" will make traffic on the shotcast server who is brotcasting the stream. But if it's submited with "/listen.pls" can be listened with your favorite player and the original stream informations will he hidden To do this copy the link from Download/Listen in your player on the website or local computer such as WinAMP :wink: But do not try to save the file couse you will just make not needed traffic and get a very large file!!![/color] [b][Download]:[/b] [URL=http://www.mx-system.com/modules/mx_pafiledb/dload.php?action=download&file_id=368]mx_music_center.zip[/URL] [b][Languages]:[/b] [color=blue]Please if you traslate the language files to your language post a link to a zip with the traslated files. Thaks![/color] [b][Romanian Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=44]mx_music_romanian_language.zip[/url] [b][German Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=45]mx_music_german_language.zip[/url] [b][Dutch Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=46]mx_music_lang_dutch.zip[/url] [b][Chinese Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=47]mx_music_lang_chinese.zip[/url] [b][Vietnamese Language][/b]: [url=http://pubory.uv.ro/portal/modules/mx_pafiledb/dload.php?action=download&file_id=48]mx_music_lang_vietnamese.zip[/url] --- NEW FILE: db_uninstall.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: db_uninstall.php,v 1.1 2007/06/06 20:32:26 orynider Exp $ * @copyright (c) 2003 [sma...@ho..., Smartor] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', true); if ( !defined('IN_ADMIN') ) { $mx_root_path = '../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($mx_root_path . 'common.'.$phpEx); // // Start session management // $mx_user->init($user_ip, PAGE_INDEX); if( !$userdata['session_logged_in'] ) { die("Hacking attempt(3)"); } if( $userdata['user_level'] != ADMIN ) { die("Hacking attempt(4)"); } // // End session management // } $sql = array( "DROP TABLE ".$mx_table_prefix."music ", "DROP TABLE ".$mx_table_prefix."music_rate ", "DROP TABLE ".$mx_table_prefix."music_comment ", "DROP TABLE ".$mx_table_prefix."music_cat ", "DROP TABLE ".$mx_table_prefix."music_config ", ); $n = 0; $message = "<b>This list is a result of the SQL queries needed for music online module</b><br /><br />"; while($sql[$n]) { $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br />' : ''; if(!$result = $db->sql_query($sql[$n])) { $message .= '<b><font color=#FF0000>[Error, Already deleted or updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } else { $message .='<b><font color=#0000fF>[Deleted/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />'; } $n++; } $message .= '<br /> If you get some Error, Already Deleted or Updated, relax, this is normal ;)'; echo "<br /><br />"; echo "<table cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Uninstallation Information</th></tr>"; echo "<tr><td class=\"row1\" align=\"center\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: mx_install_readme.htm --- <html> <head> <title>Mx Portal installation - readme</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css" --> <style type="text/css"> <!-- /* The original subSilver Theme for phpBB version 2+ Created by subBlue design http://www.subBlue.com NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2 theme administration centre. When you have finalised your style you could cut the final CSS code and place it in an external file, deleting this section to save bandwidth. */ /* General page style. The scroll bar colours only visible in IE5.5+ */ body { background-color: #E5E5E5; scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; } /* General font families for common tags */ font, th, td, p { font-family: Verdana, Arial, Helvetica, sans-serif } a:link, a:active, a:visited { color : #006699; } a:hover { text-decoration: underline; color : #DD6900; } hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} /* This is the border line & background colour round the entire page */ .bodyline { background-color: #FFFFFF; border: 1px #98AAB1 solid; } /* This is the outline round the main forum tables */ .forumline { background-color: #FFFFFF; border: 2px #006699 solid; } /* Main table cell colours and backgrounds */ td.row1 { background-color: #EFEFEF; } td.row2 { background-color: #DEE3E7; } td.row3 { background-color: #D1D7DC; } /* This is for the table cell above the Topics, Post & Last posts on the index.php page By default this is the fading out gradiated silver background. However, you could replace this with a bitmap specific for each forum */ td.rowpic { background-color: #FFFFFF; background-image: url('../../install/templates/subSilver/images/cellpic2.jpg'); background-repeat: repeat-y } /* Header cells - the blue and silver gradient backgrounds */ th { color: #FFA34F; font-size: 11px; font-weight : bold; background-color: #006699; height: 25px; background-image: url('../../install/templates/subSilver/images/cellpic3.gif'); } td.cat, td.catHead, td.catSides, td.catLeft, td.catRight, td.catBottom { background-image: url('../../install/templates/subSilver/images/cellpic1.gif'); background-color:#D1D7DC; border: medium solid #FFFFFF; height: 28px } /* Setting additional nice inner borders for the main table cells. The names indicate which sides the border will be on. Don't worry if you don't understand this, just ignore it :-) */ td.cat, td.catHead, td.catBottom { height: 29px; border-width: 0px 0px 0px 0px; } th.thHead, th.thSides, th.thTop, th.thLeft, th.thRight, th.thBottom, th.thCornerL, th.thCornerR { font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px; } td.row3Right, td.spaceRow { background-color: #D1D7DC; border: #FFFFFF; border-style: solid; } th.thHead, td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; } th.thSides, td.catSides, td.spaceRow { border-width: 0px 1px 0px 1px; } th.thRight, td.catRight, td.row3Right { border-width: 0px 1px 0px 0px; } th.thLeft, td.catLeft { border-width: 0px 0px 0px 1px; } th.thBottom, td.catBottom { border-width: 0px 1px 1px 1px; } th.thTop { border-width: 1px 0px 0px 0px; } th.thCornerL { border-width: 1px 0px 0px 1px; } th.thCornerR { border-width: 1px 1px 0px 0px; } /* The largest text used in the index page title and toptic title etc. */ .maintitle { font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000; } /* General text */ .gen { font-size : 12px; } .genmed { font-size : 11px; } .gensmall { font-size : 10px; } .gen, .genmed, .gensmall { color : #000000; } a.gen, a.genmed, a.gensmall { color: #006699; text-decoration: none; } a.gen:hover, a.genmed:hover, a.gensmall:hover { color: #DD6900; text-decoration: underline; } /* The register, login, search etc links at the top of the page */ .mainmenu { font-size : 11px; color : #000000 } a.mainmenu { text-decoration: none; color : #006699; } a.mainmenu:hover{ text-decoration: underline; color : #DD6900; } /* Forum category titles */ .cattitle { font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699} a.cattitle { text-decoration: none; color : #006699; } a.cattitle:hover{ text-decoration: underline; } /* Forum title: Text and link to the forums used in: index.php */ .forumlink { font-weight: bold; font-size: 12px; color : #006699; } a.forumlink { text-decoration: none; color : #006699; } a.forumlink:hover{ text-decoration: underline; color : #DD6900; } /* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */ .nav { font-weight: bold; font-size: 11px; color : #000000;} a.nav { text-decoration: none; color : #006699; } a.nav:hover { text-decoration: underline; } /* titles for the topics: could specify viewed link colour too */ .topictitle, h1, h2 { font-weight: bold; font-size: 11px; color : #000000; } a.topictitle:link { text-decoration: none; color : #006699; } a.topictitle:visited { text-decoration: none; color : #5493B4; } a.topictitle:hover { text-decoration: underline; color : #DD6900; } /* Name of poster in viewmsg.php and viewtopic.php and other places */ .name { font-size : 11px; color : #000000;} /* Location, number of posts, post date etc */ .postdetails { font-size : 10px; color : #000000; } /* The content of the posts (body of text) */ .postbody { font-size : 12px; line-height: 18px} a.postlink:link { text-decoration: none; color : #006699 } a.postlink:visited { text-decoration: none; color : #5493B4; } a.postlink:hover { text-decoration: underline; color : #DD6900} /* Quote & Code blocks */ .code { font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600; background-color: #FAFAFA; border: #D1D7DC; border-style: solid; border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px } .quote { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%; background-color: #FAFAFA; border: #D1D7DC; border-style: solid; border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px } /* Copyright and bottom info */ .copyright { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;} a.copyright { color: #444444; text-decoration: none;} a.copyright:hover { color: #000000; text-decoration: underline;} /* Form elements */ input, textarea, select { color : #000000; font: normal 11px Verdana, Arial, Helvetica, sans-serif; border-color : #000000; } /* The text input fields background colour */ input.post, textarea.post, select { background-color : #FFFFFF; } input { text-indent : 2px; } /* The buttons used for bbCode styling in message post */ input.button { background-color : #EFEFEF; color : #000000; font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; } /* The main submit button option */ input.mainoption { background-color : #FAFAFA; font-weight : bold; } /* None-bold submit button */ input.liteoption { background-color : #FAFAFA; font-weight : normal; } /* This is the line in the posting page which shows the rollover help line. This is actually a text box, but if set to be the same colour as the background no one will know ;) */ .helpline { background-color: #DEE3E7; border-style: none; } /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("../../phpBB2/templates/subSilver/formIE.css"); --> </style> <script language="Javascript" type="text/javascript"> <!-- if ( 0 ) { window.open('privmsg.php?mode=newpm', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');; } //--> </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <table> <tr> <td colspan="2"><p><b><font style="font-size: 9pt">MX Module - Music Online <br> v. 2.0.6 </font></b></p> <p><span style="font-size: 9pt; line-height: normal; font-weight:bold">Module</span><span style="font-size: 9pt"> <br /> - for mxBB-Portal v. 2.8.0</span></p> <p><strong><span style="font-size: 9pt">Author</span></strong><span style="font-size: 9pt"><br /> Cf Manager, OryNider (mxBB-Development Team)<br /> <br /> <span style="font-weight: bold">Description:</span> <br /> </span><span class="postbody">This Module allows you create the Music Center Page/Block where users can upload, listen, rate and comment on songs. <br> Beside that, users can link URL of the song from the another server without uploading. <br> You have an admin panel that allows you to manage the features of the module. <br> Some modifications on the original MODS have been applied to make this package more integrated, flexible and multilanguage. <br> Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM and others. <br> <br> </span><strong> <span style="font-size: 9pt">Features</span></strong><span style="font-size: 9pt"> - Media Center, Easy to install/uninstall module:</span><span class="postbody"></p> <ul> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Music Song Image</span> - You can add the Song Image to the section of each song. (Maybe CD Cover, Artist Photo or any image you want <img alt="Wink" src="http://www.mx-system.com/forum/images/smiles/icon_wink.gif" border="0" width="15" height="15"> ) <br> Maximum image size is configurable in adminCP <img alt="Very Happy" src="http://www.mx-system.com/forum/images/smiles/icon_biggrin.gif" border="0" width="15" height="15"> <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Music Search Song</span> - is helping you find the song by Song Title, Singer or Song Poster quickly and easily. <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Music Cat Views</span> - is adding a viewed counter of each Category; <br> </li> <li> <p style="margin-top: 0; margin-bottom: 0"> <span style="TEXT-DECORATION: underline">Music Download Song</span> - alows users to directly download the song to their computer.</li> </ul> </span> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt"> Special Note: </span><span class="postbody"><span style="COLOR: red">If you are posting a radio stream that ends with "/listen.pls" on music_page will be swiched to music_stream mode and will make traffic on your website, but if it's submited like a normal url with no "/listen.pls" will make traffic on the shotcast server who is brotcasting the stream. But if it's submited with "/listen.pls" can be listened with your favorite player and the original stream informations will he hidden To do this copy the link from Download/Listen in your player on the website or local computer such as WinAMP </span> <img alt="Wink" src="http://www.mx-system.com/forum/images/smiles/icon_wink.gif" border="0" width="15" height="15"><span style="COLOR: red"> But do not try to save the file couse you will just make not needed traffic and get a very large file!!!</span> </span></p> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt"> <br /> I. <a href="#install">Installation instructions</a> <br /> <br /> II. <a href="#themes">Additional styles</a> <br /> <br /> III. <a href="#languages">Additional languages</a><br /> <br /> <a target="_blank" class="postlink" href="http://arcer.ministry.ro/board/?page=16">DEMO </a> <br /> <br /> <a href="http://www.mx-system.com/index.php?page=4" target="_blank" class="postlink"> DOWNLOAD </a> <br /> <br /><a name="install"> <br /> <span style="font-weight: bold">I. Installation Instructions</span> <br /> To install this module, follow these instructions. If you encounter any problems during install, visit the <a target="_blank" class="postlink" href="http://www.mx-system.com/forum/viewtopic.php?t=9823">module support forum</a>. <br> <br> To summarize:<br> If installing from scratch, use import module in the AdminCP.<br> If upgrading, use the upgrade option in the AdminCP<br> If uninstalling, use the delete feature in the AdminCP</span></p> <p style="margin-top: 0; margin-bottom: 0"> </p> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt">Special note for mx_music online:<br> # CHMOD 777 upload<br> # CHMOD 777 upload/song_image</span></p> <p style="margin-top: 0; margin-bottom: 0"> </p> <p style="margin-top: 0; margin-bottom: 0"><span style="font-size: 9pt"> Special Note: </span><span class="postbody"><span style="COLOR: red">If you upgrade from 2.7.x and you have mx_musiconline, the posibility of migration to mx_music it's just teoretical with unknown rezult, and you do it at your own risc!!! A mx_musiconline module for 2.8.0 may be relesed by Selven.</span></span><span style="font-size: 9pt"><br> <br /> <a href="#top"> Back to Top</a> <br /> <br /><a name="themes"> <br /> <span style="font-weight: bold">II. Additional Styles</span> <br /> This module is compatible with any theme/style. <br /> <br /> <a href="#top"> Back to Top</a> <br /> <br /><a name="languages"> <br /> <span style="font-weight: bold">III. Additional Languages</span> <br /> First check to see if your language is already translated. <br /> <br /> Translated languages are downloaded <a target="_blank" class="postlink" href="http://www.mx-system.com/index.php?page=2&t=9823&phpbb_script=viewtopic">here</a>. <br /> <br /> If exists, download and install in the modules/mx_modulename/language folder. If not, duplicate (copy and paste) any included language file, rename to match your language, translate using any texteditor, save and upload. <br /><br /> <a href="#top"> Back to Top</a> </span></p> <p> <span style="font-size: 9pt">/mxBB-Development Team</span></p> </td> </tr> </table> </body> </html> --- NEW FILE: db_upgrade.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: db_upgrade.php,v 1.1 2007/06/06 20:32:27 orynider Exp $ * @copyright (c) 2002-2006 [Markus, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } // End session management } $mx_module_version = '2.0.6'; $mx_module_copy = 'mxBB <i> - Music Center</i> module by Cf Manager & <a href="http://www.mxbb.net" target="_blank">OryNider</a>'; $sql = array(); // // Precheck // if ( $result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "music_config" ) ) { // // Upgrade checks // $upgrade_206 = 0; // // validate before 2.06 // $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "music_config WHERE config_name = 'enable_integration'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_206 = 1; } $message = "<b>Upgrading!</b><br/><br/>"; if ( $upgrade_206 == 1 ) { $message .= "<b>Upgrading to v. 2.01(2.06)...</b><br/><br/>"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "music ADD song_imagename VARCHAR(255) not null AFTER song_filename"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "music ADD song_download_count VARCHAR(255) not null DEFAULT '0' AFTER song_approval"; $sql[] = "ALTER TABLE " . $mx_table_prefix . "music_cat ADD cat_views mediumint(8) NOT NULL"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rm_allowed', '1')"; $sql[] = "UPDATE ". $mx_table_prefix ."music_config SET config_value = '0.6' WHERE config_name = 'music_version'"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_size', '10240')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_width', '300')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_height', '200')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('index', '5')"; } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); } else { // // If not installed // $message = "<b>Module is not installed...and thus cannot be upgraded ;)</b><br/><br/>"; } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstalling Information - module specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> --- NEW FILE: music.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: music.php,v 1.1 2007/06/06 20:32:28 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ // // ERROR HANDLING // //error_reporting( E_ALL ); if( !defined('IN_PORTAL') || !is_object($mx_block)) { define('IN_PORTAL', true); $mx_root_path = '../../'; // // Let's include some stuff... // $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 // $block_id = ( !empty($HTTP_GET_VARS['block_id']) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; if( empty($block_id) ) { $sql = "SELECT * FROM " . BLOCK_TABLE . " WHERE block_title = 'Music Center' LIMIT 1"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, "Could not query Music Center module information", "", __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $block_id = $row['block_id']; } $is_block = FALSE; } else { // // Read block Configuration // $title = $mx_block->block_info['block_title']; $block_size = ( isset($block_size) && !empty($block_size) ? $block_size : '100%' ); if( is_object($mx_block)) { $is_block = TRUE; } global $images, $mx_images; } $music_root_path = $module_root_path . 'music_box/'; // // Get general music information // include($music_root_path . 'music_common.'.$phpEx); // // Nav switch for mx // // --------------------- // Check $album_user_id // --------------------- if (isset ($_POST['user_id'])) { $music_user_id = intval($_POST['user_id']); } elseif (isset ($_GET['user_id'])) { $music_user_id = intval($_GET['user_id']); } else { $music_user_id = $userdata['user_id']; } // //mode // if ( isset($HTTP_POST_VARS['music_mode']) || isset($HTTP_GET_VARS['music_mode']) ) { $mode= ( isset($HTTP_POST_VARS['music_mode']) ) ? $HTTP_POST_VARS['music_mode'] : $HTTP_GET_VARS['music_mode']; } else { $mode= 'music_index'; } if ( $mode == 'music_cat' ) { include($module_root_path. 'includes/music_cat.'.$phpEx); } else if ( $mode == 'music_comment' ) { include($module_root_path. 'includes/music_comment.'.$phpEx); } else if ( $mode == 'music_comment_delete' ) { include($module_root_path. 'includes/music_comment_delete.'.$phpEx); } else if ( $mode == 'music_comment_edit' ) { include($module_root_path. 'includes/music_comment_edit.'.$phpEx); } else if ( $mode == 'music_delete' ) { include($module_root_path. 'includes/music_delete.'.$phpEx); } else if ( $mode == 'music_download' ) { include($module_root_path. 'includes/music_download.'.$phpEx); } else if ( $mode == 'music_edit' ) { include($module_root_path. 'includes/music_edit.'.$phpEx); } else if ( $mode == 'music_list' ) { include($module_root_path. 'includes/music_list.'.$phpEx); } else if ( $mode == 'music_modcp' ) { include($module_root_path. 'includes/music_modcp.'.$phpEx); } else if ( $mode == 'music_page' ) { include($module_root_path. 'includes/music_page.'.$phpEx); } else if ( $mode == 'music_rate' ) { include($module_root_path. 'includes/music_rate.'.$phpEx); } else if ( $mode == 'music_song' ) { include($module_root_path. 'includes/music_song.'.$phpEx); } else if ( $mode == 'music_upload' ) { include($module_root_path. 'includes/music_upload.'.$phpEx); } else if ( $mode == 'music_stream' ) { include($module_root_path. 'includes/music_stream.'.$phpEx); } else if( !is_object($mx_block)) { die("Hacking attempt"); } else { /* +---------------------------------------------------------- | Build Categories Index +---------------------------------------------------------- */ $sql = "SELECT c.*, COUNT(s.song_id) AS count FROM ". MUSIC_CAT_TABLE ." AS c LEFT JOIN ". MUSIC_TABLE ." AS s ON c.cat_id = s.song_cat_id WHERE cat_id <> 0 GROUP BY cat_id ORDER BY cat_order ASC"; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql); } $catrows = array(); while( $row = $db->sql_fetchrow($result) ) { $music_user_access = music_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW if ($music_user_access['view'] == 1) { $catrows[] = $row; } } $allowed_cat = ''; // For Recent Public Songs below // // $catrows now stores all categories which this user can view. Dump them out! // for ($i = 0; $i < count($catrows); $i++) { // -------------------------------- // Build allowed category-list (for recent songs after here) // -------------------------------- $allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id']; // -------------------------------- // Build moderators list // -------------------------------- $l_moderators = ''; $moderators_list = ''; $grouprows= array(); if( $catrows[$i]['cat_moderator_groups'] != '') { // We have usergroup_ID, now we need usergroup name $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> 1 AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $catrows[$i]['cat_moderator_groups'] .") ORDER BY group_name ASC"; if ( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not obtain usergroups data', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $grouprows[] = $row; } } if( count($grouprows) > 0 ) { $l_moderators = $lang['Moderators']; for ($j = 0; $j < count($grouprows); $j++) { $group_link = '<a href="'. append_sid($phpbb_root_path. "groupcp.$phpEx?". POST_GROUPS_URL .'='. $grouprows[$j]['group_id']) .'">'. $grouprows[$j]['group_name'] .'</a>'; $moderators_list .= ($moderators_list == '') ? $group_link : ', ' . $group_link; } } // ------------------------------------------ // Get Last song of this Category // ------------------------------------------ if ($catrows[$i]['count'] == 0) { // // Oh, this category is empty // $last_song_info = $lang['No_Songs']; $u_last_song = ''; $last_song_title = ''; } else { // ---------------------------- // Check Song Approval // ---------------------------- if(($catrows[$i]['cat_approval'] == MUSIC_ADMIN) or ($catrows[$i]['cat_approval'] == MUSIC_MOD)) { $song_approval_sql = 'AND s.song_approval = 1'; // song Approval ON } else { $song_approval_sql = ''; // song Approval OFF } // ---------------------------- // OK, we may do a query now... // ---------------------------- $sql = "SELECT s.song_id, s.song_title, s.song_singer, s.song_user_id, s.song_username, s.song_time, s.song_cat_id, u.user_id, u.username FROM ". MUSIC_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.song_user_id = u.user_id WHERE s.song_cat_id = '". $catrows[$i]['cat_id'] ."' $song_approval_sql ORDER BY s.song_time DESC LIMIT 1"; if ( !$result = $db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, 'Could not get last song information', '', __LINE__, __FILE__, $sql); } $lastrow = $db->sql_fetchrow($result); // ---------------------------- // Write the Date // ---------------------------- $last_song_info = create_date($board_config['default_dateformat'], $lastrow['song_time'], $board_config['board_timezone']); $last_song_info .= '<br />'; // ---------------------------- // Write username of last poster // ---------------------------- if( ($lastrow['user_id'] == MUSIC_GUEST) or ($lastrow['username'] == '') ) { $last_song_info .= ($lastrow['song_username'] == '') ? $lang['Guest'] : $lastrow['song_username']; } else { $last_song_info .= $lang['Poster'] .': <a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $lastrow['user_id']) .'">'. $lastrow['username'] .'</a>'; } // ---------------------------- // Write the last song's title. // Truncate it if it's too long // ---------------------------- if( !isset($music_config['last_song_title_length']) ) { $music_config['last_song_title_length'] = 25; } $lastrow['song_title'] = $lastrow['song_title']; if (strlen($lastrow['song_title']) > $music_config['last_song_title_length']) { $lastrow['song_title'] = substr($lastrow['song_title'], 0, $music_config['last_song_title_length']) . '...'; } $last_song_info .= '<br />'. $lang['Song_Title'] .': <a href="'; $last_song_info .= append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $lastrow['song_id'])) .'">' ; $last_song_info .= $lastrow['song_title'] .'</a>'; } // END of Last Song // ------------------------------------------ // Parse to template the info of the current Category // ------------------------------------------ $template->assign_block_vars('catrow', array( 'U_VIEW_CAT' => append_sid(this_mo_mxurl("music_mode=music_cat&cat_id=". $catrows[$i]['cat_id'])), 'CAT_TITLE' => $catrows[$i]['cat_title'], 'CAT_DESC' => $catrows[$i]['cat_desc'], 'CAT_VIEWS' => $catrows[$i]['cat_views'], 'L_MODERATORS' => $l_moderators, 'MODERATORS' => $moderators_list, 'SONGS' => $catrows[$i]['count'], 'LAST_SONG_INFO' => $last_song_info) ); } // END of Categories Index /* +---------------------------------------------------------- | Top Song +---------------------------------------------------------- */ if( isset($HTTP_GET_VARS['sort_method']) ) { switch ($HTTP_GET_VARS['sort_method']) { case 'song_time': $sort_method = 'song_time'; break; case 'song_view_count': $sort_method = 'song_view_count'; break; case 'rating': $sort_method = 'rating'; break; case 'comments': $sort_method = 'comments'; break; case 'new_comment': $sort_method = 'new_comment'; break; default: $sort_method = $music_config['sort_method']; } } else if( isset($HTTP_POST_VARS['sort_method']) ) { switch ($HTTP_POST_VARS['sort_method']) { case 'song_time': $sort_method = 'song_time'; break; case 'song_view_count': $sort_method = 'song_view_count'; break; case 'rating': $sort_method = 'rating'; break; case 'comments': $sort_method = 'comments'; break; case 'new_comment': $sort_method = 'new_comment'; break; default: $sort_method = $music_config['sort_method']; } } else { $sort_method = $music_config['sort_method']; } // Song limit if( isset($HTTP_GET_VARS['song_limit']) ) { switch ($HTTP_GET_VARS['song_limit']) { case '5': $song_limit = '5'; break; case '10': $song_limit = '10'; break; case '15': $song_limit = '15'; break; case '20': $song_limit = '20'; break; default: $song_limit = $music_config['top']; } } else if( isset($HTTP_POST_VARS['song_limit']) ) { switch ($HTTP_POST_VARS['song_limit']) { case '5': $song_limit = '5'; break; case '10': $song_limit = '10'; break; case '15': $song_limit = '15'; break; case '20': $song_limit = '20'; break; default: $song_limit = $music_config['top']; } } else { $song_limit = $music_config['top']; } // // We may do query now // if ($allowed_cat != '') { $sql = "SELECT s.song_id, s.song_title, s.song_desc, s.song_singer, s.song_user_id, s.song_user_ip, s.song_username, s.song_time, s.song_cat_id, s.song_view_count, u.user_id, u.username, r.rate_song_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment FROM ". MUSIC_TABLE ." AS s LEFT JOIN ". USERS_TABLE ." AS u ON s.song_user_id = u.user_id LEFT JOIN ". MUSIC_CAT_TABLE ." AS ct ON s.song_cat_id = ct.cat_id LEFT JOIN ". MUSIC_RATE_TABLE ." AS r ON s.song_id = r.rate_song_id LEFT JOIN ". MUSIC_COMMENT_TABLE ." AS c ON s.song_id = c.comment_song_id WHERE s.song_cat_id IN ($allowed_cat) AND ( s.song_approval = 1 OR ct.cat_approval = 0 ) GROUP BY s.song_id ORDER BY $sort_method DESC LIMIT $song_limit"; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query top songs information', '', __LINE__, __FILE__, $sql); } $topsongrow = array(); while( $row = $db->sql_fetchrow($result) ) { $topsongrow[] = $row; } if (count($topsongrow) > 0) { for ($i = 0; $i < count($topsongrow); $i += $music_config['rows_per_page']) { $template->assign_block_vars('top_songs', array()); for ($j = $i; $j < ($i + $music_config['rows_per_page']); $j++) { if( $j >= count($topsongrow) ) { break; } if(!$topsongrow[$j]['rating']) { $topsongrow[$j]['rating'] = $lang['Not_rated']; } else { $topsongrow[$j]['rating'] = round($topsongrow[$j]['rating'], 2); } $template->assign_block_vars('top_songs.top_row', array( 'U_SONG' => append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $topsongrow[$j]['song_id'])), 'DESC' => $topsongrow[$j]['song_desc'] ) ); if( ($topsongrow[$j]['user_id'] == MUSIC_GUEST) or ($topsongrow[$j]['username'] == '') ) { $top_poster = ($topsongrow[$j]['song_username'] == '') ? $lang['Guest'] : $topsongrow[$j]['song_username']; } else { $top_poster = '<a href="'. append_sid($phpbb_root_path . "profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $topsongrow[$j]['user_id']) .'">'. $topsongrow[$j]['username'] .'</a>'; } $template->assign_block_vars('top_songs.top_detail', array( 'TITLE' => '<a href="'. append_sid(this_mo_mxurl("music_mode=music_page&song_id=". $topsongrow[$j]['song_id'])) . '">' . $topsongrow[$j]['song_title'] . '</a>', 'SINGER' => $topsongrow[$j]['song_singer'], 'POSTER' => $top_poster, 'TIME' => create_date($board_config['default_dateformat'], $topsongrow[$j]['song_time'], $board_config['board_timezone']), 'VIEW' => $topsongrow[$j]['song_view_count'], 'RATING' => ($music_config['rate'] == 1) ? ( '<a href="'. append_sid(this_mo_mxurl("music_mode=music_rate&song_id=". $topsongrow[$j]['song_id'])) . '">' . $topsongrow[$j]['rating'] . '</a>' ) : '', 'COMMENTS' => ($music_config['comment'] == 1) ? ( '<a href="'. append_sid(this_mo_mxurl("music_mode=music_comment&song_id=". $topsongrow[$j]['song_id'])) . '">' . $topsongrow[$j]['comments'] . '</a>' ) : '', 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($topsongrow[$j]['song_user_ip']) . '" target="_blank">' . decode_ip($topsongrow[$j]['song_user_ip']) .'</a><br />' : '' ) ); } } } else { // // No songs Found // $template->assign_block_vars('no_songs', array()); } } else { // // No Cats Found // $template->assign_block_vars('no_songs', array()); } // ------------------------------------ // additional sorting options // ------------------------------------ $sort_rating_option = ''; $sort_comments_option = ''; if( $music_config['rate'] == 1 ) { $sort_rating_option = '<option value="rating" '; $sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : ''; $sort_rating_option .= '>' . $lang['Rating'] .'</option>'; } if( $music_config['comment'] == 1 ) { $sort_comments_option = '<option value="comments" '; $sort_comments_option .= ($sort_method == 'comments') ? 'selected="selected"' : ''; $sort_comments_option .= '>' . $lang['Comments'] .'</option>'; $sort_new_comment_option = '<option value="new_comment" '; $sort_new_comment_option .= ($sort_method == 'new_comment') ? 'selected="selected"' : ''; $sort_new_comment_option .= '>' . $lang['New_Comment'] .'</option>'; } /* +---------------------------------------------------------- | Start output the page +---------------------------------------------------------- */ $page_title = $lang['Music']; if ( !is_object($mx_block)) { include($mx_root_path . 'includes/page_header.'.$phpEx); } $template->set_filenames(array( 'body' => 'music_index_body.tpl') ); $template->assign_vars(array( 'L_CATEGORY' => $lang['Category'], 'L_SONGS' => $lang['Songs'], 'L_CAT_VIEWS' => $lang['Cat_Views'], 'L_LAST_SONG' => $lang['Last_Song'], 'S_MUSIC_ACTION' => append_sid(this_mo_mxurl()), 'S_ROWS' => $music_config['rows_per_page'], 'S_ROW_WIDTH' => (100/$music_config['rows_per_page']) . '%', 'L_TOP_SONGS' => $lang['Top_Songs'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_SONG_LIMIT' => $lang['Song_Limit'], 'L_NO_SONGS' => $lang['No_Songs'], 'L_SONG_TITLE' => $lang['Song_Title'], 'L_SINGER' => $lang['Singer'], 'L_POSTER' => $lang['Poster'], 'L_POSTED' => $lang['Posted'], 'L_RATING' => $lang['Rating'], 'L_COMMENTS' => $lang['Comments'], 'L_PUBLIC_CATS' => $lang['Public_Categories'], 'L_SEARCH_SONGS' => $lang['Search_song'], 'S_MUSIC_LIST' => append_sid(this_mo_mxurl("music_mode=music_list")), 'L_TIME' => $lang['Time'], 'L_VIEW' => $lang['View'], 'SORT_TIME' => ($sort_method == 'song_time') ? 'selected="selected"' : '', 'SORT_VIEW' => ($sort_method == 'song_view_count') ? 'selected="selected"' : '', 'SORT_RATING_OPTION' => $sort_rating_option, 'SORT_COMMENTS_OPTION' => $sort_comments_option, 'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option, 'L_SORT' => $lang['Sort']) ); // // Generate the page // $template->pparse('body'); if ( !is_object($mx_block)) { include($mx_root_path . 'includes/page_tail.'.$phpEx); } // +------------------------------------------------------+ // | Powered by Music Online 2.0 (c) 2003 Cf Manager | // +------------------------------------------------------+ } ?> --- NEW FILE: music_center.pak --- module=+:57=+:Music Center=+:modules/mx_music/=+:music_center=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:57=+:60=+:music_center=+:Music Center=+:music.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Music Center=+:Demo block=+:60=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: db_install.php,v 1.1 2007/06/06 20:32:25 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ ini_set( 'display_errors', '1' ); define( 'IN_PORTAL', true ); if ( !defined( 'IN_ADMIN' ) ) { $mx_root_path = './../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management if ( !$userdata['session_logged_in'] ) { die( "Hacking attempt(1)" ); } if ( $userdata['user_level'] != ADMIN ) { die( "Hacking attempt(2)" ); } } $mx_module_version = '2.0.6'; $mx_module_copy = 'mxBB <i> - Music Center</i> module by Cf Manager & <a href="http://www.mxbb.net" target="_blank">OryNider</a>'; // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "music_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql = array(); $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_rate"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_comment"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_cat"; $sql[] = "DROP TABLE IF EXISTS " . $mx_table_prefix . "music_config"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "music ( song_id int(11) UNSIGNED NOT NULL auto_increment, song_filename varchar(255) NOT NULL, song_imagename varchar(255) NOT NULL, song_title varchar(255) NOT NULL, song_url varchar(255) NOT NULL, song_desc text, song_singer varchar(255) NOT NULL, song_user_id mediumint(8) NOT NULL, song_username varchar(32), song_user_ip char(8) NOT NULL DEFAULT '0', song_time int(11) UNSIGNED NOT NULL, 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, PRIMARY KEY (song_id), KEY song_cat_id (song_cat_id), KEY song_user_id (song_user_id), KEY song_time (song_time) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "music_rate ( rate_song_id int(11) UNSIGNED NOT NULL, rate_user_id mediumint(8) NOT NULL, rate_user_ip char(8) NOT NULL, rate_point tinyint(3) UNSIGNED NOT NULL, 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) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "music_comment ( comment_id int(11) UNSIGNED NOT NULL auto_increment, comment_song_id int(11) UNSIGNED NOT NULL, comment_user_id mediumint(8) NOT NULL, comment_username varchar(32), comment_user_ip char(8) NOT NULL, comment_time int(11) UNSIGNED NOT NULL, comment_text TEXT, comment_edit_time int(11) UNSIGNED, comment_edit_count smallint(5) UNSIGNED NOT NULL DEFAULT '0', comment_edit_user_id mediumint(8), 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) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE ". $mx_table_prefix . "music_cat ( cat_id mediumint(8) UNSIGNED NOT NULL auto_increment, cat_title varchar(255) NOT NULL, cat_desc text, cat_order mediumint(8) NOT NULL, cat_views mediumint(8) NOT NULL, 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), cat_upload_groups varchar(255), cat_rate_groups varchar(255), cat_comment_groups varchar(255), cat_edit_groups varchar(255), cat_delete_groups varchar(255), cat_moderator_groups varchar(255), cat_approval tinyint(3) NOT NULL DEFAULT '0', PRIMARY KEY (cat_id), KEY cat_order (cat_order) ) TYPE=MyISAM"; $sql[] = "CREATE TABLE " . $mx_table_prefix . "music_config ( config_name VARCHAR(255) NOT NULL default '', config_value varchar(255) NOT NULL default '', PRIMARY KEY (config_name) ) TYPE=MyISAM"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_songs', '1024')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('user_songs_limit', '50')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mod_songs_limit', '250')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_file_size', '3145728')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rows_per_page', '20')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('cols_per_page', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('top', '5')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('sort_method', 'song_time')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mp3_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wav_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wma_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('wmv_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mid_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('ram_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('au_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('mpeg_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('avi_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('swf_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('qt_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rm_allowed', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('desc_length', '512000')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('hotlink_prevent', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rate', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('rate_scale', '10')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('comment', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('music_version', '.0.6')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_size', '10240')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_width', '300')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('max_image_height', '200')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('download', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('enable_integration', '1')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('override_default_pages', '0')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "music_config VALUES ('index', '5')"; $sql[] = "UPDATE " . $mx_table_prefix . "module" . " SET module_version = '" . $mx_module_version . "', module_copy = '" . $mx_module_copy . "' WHERE module_id = '" . $mx_module_id . "'"; $message .= mx_do_install_upgrade( $sql ); } else { // If already installed $message = "<b>Module is already installed... consider upgrading ;)</b><br/><br/>"; } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Module Installation/Upgrading/Uninstallation Information - Module specific DB tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; ?> |
|
From: OryNider <ory...@us...> - 2007-06-06 20:32:30
|
Update of /cvsroot/mxbb/mx_music/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6104/admin Added Files: admin_music_auth.php admin_music_cat.php admin_music_cfg.php admin_music_ext.php Log Message: --- NEW FILE: admin_music_ext.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_ext.php,v 1.1 2007/06/06 20:32:21 orynider Exp $ * @copyright (c) 2002-2006 [Markus, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define( 'IN_PORTAL', 1 ); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Configuration ext'] = 'modules/mx_music/admin/' . $file; return; } // // Let's set the root dir for phpBB // $module_root_path = '../'; $mx_root_path = '../../../'; $music_root_path = $module_root_path . 'music_box/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); // // Get general music information // include($music_root_path . 'music_common.'.$phpEx); // include_once( $module_root_path . 'music_box/music_constants.'.$phpEx ); // ********************************************************************** // Read language definition // ********************************************************************** if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); } // // Mode setting // $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); // // Main db settings // Pull all config data // $sql = "SELECT * FROM " . MUSIC_CONFIG_TABLE; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( CRITICAL_ERROR, "Could not query phpbb plugin base configuration information", "", __LINE__, __FILE__, $sql ); } else { while ( $row = $db->sql_fetchrow( $result ) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = ( isset( $HTTP_POST_VARS[$config_name] ) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if ( isset( $HTTP_POST_VARS['submit'] ) ) { $sql = "UPDATE " . MUSIC_CONFIG_TABLE . " SET config_value = '" . str_replace( "\'", "''", $new[$config_name] ) . "' WHERE config_name = '$config_name'"; if ( !$db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Failed to update general configuration for $config_name", "", __LINE__, __FILE__, $sql ); } } } $db->sql_freeresult($result); if ( isset( $HTTP_POST_VARS['submit'] ) ) { $message = $lang['music_config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_music_config'], "<a href=\"" . append_sid( "admin_music_ext.$phpEx" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } } // // Populate parameter variables // $music_index = $new['index']; // $other = $new['other']; $override_default_pages = $new['override_default_pages']; $integration_enabled = $new['enable_integration']; // // Get page_list selects // $pagelist_index = get_list_formatted('page_list', $new['index'], 'index'); // $pagelist_other = get_list_formatted('page_list', $new['other'], 'other'); // // Start page proper // $template->set_filenames( array( "body" => "admin/music_admin_body_ext.tpl" )); $template->assign_vars( array( 'S_MUSIC_ACTION' => append_sid( "admin_music_ext.$phpEx" ), 'L_MUSIC_TITLE' => $lang['mx_music_admin'], 'L_MUSIC_EXPLAIN' => $lang['mx_music_admin_explain'], 'L_DEFAULT_PAGES_TITLE' => $lang['default_pages_title'], 'L_DEFAULT_PAGES_TITLE_EXPLAIN' => $lang['default_pages_title_explain'], 'L_DEFAULT_PAGES_MORE_TITLE' => $lang['default_pages_more_title'], 'L_DEFAULT_PAGES_MORE_TITLE_EXPLAIN' => $lang['default_pages_more_title_explain'], // // Enable/Disable phpBB integration // 'L_MUSIC_INTEGRATION_ENABLED' => $lang['integration_enabled'], 'L_MUSIC_INTEGRATION_ENABLED_EXPLAIN' => $lang['integration_enabled_explain'], 'L_MUSIC_INTEGRATION_ENABLED_YES' => $lang['integration_enabled_yes'], 'L_MUSIC_INTEGRATION_ENABLED_NO' => $lang['integration_enabled_no'], 'MUSIC_INTEGRATION_ENABLED_YES' => ( $integration_enabled == '1' ) ? ' checked="checked"' : '', 'MUSIC_INTEGRATION_ENABLED_NO' => ( $integration_enabled == '0' ) ? ' checked="checked"' : '', // // Default static settings or block settings // 'L_OVERRIDE_DEFAULT_PAGES' => $lang['override'], 'L_OVERRIDE_DEFAULT_PAGES_EXPLAIN' => $lang['override_explain'], 'L_OVERRIDE_DEFAULT_PAGES_YES' => $lang['override_yes'], 'L_OVERRIDE_DEFAULT_PAGES_NO' => $lang['override_no'], 'OVERRIDE_DEFAULT_PAGES_CHECKBOX_YES' => ( $override_default_pages == '1' ) ? ' checked="checked"' : '', 'OVERRIDE_DEFAULT_PAGES_CHECKBOX_NO' => ( $override_default_pages == '0' ) ? ' checked="checked"' : '', 'L_MUSIC_INDEX' => $lang['index'], 'MUSIC_INDEX' => $pagelist_index, // 'L_SUBMIT' => $lang['submit'], // 'L_RESET' => $lang['reset'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'] )); $template->pparse( "body" ); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> --- NEW FILE: admin_music_cat.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_cat.php,v 1.1 2007/06/06 20:32:17 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', 1); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Categories'] = 'modules/mx_music/admin/' . $file; return; } // // Let's set the root dir for phpBB // $module_root_path = '../'; $mx_root_path = '../../../'; $music_root_path = $module_root_path . 'music_box/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); // // Get general music information // include($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ); } // -------------------------- // This function will sort the order of all categories // function mx_music_reorder_cat() { global $db; $sql = "SELECT cat_id, cat_order FROM ". MUSIC_CAT_TABLE ." WHERE cat_id <> 0 ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get list of Categories', '', __LINE__, __FILE__, $sql); } $i = 10; while( $row = $db->sql_fetchrow($result) ) { $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_order = $i WHERE cat_id = ". $row['cat_id']; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update order fields', '', __LINE__, __FILE__, $sql); } $i += 10; } } // END // -------------------------- if( !isset($HTTP_POST_VARS['mode']) ) { if( !isset($HTTP_GET_VARS['action']) ) { $template->set_filenames(array( 'body' => 'admin/music_cat_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx"), 'L_MOVE_UP' => $lang['Move_up'], 'L_MOVE_DOWN' => $lang['Move_down'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'S_MODE' => 'new', 'L_CREATE_CATEGORY' => $lang['Create_category']) ); $sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $catrow[] = $row; } for( $i = 0; $i < count($catrow); $i++ ) { $template->assign_block_vars('catrow', array( 'COLOR' => ($i % 2) ? 'row1' : 'row2', 'TITLE' => $catrow[$i]['cat_title'], 'DESC' => $catrow[$i]['cat_desc'], 'S_MOVE_UP' => append_sid("admin_music_cat.$phpEx?action=move&move=-15&cat_id=" . $catrow[$i]['cat_id']), 'S_MOVE_DOWN' => append_sid("admin_music_cat.$phpEx?action=move&move=15&cat_id=" . $catrow[$i]['cat_id']), 'S_EDIT_ACTION' => append_sid("admin_music_cat.$phpEx?action=edit&cat_id=" . $catrow[$i]['cat_id']), 'S_DELETE_ACTION' => append_sid("admin_music_cat.$phpEx?action=delete&cat_id=" . $catrow[$i]['cat_id']) ) ); } $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( $HTTP_GET_VARS['action'] == 'edit' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT * FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } if( $db->sql_numrows($result) == 0 ) { message_die(GENERAL_ERROR, 'The requested category is not existed'); } $catrow = $db->sql_fetchrow($result); $template->set_filenames(array( 'body' => 'admin/music_cat_new_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_SONGS_APPROVAL' => $lang['Songs_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'S_CAT_TITLE' => $catrow['cat_title'], 'S_CAT_DESC' => $catrow['cat_desc'], 'VIEW_GUEST' => ($catrow['cat_view_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'VIEW_REG' => ($catrow['cat_view_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'VIEW_PRIVATE' => ($catrow['cat_view_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'VIEW_MOD' => ($catrow['cat_view_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'VIEW_ADMIN' => ($catrow['cat_view_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'UPLOAD_GUEST' => ($catrow['cat_upload_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'UPLOAD_REG' => ($catrow['cat_upload_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'UPLOAD_PRIVATE' => ($catrow['cat_upload_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'UPLOAD_MOD' => ($catrow['cat_upload_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'UPLOAD_ADMIN' => ($catrow['cat_upload_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'RATE_GUEST' => ($catrow['cat_rate_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'RATE_REG' => ($catrow['cat_rate_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'RATE_PRIVATE' => ($catrow['cat_rate_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'RATE_MOD' => ($catrow['cat_rate_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'RATE_ADMIN' => ($catrow['cat_rate_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'COMMENT_GUEST' => ($catrow['cat_comment_level'] == MUSIC_GUEST) ? 'selected="selected"' : '', 'COMMENT_REG' => ($catrow['cat_comment_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'COMMENT_PRIVATE' => ($catrow['cat_comment_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'COMMENT_MOD' => ($catrow['cat_comment_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'COMMENT_ADMIN' => ($catrow['cat_comment_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'EDIT_REG' => ($catrow['cat_edit_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'EDIT_PRIVATE' => ($catrow['cat_edit_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'EDIT_MOD' => ($catrow['cat_edit_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'EDIT_ADMIN' => ($catrow['cat_edit_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'DELETE_REG' => ($catrow['cat_delete_level'] == MUSIC_USER) ? 'selected="selected"' : '', 'DELETE_PRIVATE' => ($catrow['cat_delete_level'] == MUSIC_PRIVATE) ? 'selected="selected"' : '', 'DELETE_MOD' => ($catrow['cat_delete_level'] == MUSIC_MOD) ? 'selected="selected"' : '', 'DELETE_ADMIN' => ($catrow['cat_delete_level'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'APPROVAL_DISABLED' => ($catrow['cat_approval'] == MUSIC_USER) ? 'selected="selected"' : '', 'APPROVAL_MOD' => ($catrow['cat_approval'] == MUSIC_MOD) ? 'selected="selected"' : '', 'APPROVAL_ADMIN' => ($catrow['cat_approval'] == MUSIC_ADMIN) ? 'selected="selected"' : '', 'S_MODE' => 'edit', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_PANEL_TITLE' => $lang['Edit_Category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else if( $HTTP_GET_VARS['action'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $sql = "SELECT cat_id, cat_title, cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } $cat_found = FALSE; while( $row = $db->sql_fetchrow($result) ) { if( $row['cat_id'] == $cat_id ) { $thiscat = $row; $cat_found = TRUE; } else { $catrow[] = $row; } } if( $cat_found == FALSE ) { message_die(GENERAL_ERROR, 'The requested category is not existed'); } $select_to = '<select name="target"><option value="0">'. $lang['Delete_all_songs'] .'</option>'; for ($i = 0; $i < count($catrow); $i++) { $select_to .= '<option value="'. $catrow[$i]['cat_id'] .'">'. $catrow[$i]['cat_title'] .'</option>'; } $select_to .= '</select>'; $template->set_filenames(array( 'body' => 'admin/music_cat_delete_body.tpl') ); $template->assign_vars(array( 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx?cat_id=$cat_id"), 'L_CAT_DELETE' => $lang['Delete_Category'], 'L_CAT_DELETE_EXPLAIN' => $lang['Delete_Category_Explain'], 'L_CAT_TITLE' => $lang['Category_Title'], 'S_CAT_TITLE' => $thiscat['cat_title'], 'L_MOVE_CONTENTS' => $lang['Move_contents'], 'L_MOVE_DELETE' => $lang['Move_and_Delete'], 'S_SELECT_TO' => $select_to) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else if( $HTTP_GET_VARS['action'] == 'move' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $move = intval($HTTP_GET_VARS['move']); $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_order = cat_order + $move WHERE cat_id = $cat_id"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not change category order', '', __LINE__, __FILE__, $sql); } mx_music_reorder_cat(); // Return a message... $message = $lang['Category_changed_order'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } } else { if( $HTTP_POST_VARS['mode'] == 'new' ) { if( !isset($HTTP_POST_VARS['cat_title']) ) { $template->set_filenames(array( 'body' => 'admin/music_cat_new_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_CAT_TITLE' => $lang['Music_Categories_Title'], 'L_MUSIC_CAT_EXPLAIN' => $lang['Music_Categories_Explain'], 'S_MUSIC_ACTION' => append_sid("admin_music_cat.$phpEx"), 'L_CAT_TITLE' => $lang['Category_Title'], 'L_CAT_DESC' => $lang['Category_Desc'], 'L_CAT_PERMISSIONS' => $lang['Category_Permissions'], 'L_VIEW_LEVEL' => $lang['View_level'], 'L_UPLOAD_LEVEL' => $lang['Upload_level'], 'L_RATE_LEVEL' => $lang['Rate_level'], 'L_COMMENT_LEVEL' => $lang['Comment_level'], 'L_EDIT_LEVEL' => $lang['Edit_level'], 'L_DELETE_LEVEL' => $lang['Delete_level'], 'L_SONGS_APPROVAL' => $lang['Songs_Approval'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'VIEW_GUEST' => 'selected="selected"', 'UPLOAD_REG' => 'selected="selected"', 'RATE_REG' => 'selected="selected"', 'COMMENT_REG' => 'selected="selected"', 'EDIT_REG' => 'selected="selected"', 'DELETE_MOD' => 'selected="selected"', 'APPROVAL_DISABLED' => 'selected="selected"', 'S_MODE' => 'new', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_PANEL_TITLE' => $lang['Create_category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { // Get posting variables $cat_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = str_replace("\'", "''", trim($HTTP_POST_VARS['cat_desc'])); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intval($HTTP_POST_VARS['cat_upload_level']); $rate_level = intval($HTTP_POST_VARS['cat_rate_level']); $comment_level = intval($HTTP_POST_VARS['cat_comment_level']); $edit_level = intval($HTTP_POST_VARS['cat_edit_level']); $delete_level = intval($HTTP_POST_VARS['cat_delete_level']); $cat_approval = intval($HTTP_POST_VARS['cat_approval']); // Get the last ordered category $sql = "SELECT cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order DESC LIMIT 1"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music Categories information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $last_order = $row['cat_order']; $cat_order = $last_order + 10; // Here we insert a new row into the db $sql = "INSERT INTO ". MUSIC_CAT_TABLE ." (cat_title, cat_desc, cat_order, cat_view_level, cat_upload_level, cat_rate_level, cat_comment_level, cat_edit_level, cat_delete_level, cat_approval) VALUES ('$cat_title', '$cat_desc', '$cat_order', '$view_level', '$upload_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$cat_approval')"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not create new music Category', '', __LINE__, __FILE__, $sql); } // Return a message... $message = $lang['New_category_created'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } else if( $HTTP_POST_VARS['mode'] == 'edit' ) { // Get posting variables $cat_id = intval($HTTP_GET_VARS['cat_id']); $cat_title = str_replace("\'", "''", htmlspecialchars(trim($HTTP_POST_VARS['cat_title']))); $cat_desc = str_replace("\'", "''", trim($HTTP_POST_VARS['cat_desc'])); $view_level = intval($HTTP_POST_VARS['cat_view_level']); $upload_level = intval($HTTP_POST_VARS['cat_upload_level']); $rate_level = intval($HTTP_POST_VARS['cat_rate_level']); $comment_level = intval($HTTP_POST_VARS['cat_comment_level']); $edit_level = intval($HTTP_POST_VARS['cat_edit_level']); $delete_level = intval($HTTP_POST_VARS['cat_delete_level']); $cat_approval = intval($HTTP_POST_VARS['cat_approval']); // Now we update this row $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_title = '$cat_title', cat_desc = '$cat_desc', cat_view_level = '$view_level', cat_upload_level = '$upload_level', cat_rate_level = '$rate_level', cat_comment_level = '$comment_level', cat_edit_level = '$edit_level', cat_delete_level = '$delete_level', cat_approval = '$cat_approval' WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update this music Category', '', __LINE__, __FILE__, $sql); } // Return a message... $message = $lang['Category_updated'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else if( $HTTP_POST_VARS['mode'] == 'delete' ) { $cat_id = intval($HTTP_GET_VARS['cat_id']); $target = intval($HTTP_POST_VARS['target']); if( $target == 0 ) // Delete All { // Get file information of all songs in this category $sql = "SELECT song_id, song_filename, song_cat_id FROM ". MUSIC_TABLE ." WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not query music information', '', __LINE__, __FILE__, $sql); } $songrow = array(); while( $row = $db ->sql_fetchrow($result) ) { $songrow[] = $row; $song_id_row[] = $row['song_id']; } if( count($songrow) != 0 ) // if this category is not empty { // Delete all physical song for ($i = 0; $i < count($songrow); $i++) { @unlink('../' . MUSIC_UPLOAD_PATH . $songrow[$i]['song_filename']); } $song_id_sql = '(' . implode(',', $song_id_row) . ')'; // Delete all related ratings $sql = "DELETE FROM ". MUSIC_RATE_TABLE ." WHERE rate_song_id IN ". $song_id_sql; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete Ratings information', '', __LINE__, __FILE__, $sql); } // Delete all related comments $sql = "DELETE FROM ". MUSIC_COMMENT_TABLE ." WHERE comment_song_id IN ". $song_id_sql; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete Comments information', '', __LINE__, __FILE__, $sql); } // Delete song entries in db $sql = "DELETE FROM ". MUSIC_TABLE ." WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete song entries in the DB', '', __LINE__, __FILE__, $sql); } } // This category is now emptied, we can remove it! $sql = "DELETE FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete this Category', '', __LINE__, __FILE__, $sql); } // Re-order the rest of categories mx_music_reorder_cat(); // Return a message... $message = $lang['Category_deleted'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } else // Move content... { $sql = "UPDATE ". MUSIC_TABLE ." SET song_cat_id = '$target' WHERE song_cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update this Category content', '', __LINE__, __FILE__, $sql); } // This category is now emptied, we can remove it! $sql = "DELETE FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if(!$result = $db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete this Category', '', __LINE__, __FILE__, $sql); } // Re-order the rest of categories mx_music_reorder_cat(); // Return a message... $message = $lang['Category_deleted'] . "<br /><br />" . sprintf($lang['Click_return_music_category'], "<a href=\"" . append_sid("admin_music_cat.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } } /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> --- NEW FILE: admin_music_auth.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_auth.php,v 1.1 2007/06/06 20:32:13 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', 1); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Permissions'] = 'modules/mx_music/admin/' . $file; return; } // // Let's set the root dir for phpBB // $module_root_path = '../'; $mx_root_path = '../../../'; $music_root_path = $module_root_path . 'music_box/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); // // Get general music information // include($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ); } if( !isset($HTTP_POST_VARS['submit']) ) { // Build the category selector $sql = "SELECT cat_id, cat_title, cat_order FROM ". MUSIC_CAT_TABLE ." ORDER BY cat_order ASC"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get Category list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $catrows[] = $row; } for ($i = 0; $i < count($catrows); $i++) { $template->assign_block_vars('catrow', array( 'CAT_ID' => $catrows[$i]['cat_id'], 'CAT_TITLE' => $catrows[$i]['cat_title']) ); } $template->set_filenames(array( 'body' => 'admin/music_cat_select_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_AUTH_TITLE' => $lang['Music_Auth_Title'], 'L_MUSIC_AUTH_EXPLAIN' => $lang['Music_Auth_Explain'], 'L_SELECT_CAT' => $lang['Select_a_Category'], 'S_MUSIC_ACTION' => append_sid("admin_music_auth.$phpEx"), 'L_LOOK_UP_CAT' => $lang['Look_up_Category']) ); $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { if( !isset($HTTP_GET_VARS['cat_id']) ) { $cat_id = intval($HTTP_POST_VARS['cat_id']); $template->set_filenames(array( 'body' => 'admin/music_auth_body.tpl') ); $template->assign_vars(array( 'L_MUSIC_AUTH_TITLE' => $lang['Music_Auth_Title'], 'L_MUSIC_AUTH_EXPLAIN' => $lang['Music_Auth_Explain'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_GROUPS' => $lang['Usergroups'], 'L_VIEW' => $lang['View'], 'L_UPLOAD' => $lang['Upload'], 'L_RATE' => $lang['Rate'], 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], 'S_MUSIC_ACTION' => append_sid("admin_music_auth.$phpEx?cat_id=$cat_id"), ) ); // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " WHERE group_single_user <> " . TRUE ." ORDER BY group_name ASC"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql); } while( $row = $db->sql_fetchrow($result) ) { $groupdata[] = $row; } // Get info of this cat $sql = "SELECT cat_id, cat_title, cat_view_groups, cat_upload_groups, cat_rate_groups, cat_comment_groups, cat_edit_groups, cat_delete_groups, cat_moderator_groups FROM ". MUSIC_CAT_TABLE ." WHERE cat_id = '$cat_id'"; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql); } $thiscat = $db->sql_fetchrow($result); $view_groups = @explode(',', $thiscat['cat_view_groups']); $upload_groups = @explode(',', $thiscat['cat_upload_groups']); $rate_groups = @explode(',', $thiscat['cat_rate_groups']); $comment_groups = @explode(',', $thiscat['cat_comment_groups']); $edit_groups = @explode(',', $thiscat['cat_edit_groups']); $delete_groups = @explode(',', $thiscat['cat_delete_groups']); $moderator_groups = @explode(',', $thiscat['cat_moderator_groups']); for ($i = 0; $i < count($groupdata); $i++) { $template->assign_block_vars('grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], 'VIEW_CHECKED' => (in_array($groupdata[$i]['group_id'], $view_groups)) ? 'checked="checked"' : '', 'UPLOAD_CHECKED' => (in_array($groupdata[$i]['group_id'], $upload_groups)) ? 'checked="checked"' : '', 'RATE_CHECKED' => (in_array($groupdata[$i]['group_id'], $rate_groups)) ? 'checked="checked"' : '', 'COMMENT_CHECKED' => (in_array($groupdata[$i]['group_id'], $comment_groups)) ? 'checked="checked"' : '', 'EDIT_CHECKED' => (in_array($groupdata[$i]['group_id'], $edit_groups)) ? 'checked="checked"' : '', 'DELETE_CHECKED' => (in_array($groupdata[$i]['group_id'], $delete_groups)) ? 'checked="checked"' : '', 'MODERATOR_CHECKED' => (in_array($groupdata[$i]['group_id'], $moderator_groups)) ? 'checked="checked"' : '') ); } $template->pparse('body'); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); } else { $cat_id = intval($HTTP_GET_VARS['cat_id']); $view_groups = @implode(',', $HTTP_POST_VARS['view']); $upload_groups = @implode(',', $HTTP_POST_VARS['upload']); $rate_groups = @implode(',', $HTTP_POST_VARS['rate']); $comment_groups = @implode(',', $HTTP_POST_VARS['comment']); $edit_groups = @implode(',', $HTTP_POST_VARS['edit']); $delete_groups = @implode(',', $HTTP_POST_VARS['delete']); $moderator_groups = @implode(',', $HTTP_POST_VARS['moderator']); $sql = "UPDATE ". MUSIC_CAT_TABLE ." SET cat_view_groups = '$view_groups', cat_upload_groups = '$upload_groups', cat_rate_groups = '$rate_groups', cat_comment_groups = '$comment_groups', cat_edit_groups = '$edit_groups', cat_delete_groups = '$delete_groups', cat_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update music config table', '', __LINE__, __FILE__, $sql); } // okay, return a message... $message = $lang['Music_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_music_auth'], '<a href="' . append_sid("admin_music_auth.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'); message_die(GENERAL_MESSAGE, $message); } } /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> --- NEW FILE: admin_music_cfg.php --- <?php /** * * @package mxBB Portal Module - mx_music * @version $Id: admin_music_cfg.php,v 1.1 2007/06/06 20:32:18 orynider Exp $ * @copyright (c) 2003 [ory...@rd..., OryNider] mxBB Development Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ define('IN_PORTAL', 1); if ( !empty( $setmodules ) ) { $file = basename( __FILE__ ); $module['Music_Online']['Configuration std'] = 'modules/mx_music/admin/' . $file; return; } // // Let's set the root dir for phpBB // $module_root_path = '../'; $mx_root_path = '../../../'; $music_root_path = $module_root_path . 'music_box/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require($mx_root_path . 'admin/pagestart.' . $phpEx); // // Get general music information // include($music_root_path . 'music_common.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_admin_music.' . $phpEx ); } if ( file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_music.' . $phpEx ); } else if ( file_exists( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ) ) { include( $module_root_path . 'language/lang_english/lang_main_music.' . $phpEx ); } // // Pull all config data // $sql = "SELECT * FROM " . MUSIC_CONFIG_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, "Could not query music config information", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . MUSIC_CONFIG_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Failed to update music configuration for $config_name", "", __LINE__, __FILE__, $sql); } } } if( isset($HTTP_POST_VARS['submit']) ) { $message = $lang['Music_config_updated'] . "<br /><br />" . sprintf($lang['Click_return_music_config'], "<a href=\"" . append_sid("admin_music_cfg.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $message); } } $template->set_filenames(array( "body" => "admin/music_config_body.tpl") ); $template->assign_vars(array( 'L_MUSIC_CONFIG' => $lang['Music_config'], 'L_MUSIC_CONFIG_EXPLAIN' => $lang['Music_config_explain'], 'S_MUSIC_CONFIG_ACTION' => append_sid('admin_music_cfg.'.$phpEx), 'MAX_SONGS' => $new['max_songs'], 'MAX_FILE_SIZE' => $new['max_file_size'], 'ROWS_PER_PAGE' => $new['rows_per_page'], 'COLS_PER_PAGE' => $new['cols_per_page'], 'TOP' => $new['top'], // // Song image // 'MAX_IMAGE_SIZE' => $new['max_image_size'], 'MAX_IMAGE_WIDTH' => $new['max_image_width'], 'MAX_IMAGE_HEIGHT' => $new['max_image_height'], 'USER_SONGS_LIMIT' => $new['user_songs_limit'], 'MOD_SONGS_LIMIT' => $new['mod_songs_limit'], 'MP3_ENABLED' => ($new['mp3_allowed'] == 1) ? 'checked="checked"' : '', 'MP3_DISABLED' => ($new['mp3_allowed'] == 0) ? 'checked="checked"' : '', 'WAV_ENABLED' => ($new['wav_allowed'] == 1) ? 'checked="checked"' : '', 'WAV_DISABLED' => ($new['wav_allowed'] == 0) ? 'checked="checked"' : '', 'WMA_ENABLED' => ($new['wma_allowed'] == 1) ? 'checked="checked"' : '', 'WMA_DISABLED' => ($new['wma_allowed'] == 0) ? 'checked="checked"' : '', // Media Center 'WMV_ENABLED' => ($new['wmv_allowed'] == 1) ? 'checked="checked"' : '', 'WMV_DISABLED' => ($new['wmv_allowed'] == 0) ? 'checked="checked"' : '', 'MIDI_ENABLED' => ($new['mid_allowed'] == 1) ? 'checked="checked"' : '', 'MIDI_DISABLED' => ($new['mid_allowed'] == 0) ? 'checked="checked"' : '', 'RAM_ENABLED' => ($new['ram_allowed'] == 1) ? 'checked="checked"' : '', 'RAM_DISABLED' => ($new['ram_allowed'] == 0) ? 'checked="checked"' : '', 'AU_ENABLED' => ($new['au_allowed'] == 1) ? 'checked="checked"' : '', 'AU_DISABLED' => ($new['au_allowed'] == 0) ? 'checked="checked"' : '', 'MPEG_ENABLED' => ($new['mpeg_allowed'] == 1) ? 'checked="checked"' : '', 'MPEG_DISABLED' => ($new['mpeg_allowed'] == 0) ? 'checked="checked"' : '', 'AVI_ENABLED' => ($new['avi_allowed'] == 1) ? 'checked="checked"' : '', 'AVI_DISABLED' => ($new['avi_allowed'] == 0) ? 'checked="checked"' : '', 'SWF_ENABLED' => ($new['swf_allowed'] == 1) ? 'checked="checked"' : '', 'SWF_DISABLED' => ($new['swf_allowed'] == 0) ? 'checked="checked"' : '', 'QT_ENABLED' => ($new['qt_allowed'] == 1) ? 'checked="checked"' : '', 'QT_DISABLED' => ($new['qt_allowed'] == 0) ? 'checked="checked"' : '', 'RM_ENABLED' => ($new['rm_allowed'] == 1) ? 'checked="checked"' : '', 'RM_DISABLED' => ($new['rm_allowed'] == 0) ? 'checked="checked"' : '', // Media Center 'SONG_DESC_MAX_LENGTH' => $new['desc_length'], 'HOTLINK_PREVENT_ENABLED' => ($new['hotlink_prevent'] == 1) ? 'checked="checked"' : '', 'HOTLINK_PREVENT_DISABLED' => ($new['hotlink_prevent'] == 0) ? 'checked="checked"' : '', 'HOTLINK_ALLOWED' => $new['hotlink_allowed'], 'RATE_ENABLED' => ($new['rate'] == 1) ? 'checked="checked"' : '', 'RATE_DISABLED' => ($new['rate'] == 0) ? 'checked="checked"' : '', 'RATE_SCALE' => $new['rate_scale'], 'COMMENT_ENABLED' => ($new['comment'] == 1) ? 'checked="checked"' : '', 'COMMENT_DISABLED' => ($new['comment'] == 0) ? 'checked="checked"' : '', 'DOWNLOAD_ENABLED' => ($new['download'] == 1) ? 'checked="checked"' : '', 'DOWNLOAD_DISABLED' => ($new['download'] == 0) ? 'checked="checked"' : '', 'SORT_TIME' => ($new['sort_method'] == 'song_time') ? 'selected="selected"' : '', 'SORT_SONG_TITLE' => ($new['sort_method'] == 'song_title') ? 'selected="selected"' : '', 'SORT_USERNAME' => ($new['sort_method'] == 'song_user_id') ? 'selected="selected"' : '', 'SORT_VIEW' => ($new['sort_method'] == 'song_view_count') ? 'selected="selected"' : '', 'SORT_RATING' => ($new['sort_method'] == 'rating') ? 'selected="selected"' : '', 'SORT_COMMENTS' => ($new['sort_method'] == 'comments') ? 'selected="selected"' : '', 'SORT_NEW_COMMENT' => ($new['sort_method'] == 'new_comment') ? 'selected="selected"' : '', 'SORT_ASC' => ($new['sort_order'] == 'ASC') ? 'selected="selected"' : '', 'SORT_DESC' => ($new['sort_order'] == 'DESC') ? 'selected="selected"' : '', 'S_GUEST' => MUSIC_GUEST, 'S_USER' => MUSIC_USER, 'S_PRIVATE' => MUSIC_PRIVATE, 'S_MOD' => MUSIC_MOD, 'S_ADMIN' => MUSIC_ADMIN, 'L_MAX_SONGS' => $lang['Max_songs'], 'L_MAX_FILE_SIZE' => $lang['Max_file_size'], 'L_USER_SONGS_LIMIT' => $lang['User_songs_limit'], 'L_MOD_SONGS_LIMIT' => $lang['Moderator_songs_limit'], 'L_ROWS_PER_PAGE' => $lang['Rows_per_page'], 'L_COLS_PER_PAGE' => $lang['Cols_per_page'], 'L_TOP' => $lang['Top'], // // Lang Song image // 'L_MAX_IMAGE_SIZE' => $lang['Max_image_size'], 'L_MAX_IMAGE_WIDTH' => $lang['Max_image_width'], 'L_MAX_IMAGE_HEIGHT' => $lang['Max_image_height'], 'L_MP3_ALLOWED' => $lang['MP3_allowed'], 'L_WAV_ALLOWED' => $lang['WAV_allowed'], 'L_WMA_ALLOWED' => $lang['WMA_allowed'], // Media Center 'L_WMV_ALLOWED' => $lang['WMV_allowed'], 'L_MIDI_ALLOWED' => $lang['MIDI_allowed'], 'L_RAM_ALLOWED' => $lang['RAM_allowed'], 'L_AU_ALLOWED' => $lang['AU_allowed'], 'L_MPEG_ALLOWED' => $lang['MPEG_allowed'], 'L_AVI_ALLOWED' => $lang['AVI_allowed'], 'L_SWF_ALLOWED' => $lang['SWF_allowed'], 'L_QT_ALLOWED' => $lang['QT_allowed'], 'L_RM_ALLOWED' => $lang['RM_allowed'], // Media Center 'L_SONG_DESC_MAX_LENGTH' => $lang['Song_Desc_Max_Length'], 'L_HOTLINK_PREVENT' => $lang['Hotlink_prevent'], 'L_HOTLINK_ALLOWED' => $lang['Hotlink_allowed'], 'L_RATE_SYSTEM' => $lang['Rate_system'], 'L_RATE_SCALE' => $lang['Rate_Scale'], 'L_COMMENT_SYSTEM' => $lang['Comment_system'], 'L_DOWNLOAD_SYSTEM' => $lang['Download_system'], 'L_EXTRA_SETTINGS' => $lang['Extra_Settings'], 'L_DEFAULT_SORT_METHOD' => $lang['Default_Sort_Method'], 'L_TIME' => $lang['Time'], 'L_SONG_TITLE' => $lang['Song_Title'], 'L_USERNAME' => $lang['Sort_Username'], 'L_VIEW' => $lang['View'], 'L_RATING' => $lang['Rating'], 'L_COMMENTS' => $lang['Comments'], 'L_DOWNLOAD' => $lang['Download'], 'L_NEW_COMMENT' => $lang['New_Comment'], 'L_DEFAULT_SORT_ORDER' => $lang['Default_Sort_Order'], 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'L_GUEST' => $lang['Forum_ALL'], 'L_REG' => $lang['Forum_REG'], 'L_PRIVATE' => $lang['Forum_PRIVATE'], 'L_MOD' => $lang['Forum_MOD'], 'L_ADMIN' => $lang['Forum_ADMIN'], 'L_DISABLED' => $lang['Disabled'], 'L_ENABLED' => $lang['Enabled'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset']) ); $template->pparse("body"); include($mx_root_path . 'admin/page_footer_admin.'.$phpEx); /* Powered by Music Online 2.0 (c) 2003 Cf Manager */ ?> |
|
From: OryNider <ory...@us...> - 2007-06-06 20:24:30
|
Update of /cvsroot/mxbb/mx_music/upload/song_image In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27696/song_image Log Message: Directory /cvsroot/mxbb/mx_music/upload/song_image added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:22:37
|
Update of /cvsroot/mxbb/mx_music/templates/subSilver/images/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24432/lang_english Log Message: Directory /cvsroot/mxbb/mx_music/templates/subSilver/images/lang_english added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:21:21
|
Update of /cvsroot/mxbb/mx_music/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22473/admin Log Message: Directory /cvsroot/mxbb/mx_music/templates/subSilver/admin added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:21:21
|
Update of /cvsroot/mxbb/mx_music/templates/subSilver/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22473/images Log Message: Directory /cvsroot/mxbb/mx_music/templates/subSilver/images added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:21:06
|
Update of /cvsroot/mxbb/mx_music/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21931/subSilver Log Message: Directory /cvsroot/mxbb/mx_music/templates/subSilver added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:19:34
|
Update of /cvsroot/mxbb/mx_music/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20160/lang_english Log Message: Directory /cvsroot/mxbb/mx_music/language/lang_english added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:19:34
|
Update of /cvsroot/mxbb/mx_music/language/lang_romanian In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20160/lang_romanian Log Message: Directory /cvsroot/mxbb/mx_music/language/lang_romanian added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:18:49
|
Update of /cvsroot/mxbb/mx_music/templates In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19040/templates Log Message: Directory /cvsroot/mxbb/mx_music/templates added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:18:49
|
Update of /cvsroot/mxbb/mx_music/music_box In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19040/music_box Log Message: Directory /cvsroot/mxbb/mx_music/music_box added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:18:48
|
Update of /cvsroot/mxbb/mx_music/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19040/includes Log Message: Directory /cvsroot/mxbb/mx_music/includes added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:18:48
|
Update of /cvsroot/mxbb/mx_music/language In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19040/language Log Message: Directory /cvsroot/mxbb/mx_music/language added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:18:47
|
Update of /cvsroot/mxbb/mx_music/upload In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19040/upload Log Message: Directory /cvsroot/mxbb/mx_music/upload added to the repository |
|
From: OryNider <ory...@us...> - 2007-06-06 20:18:46
|
Update of /cvsroot/mxbb/mx_music/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19040/admin Log Message: Directory /cvsroot/mxbb/mx_music/admin added to the repository |
|
From: Jon O. <jon...@us...> - 2007-06-05 21:22:19
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16405 Modified Files: db_install.php db_upgrade.php Log Message: updated version number Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_install.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** db_install.php 30 May 2007 21:33:00 -0000 1.20 --- db_install.php 5 Jun 2007 21:22:16 -0000 1.21 *************** *** 30,34 **** } ! $mx_module_version = '2.2.0'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.2.2'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_upgrade.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** db_upgrade.php 30 Jan 2007 16:26:09 -0000 1.23 --- db_upgrade.php 5 Jun 2007 21:22:16 -0000 1.24 *************** *** 30,34 **** } ! $mx_module_version = '2.2.0'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.2.2'; $mx_module_copy = 'Original phpBB <i>LinkDb</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?p=1183059" target="_blank">CRLin</a>, <a href="http://www.hostsector.com/~mohd/" target="_blank">pafileDB</a> & <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=110836" target="_blank">Advanced Links Mod</a> :: Adapted for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2007-06-05 21:21:54
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16011 Modified Files: kb_article.php kb_search.php Log Message: Bugfixes... Index: kb_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_search.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_search.php 16 May 2007 19:37:44 -0000 1.8 --- kb_search.php 5 Jun 2007 21:21:51 -0000 1.9 *************** *** 31,47 **** global $mx_root_path, $module_root_path, $is_block, $phpEx; - /* - if ( !$this->auth_global['auth_search'] ) - { - if ( !$userdata['session_logged_in'] ) - { - // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".$this->this_mxurl("action=stats"), true)); - } - - $message = sprintf( $lang['Sorry_auth_search'], $this->auth_global['auth_search_type'] ); - mx_message_die( GENERAL_MESSAGE, $message ); - } - */ - include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); --- 31,34 ---- *************** *** 97,112 **** //$sort_method = 'article_rating'; break; - /* - case 'file_update_time': - $sort_method = 'file_update_time'; - break; - */ default: ! $sort_method = $kb_config['sort_method']; } } else { ! $sort_method = $kb_config['sort_method']; } --- 84,134 ---- //$sort_method = 'article_rating'; break; default: ! switch ( $kb_config['sort_method'] ) ! { ! case 'Id': ! $sort_method = 'article_id'; ! break; ! case 'Latest': ! $sort_method = 'article_date'; ! break; ! case 'Toprated': ! $sort_method = 'rating'; ! break; ! case 'Most_popular': ! $sort_method = 'views'; ! break; ! case 'Userrank': ! $sort_method = 'user_rank'; ! break; ! case 'Alphabetic': ! $sort_method = 'article_title'; ! break; ! } } } else { ! switch ( $kb_config['sort_method'] ) ! { ! case 'Id': ! $sort_method = 'article_id'; ! break; ! case 'Latest': ! $sort_method = 'article_date'; ! break; ! case 'Toprated': ! $sort_method = 'rating'; ! break; ! case 'Most_popular': ! $sort_method = 'views'; ! break; ! case 'Userrank': ! $sort_method = 'user_rank'; ! break; ! case 'Alphabetic': ! $sort_method = 'article_title'; ! break; ! } } Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_article.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** kb_article.php 28 Apr 2007 19:59:05 -0000 1.14 --- kb_article.php 5 Jun 2007 21:21:51 -0000 1.15 *************** *** 30,33 **** --- 30,34 ---- global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx, $images; global $mx_kb_custom_field, $mx_kb_functions, $print_version, $board_config, $mx_block; + global $page_id; // *************** *** 320,324 **** $article_toc = trim($art_split[0]); ! //$article_toc = preg_replace( "'\[[\/\!]*?[^\[\]]*?\]'si", "", $article_toc ); // Fixed $article_toc = $mx_text->display($article_toc, $mx_block->get_parameters( 'Text', MX_GET_PAR_OPTIONS )); $article_toc = strip_tags($article_toc); --- 321,325 ---- $article_toc = trim($art_split[0]); ! $article_toc = preg_replace( "'\[[\/\!]*?[^\[\]]*?\]'si", "", $article_toc ); // Fixed $article_toc = $mx_text->display($article_toc, $mx_block->get_parameters( 'Text', MX_GET_PAR_OPTIONS )); $article_toc = strip_tags($article_toc); *************** *** 326,330 **** if( $page_num != $i ) { ! $temp_url = append_sid(PORTAL_URL . "index.php?page=$page_id&mode=pagination&page_num=$page_number" . $xtra_dynamic); $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . ' - ' . $article_toc . '</a>'; } --- 327,331 ---- if( $page_num != $i ) { ! $temp_url = append_sid(PORTAL_URL . "index.php?page=$page_id&mode=article&k=$article_id&page_num=$page_number" . $xtra_dynamic); $page_link = '<a href="' . $temp_url . '" class="nav">' . $page_number . ' - ' . $article_toc . '</a>'; } |
|
From: Jon O. <jon...@us...> - 2007-06-05 21:21:22
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15979 Modified Files: db_install.php db_upgrade.php Log Message: updated Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/db_install.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** db_install.php 5 May 2007 20:19:20 -0000 1.26 --- db_install.php 5 Jun 2007 21:21:18 -0000 1.27 *************** *** 31,35 **** } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.2.2'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb.net" target="_blank">Jon</a>'; Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/db_upgrade.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** db_upgrade.php 5 May 2007 20:19:21 -0000 1.19 --- db_upgrade.php 5 Jun 2007 21:21:18 -0000 1.20 *************** *** 31,35 **** } ! $mx_module_version = '2.0.0'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '2.2.2'; $mx_module_copy = 'Original phpBB <i>Calendar LITE</i> MOD by <a href="http://www.snailsource.com/" target="_blank">Martin</a> :: Adapted for mxBB by <a href="http://www.phpmix.com" target="_blank">Markus</a> & <a href="http://www.mxbb.net" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2007-06-05 21:21:03
|
Update of /cvsroot/mxbb/mx_bugsbt In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15586 Modified Files: db_install.php Log Message: updated Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_bugsbt/db_install.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db_install.php 5 May 2007 20:17:43 -0000 1.2 --- db_install.php 5 Jun 2007 21:20:59 -0000 1.3 *************** *** 31,35 **** } ! $mx_module_version = '1.0.0'; $mx_module_copy = 'Designed for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; --- 31,35 ---- } ! $mx_module_version = '1.0.1'; $mx_module_copy = 'Designed for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; |
|
From: Jon O. <jon...@us...> - 2007-06-05 21:20:37
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15547 Modified Files: mx_last_msg.php Log Message: Styles fix Last message block update - "memory" of current page Index: mx_last_msg.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_last_msg.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_last_msg.php 5 May 2007 20:13:40 -0000 1.3 --- mx_last_msg.php 5 Jun 2007 21:20:34 -0000 1.4 *************** *** 66,70 **** $msg_start = ( isset( $HTTP_GET_VARS['lmsg_start'] ) ) ? intval( $HTTP_GET_VARS['lmsg_start'] ) : 0; - $start_prev = ( $msg_start == 0 ) ? 0 : $msg_start - $PostNumber; $start_next = $msg_start + $PostNumber; --- 66,69 ---- *************** *** 201,205 **** $message = $postrow[$row_count]['topic_title']; ! $url = append_sid(PHPBB_URL . 'viewtopic.php?t=' . $postrow[$row_count]['topic_id'] . '#' . $postrow[$row_count]['topic_last_post_id']); if ( $postrow[$row_count]['topic_status'] == TOPIC_MOVED ) --- 200,204 ---- $message = $postrow[$row_count]['topic_title']; ! $url = append_sid(PHPBB_URL . 'viewtopic.php?'. 'lmsg_start=' . $msg_start . '&t=' . $postrow[$row_count]['topic_id'] . '#' . $postrow[$row_count]['topic_last_post_id']); if ( $postrow[$row_count]['topic_status'] == TOPIC_MOVED ) *************** *** 374,378 **** } ! $forum_url = append_sid(PHPBB_URL . 'viewforum.php?f=' . $postrow[$row_count]['forum_id']); } else --- 373,377 ---- } ! $forum_url = append_sid(PHPBB_URL . 'viewforum.php?'. 'lmsg_start=' . $msg_start . '&f=' . $postrow[$row_count]['forum_id']); } else *************** *** 384,388 **** if ( $display_icon_view == "TRUE" ) { ! $last_post_url = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?" . POST_POST_URL . '=' . $postrow[$row_count]['topic_last_post_id']) . '#' . $postrow[$row_count]['topic_last_post_id'] . '"><img src="' . $images['last_msg_icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; } else --- 383,387 ---- if ( $display_icon_view == "TRUE" ) { ! $last_post_url = '<a href="' . append_sid(PHPBB_URL . "viewtopic.$phpEx?". "lmsg_start=" . $msg_start . "&" . POST_POST_URL . '=' . $postrow[$row_count]['topic_last_post_id']) . '#' . $postrow[$row_count]['topic_last_post_id'] . '"><img src="' . $images['last_msg_icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>'; } else |
|
From: Jon O. <jon...@us...> - 2007-06-05 21:20:24
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15520 Modified Files: mx_functions_style.php Log Message: Styles fix Last message block update - "memory" of current page Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_functions_style.php 4 Jun 2007 21:14:02 -0000 1.12 --- mx_functions_style.php 5 Jun 2007 21:20:19 -0000 1.13 *************** *** 363,373 **** if ( defined('IN_ADMIN') ) { ! $init_style = $portal_config['default_admin_style']; // Use subSilver (if installed) $init_override = 1; } else if (isset($mx_page)) { ! $init_style = $mx_page->default_style; ! $init_override = $mx_page->override_user_style; } else --- 363,373 ---- if ( defined('IN_ADMIN') ) { ! $init_style = $portal_config['default_admin_style']; $init_override = 1; } else if (isset($mx_page)) { ! $init_style = $mx_page->default_style == -1 ? $portal_config['default_style'] : $mx_page->default_style; ! $init_override = $mx_page->override_user_style == -1 ? $portal_config['override_user_style'] : $mx_page->override_user_style; } else |
|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:50
|
Update of /cvsroot/mxbb/core/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15497 Modified Files: admin_mx_portal.tpl mx_pagecp_admin_body.tpl Log Message: Added custom styles for pages Added style selection for the adminCP Index: mx_pagecp_admin_body.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/mx_pagecp_admin_body.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_pagecp_admin_body.tpl 13 May 2007 20:33:35 -0000 1.11 --- mx_pagecp_admin_body.tpl 4 Jun 2007 21:14:46 -0000 1.12 *************** *** 667,670 **** --- 667,678 ---- </tr> <tr> + <td width="50%" align="right" >{L_DEFAULT_STYLE}</td> + <td>{pages.STYLE_SELECT}</td> + </tr> + <tr> + <td width="50%" align="right" >{L_OVERRIDE_STYLE}<br /><span class="gensmall">{L_OVERRIDE_STYLE_EXPLAIN}</span></td> + <td><input type="radio" name="mx_override_user_style" value="-1" {pages.OVERRIDE_STYLE_DEFAULT} /> {L_DEFAULT} <input type="radio" name="mx_override_user_style" value="1" {pages.OVERRIDE_STYLE_YES} /> {L_YES} <input type="radio" name="mx_override_user_style" value="0" {pages.OVERRIDE_STYLE_NO} /> {L_NO}</td> + </tr> + <tr> <td width="50%" align="right" >{L_PAGE_MAIN_LAYOUT}</td> <td><input type="text" size="45" name="page_main_layout" value="{pages.E_PAGE_MAIN_LAYOUT}" class="post" /></td> Index: admin_mx_portal.tpl =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/admin/admin_mx_portal.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_mx_portal.tpl 13 May 2007 20:33:35 -0000 1.9 --- admin_mx_portal.tpl 4 Jun 2007 21:14:46 -0000 1.10 *************** *** 21,26 **** </tr> <tr> ! <td class="row1">{L_TOP_PHPBB_LINKS}</td> ! <td class="row2"><input type="radio" name="top_phpbb_links" value="1" {S_TOP_PHPBB_LINKS_YES} /> {L_YES} <input type="radio" name="top_phpbb_links" value="0" {S_TOP_PHPBB_LINKS_NO} /> {L_NO}</td> </tr> <tr> --- 21,45 ---- </tr> <tr> ! <td class="row1">{L_MX_USE_CACHE}<br /><span class="gensmall">{L_MX_USE_CACHE_EXPLAIN}</span></td> ! <td class="row2"><input type="radio" name="mx_use_cache" value="1" {S_MX_USE_CACHE_YES} /> {L_YES} <input type="radio" name="mx_use_cache" value="0" {S_MX_USE_CACHE_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_MX_MOD_REWRITE}<br /><span class="gensmall">{L_MX_MOD_REWRITE_EXPLAIN}</span></td> ! <td class="row2"><input type="radio" name="mod_rewrite" value="1" {S_MX_MOD_REWRITE_YES} /> {L_YES} <input type="radio" name="mod_rewrite" value="0" {S_MX_MOD_REWRITE_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <th class="thHead" colspan="2">{L_STYLE_SETTINGS}</th> ! </tr> ! <tr> ! <td class="row1">{L_DEFAULT_ADMIN_STYLE}</td> ! <td class="row2">{ADMIN_STYLE_SELECT}</td> ! </tr> ! <tr> ! <td class="row1">{L_DEFAULT_STYLE}</td> ! <td class="row2">{STYLE_SELECT}</td> ! </tr> ! <tr> ! <td class="row1">{L_OVERRIDE_STYLE}<br /><span class="gensmall">{L_OVERRIDE_STYLE_EXPLAIN}</span></td> ! <td class="row2"><input type="radio" name="mx_override_user_style" value="1" {OVERRIDE_STYLE_YES} /> {L_YES} <input type="radio" name="mx_override_user_style" value="0" {OVERRIDE_STYLE_NO} /> {L_NO}</td> </tr> <tr> *************** *** 41,50 **** </tr> <tr> ! <td class="row1">{L_MX_USE_CACHE}<br /><span class="gensmall">{L_MX_USE_CACHE_EXPLAIN}</span></td> ! <td class="row2"><input type="radio" name="mx_use_cache" value="1" {S_MX_USE_CACHE_YES} /> {L_YES} <input type="radio" name="mx_use_cache" value="0" {S_MX_USE_CACHE_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_MX_MOD_REWRITE}<br /><span class="gensmall">{L_MX_MOD_REWRITE_EXPLAIN}</span></td> ! <td class="row2"><input type="radio" name="mod_rewrite" value="1" {S_MX_MOD_REWRITE_YES} /> {L_YES} <input type="radio" name="mod_rewrite" value="0" {S_MX_MOD_REWRITE_NO} /> {L_NO}</td> </tr> <tr> --- 60,65 ---- </tr> <tr> ! <td class="row1">{L_TOP_PHPBB_LINKS}</td> ! <td class="row2"><input type="radio" name="top_phpbb_links" value="1" {S_TOP_PHPBB_LINKS_YES} /> {L_YES} <input type="radio" name="top_phpbb_links" value="0" {S_TOP_PHPBB_LINKS_NO} /> {L_NO}</td> </tr> <tr> |
|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:36
|
Update of /cvsroot/mxbb/core/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15482 Modified Files: lang_admin.php Log Message: Added custom styles for pages Added style selection for the adminCP Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_admin.php,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** lang_admin.php 13 May 2007 20:33:21 -0000 1.73 --- lang_admin.php 4 Jun 2007 21:14:33 -0000 1.74 *************** *** 104,107 **** --- 104,108 ---- $lang['Portal_General_Config_explain'] = 'Use this form to manage the main settings of your mxBB portal.'; $lang['Portal_General_settings'] = 'General Settings'; + $lang['Portal_Style_settings'] = 'Style Settings'; $lang['Portal_General_config_info'] = 'General Portal Config Info '; $lang['Portal_General_config_info_explain'] = 'Current setup info from config.php (no editing needed)'; *************** *** 133,136 **** --- 134,142 ---- $lang['Portal_Navigation_block'] = 'Overall Header Navigation Block (default value)'; $lang['Portal_Navigation_block_explain'] = '- This is the default template overall_header navigation block.'; + $lang['Default_style'] = 'Portal Pages Style (default)'; + $lang['Default_admin_style'] = 'AdminCP Style'; + $lang['Select_page_style'] = "Select (or use default)"; + $lang['Override_style'] = 'Override user style'; + $lang['Override_style_explain'] = 'Replaces users style with the default (for pages)'; // *************** *** 282,285 **** --- 288,294 ---- $lang['Page_Id'] = 'Page ID'; $lang['Page_icon'] = 'Page Icon <br /> - to be used in the adminCP only, eg. icon_home.gif (default)'; + $lang['Default_page_style'] = 'Portal Style (default)<br />To use the default setting, leave this unset.'; + $lang['Override_page_style'] = 'Override user style'; + $lang['Override_page_style_explain'] = ' '; $lang['Page_header'] = 'Page header file <br /> - i.e. overall_header.tpl (default), overall_noheader.tpl (no header) or user custom header file.<br />To use the default setting, leave this blank.'; $lang['Page_footer'] = 'Page footer file <br /> - i.e. overall_footer.tpl (default) or user custom footer file.<br />To use the default setting, leave this blank.'; |
|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:23
|
Update of /cvsroot/mxbb/core/install/schemas In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15447 Modified Files: mysql_schema_install.sql mysql_schema_upgrade_to_2.8.0.sql Log Message: Added custom styles for pages Added style selection for the adminCP Index: mysql_schema_install.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_install.sql,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** mysql_schema_install.sql 16 May 2007 19:18:38 -0000 1.35 --- mysql_schema_install.sql 4 Jun 2007 21:14:20 -0000 1.36 *************** *** 191,195 **** `column_id` smallint(5) NOT NULL default '0', `block_id` smallint(5) NOT NULL default '0', ! `block_order` smallint(5) NOT NULL default '0' ) TYPE=MyISAM; --- 191,196 ---- `column_id` smallint(5) NOT NULL default '0', `block_id` smallint(5) NOT NULL default '0', ! `block_order` smallint(5) NOT NULL default '0', ! PRIMARY KEY (`column_id`, `block_id`) ) TYPE=MyISAM; *************** *** 411,414 **** --- 412,417 ---- `auth_view_group` varchar(255) NOT NULL default '0', `auth_moderator_group` varchar(255) NOT NULL default '0', + `default_style` smallint(5) NOT NULL default '-1', + `override_user_style` smallint(2) NOT NULL default '-1', `page_header` varchar(255) default '', `page_footer` varchar(255) default '', *************** *** 421,433 **** - # # Dumping data for table 'mx_table_page' # ! INSERT INTO mx_table_page VALUES("5", "Site Search", "Site Search page", "icon_search.gif", "0", "0", "0", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("4", "Sitestats", "Sitestats page", "icon_stats.gif", "0", "0", "0", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("1", "Home", "This is the startpage", "icon_home.gif", "0", "0", "0", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("2", "Forum", "This is the phpBB Forum startpage", "icon_forum.gif", "0", "0", "0", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "1"); ! INSERT INTO mx_table_page VALUES("3", "Demo Page", "Block Demos", "icon_scate.gif", "0", "0", "0", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); --- 424,435 ---- # # Dumping data for table 'mx_table_page' # ! INSERT INTO mx_table_page VALUES("1", "Home", "This is the startpage", "icon_home.gif", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("2", "Forum", "This is the phpBB Forum startpage", "icon_forum.gif", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "1"); ! INSERT INTO mx_table_page VALUES("3", "Demo Page", "Block Demos", "icon_scate.gif", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("4", "Sitestats", "Sitestats page", "icon_stats.gif", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); ! INSERT INTO mx_table_page VALUES("5", "Site Search", "Site Search page", "icon_search.gif", "0", "0", "0", "-1", "-1", "", "", "", "0", "a:1:{i:0;s:0:\"\";}", "-1"); *************** *** 551,554 **** --- 553,559 ---- `portal_url` varchar(255) default NULL, `portal_version` varchar(255) default NULL, + `default_admin_style` smallint(5) NOT NULL default '-1', + `default_style` smallint(5) NOT NULL default '-1', + `override_user_style` smallint(2) NOT NULL default '1', `overall_header` varchar(255) default 'overall_header.tpl', `overall_footer` varchar(255) default 'overall_footer.tpl', Index: mysql_schema_upgrade_to_2.8.0.sql =================================================================== RCS file: /cvsroot/mxbb/core/install/schemas/mysql_schema_upgrade_to_2.8.0.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql_schema_upgrade_to_2.8.0.sql 16 May 2007 19:18:38 -0000 1.1 --- mysql_schema_upgrade_to_2.8.0.sql 4 Jun 2007 21:14:20 -0000 1.2 *************** *** 9,12 **** --- 9,14 ---- # New Fields in Table `mx_page` ALTER TABLE mx_table_page ADD page_footer varchar(255) default '' AFTER page_header; + ALTER TABLE mx_table_page ADD default_style smallint(5) NOT NULL default '-1' AFTER auth_moderator_group; + ALTER TABLE mx_table_page ADD override_user_style smallint(2) NOT NULL default '-1' AFTER default_style; # ------------------------------------------------------------ *************** *** 14,16 **** # New Fields in Table `mx_portal` # ! ALTER TABLE mx_table_portal ADD overall_footer varchar(255) default 'overall_footer.tpl' AFTER overall_header; \ No newline at end of file --- 16,21 ---- # New Fields in Table `mx_portal` # ! ALTER TABLE mx_table_portal ADD overall_footer varchar(255) default 'overall_footer.tpl' AFTER overall_header; ! ALTER TABLE mx_table_portal ADD default_admin_style smallint(5) NOT NULL default '-1' AFTER portal_version; ! ALTER TABLE mx_table_portal ADD default_style smallint(5) NOT NULL default '-1' AFTER default_admin_style; ! ALTER TABLE mx_table_portal ADD override_user_style smallint(2) NOT NULL default '1' AFTER default_style; \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:14
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14991/includes Modified Files: mx_functions_admincp.php mx_functions_core.php mx_functions_phpbb.php mx_functions_style.php Log Message: Added custom styles for pages Added style selection for the adminCP Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** mx_functions_core.php 16 May 2007 19:18:23 -0000 1.43 --- mx_functions_core.php 4 Jun 2007 21:14:02 -0000 1.44 *************** *** 366,369 **** --- 366,371 ---- pag.page_name, pag.page_icon, + pag.default_style, + pag.override_user_style, pag.page_header, pag.page_footer, *************** *** 410,413 **** --- 412,417 ---- "page_name" => $row['page_name'], "page_icon" => $row['page_icon'], + "default_style" => $row['default_style'], + "override_user_style" => $row['override_user_style'], "page_header" => $row['page_header'], "page_footer" => $row['page_footer'], *************** *** 2483,2486 **** --- 2487,2492 ---- var $page_title = ''; var $page_icon = ''; + var $default_style = '-1'; + var $override_user_style = '-1'; var $page_ov_header = ''; var $page_ov_footer = ''; *************** *** 2535,2538 **** --- 2541,2547 ---- $this->page_icon = $this->info['page_icon']; + $this->default_style = $this->info['default_style'] == -1 ? ($portal_config['default_style']) : ( $this->info['default_style'] ); + $this->override_user_style = $this->info['override_user_style'] == -1 ? ($portal_config['override_user_style'] == 1 ? true : false ) : ( $this->info['override_user_style'] == 1 ? true : false ); + $this->page_ov_header = !empty($this->info['page_header']) && file_exists($mx_root_path . TEMPLATE_ROOT_PATH . $this->info['page_header']) ? $this->info['page_header'] : $portal_config['overall_header']; $this->page_ov_footer = !empty($this->info['page_footer']) && file_exists($mx_root_path . TEMPLATE_ROOT_PATH . $this->info['page_footer']) ? $this->info['page_footer'] : $portal_config['overall_footer']; Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_functions_style.php 7 May 2007 19:25:12 -0000 1.11 --- mx_functions_style.php 4 Jun 2007 21:14:02 -0000 1.12 *************** *** 260,266 **** function _init_userprefs() { ! global $userdata, $board_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; global $nav_links; if ( $userdata['user_id'] != ANONYMOUS ) --- 260,267 ---- function _init_userprefs() { ! global $userdata, $board_config, $portal_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; global $nav_links; + global $mx_page; if ( $userdata['user_id'] != ANONYMOUS ) *************** *** 268,272 **** if ( !empty($userdata['user_lang'])) { - //$board_config['default_lang'] = $userdata['user_lang']; // See simpler lang select code below $default_lang = phpbb_ltrim(basename(phpbb_rtrim($userdata['user_lang'])), "'"); } --- 269,272 ---- *************** *** 354,389 **** } - /* Note: This is a simpler "working" version. phpBB 2.0.21 introduced above code instead. - // - // Is the lang installed? - // - if ( !file_exists($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) || !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx)) - { - $board_config['default_lang'] = 'english'; - } - // ! // Include phpBB and mxBB lang keys // ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); ! include($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); - // - // Include Admin lang keys - // if ( defined('IN_ADMIN') ) { ! if( !file_exists($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx) || !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx) ) ! { ! $board_config['default_lang'] = 'english'; ! } ! ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx); ! include($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx); } - */ // ! // Set up demo style // if ( isset($_GET['demo_theme']) || isset($_COOKIE['demo_theme'])) --- 354,382 ---- } // ! // Build Portal style // ! $portal_config['default_admin_style'] = $portal_config['default_admin_style'] == -1 ? $board_config['default_style'] : $portal_config['default_admin_style']; ! $portal_config['default_style'] = $portal_config['default_style'] == -1 ? $board_config['default_style'] : $portal_config['default_style']; ! $portal_config['override_user_style'] = $portal_config['override_user_style'] == -1 ? $board_config['override_user_style'] : $portal_config['override_user_style']; if ( defined('IN_ADMIN') ) { ! $init_style = $portal_config['default_admin_style']; // Use subSilver (if installed) ! $init_override = 1; ! } ! else if (isset($mx_page)) ! { ! $init_style = $mx_page->default_style; ! $init_override = $mx_page->override_user_style; ! } ! else ! { ! $init_style = $portal_config['default_style']; ! $init_override = $portal_config['override_user_style']; } // ! // Setup demo style // if ( isset($_GET['demo_theme']) || isset($_COOKIE['demo_theme'])) *************** *** 398,404 **** // ! // Set up style // ! if ( !$board_config['override_user_style'] ) { if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 ) --- 391,397 ---- // ! // Setup style // ! if ( !$portal_config['override_user_style'] ) { if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 ) *************** *** 412,416 **** } ! $style = isset($_POST['default_style']) ? intval($_POST['default_style']) : $board_config['default_style']; $theme = $this->_setup_style($style); --- 405,409 ---- } ! $style = isset($_POST['default_style']) ? intval($_POST['default_style']) : $init_style; $theme = $this->_setup_style($style); Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** mx_functions_phpbb.php 30 May 2007 21:31:03 -0000 1.30 --- mx_functions_phpbb.php 4 Jun 2007 21:14:02 -0000 1.31 *************** *** 768,774 **** * @return string (html) */ ! function mx_style_select($default_style, $select_name = "style", $dirname = "templates") { ! global $db; $sql = "SELECT themes_id, style_name --- 768,774 ---- * @return string (html) */ ! function mx_style_select($default_style, $select_name = "style", $dirname = "templates", $show_instruction = false) { ! global $db, $lang; $sql = "SELECT themes_id, style_name *************** *** 781,787 **** $style_select = '<select name="' . $select_name . '">'; while ( $row = $db->sql_fetchrow($result) ) { ! $selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : ''; $style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>'; --- 781,792 ---- $style_select = '<select name="' . $select_name . '">'; + if ($show_instruction) + { + $selected1 = ( $default_style == -1 ) ? ' selected="selected"' : ''; + $style_select .= '<option value="-1"' . $selected1 . '>' . $lang['Select_page_style'] . '</option>'; + } while ( $row = $db->sql_fetchrow($result) ) { ! $selected = ( $row['themes_id'] == $default_style && !$selected1) ? ' selected="selected"' : ''; $style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>'; Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** mx_functions_admincp.php 13 May 2007 20:33:04 -0000 1.35 --- mx_functions_admincp.php 4 Jun 2007 21:14:01 -0000 1.36 *************** *** 334,337 **** --- 334,339 ---- $page_desc = $mx_request_vars->post('page_desc', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_icon = $mx_request_vars->post('menuicons', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); + $default_style = $mx_request_vars->post('mx_default_style', MX_TYPE_INT, '-1'); + $override_user_style = $mx_request_vars->post('mx_override_user_style', MX_TYPE_INT, '-1'); $page_header = $mx_request_vars->post('page_header', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_footer = $mx_request_vars->post('page_footer', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); *************** *** 368,372 **** } ! $sql = "INSERT INTO " . PAGE_TABLE . " ( page_id, page_name, page_desc, page_icon, auth_view, page_header, page_footer, page_main_layout, navigation_block, ip_filter, phpbb_stats ) VALUES ( '" . $page_id_new . "', '" . $page_name . "', --- 370,374 ---- } ! $sql = "INSERT INTO " . PAGE_TABLE . " ( page_id, page_name, page_desc, page_icon, auth_view, default_style, override_user_style, page_header, page_footer, page_main_layout, navigation_block, ip_filter, phpbb_stats ) VALUES ( '" . $page_id_new . "', '" . $page_name . "', *************** *** 374,377 **** --- 376,381 ---- '" . $page_icon . "', '" . $auth_view . "', + '" . $default_style . "', + '" . $override_user_style . "', '" . $page_header . "', '" . $page_footer . "', *************** *** 922,925 **** --- 926,931 ---- $page_desc = $mx_request_vars->post('page_desc', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_icon = $mx_request_vars->post('menuicons', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); + $default_style = $mx_request_vars->post('mx_default_style', MX_TYPE_INT, '-1'); + $override_user_style = $mx_request_vars->post('mx_override_user_style', MX_TYPE_INT, '-1'); $page_header = $mx_request_vars->post('page_header', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); $page_footer = $mx_request_vars->post('page_footer', MX_TYPE_NO_TAGS | MX_TYPE_SQL_QUOTED, ''); *************** *** 945,948 **** --- 951,956 ---- page_desc = '$page_desc', page_icon = '$page_icon', + default_style = '$default_style', + override_user_style = '$override_user_style', page_header = '$page_header', page_footer = '$page_footer', |