Simple Articles Version 2.0

Welcome

Welcome and congratulations for downloading Simple Articles from kneuf!! Simple Articles is simple article lister. It is not clogged down with the advanced stuff, just the basics. There are many things that would probably be added in the next release, planned things are here. Right now, there is no template support. You have to modify the actually .php files if you want to change any of the HTML (it should be somewhat easy).

About

Simple Articles is a simple article manager. You can add, edit, and delete articles. You can also add, edit, and delete categories. You can view the amount of hits (not unique hits, these are all views) each article receives and whether or not they are public. Simple Articles is released under the GPL GNU license. It can be viewed here: gnu.txt.

Contents of ReadMe

Use the links below to skip through the ReadMe.
  1. Welcome
  2. About
  3. Contents of ReadMe
  4. Script Requirements
  5. Included Files
  6. Installation
  7. Upgrading
  8. Done
  9. Using Simple Articles
  10. Some Notes

Script Requirements

In order to use Simple Articles:

Included Files

The following files should have been included with this distribution.

Installation

Installing Simple Articles is very easy. There are three things you have to do in order to successfully operate this script.
  1. Edit Files
  2. Upload
  3. Configure Database
  4. Finishing Up
  1. Edit Files

    You need to edit these files in order to use Simple Articles:
    1. /.htaccess
    2. /index.php
    3. /view.php
    4. /admin/index.php
    5. /admin/cat.php
    6. /inc/config.inc.php
    Now to install :)
    1. Open up the included .htaccess file. It should contain something like this:

      This is fine if you are installing this to the directory articles. This also assumes that articles in in the root directory, example to access on the WWW, visiting http://somesite.com/articles/. If you installing to a different directory, replace it with /articles/. Example, say we installed to http://somesite.com/more/content/articles/, the .htaccess file would look like this:

      Notice RewriteBase changed from /articles/ to /more/content/articles/. This is all that needs to be done to this file.
    2. Open up index.php, and change the 2nd line (if needed; it shouldn't need changing). 2nd line:

      Using the above configuration, this will require the config.inc.php to be there. This assumes that you have kept the original directory structure. This is it for this file.
    3. Open view.php and follow the instructions for the index.php file above.
    4. Open up /admin/index.php and notice that the require_once("..."); is now the third line, the session_start(); is the second line. Leave the session_start(); where it is to avoid any troubles, it is there so we can have a simple login session. The require_once("..."); code has changed. Instead of being like the other:

      It is now:

      Again, this is fine as long as the directory structure remains the same. What this does is it goes down a level in the directory hierarchy and then goes into the inc folder then finally opens up the config.inc.php file. Thats all that is need for this file.
    5. Open up /admin/cat.php, and follow the instructions for the admin/index.php file, above.
    6. Open up /inc/config.inc.php, and fill in required details.
      Here are the first 10 lines, the ones you may have to edit. Nothing else should be changed unless you know what you are doing.

      • $cfg['db_uname'] = "user"; //the database username
        This is the databases username, used to connect.
      • $cfg['db_paswd'] = "pass"; //the database password
        This is the databases password, used to connect.
      • $cfg['db_host'] = "localhost"; //the database host, usually localhost
        This is the databases host, used to connect. Default is localhost (if mysql server is on same machine)
      • $cfg['db_dbase'] = "simple_articles"; //the database name
        This is the database which holds the tables used for Simple Articles. You should make a new database for Simple Articles to use, if at all possible.
      • $cfg['main_max'] = "5"; //the maximum results to be displayed on the main page....
        This is the maximum number of listing to display when a user reach the /index.php page and doesn't select a category.
      • $cfg['site_title'] = "Simple Articles"; //the site title, displayed in the browsers title bar
        This is the title to use with Simple Articles, that is displayed as the title of the page and in various other locations.
      • $cfg['latest_url'] = "http://kneuf.com/script/simplearticlesversion.txt"; //the path to the file on the kneuf.com server that contains the latest version
        This is used to get the latest version information from the kneuf.com server. It should be left as is. If there is a problem: i.e., nothing is displayed or an error occurs, try visiting yourself to see if the server is up, and if it is try checking the Simple Articles page or look at the news for a new URL to use.
      • $cfg['admin_username'] = "test"; //the admins username (must be less than 100 chars)
        This is the username used to login in the admin pages that allow you to manage your articles. They must be less than 100 chars or else it will not work.
      • $cfg['admin_password'] = "testing"; //the admins password (must be less than 100 chars)
        This is the password used to login in the admin pages. Must be less than 100 chars.

  2. Upload

    Now just FTP the files up in the same hierarchy as they came in. You do not have to FTP up: If you do not know how to FTP, search on Google or consult your FTP Client Documentation. Don't have a FTP client? I recommend SmartFTP.
  3. Configure Database

    To configure the database for use with Simple Articles, you can visit the easy to use script at /install.php. Just enter in the information (it asks for the database connect information, password, username, etc. just fill in the same details as you did in the config.inc.php file). Or you can use the included .sql file in /docs/db.sql. Just use your favourite method, e.g., you can use phpMyAdmin.
  4. Finishing Up

    To finish the install, just delete these files (if they are there):
    • /install.php
    • /upgrade.php

Upgrading

Reminder: Make a backup of your database and all other files before proceeded, should anything go wrong.
  1. First, delete all files from previous installations. Do not touch the database!
  2. If you are upgrading from a previous version, just follow the instructions in the Installation Section, but skip the mySQL part (as you already have the mysql tables set up). Note: If you modified the previous versions, the modifications will be lost. You should be able modify this release more easily however.
  3. Now we have to modify the mysql database a little bit. Make sure there is a backup!! To make it easy, just run /upgrade.php. If you want to do it manually, (note, to change the database you need to be able to alter database tables) just run the /docs/upgrade.sql file (if you run the upgrade.sql file you will have to change all the times in the articles table (sa_page) to their correct time. It is better to use the upgrade.php file instead.
  4. That's it, it should be fine to use :)

Done

When you have finished installing or upgrading, make sure that the /install.php file and /upgrade.php file are deleted.

Using Simple Articles

  1. Basics
  2. Managing Simple Articles
  1. Basics

    After you have installed Simple Articles, or upgraded it, you are ready to use it. To manage your articles, point your browser to: http://your_site.com/articles/admin/ or whatever directory you installed it. The admin scripts are in the admin directory. To display Articles, go to http://some_site.com/articles/.
  2. Managing Simple Articles

    To add/edit/delete Articles, you need to use the Admin scripts located in the admin directory. In there you will find:
    index.php is the main script used to manage your articles. From there you can Add, Edit, and Delete, articles. This is also where you Login, Logout, and Retrieve Latest Version.

    Adding a New Article
    To add a new articles, from the menu at the top click on "Add Article". This brings you to the Add an Article page. Fill in the fields and click on "Add" at the bottom. To help, the "author" field is already filled in with the admins username. The "Title" field is the name of the Article. If the Article is "Public", meaning it is viewable to everybody, then set "Public" to Yes, if you want make it but don't want to display it right now, select "No". The "Description" field is self explanatory, just enter in a brief description of your article. The "Article" field is where you type your article. HTML is supported, however BBCode is not. To create a new page in the article, insert [new_page] in the place you want to have a new page. The "Category" selection is automatically filled in with data from the Category Script. If you want to automatically convert all new lines (\n) in your description and article to an HTML <br>, select "Convert Newlines(\n) to HTML Breaks?" and set it to "Yes", if you do not want to do this, select "No". And that is it for this page.

    Editing An Existing Article
    To edit an existing article, click on the "View All" link in the menu. This brings up a list of all the articles, whether they are public or not, and displays them. Find the article you want and click its "[edit]" button. It brings up all the same fields as the Add an Article page, but the values are filled in.

    Deleted An Article
    To delete an existing article, click on the "View All" link in the menu. This will brink up a list of all the articles. Just select the one you want to delete and click on its "[delete]" button. A confirmation dialog will appear and ask if you really want to delete it, select "Yes" if you do.

    Logging In
    To login to the Admin, just visit the /admin/index.php page with your browser and if you are not logged in the script will present a form in which to log in with. To login, simple enter in your Admin Username and Admin Password, as defined in /inc/config.inc.php file.

    Logging Out
    To logout, just click on the "Logout" link in the menu. This will clear all session data and redirect you. For added security, it is advisable to close that browser window.

    cat.php is the script used to Add, Edit, and Delete categories. It is opened via a popup from the index.php file. To use this script, login at index.php and select the "Add/Edit/Delete Category" from the menu.

    Adding a Category
    Adding a category is easy, just fill in the "Add" box near the bottom of the page with the category name you want.

    Editing an Existing Category
    Editing an existing category is also easy, just select the category you want to edit and select its "Edit" link.

    Deleting a Category
    To delete a category, just select the category you want to delete and hit the "Delete" link. It will confirm it. This will not delete all the articles related to this category, you will have to do that manually.

Some Notes

Please remember that Simple Articles is free, and released under the GPL GNU license. You must keep the copyright code on every page as is. Simple Articles was developed by kneuf! of kneuf.com. This is version 2.0.
Simple Articles © kneuf.com 2004