Simple Articles Version 2.0
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).
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.
Use the links below to skip through the ReadMe.
- Welcome
- About
- Contents of ReadMe
- Script Requirements
- Included Files
- Installation
- Upgrading
- Done
- Using Simple Articles
- Some Notes
In order to use Simple Articles:
- You need a server with the Apache as the http server
- Be able to use htaccess files, and have mod_rewrite installed
- Tested with PHP version 4.3.3 but should work on all versions past 4.3
- It was tested with MySQL version 4.0.16
- Session Support in PHP
The following files should have been included with this distribution.
- /.htaccess - the .htaccess file that allows you to view articles as if they were static files
- /index.php - lists articles to the public
- /install.php - installs the database tables
- /upgrade.php - updates database from previous versions
- /view.php - displays article
- /admin/cat.php - allows you to admin the categories
- /admin/index.php - allows you to admin the articles
- /admin/optimize.php - not used yet, will allow optimization of tables associated with Simple Articles
- /docs/change_log.html - dummy file
- /docs/future.html - file that contains info on what is planned for the next release
- /docs/index.html - contains links to the other documentation pages
- /docs/readme.html - this file
- /docs/db.sql - the database schema
- /docs/gpl.txt - the license used by this software
- /docs/upgrade.sql - the .sql file to use if you are upgrading
- /inc/config.inc.php - the configuration file
- /inc/index.html - dummy file to prevent directory listings in apache
Installing Simple Articles is very easy. There are three things you have to do in order to successfully operate this script.
- Edit Files
- Upload
- Configure Database
- Finishing Up
-
You need to edit these files in order to use Simple Articles:
- /.htaccess
- /index.php
- /view.php
- /admin/index.php
- /admin/cat.php
- /inc/config.inc.php
Now to install :)
- 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.
-
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.
-
Open view.php and follow the instructions for the index.php file above.
-
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.
-
Open up /admin/cat.php, and follow the instructions for the admin/index.php file, above.
-
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.
-
Now just FTP the files up in the same hierarchy as they came in. You do not have to FTP up:
- /docs - the /docs/ directory
- /update.php - the update.php file (note! if upgrading from previous version, read this: Upgrading.
- /install.php - don't upload unless you want to setup the database tables automatically. Read more at Configure Database.
- /admin/optimize.php - don't even upload this. It will be released in the next version (hopefully). It has some of the code to help Optimize the tables associated with Simple Articles.
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.
-
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.
-
To finish the install, just delete these files (if they are there):
- /install.php
- /upgrade.php
Reminder: Make a backup of your database and all other files before proceeded, should anything go wrong.
- First, delete all files from previous installations. Do not touch the database!
- 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.
- 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.
- That's it, it should be fine to use :)
When you have finished installing or upgrading, make sure that the /install.php file and /upgrade.php file are deleted.
- Basics
- Managing Simple Articles
-
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/.
-
To add/edit/delete Articles, you need to use the Admin scripts located in the admin directory. In there you will find:
- index.php - log in form, logout, add/edit/delete articles
- cat.php - add/edit/delete categories. Note: opens as popup from index.php
- optimize.php - not used; can delete if not done so already
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.
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