Note for users of versions <2.20:
Starting with 2.20 a new userlevel for admins (superadmin) is available. Critical actions (e.g. shutdown of SimpNews) only can be performed by admins with this level. If admin interface or whole script is being shutdown, admins with this level still will be able to login. They also will be able to login, even if max. number of allowed admin logins has been reached. 'Cause of this, you should assign this level to at least one admin after upgrading.
We recommend only to have one admin with this level, so performing critical actions will not result in a "collision".

Installation

Important installation note: the database you define in config.php must still exist. The install script does not create the database for security reasons.
Note for users of PHP4 <= 4.0.4: Please uncomment function is_null at end of functions.php.
  1. Copy config.dist.php to config.php and edit it to fit your needs (only recommended for people with PHP knowledge) or call admin/mkconfig.php to generate a config.php (if you're using PHP version >= 4.2.0, you have to set $new_global_handling=true; in mkconfig.php).
    Note: You can have multiple instances of SimpNews in the same database. Just set tableprefix in config.php to different values for each installation. Do this before calling admin/install.php.
    To switch default language to English set the approriate values in config.php:
    $default_lang = "en"; for user view
    $admin_lang = "en"; for admin interface

    On upgrading an existing installation, ensure you put all new vars of the new version in your existing config.php !!
  2. Upload all files (.php, inc. ...) to your webhoster. Please maintain subdirectory structure.
    Important: Use binary mode in ftp to transfer files in /applet, /gfx /admin/gfx and /sfx !!!!
    1. 1st time installation:
      Now you can call
      http://your.host.com/installdir/admin/install.php
      to create the tables and the 1st admin user
    2. Upgrade:
      THIS ARCHIVE ONLY CONTAINS DB UPDATE SCRIPTS FOR V2.25+. TO UPDATE OLDER VERSION PLEASE DONWLOAD UPDATE PACKAGE TO 2.25 FROM WEBSITE !!!
      Please replace all files (.php, .inc ...) on your server !!
      This way you determine which script you need:
      • Take the actually installed versionnumber (e.g. 1.10).
      • Remove the point in the versionnumber (in our example this results in 110).
        Now you have the upgrade version.
      • After this you need to sequentially use all upgrade scripts from this version to the actual version.
        For our example the actual version should be 1.22 (short 122). Use upgrade_110_to_111.php than upgrade_111_to_112.php and so on until you reach upgrade_121_to_122.php
        If one script in the sequence does not exists, for this upgrade step no database changes were necessary. In this case just continue with the next one in the sequence.
        Upgrade scripts reside in subdir admin
  3. After installation remove admin/mkconfig.php, admin/install.php, admin/upgrade_* and admin/fill_* and set filemode for config.php to disable PHP from writing to this file (on most server configurations this will be chmod 644).
  4. Now you can enter the admininterface by calling
    http://your.host.com/installdir/admin/index.php
    and login using the adminuser created during the installprogress.

Calling different user views

URL parameters for scripts

Parametername Valid for Description default Value1
language
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • news5.php
  • eventcal.php
  • events.php
  • evlist2.php
  • newsframe.php
  • subscription.php
  • news_arc.php
  • news4_arc.php
  • evlist3.php
  • masssub.php
  • nlmaint.php
  • rss_news.php
  • wap_catlist.php
  • wap_ev_search.php
  • wap_short_events.php
  • wap_short_events2.php
  • wap_short_announce.php
  • wap_short_news.php
  • wap_catlist2.php
Language to use for interface
(Valid language settings are those, for which a language file is available in language subdir.
The value to be used is the part of the filename between '_' and '.' -> for lang_en.php the value is "en")
$default_lang from config.php
layout
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • news5.php
  • eventcal.php
  • events.php
  • evlist2.php
  • newsframe.php
  • subscription.php
  • news_arc.php
  • news4_arc.php
  • evlist3.php
  • masssub.php
  • nlmaint.php
  • rss_news.php
  • wap_catlist.php
  • wap_ev_search.php
  • wap_short_events.php
  • wap_short_events2.php
  • wap_short_announce.php
  • wap_short_news.php
  • wap_catlist2.php
Layout to use for interface Layout for the provided language marked as default in admin interface
category
  • news.php
  • news4.php
  • news5.php
  • eventcal.php
  • events.php
  • subscription.php
  • news_arc.php
  • news4_arc.php
  • evlist3.php
  • rss_news.php
  • wap_short_events.php
  • wap_short_events2.php
  • wap_short_announce.php
  • wap_short_news.php
Category to display in list
(-1=display all categories)
For news_arc.php and news4_arc.php selected category has to be marked as archiv in admin interface.
Category 0 (general)
sortorder
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • news5.php
  • events.php
  • evlist2.php
  • newsframe.php
  • evlist3.php
  • rss_news.php
  • wap_short_events.php
  • wap_short_events2.php
  • wap_short_announce.php
  • wap_short_news.php
Sorting order for entries
(0=order by date descending, 1=order by date ascending, 2=order by heading ascending, 3=order by heading descending)
Order by date descending

news5.php/evlist2.php: order by date ascending
limitdays
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • evlist3.php
  • rss_news.php
  • wap_short_events.php
  • wap_short_events2.php
  • wap_short_announce.php
  • wap_short_news.php
Limits list to display only provided number of days.
(Overrides setting in database)
 
startdate
Format: YYYY-MM-DD
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • news5.php
  • events.php
  • evlist2.php
  • evlist3.php
  • rss_news.php
Start listing at given date  
enddate
Format: YYYY-MM-DD
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • news5.php
  • events.php
  • evlist2.php
  • evlist3.php
  • rss_news.php
Stop listing at given date
(overrides any limiting by days
 
maxannounce
  • news.php
  • news2.php
  • news3.php
  • news4.php
  • news5.php
  • events.php
  • evlist2.php
  • evlist3.php
Only display given number of announcements.
(for scripts separating by category: limit number of announcements per category)
 
maxentries
  • news.php
  • news3.php
  • news4.php
  • rss_news.php
  • wap_short_announce.php
  • wap_short_events.php
  • wap_short_events2.php
  • wap_short_news.php
Only display given number of entries.  
cats
  • masssub.php
Liste of categories to be included in form
(separated by colon, e.g. cats=1,2,3)
 
mode
  • wap_catlist.php
Define to which script category entries should link.
possible values:
  • news = wap_short_news.php
  • events = wap_short_events.php
  • events2 = wap_short_events2.php
  • announce = wap_short_announce.php
  • evsearch = wap_ev_search.php
news
searchtype
  • wap_ev_search.php
Define which searching mode to use.
possible values:
  • text = search by text
  • normal = search by category and date
mode defined within admin interface
sortorder
  • news_arc.php
  • news4_arc.php
Define which sortorder to use.
possible values:
  • 0 = defined display position
  • 10 = heading ascending
  • 11 = heading descending
  • 20 = date ascending
  • 21 = date descending
0

1 default Value used if parameter is not supplied

URL-Parameters have to be provided as follows:

Including lists in your own pages

Please note, you only can include the lists mentioned in this section in your own pages. The other lists are designed to be called directly and can't be included in you own pages.

Best way to get the code to include the appropriate list in your page is to use the generator for the code snippet provided in admin interface.
Note: The code snippets provided in this documentation are PHP code

Hotnews list

  1. Use
    include('<pathtosimpnews>/hotnews.php');
    or
    include('<pathtosimpnews>/hotnews2.php');
    or
    include('<pathtosimpnews>/hotnews4.php');
    or
    include('<pathtosimpnews>/hotnews5.php');
    or
    include('<pathtosimpnews>/hotnews6.php');
    or
    include('<pathtosimpnews>/hotnews7.php');
    or
    include('<pathtosimpnews>/hotnews8.php');
    or
    include('<pathtosimpnews>/hotnews9.php');
    to include the table in your page.
  2. If you want to enable last visit tracking by cookie (and marking new news since last visit), use
    include('<pathtosimpnews>/newscookie.php');
    to include cookiehandling in your existing page.
    This file has to be included before any HTTP body content is sent by PHP.
These versions do not use the header and footer data defined in the admin interface, nor the stylesheet, nor metadata.php, nor link colors. These scripts are designed to be included in an existing page (e.g. if you want to have the latest 3 entries on your main page).
hotnews.php works like news.php, hotnews2.php like news2.php, hotnews4.php like news4.php and hotnews5.php like news5.php.
hotnews6/7/8/9 display the amount of entries (per category) defined in admin interface for the categories selected in admin interface.

List of current events

  1. Use
    include('<pathtosimpnews>/currentevents.php');
    to include the table in your page.
  2. If you want to enable last visit tracking by cookie (and marking new news since last visit), use
    include('<pathtosimpnews>/newscookie.php');
    to include cookiehandling in your existing page.
    This file has to be included before any HTTP body content is sent by PHP.
This version does not use the header and footer data defined in the admin interface, nor the stylesheet, nor metadata.php, nor link colors. This script is designed to be included in an existing page.

News notification icon

without lastvisit cookie

  1. Use
    include('<pathtosimpnews>/newsnotify.php');
    to include the table in your page.

with last visit cookie

  1. Use
    include('<pathtosimpnews>/newsnotify2.php');
    to include the table in your page.
  2. If you want to enable last visit tracking by cookie (and marking new news since last visit), use
    include('<pathtosimpnews>/newscookie.php');
    to include cookiehandling in your existing page.
    This file has to be included before any HTTP body content is sent by PHP.

Event calendar

  1. Use
    include('<pathtosimpnews>/eventcal2.php');
    to include the table in your page.
  2. If you want to enable last visit tracking by cookie (and marking new news since last visit), use
    include('<pathtosimpnews>/newscookie.php');
    to include cookiehandling in your existing page.
    This file has to be included before any HTTP body content is sent by PHP.

Ticker Java Applets

There are 6 different kinds of ticker avail: Method for inclusion is the same for all 6. In the following instruction just replace <script> with the name of the script you want to include.
  1. Use
    include('<pathtosimpnews>/<script>');
    to include the applet in your page.
  2. If you want to enable last visit tracking by cookie (and marking new news since last visit), use
    include('<pathtosimpnews>/newscookie.php');
    to include cookiehandling in your existing page.
    This file has to be included before any HTTP body content is sent by PHP.

JavaScript newsfader/newsscroller

  1. Use
    include('<pathtosimpnews>/js_newsfader.php');
    or
    include('<pathtosimpnews>/js_newsscroller.php');
    to include the fader/scroller in your page.
  2. If you want to enable last visit tracking by cookie (and marking new news since last visit), use
    include('<pathtosimpnews>/newscookie.php');
    to include cookiehandling in your existing page.
    This file has to be included before any HTTP body content is sent by PHP.

catlist_inc.php

  1. Use
    include('<pathtosimpnews>/catlist_inc.php');
    to include the fader/scroller in your page.
Note: Name of frame, news will occur in, is defined by $linktarget at top of script.

subscribe/unsubscribe newsletter

using forms generated by scripts

subscribe/unsubscribe single newsletter
http://your.host.com/installdir/subscription.php?params
If param category is provided, form only provides subscription/unsubscription for defined category.
If param is not provided, user can selected category to subscribe/unsubscribe from a dropdown list.
subscribe multiple newsletter with 1 click
http://your.host.com/installdir/masssub.php?params
User gets a list of all categories available for newsletter. He/she can check the desired cats and subscribe them with submitting just 1 form.
maintain subscribed newsletter
http://your.host.com/installdir/nlmaint.php?params
User has to enter his email. After this he will see a list of all subscribed (and confirmed) newsletter. From this list he/she can select the newsletter(s) to unsubscribe.

Include subscription form for newsletter in own pages

form to subscribe/unsubscribe single newsletter
Example code for using external form to subscribe to news:
Please replace {desired category} with the news category to use for this newsletter (0=subscribe for all available categories).
<!-- --------- Start of subscription code --------- -->
<table width="80%" align="center">
<form method="post" action="/simpnews/subscription.php">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="layout" value="1">
<input type="hidden" name="mode" value="subscribe">
<tr><td align="right" width="30%">Email:</td>
<td><input type="text" name="email" size="40" maxlength="240"></td></tr>
<tr><td align="right" valign="top">Email type:</td><td>
<input type="radio" name="emailtype" value="0" checked> HTML<br>
<input type="radio" name="emailtype" value="1"> plain text</td></tr>
<input type="hidden" name="newscat" value="{desired category}">
<td align="center" colspan="2"><input type="submit" value="subscribe">
</td></tr></form></table>
<!-- --------- End of subscription code --------- -->

Example code for using external form to unsubscribe:
<!-- --------- Start of unsubscription code --------- -->
<table width="80%" align="center">
<form method="post" action="/simpnews/subscription.php">
<input type="hidden" name="lang" value="en">
<input type="hidden" name="layout" value="1">
<input type="hidden" name="mode" value="unsubscribe">
<tr><td align="right" width="30%">Email:</td>
<td><input type="text" name="email" size="40" maxlength="240"></td></tr>
<input type="hidden" name="newscat" value="{desired category}">
<td align="center" colspan="2"><input type="submit" value="unsubscribe">
</td></tr></form></table>
<!-- --------- End of unsubscription code --------- -->

form to subscribe multiple newsletter with 1 click
Please generate the HMTL code for this form using the function in admin interface.

Admin interface

Note concerning attachements

If you switch $attach_in_fs from true to false or vice versa and there are existing attachements, this will result in database inconsitency. Please first delete all attachements in the admin interface, than switch and upload the attachements again.

Note on field "remark put in emails" in layout:

Please include "{unsubscribeurl}" somewhere in your text (without the quotes). This will be replaced by the appropriate URL to unsubscribe for the recipient on sending mails.

Texts

You can use different placeholders for the different texts. These placeholders on runtime will be replaced by the actual, asociated values.
The following list shows the placeholders available for the various texts and what values will be used to replace.

Authentitication of admin users

There are 3 ways to get authentication for admin users.
  1. Using the internal authentication method. This is based on the data in the admin table and uses cookies for session handling.
  2. Using the internal authentication method. Sessionid sent by get and post requests.
  3. Using authentication by webserver via .htaccess

Method #1

You have to set $enable_htaccess and $sessid_url in config.php to false.
In this case please ensure the following settings in config.php are correct: This method uses username and password stored in the database and because of this you can change the password within the admin interface.

Method #2

You have to set $enable_htaccess to false and $sessid_url to true in config.php.
This method uses no cookie for storing the sessionid, but instead sends the sessionid in every get and post request. Because of this, everybody who can look on your screen also can see your sessionid.
We think this is not really secure and recommend to use method 1 or 3. But you decide yourself.
Please ensure $sesscookiename is set to an value not used in an other way by SimpNews (best would be to let the default name, because this ensures avoiding conflicts with other HTTP-variables SimpNews uses).

This method uses username and password stored in the database and because of this you can change the password within the admin interface.

Method #3

You have to set $enable_htaccess to true in config.php.
For every user set up in the admin interface, you also have to set up an user in .htpasswd. Username in database and .htpasswd must be the same, so the program can do assignment of external and internal userdefinition (Note: usernames are not case sensitiv in SimpNews, but may be in .htaccess).
Because of security reasons the admin interface does not update .htpasswd. So if you use this kind of authentication changes of the password in the admin interface will not have any effects. Also if you generate a new user in the admin interface be sure to also add this user to .htpasswd. You still have to provide a password while creating a new user, so no security whole appears if you change from Method 3 to Method 1 or 2.
Remark: Using this method the internal login and failed login tracking is not available. Also the logout function does not work.

Changing storing mode for attachements

Important: Don't just change storing mode for attachements in config.php ($attach_in_fs), if you allready have used attachements in SimpNews. Before you change storing type from database to filesystem (and vice versa), use the function transfer files to database or transfer files to filesystem in manage files in admin interface. This will transfer binary data of attachements from database to filesystem (or vice versa) and update database entries. After this and before uploading new files, you can switch the storing mode in config.php

Tested browsers and systems

For actual list see our website

Licence

This program is Freeware. You are allowed to use this for free in non commercial and commercial environments. You are not allowed to do any changes to the scripts, except of the following files: If you are using this program on your website, please enter your site as a reference on our homepage.

If you are using this program in a commercial environment, it would be very kind to provide our work with a little donation.

Newest version can be found at http://www.boesch-it.de

Uses:

© 2002-2005 Bösch IT-Consulting
Last updated: 03/02/2005