Update of /cvsroot/mxbb/core/modules/mx_news In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26348 Added Files: db_install.php db_uninstall.php db_upgrade.php index.htm mx_install_readme.htm mx_news.pak mx_news.php Log Message: New module. Based on the KB engine and reuse the core comments OO class to make a simple news/comments module, for wuick news. Very handy... --- NEW FILE: db_uninstall.php --- <?php /** * * @package mxBB Portal Module - mx_news * @version $Id: db_uninstall.php,v 1.1 2008/01/28 22:21:05 jonohlsson Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ 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 } $sql = array( "DROP TABLE " . $mx_table_prefix . "simplenews_config ", "DROP TABLE " . $mx_table_prefix . "simplenews_comments ", ); 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\">" . mx_do_install_upgrade( $sql ) . "</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: #FFFFFF; border-style: solid; 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("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 size="5">MX Module - mx_news <br> <font size="2">v. 0.9x</font></font></b></p> <p><span style="font-weight: bold"><span style="font-size: 16px; line-height: normal">Module</span></span> <br /> - for Mx Portal v. 2.7.5+</p> <p><strong>Author</strong><br /> Haplo<br /> <br /> <span style="font-weight: bold">Description</span> <br /> The MX Module is an addon product for the MX-portal.</p> <p><strong>Features</strong> <br /> Easy to use and install/uninstall module.</p> <p> <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 href="http://www.mx-system.com" target="_blank" class="postlink">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 href="http://www.mx-system.com/forum/viewforum.php?f=20" target="_blank" class="postlink"> module support forum</a>. </p> <p>All install notes are maintained at www.mx-system.com, <a href="http://www.mx-system.com/forum/viewforum.php?f=11">here</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</p> <p>Note: If upgrading, do NOT delete module prior to upgrading, or else you'll lose all module data!<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 href="http://www.mx-system.com/index.php?page=4&action=category&cat_id=5" target="_blank" class="postlink"> 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> </p> <p> /Mx Team</p> </td> </tr> </table> </body> </html> --- NEW FILE: db_upgrade.php --- <?php /** * * @package mxBB Portal Module - mx_news * @version $Id: db_upgrade.php,v 1.1 2008/01/28 22:21:05 jonohlsson Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ 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 = '1.0.0'; $mx_module_copy = 'Created for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; // For compatibility with core 2.7.+ define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); $sql = array(); // Precheck if ( $result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "simplenews_config" ) ) { // Upgrade checks $upgrade_280 = false; $message = "<b>Upgrading!</b><br/><br/>"; if ( $upgrade_280 == 1 ) { } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } if ( !MXBB_27x ) { $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 ); $message .= "<b>...Now upgraded to v. $mx_module_version :-)</b><br/><br/>"; // // Empty module cache // include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); $module_cache = new module_cache($mx_root_path . 'modules/mx_news/mx_news/'); $module_cache->tidy(); $module_cache->save(); } else { // If not installed $message = "<b>Module 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: db_install.php --- <?php /** * * @package mxBB Portal Module - mx_news * @version $Id: db_install.php,v 1.1 2008/01/28 22:21:05 jonohlsson Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ 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 = '1.0.0'; $mx_module_copy = 'Created for mxBB by <a href="http://www.mxbb.net" target="_blank">Jon</a>'; // For compatibility with core 2.7.+ define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $mx_table_prefix . "simplenews_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $tmp = $userdata['user_id']; $sql = array( "DROP TABLE IF EXISTS " . $mx_table_prefix . "simplenews_config ", "CREATE TABLE " . $mx_table_prefix . "simplenews_config ( config_name varchar(255) NOT NULL default '', config_value varchar(255) NOT NULL default '', PRIMARY KEY (config_name) )", // -------------------------------------------------------- // Table structure for table `phpbb_pa_comments` "CREATE TABLE " . $mx_table_prefix . "simplenews_comments ( comments_id int(10) NOT NULL auto_increment, block_id int(10) NOT NULL default '0', comments_text text NOT NULL, comments_title text NOT NULL, comments_time int(50) NOT NULL default '0', comment_bbcode_uid varchar(10) default NULL, poster_id mediumint(8) NOT NULL default '0', PRIMARY KEY (comments_id), KEY comments_id (comments_id), FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) )", // General "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('enable_module', '0')", // settings_disable "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('module_name', 'News Manager')", // settings_dbname "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('wysiwyg_path', 'modules/mx_shared/')", // New -------------------- // Comments "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('internal_comments', '1')", // NEW "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('formatting_comment_wordwrap', '1')", // formatting_comment_fixup "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('formatting_comment_image_resize', '300')", // NEW "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('formatting_comment_truncate_links', '1')", // NEW "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('max_comment_subject_chars', '50')", // NEW "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('max_comment_chars', '5000')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allow_comment_wysiwyg', '0')", // allow_wysiwyg_comments & allow_wysiwyg "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allow_comment_html', '1')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allow_comment_bbcode', '1')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allow_comment_smilies', '1')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allow_comment_links', '1')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allow_comment_images', '1')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('no_comment_image_message', '[No image please]')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('no_comment_link_message', '[No links please]')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')", // NEW //"INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('del_topic', '1')", // NEW //"INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('autogenerate_comments', '1')", // NEW "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('comments_pagination', '5')", "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('comments_forum_id', '0')", // New // Notifications "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('notify', 'pm')", // pm_notify "INSERT INTO " . $mx_table_prefix . "simplenews_config VALUES ('notify_group', '0')", // NEW ); $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/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: mx_news.php --- <?php /** * * @package mxBB Portal Module - mx_news * @version $Id: mx_news.php,v 1.3 2008/01/28 22:21:05 jonohlsson Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( file_exists( './viewtopic.php' ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); define( 'IN_PORTAL', true ); define( 'IN_DOWNLOAD', true ); // When run as a phpBB mod these paths are identical ;) $phpbb_root_path = $module_root_path = $mx_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include( $phpbb_root_path . 'common.' . $phpEx ); include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) // Start session management $userdata = session_pagestart( $user_ip, PAGE_DOWNLOAD ); init_userprefs( $userdata ); // End session management } else { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'download' ) { define('MX_GZIP_DISABLED', true); } define( 'IN_PORTAL', true ); $mx_root_path = '../../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management $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 = 'mxNews' LIMIT 1"; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query mx_news module information", "", __LINE__, __FILE__, $sql ); } $row = $db->sql_fetchrow( $result ); $block_id = $row['block_id']; } $is_block = false; } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings // $title = $mx_block->block_info['block_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); $is_block = true; global $images; } define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); } // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- // Start // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- // =================================================== // ? // =================================================== list( $trash, $mx_script_name_temp ) = split ( trim( $board_config['server_name'] ), PORTAL_URL ); $mx_script_name = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $mx_script_name_temp ) ); // // Include the common file // include( $module_root_path . 'mx_news/mx_news_common.' . $phpEx ); // // Get action variable other wise set it to the main // $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'news'; // =================================================== // Is admin? // =================================================== $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; // =================================================== // if the database disabled give them a nice message // =================================================== if ( intval( $mx_news_config['module_enable'] ) ) { mx_message_die( GENERAL_MESSAGE, $lang['mx_news_disable'] ); } // // an array of all expected actions // $actions = array( 'news' => 'main', 'post_news' => 'post_comment' ); // // Lets Build the page // if ( !$is_block ) { include( $mx_root_path . 'includes/page_header.' . $phpEx ); } $mx_news->module( $actions[$action] ); $mx_news->modules[$actions[$action]]->main( $action ); $mx_news_functions->page_header(); // // page body for mx_news // $template->set_filenames( array( 'body' => $mx_news_tpl_name ) ); $template->pparse( 'body' ); $mx_news_functions->page_footer(); if ( !$is_block ) { include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } ?> --- NEW FILE: mx_news.pak --- module=+:56=+:Simple news manager=+:modules/mx_news/=+:News Manager module=+:1 New_function=+:---------------------------=+:0=+:0=+:0=+:0=+:0 function=+:56=+:67=+:News=+:News Manager=+:mx_news.php=+: parameter=+:0=+:0=+:0=+:endoflist=+:0=+:0 block=+:=+:Demo - News=+:Demo block=+:67=+:0=+:5=+:0=+:0=+:0=+:0=+:1=+:1 function=+:0=+:0=+:0=+:endoflist=+:0=+:0 --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |