PHP Classes

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

Recommend this page to a friend!
  Info   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 3,057 All time: 1,188 This week: 131Up
Version License PHP version Categories
newsscript 1.0GNU General Publi...4.0Databases, Content management
Description 

Author

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.

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
Picture of Andrew
Name: Andrew <contact>
Classes: 4 packages by
Country: United Kingdom
Age: ???
All time rank: 17810 in United Kingdom
Week rank: 78 Up3 in United Kingdom Up
Innovation award
Innovation award
Nominee: 1x

Details

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

  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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:3,057
This week:0
All time:1,188
This week:131Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:79%StarStarStarStar
Documentation:66%StarStarStarStar
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1390