PHPNews - Readme

Table of contents

  1. What features are there in PHPNews?
  2. Requirements for PHPNews
  3. Installing PHPNews
  4. How to include News on your Homepage?
  5. How to edit your Templates?
  6. Including the Archives
  7. Including the Headlines
  8. Splitting Comments into pages
  9. How to create RSS News Feeds
  10. Credits

What features are there in PHPNews?:

It is our aim to make PHPNews the most comprehensive News Management system on the market. So far our features include:

To the topTo the top


Requirements for PHPNews:

In order to run PHPNews, you will need a web server with PHP 4.1.0 or higher and a MySQL Database. If you are unsure about your server, please contact your Host Administrator.

To the topTo the top


Installing PHPNews:

  1. Firstly, extract your files to a folder on your computer from phpnews_1-2-6.zip (Use a programs extract utility to keep the folder structure).
  2. Now upload the files to a directory on your website (eg. mysite.com/phpnews/).
  3. `
  4. Now CHMOD this directory 775 or 777 during the installation to enable PHPNews to write a settings.php file. Change it back after the install.
  5. Now, execute install.php which you uploaded into the directory you just created. Follow the Step by Step instructions.
  6. Go to the index.php file in your directory (ie. mysite.com/phpnews/index.php). You will be prompted to enter a Username and Password. Enter the username and password you chose in the installation process. (Both the username and password are case sensitive)
  7. Now you're ready to edit and try out PHPNews' different features and post news articles! Don't forget to register your PHPNews install as then the PHPNews website will then link to your site!

To the topTo the top


How to include News on your Homepage:

Now you're ready to make the news appear on a page of your site. Save a page on your website as *.php (example, index.php). Then place the following code in your PHP file where you want the news to appear:

PHP Code:

<?php
include("path/to/phpnews/news.php");
?>

The above is an example. The text between the two quotation marks is the path to your news.php file (which should be stored in a folder like phpnews). If you didn't call your folder phpnews, you will have to edit the name of the folder above.

Now you should have your news which you posted in your admin center appear on your website! Now you're ready to edit your news templates!

To the topTo the top


How to edit your Templates:

  1. This can be done one of two ways. One, open up the files with "_temp.php" in their filename. Inside, is the code that will be printed which each news post.
  2. Secondly, you can go to the "Modify the Templates" section of PHPNews and do your editing that way. There is also help available there that explains the variables (Words with $ before them).

In PHPNews you can edit every aspect of how your news is displayed.

To the topTo the top


Including the Archives

PHPNews automatically sorts all news into Archives. You can display your Archives 1 of 2 different ways. You can either order your News by Month and Year, or by The Catgeory it was added to (News Categories are an optional feature which can be enabled in your Settings). Including your Archives is done just like your News (You cannot display your News and Archives on the same page)

PHP Code:

<?php
include("path/to/phpnews/archive.php");
?>

Now, you need to place the following piece of PHP code where you want the Archives displayed. To display Archives sorted by Month And Year (default) use this code:

PHP Code:

<?php
byMonth();
?>

To display your Archives sorted by News Categories use the following piece of Code:

PHP Code:

<?php
byCat();
?>

To the topTo the top


Including the Headlines

By including the file headlines.php, you can show the recent news posts as headlines. In any file place:

PHP Code:

<?php
include("path/to/phpnews/headlines.php");
?>

You can edit the appearance of your headlines in the "Modify your Templates" section of PHPNews, and edit the number to show in the "Modify your Settings" section of PHPNews.

You can also show your Headlines by Category. An example would be:

PHP Code:

<?php
$_GET['headcat'] = 1;
include("path/to/phpnews/headlines.php");
?>

Replace the number 1 with the ID number of the Category you wish to show.

You can also include headlines by the number of views of the articles. Just use the following code:

PHP Code:

<?php
$_GET['headviews'] = 1;
$_GET['headorder'] = 'up';
include("path/to/phpnews/headlines.php");
?>

By specifying $_GET['headorder'] as "up" the articles will be shown in ascending order. If you dont specify they will be shown in descending order.

To the topTo the top


Splitting Comments into Pages

If you want to split your comments up into pages, first enable it in the settings. Then go to the Templates section of PHPNews and go to the Comments Templates. Read the help to get the variable to use in your template.

To the topTo the top


Creating RSS News Feeds

PHPNews conists of two ways to create the RSS News Feeds, which can be enabled in the PHPNews Settings.

  1. The manual creation. A new RSS file will be created everytime you click "Manual RSS Feed Creation" in the Advanced features section of the Admin center.
  2. Otherwise the RSS File will be created everytime a news article is posted. This will keep your RSS file up to date constantly.

The RSS File will be named after your Website Name you enter in your Settings.

To the topTo the top


Credits:

PHPNews was first started as a freeware project by Pierce Ward (Big P) in October 2002.

Big P - Administrator/Lead Programmer
Json - Lead Programmer
Christoph Berg - Web Designer/Lead Programmer

To the topTo the top

Copyright © 2003 - 2005 PHPNews