script name: PHP-News
date:        2001-02-13
author:      Linda Pedersen aka kill-9
web site:     www.kill-9.dk
comments:    version 1.4

Welcome to PHP-News version 1.3.  PHP-news will let you store all the news for your web site on the database.  
From the admin side of PHP-News you may Add, delete and edit your news.
PHP-News 1.41 adds
	1. catagory support

PHP-News 1.4 adds
	1. added template support
	2. added picture upload link on the picture as well
	3. added file upload
	4. url's and email's automatically translated into links in news.
	5. added the ability to expire news.


version 1.30
1. added support for time offset.  so that user may display there time zone vs the servers time zone.
2. added support for viewing all the news.  Users may now see all news if when you have a limit set up.

version 1.20
1. background color for page.
2. Main font color. for larger text
3. Normal font color for the normal stuff.
4. Number of news entries to display to your users you may set a number or you may use all so that all of the news
   will be displayed.
5. You may chose to show the date the news was added. and or the time the news was added.   


For new installs (Note. if you have a previous version of php-news skip to the bottom)
Install:

Extract the zip file into your web directory.  Several sub directories will be created.
	1. Upload news.sql to your database.
		mysql -u your_login -p your_database_name < news.sql
		
		Note: you will be prompted for a password.
	2. Edit database.inc.php to reflect your login name , password and database name
		to mysql.
	3. If your server allows upload of files through php. (note if you don't know the
		 answer to this the best way to find out is to just try).
		 run the following command from your web directory.
		 chmod -777 upload
		 this will set the permissions that allow php to upload pictures and
		 files with your news.
	4. connect to the admin directory from your web server example
		http://www.yoursite.com/admin/
		php-catagories is where you will create new catagories.  Create a catagory before you add new news.
		Click on the link in titled php-news. this is the screen where you can
		insert update and delete your news.
	5. Once you have inserted some news. you may click on the links in the right
		hand side this will allow you to then update that news.  click on the 
		radio button next to that then click on the delete button to delete 
		the news.
		If you want your news to expire on a certain date supply an end date
		other wise leave that blank.
		
	6. run list_cat.php from the main directory this will give you a list of all the catagorys
		and show them as links to show_news.php
		for more info read using.txt
			
	6. run show_news.php from the main directory of your web server example.
	 	http://www.yoursite.com/show_news.php
		You man create new templates if you like read template_how to to learn
		how this is done. new templates must be in the templates directory
		and must also be added at the top of news.inc 
		example:
			$show_news_template="templates/your_template";
			
	7. The server time offset feature remains in news.inc this is if your server
		is in a direct time zone then you are and you would like your news
		to show up using your time instead of the server time and don't
		want to have to edit news date all the time.
		$time_offset="0"; 
		
		values should be +1 = + one hour
		or -2 for minus 2 hours.
	8. in news.inc you will find another setting 
		$show_news="5";
		This is the number of news entries you would like to see per page
		News showing comes with a previous and next buttons / links
	9. in news.inc you will find another setting 
		$date_format="d/m/Y";
		This is how you would like your dates displayed.
		
		d=day
		m=month
		Y= for digit year example 1999
		y= for a two digit year example 99
		H= hour
		i= minute
		s= second
		
	10. you will find a new setting in news.inc as of version 1.41 
		$default_news_cat="site news";	
		
		This is the default catagory for news in the event you dont pass it a catagory_id
		
		
		
NOTE: for more info please read using.txt		
		
		
		
				


for upgrades.
back up everything first because most of the old files for php-news will be over wrighten

Extract the zip file into your web directory.  Several sub directories will be created.
	1. Upload upgrades to your database.
		mysql -u your_login -p your_database_name < news.sql
		
		Note: you will be prompted for a password.
	2. Edit database.inc.php to reflect your login name , password and database name
		to mysql.
	3. If your server allows upload of files through php. (note if you don't know the
		 answer to this the best way to find out is to just try).
		 run the following command from your web directory.
		 chmod -777 upload
		 this will set the permissions that allow php to upload pictures and
		 files with your news.
	4. connect to the admin directory from your web server example
		http://www.yoursite.com/admin/
		Click on the link in titled php-news. this is the screen where you can
		insert update and delete your news.
	5. Once you have inserted some news. you may click on the links in the right
		hand side this will allow you to then update that news.  click on the 
		radio button next to that then click on the delete button to delete 
		the news.
		If you want your news to expire on a certain date supply an end date
		other wise leave that blank.
	6. run show_news.php from the main directory of your web server example.
	 	http://www.yoursite.com/show_news.php
		You man create new templates if you like read template_how to to learn
		how this is done. new templates must be in the templates directory
		and must also be added at the top of news.inc 
		example:
			$show_news_template="templates/your_template";
			
	7. The server time offset feature remains in news.inc this is if your server
		is in a direct time zone then you are and you would like your news
		to show up using your time instead of the server time and don't
		want to have to edit news date all the time.
		$time_offset="0"; 
		
		values should be +1 = + one hour
		or -2 for minus 2 hours.
	8. in news.inc you will find another setting 
		$show_news="5";
		This is the number of news entries you would like to see per page
		News showing comes with a previous and next buttons / links
	9. in news.inc you will find another setting 
		$date_format="d/m/Y";
		This is how you would like your dates displayed.
		
		d=day
		m=month
		Y= for digit year example 1999
		y= for a two digit year example 99
		H= hour
		i= minute
		s= second
		
		
		
Notes for all:  Read apache.txt to learn how to protect your admin directory with
 a password				 
		 
			


