PHP Classes
elePHPant
Icontem

News Script: Manage and publish news stored in a MySQL database

Recommend this page to a friend!

  Author Author  
Name: Andrew <contact>
Classes: 4 packages by
Country: United Kingdom United Kingdom
Age: ???
All time rank: 17410 in United Kingdom United Kingdom
Week rank: 241 Down6 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to manage and publish news articles stored in a MySQL database.

It can add, edit and delete articles from a MySQL database table.

The class can also display individual news articles using an external template script.

Details
{startverticalbanner}
News System		(PHP/MySQL)	(www.surneo.com)
-----------

A Simple News system Class using PHP4 and MySQL.

Notice there isn't any security on the admin pages, that is they should not be left vewable on your
web server because anyone could add/remove atricles, you should password protect the directory!
maybe in future I will add a secure login section, althought you could easily combine this script
with the simple login script on my site to add a little security :-)



Installation
------------

You need to setup the following MySQL Table.

SQL Table:

CREATE TABLE `newstbl` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`author` VARCHAR( 30 ) NOT NULL ,
`content` TEXT NOT NULL ,
`date` DATE NOT NULL 
) ENGINE = MYISAM ;

You can view the installDatabase.php page to create this database for you.
You must edit config.php first!



Configuration
--------------

config.php:

This file contains all the settings you need to set, such as MySQL settings!

DisplayTemplate:

This can be edited to suit your needs, it's the layout for the news articles.
You can edit this file and the CSS file to make each article display as you wish.

Usage
-----

test.php	: An example showing howto display the items in your database.

Admin
-----

manageNews.php	: This page will show all items with the ability to delete or edit each item

addNewsForm.php	: This page will allow you to add new items to your database

  Classes of Andrew  >  News Script  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: News Script
Base name: newsscript
Description: Manage and publish news stored in a MySQL database
Version: 1.0
PHP version: 4.0
License: GNU General Public License (GPL)
All time users: 2770 users
All time rank: 1324
Week users: 3 users
Week rank: 263 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
Group folder image Databases Database management, accessing and searching View top rated classes
Group folder image Content management Components and tools to manage content View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
August 2008
Number 10
Many sites have a news section or a blog on which are published the latest news about the site.

This class provides a simple but effective solution to publish simple news articles that can be used in any PHP site.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (80%) Good (85%) Sufficient (70%) Sufficient (70%) - - Sufficient (62%) 964
Month: Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Files folder imageadmin (4 files)
Files folder imagetemplates (1 file)
Accessible without login Plain text file config.php Conf. Configuration file
Accessible without login Plain text file installDatabase.php Aux. Installation file
Plain text file NewsScript.php Class Main class file
Accessible without login Plain text file readme.txt Doc. Readme Info
Accessible without login Plain text file style.css Data Style sheet
Accessible without login Plain text file test.php Example Test usage file

  Files folder image Files  /  admin  
File Role Description
  Accessible without login Plain text file addNewsForm.php Appl. Add a News Item
  Accessible without login Plain text file deleteNews.php Appl. Deletes news items
  Accessible without login Plain text file editNewsForm.php Appl. Edits News Items
  Accessible without login Plain text file manageNews.php Appl. Used to edit/delete articles.

  Files folder image Files  /  templates  
File Role Description
  Accessible without login Plain text file DisplayTemplate.php Aux. Template file

Install with Composer Install with Composer - Download Download all files: newsscript.tar.gz newsscript.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.