Advanced News
plugin for CMSimple
Version v1.0.0 - 02/11/2005
(dd/mm/yyyy)
Contents
Introduction
Features
Requirements
Quick install & go!
Installation
instructions
Configuration settings
Language settings
News topics
administration
Usage of
news functions in CMSimple
Credits
Other plugins &
tools
Introduction
The advanced news plugin is used to publish news topics, which can be
shown into any CMSimple page by means of the CMSimple scripting
command.
Disclaimer :
No warranties
whatsoever, use at your own risk !
.
This plugin uses the following external modules:
- Javascript popup calendar from Dynarch.com
- Flatfile database from Luke Plant
- one of the by CMSimple supported external editors:
Some language settings
have been added during latest revisions, so please complete the
translation of this xx.php file...
Features
- Begin and end publishing date with
Javascript date-picker.
- News headline & full story.
- News status (including automatic status update)
- ready to publish
- published
- archived
- News item options
- display permanent in the newsbox
- make available in the RSS news feed
- News topics search function for the archived news topics
- RSS news feed (with advertising function)
- News topics administration backend, with integrated WYSIWYG
editor for the full story field.
- Uses a flat-file database, so there's less overhead in the
CMSimple content file
Requirements
:
- The CMSimple plugin
loader from SVARRER must be installed and operational !
- Apache / PHP
environment:
- Developed on : Apache/1.3.33
(Win32) / PHP/4.3.10
- Tested on : Apache/1.3.34 (Unix) PHP/5.0.4
mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2
mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7e-p1
- Beta tested on :
- Apache/df-exts 1.2 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d
AuthPG/1.3 / PHP/4.3.10
- Apache/2.0.55 (Win32) / PHP/5.0.4
- One of the external editors
Quick
install & go!
- If not already installed, download the Plugin-Loader from http://cmsimpleplugins.svarrer.dk/?Plugin_Loader
and install it according the easy instructions.
- Download the AdvancedNews.rar file and extract it to a
local folder on your computer, do not change the predefined folder
structure.
- Using your favorite FTP program, upload the folder
advancednews and it's content as a sub folder of the folder called plugins
(from the plugin loader installation) on your remote machine (web
server).
- Log
on
to CMSimple administration/edit mode and insert this line
on your chosen page.
#cmsimple
$output=shownewsbox();#
- Save these modifications. A news topics page
has been added to your site !
- Login as administrator and select AdvancedNews from the
available
CMSimple plugins. Now you can start creating you first news topic...
Installation
instructions
- Always make a full backup of your
current CMSimple installation.
- I can't be
held responsible for any data lost or what so ever !
- If not already installed, please download the Plugin-Loader
from http://cmsimpleplugins.svarrer.dk/?Plugin_Loader
and install it according the installation instructions.
- Download the Advancednews.rar file and extract it to a
local folder on your computer , please retain the predefined folder
structure.
- Upload the folder advancednews and it's content as a
sub folder of the folder called plugins (from the
plugin loader installation

- The picture below shows the advanced news plugin folder
structure

- folder permissions : please
see the picture below and check these minimum folder permissions for
the advancednews plugin.
General permissions
- all folder permissions chmod to 755
except
the RSS folder,
this must be set to chmod 777

Root folder
file permissions
- all files in the root of the advancednews folder chmod to 644
Config folder
: file permissions
Data folder :
file permissions
- news-xx.txt file permissions to 666

Language
folder : file permissions
- language files chmod to 666
- nl.php
- en.php
- de.php
- fr.php
- da.php
Remaining
folder file permissions
- all other files chmod to 644
The Advanced News plugin is installed now
Before you can use the Advanced News plugin, it's necessary
to
- make some configuration settings
- adjust some language settings
- integrate the newsbox in a CMSimple page
- create a news topics
Configuration
settings
The configuration settings of the Advanced Form plugin are integrated
into the CMSimple administrative module.
So, first login into this module.

Select Configuration settings from the
drop down list.

Make the necessary changes according your needs.

General advanced news
plugin settings
The settings listed below are required.
news
editor |
string |
here
you specify the name of the external editor (see
list
below) you want to be uses for editing the news full story field.
Supported editors are:
- HTMLarea 3.0 RC1 (htmlarea)
- FCKeditor 2.1.1 (fckeditor)
- TinyMCE 2.0RC3 (tinymce)
- Xinha nightly (xinha)
The editor has to be installed in the root folder of your CMSimple
website. |
news
items visible |
number |
this represents the latest x news topics visible in the
newsbox function. |
news archive records page |
number |
here you define the maximum number of news topics you
want to appear per page in the archive news topics list (topics paging) |
news archive layout |
string |
this option sets how the archived news topics are
displayed:
|
news admin records page |
number |
here you define the maximum number of news topics you
want to
appear per page in the administrative module news topics list (topics
paging) |
RSS feed settings
The settings below are only needed if you want to make some selected
news topics available in an RSS news feed (xml) file.
news rss encoding |
string |
this
is the
encoding you want to use in your news feed Some examples : ISO-8859-1,
UTF-8 |
news rss link |
string |
this is the
FQDN (fully qualified domain name) of your website |
news
rss logo |
string |
this is the
full path to the logo you want to be displayed in your RSS news feed. |
news
rss copyright |
string |
this is the
name of the news feed copyright holder. |
news
rss editor |
string |
this is the
e-mail address of the news feed editor |
Language
settings
Select Language settings
from the drop down list.

Make the necessary changes according your needs.

Localization settings
(all required settings)
news date format |
string |
the date
representation used in the archived news topics and in the advanced
news administration module:
- Date format
you want to use
- d : day (01 - 31)
- m : month (01 - 12)
- Y : 4 digit year
- Date separator
: these date separators can be used :
- . (dot)
- / (slash)
- – (hyphen)
For
more information about this syntax, see the date() function in the php manual
|
news display date format |
string |
the
date representation used in the newsbox
- %A : full day name; ie. Monday
- %B : full month name; ie. September
- %d : day number; ie. 25
- %Y : 4 digit year notation; ie. 2005
For more
information about this syntax, see the strftime() function in the php
manual |
news date locale |
string |
this
setting is used for the date translation in the proper language. It
seems that this setting is OS
Dependant:
- On Free
BSD
one has to use :
- for Danish locale language : "da_DK.ISO8859-1"
- for Belgian/Dutch : "nl_NL.ISO8859-1"
- for German : "de_DE.ISO8859-1"
- for French : “fr_FR.ISO8859-1”
- Looks like on your Linux server one has
to use :
- for Danish : "da_DK"
- for Belgian/Dutch : “nl_NL”
- for German : “de_DE”
- for French : “fr_FR”
- On MS
Windows servers one has to use:
- for Danish : "danish"
- for German : "german"
- for Dutch : "dutch"
- for French : “french”
|
RSS feed settings
The settings below are only needed if you want to make some selected
news topics available in an RSS news feed (xml) file.

news rss page |
string |
this is the
FQN (fully qualified
name) of the CMSimple newsbox page (the page where you
included
the #cmsimple $output=shownewsbox();# script)
example:
CMSimple_plugins:Latest_news
please remember :
- replace spaces with underscores in the page
names.
- CMSimple page names are CasE SenSiTiVE.
|
news rss enable |
boolean |
set to true
if you want a RSS news feed xml file be generated automatically. |
By
default, the Advanced News plugin automatically selects the language
file according your CMSimple selected language settings. Example: when
your CMSimple default language is set to German, the Advanced News
plugin language will also use the German plugin language file. If your
CMSimple selected language file isn't available for the plugin, then
the english language file is used. (If you want to add a new language
file, please just copy then en.php language file located in the
language folder of the advanced news plugin, rename the file xx.php
where xx represents your desired language.
Once
the new xx.php language file is available, you can start translating
the plugin language settings as described in the procedure above.
I would really appreciate if you send me the news language translation
file
(plugins[@]jat-at-home.be)
Back
to contents
News
topics administration
Select News items
from the drop down list.

- Default administrative view.

- News topics administrative
tasks.
- News topics filters (on news status)

By selecting one or more check boxes and applying the filter, you'll
get
an overview of news topics based on their current status.

Once selected, the news topic details screen is displayed.

Date |
date |
this is the news topic creation
date
(this field is read-only). You must use the date-picker to select the
date from. |
Start date |
date |
this
is the date from which the news topic needs to be published (this field
is read-only). You must use the date-picker to select the date from. |
End date |
date |
this
is the date until the news topic has to be published (this field is
read-only). You must use the date-picker to select the date from. |
News status |
number |
A news topic can have 3 different
values:
- Ready
to publish (normally on creation)
- Published
(when system date is in between the publishing start & end date)
- Archived (when the system date has
passed the end publishing date)
The news topic status is automatically updated, based on the criteria
as described above. |
Publish always |
boolean |
|
RSS feed |
boolean |
check this field if you want to
include the news topic in your site's
RSS feed. This RSS news feed XML file is generated on-the-fly, without
any administrator interaction. |
Title |
string |
this is the heading (title) of the
news topic |
Short
story |
string |
this is a brief description of the
news topic (headline) |
Full story |
string |
this
is the news topic's complete story. This field is a text area where you
can use the external WYSIWYG editor with all it's features. |
Select the appropriate news topic you want to modify

Once selected, the news topic details screen is displayed, and you can
start editing the news field values.
Select the appropriate news topic you want to modify

Once selected, the news topic details screen is displayed.
Select the news topic for which you want to change their status, then
press the change status button.

Select the new status from the drop down list

Then press the OK button to confirm the status changes.

Select the news topic for which you want to change their status, then
press the change status button.

Then press the change status button.

Now, confirm the deletion of the selected news topics by pressing the
Delete button.

Once the news topics are deleted, press the OK button to return to the
News topics administrative panel.

Usage
of news functions in CMSimple
The Advanced news plugin contains four public functions which can be
used in CMSimple:
- shownewsbox()
- showarchivednews()
- showadvancednewslink()
- rss_advertise()
Each function is called with the following syntax :
name_of_the_function('option1=value,option2=value,...[optionX=value]')
shownewsbox function
This function displays the latest (x) news topics in a CMSimple page
i.e. the (x) most recent news topics
The function can be called with three parameters:
shownewsbox('option1=value,option2=value,option3=value')
- id=
[optional] : the news
topic id you want to display
- alwayspublish=
[optional]
: true/false or 1/0 : also
include news topics marked as 'always
publish' (independent of the publishing date or status)
- showlatest=
[optional]:overrules the latest
x news items to display set in the plugin config module
- default= number as defined in the configuration settings
The CMSimple scripting syntax to be used :
#cmsimple
$output=shownewsbox('showlatest =5,alwayspublish=true');#

shownewsarchive function
This function displays the archived news topics
The function can be called with two parameters:
shownewsarchive('option1=value,option2=value')
- layout=
[optional] : shows the archived news topics in either table or advanced layout
- displaysearch=
[optional] : true/false; sets the
search options available or not
The CMSimple scripting syntax to be used :
#cmsimple
$output=shownewsarchive('layout=advanced,displaysearch=true');#

advancednewslink function
This function displays the news topics in the newsbox page which is
called from within the CMSimple template.
Pre-conditions :
a CMSimple page
including the script #cmsimple $output.=shownewsbox();#
must be present,
otherwise the news item details won't be displayed.
The function can be called with two parameters:
advancednewslink('option1=value,option2=value')
- newspage=
[required] : this is the page
name containing the shownewsbox() function
- replace spaces with
underscores in the page names.
- CMSimple page names
are CasE SenSiTiVE.
- use the FQN of the
CMSImple page: i.e. News:Latest_News
- alwayspublish=
[optional] : true/false or 1/0 ; includes news
topics marked with 'Always publish'
The CMSimplescripting syntax to be used :
<?php
advancednewslink('newspage=Latest_News,alwayspublish=true');?>

rss_advertise function
This function displays a graphical hyperlink to the newsfeed (XML) file.
The RSS newsfeed file generated by the advanced news plugin can be used
with the RSS reader plugin (SimpleRSS) which is developped by
http://www.cycronic.de/dev/cmsimple/
The function can be called with one parameters:
rss_advertise('option1=value')
- replace
[optional] : true/false or 1/0 ; when set
to true,
the scripting line will be replaced with the content generated by the
function
The CMSimplescripting syntax to be used :
#cmsimple $output.=rss_advertise('replace=true');#

Back to contents
Credits
Beta Testing
I'd like to thank the following persons who spend some of their free
evenings by testing this plugin:
- Erwin Grabler
- Thomas Petersen
- Gerd Xhonneux
- Sony Tricoire (supplied parts of the RSS feed code)
- Dagfinn Hamstad
Translators
- Danish: Thomas Petersen
- German: Erwin Grabler / Gerd Xhonneux
- French: Sony Tricoire / Gerd Xhonneux
- Norwegean : Dagfinn Hamstad
- Dutch: Jan Kanters
Other
plugins & tools
Please visit the sites listed below to download other available plugins
for CMSimple:
Back to
contents