Newsadmin Last updated 26.06.2006
English views: 20728
since 22.8.2003
[In English] [Suomeksi]

Newsadmin - Simple PHP news publishing system for web pages

Newsadmin - Simple PHP news publishing system for web pages

(C) 2004 AD Tuomas Airaksinen

1  Credits

For the glory of God (for being used at the homepage of our church :P), hacked by Tuomas Airaksinen.

2  Purpose

I hacked this little and relatively simple script for Jyväskylä Free Church, because there was a need for it. I didn't find any other script that would have filled this purpose nicely, because it was not meaningfull to have full-blown content-management system, but just a simple way for pastors to write short news articles. I wanted to release it for public because of its (enough) general implementation and the need that was apparent on many other pages as well.

2.1  Examples of usage

  • This script has been used for
    • Maintaining "current affairs" or "latest news"-column on a web site of church or any other organization

    • Personal web log on any private homepage.

3  Features

3.1  Demonstration - see it yourself working

3.2  Features listed

  • There can be several editors that can type and publish news. Afterwards, they can modify or delete their news.

  • There can be several different administrators that can add, delete and modify other editors and admins.

  • Editor has possibility to upload a picture related to news. If ImageMagick is present on the server, the script uses 'convert'-tool to resize it to wanted size.

  • It is easy to print news with print_news(num)-function. print_news also cuts long articles (maximum length configurable) and links to readarticle.php with which you can see whole article.
    • If you know HTML and a little PHP (okay, you ONLY need some common sense...) you can also make your own printing functions in printfunctions.php.

  • Gnu Gettext is used used to translate translate this into foreign languages. If you translate this application to your language, please send me .po file :) Translatable .po-files are in po/-directory and they are installed in locale/-directory. Read po/HOWTO-TRANSLATE.txt

  • Simple news archive page to crawl the past.

  • You can process articles trough parsewiki if you want to use its formatting features (configuration variable). This requires perl to be installed. Doesn't work if php is in safe mode (shell_exec doesn't work then). See to have an idea how it works when enabled.

  • And that's not all! In addition there is:
    • Calendar script by ikemcg with which you can edit events. One week onwards can be printed on your web page with print_thisweek() from functions.php;. Login to calendar with same usernames&passwords as in newsadmin.

4  How to install and use it

First, you better know what is an SQL server (MySQL). It is also nice if you know what is PHP and HTML and know where to put the files to make them work.

4.1  Installation

  1. Install (or ask your admin to install) required programs on server (Apache, PHP4, MySQL, ImageMagick). Apache must have PHP4 support enabled an PHP4 must have support for MySQL and gettext. If gettext support doesn't exists, you can use only english language.

  2. Download newsadmin from (downloads are in the end of page)

  3. Unpack the package and modify newsadmin-config.php to fullfill your purposes.

  4. Put php files into your web directory (for example /public_html/).

  5. Make sure a directory "newspics" exists on server and that the web server has permission to write in it.

  6. Create tables on MySQL-server by going to http://yoursite/yourwebdir/newsadmin-createtables.php.

  7. Go to http://yoursite/yourwebdir/newsadmin.php. Log in using username admin and password admin.

  8. Create necessary editors and administrators using newsadmin.php.

  9. Write some news articles

  10. Check out your articles in http://yoursite/yourwebdir/archive.php and http://yoursite/yourwebdir/index.php

  11. Go ahead in calendar/, login with any username & password you have created, and add some events for next week.

  12. Go again to http://yoursite/yourwebdir/index.php and see them there.

  13. Edit your main page to require newsadmin-functions.php and make function call print_news(num) [where num is number of news items to show] there to show news topics. You can see the example in index.php shipped within the package.

  14. Teach the editors how to use newsadmin.php.

5  Translating (using gettext)

  • Read HOWTO-TRANSLATE.txt in po/ directory (comes with the package).

6  Technical support

6.1  Security

If you find bugs or security holes, let me know (email me). Or even better: fix them and send me a patch or fixed version.

6.2  Christian churches

If you represent some christian church, I'm may be somewhat willing to help you getting started. Don't send stupid questions, though. And it depends very much about the situation if I'm willing at all.

6.3  All other

No (free) support at all. Don't email me stupid questions. There exists a forum for this script on my web page, you may send your questions there. If I'm in good mood I may try to answer . <>.
And of course: anyone can pay me and I'll happily do anything you want...

7  Licence

This is free software and is licenced under GNU General Public Licence (GPL). Read file COPYING shipped within the package.

File translated from TEX by TTH, version 3.52.
On 4 Feb 2004, 22:06.
Rate my script!
Very Good


  • newsadmin-1.1.tar.gz

    See also photogallery php script (GPL)

    I publish open access post-print version of all my papers.