|
From: Jon O. <jon...@us...> - 2008-06-22 05:14:23
|
Update of /cvsroot/mxbb/mx_news In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5361 Modified Files: mx_news_list.php Log Message: Updated Index: mx_news_list.php =================================================================== RCS file: /cvsroot/mxbb/mx_news/mx_news_list.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_news_list.php 15 Jun 2008 21:04:40 -0000 1.3 --- mx_news_list.php 21 Jun 2008 23:03:41 -0000 1.4 *************** *** 1,259 **** ! <?php ! /** ! * ! * @package MX-Publisher Module - mx_news ! * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] MX-Publisher Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * ! */ ! ! $phpEx = substr(strrchr(__FILE__, '.'), 1); ! ! if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE ! { ! define( 'MXBB_MODULE', false ); ! define( 'IN_PHPBB', true ); ! 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 = './'; ! $mx_mod_path = $phpbb_root_path . 'mx_mod/'; ! ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) ! { ! define('IN_CASHMOD', true); ! } ! ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! @ini_set( 'display_errors', '1' ); ! error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! ! include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); ! include_once( $mx_mod_path . 'includes/functions_core.' . $phpEx ); ! define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) ! // ! // Instatiate the mx_cache class ! // ! $mx_cache = new mx_cache(); ! // ! // Get MX-Publisher config settings ! // ! $portal_config = $mx_cache->obtain_mxbb_config(); ! // ! // instatiate the mx_request_vars class ! // ! $mx_request_vars = new mx_request_vars(); ! $is_block = false; ! if ( file_exists("./modcp.$phpEx") ) // phpBB2 ! { ! define('PORTAL_BACKEND', 'phpbb2'); ! $tplEx = 'tpl'; ! mx_page::load_file('bbcode', 'phpbb2'); ! //include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! mx_page::load_file('functions_post', 'phpbb2'); ! //include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_DOWNLOAD ); ! init_userprefs( $userdata ); ! // End session management ! } ! else if ( @file_exists("./mcp.$phpEx") ) // phpBB3 ! { ! define('PORTAL_BACKEND', 'phpbb3'); ! $tplEx = 'html'; ! // ! // Start session management ! // ! $user->session_begin(); ! $userdata = $user->data; ! $user->setup(); ! // ! // End session management ! // ! // ! // Get phpBB config settings ! // ! $board_config = $config; ! } ! else ! { ! die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); ! } } - 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( $_GET['block_id'] ) ) ? $_GET['block_id'] : $_POST['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%' ); ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) ! { ! define('IN_CASHMOD', true); ! } ! $is_block = true; ! global $images; ! } ! define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); ! } ! // ------------------------------------------------------------------------------------------------------------------------- ! // ------------------------------------------------------------------------------------------------------------------------- ! // 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 ) ); ! // ! // Setup config parameters ! // ! $config_name = array( 'toplist_pagination', 'toplist_use_pagination', 'target_block', 'split_key', 'max_title_characters' , 'max_characters' ); ! for( $i = 0; $i < count( $config_name ); $i++ ) ! { ! $config_value = $mx_block->get_parameters( $config_name[$i] ); ! $toplist_config[$config_name[$i]] = $config_value; } ! if ($toplist_config['target_block'] == 0) ! { ! echo('You need to set the target News Block for this list!'); ! return; } ! $toplist_config['split_key'] = '<!-- ' . $toplist_config['split_key'] . ' -->'; ! ! // ! // Include the common file ! // ! include( $module_root_path . 'mx_news/mx_news_common.' . $phpEx ); ! ! $mx_news_config['max_comment_subject_chars'] = $toplist_config['max_title_characters']; ! $mx_news_config['max_comment_chars'] = $toplist_config['max_characters']; ! ! $toplist_page_id = intval($toplist_config['target_block']) > 0 ? get_page_id( $toplist_config['target_block'] ) : get_page_id( 'mx_news.php', true ); ! ! // ! // Get action variable other wise set it to the main ! // ! //$action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'list'); ! $action = 'lists'; ! // =================================================== ! // Is admin? ! // =================================================== ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; ! break; ! case 'phpbb3': ! $is_admin = ( $userdata['user_type'] == USER_FOUNDER ) ? true : 0; ! break; } ! // =================================================== ! // if the module is disabled give them a nice message ! // =================================================== ! if (!($mx_news_config['enable_module'] || $mx_user->is_admin)) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['mx_news_disable'] ); } ! // ! // an array of all expected actions ! // ! $actions = array( ! 'lists' => 'lists' ! ); ! // ! // 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 ); ! } ! ?> \ No newline at end of file --- 1,295 ---- ! <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">MXP</font><font size="5"> Module - ! News Manager<br> ! <font size="2">v. 1.0.1</font></font></b></p> ! <p><span style="font-weight: bold"><span style="font-size: 16px; line-height: normal">Module</span></span> ! <br /> ! - for MXP 2.8.x and 3.0.x (with some notes, see below)</p> ! <p><strong>Author [Credits]</strong><br /> ! <a href="mailto:jon...@mx...">Jon Ohlsson</a> [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin]<br /> ! <br /> ! <span style="font-weight: bold">Description</span> <br /> ! The MXP Module is an addon product for the MX-Publisher Core.</p> ! <p><strong>Features</strong> <br /> ! Simple News Manager, with a latest news block.</p> ! <p>Note: <em>This module currently supports standalone/internal and phpBB2 ! mode only (with MXP 3.0.x)</em></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-publisher.com" target="_blank" class="postlink">DEMO ! </a> <br /> ! <br /> ! <a href="http://www.mx-publisher.com/download" 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.</p> ! <p>If you encounter any ! problems during install, or if you need further assistance, visit the ! MXP<a href="http://www.mx-publisher.com/forum/" target="_blank" class="postlink"> ! support forum</a> or <a href="http://www.mx-publisher.com/docs" target="_blank" class="postlink">Online ! Docs</a>.</p> ! <p> <i>To summarize:</i></p> ! <ul> ! <li> If installing from scratch, use the "install module" option in the ! AdminCP - Modules</li> ! <li> If upgrading, use the "upgrade module" option in the ! AdminCP - Modules</li> ! <li> If uninstalling, use the "delete module" feature in the AdminCP ! - Modules</li> ! </ul> <p><i>Note:</i> If upgrading, do NOT delete/uninstall the module prior ! to upgrading, or else you'll lose all module data!</p> ! <p> <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. Available ! translations are hosted at www.mx-publisher.com<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> /MXP Team</p> ! </td> ! </tr> ! </table> ! </body> ! </html> |