eDNews - The Dynamic News Engine
version 2.1 - Sept 09
Live Demo
This page includes a live demonstration of eDNews that you can use to discover what this module is capable of.
You can add news and view the list of archived news.
-- The eDNews Live demo was deactivated because of spam issues. --
eDNews has been installed in the modules/ folder of this website (built with eDContainer) and the following PHP code is used in this page to obtain the result you see above.
<?php
// Check which eDNews component to display
if ( isset( $_REQUEST['action'] ) ) {
$action = $_REQUEST['action'];
} else {
$action = null;
}
// Find and display the required component
switch( $action ) {
case 'view':
// Retrieve newsid if defined
if ( isset( $_REQUEST['newsid'] ) ) {
$newsid = $_REQUEST['newsid'];
} else if ( ! isset( $newsid ) ) {
$newsid = null;
}
require 'modules/eDNews/eDNews_view.php';
break;
case 'add':
require 'modules/eDNews/eDNews_add.php';
break;
case 'archive':
require 'modules/eDNews/eDNews_archive.php';
break;
default:
require 'modules/eDNews/eDNews.php';
break;
}
?>
The choice was here made to have all the components of eDNews displayed from a single page and the code set which component to display based on the action parameter.
Here is displayed how eDNews has been configured (using its configuration file):
<?php
/**
* eDNews - Main Configuration File
*
* Configure from here the parameters of your eDNews module.
*
* Get support: support@edreamers.org
* The Forums: http://eDreamers.org/forums/
*/
$CONFIG = array();
/**
* eDNews Root - This file absolute URL,
* ex: http://pathtoedcontainer/
*/
$CONFIG['root'] =
'http://edreamers.org/index.php?folder=solutions
&file=eDNews&page=3';
/**
* Path to the templates used for display
*/
$CONFIG['templatePath'] = './modules/eDNews/templates/';
/**
* Path to the eDToolbox by eDreamers
* You only need to change this value in case you have an
* existing installation of eDToolbox that you would like
* to reuse
*/
$CONFIG['edtoolboxPath'] = 'modules/eDToolbox/';
/**
* eDNews Default Language
* Set the default language on line 37, taken from the
* supported values shown in the comments. Code from
* line 38 allows the language to be dynamically by the
* page or script where eDNews is installed
*/
$CONFIG['supported_languages'] = array( 'en' );
if ( in_array( $_REQUEST['lg'], $CONFIG['supported_languages'] ) ) {
$CONFIG['language'] = $_REQUEST['lg'];
} else {
$CONFIG['language'] = 'en'; // 'fr' | 'en'
}
/**
* Display (true) or hide (false) the "add news" link
*/
$CONFIG['display_add'] = false; // true | false
/**
* News Expiration delays in days
* News are automatically archived after this delay
*/
$CONFIG['expirationDelay'] = '60';
/**
* Debug modes
* Set debug to true to test eDNews (without templates) in
* case you need to solve some problems. Set debugTemplate
* to true to test templates
*/
$CONFIG['debug'] = false; // true | false
$CONFIG['debugTemplate'] = false; // true | false
/**
* eDNews Application configuration
* Database, table and fields parameters
* If you change any name, update the following values.
*/
$CONFIG['host'] = 'hidden';
$CONFIG['user'] = 'hidden';
$CONFIG['password'] = 'hidden';
$CONFIG['db'] = 'hidden';
/**
* Path the various components of eDNews
* If used standalone you don't need to change these values
* but eDNews is meant to be integrated in your web site or
* application, inside pages that have different. URLS that
* you can specify here
*/
$CONFIG['addURL'] = $CONFIG['root'].'&action=add';
$CONFIG['startURL'] = $CONFIG['root'].'&action=null';
$CONFIG['viewURL'] = $CONFIG['root'].'&action=view';
$CONFIG['archiveURL'] =
$CONFIG['root'].'&action=archive';
/**
* You don't have to change the following values if you used
* the news.sql script to create the news table but you still
* have the freedom to rename the news table and fields in
* your database. If doing so, then update the following
* values to match your database
*/
$CONFIG['table'] = 'news';
$CONFIG['fld_id'] = 'newsid';
$CONFIG['fld_title'] = 'nstitle';
$CONFIG['fld_content'] = 'nscontent';
$CONFIG['fld_dateCreated'] = 'nsdateCreated';
$CONFIG['fld_score'] = 'nsscore';
$CONFIG['fld_expired'] = 'nsexpired';
?>
eDreamers Support Team is here to assist you in the setup and configuration of your eDNews installation.
Post your questions and request to support@edreamers.org.
Print page | all | view   
|