sNews 1.6 Readme

(Developers Version 1.6.0)
Revision Date: May 03.09 - Revisions by Keyrocks.

Welcome to sNews 1.6 - a single file, template independant, PHP and MySQL powered, standards valid Content Management System.

Before installing please check minimum system requirements:

Apache Server with mod_rewrite module enabled
PHP: Hypertext Preprocessor version 4.x or above
MySQL database

These applications are freely available, and can be installed both on Windows and Linux OS (detailed info can be obtained at their websites). They are installed by default on Mac OS X from version 10.2.8 and up. Note that sNews 1.6 won't work on Windows server because it uses different methods of URL rewriting.


Install sNews by following these 4 easy steps:

1. Setup the Database

Create a new, empty MySQL database:
In most cases, your server host will have provided you with CPanel (or another admin panel system) to create a new database on the server. Once you have created it, the next step is to add the four tables to it that will contain the data for your sNews CMS. In most cases, you will use phpMyAdmin for this.

Table Creation - Option A:
An SQL folder is included in this installation package and it contains a ready-made SQL file - snews1600.sql - with the table-script in it. You can use the IMPORT tab in phpMyAdmin to import the contents of this file to create your tables.

Table Creation - Option B:
If you would rather run a manual query to create your database tables, copy and paste the following SQL script into the query textarea:

CREATE TABLE articles (
	id int(11) primary key auto_increment,
	title varchar(100) default NULL,
	seftitle varchar(100) default NULL,
  	`text` longtext,
  	`date` datetime default NULL,
  	category int(8) NOT NULL default '0',
  	position int(6) default NULL,
  	displaytitle char(3) NOT NULL default 'YES',
  	displayinfo char(3) NOT NULL default 'YES',
  	commentable varchar(5) NOT NULL default '',
  	published int(3) NOT NULL default '1',
  	description_meta varchar(255) default NULL,
  	keywords_meta varchar(255) default NULL
);
CREATE TABLE categories (
  	id int(8) primary key auto_increment,
 	name varchar(100) NOT NULL,
 	seftitle varchar(100) NOT NULL,
 	description varchar(255) NOT NULL,
 	published varchar(4) NOT NULL default 'YES',
 	catorder smallint(6) NOT NULL default '0'
);
CREATE TABLE comments (
 	id int(11) primary key auto_increment,
 	articleid int(11) default '0',
 	name varchar(50),
 	url varchar(100) NOT NULL,
 	comment text,
 	time datetime NOT NULL default '0000-00-00 00:00:00',
 	approved varchar(5) NOT NULL default 'True'
);
CREATE TABLE settings (
 	id int(8) primary key auto_increment,
 	name varchar(20) NOT NULL,
 	`value` varchar(60) NOT NULL
);
	INSERT INTO settings VALUES (1, 'website_title', 'sNews 1.6');
	INSERT INTO settings VALUES (2, 'home_sef', 'home');
	INSERT INTO settings VALUES (3, 'website_description', 'sNews CMS');
	INSERT INTO settings VALUES (4, 'website_keywords', 'new, site, snews');
	INSERT INTO settings VALUES (5, 'website_email', 'info@mydomain.com');
	INSERT INTO settings VALUES (6, 'contact_subject', 'Contact Form');
	INSERT INTO settings VALUES (7, 'language', 'EN');
	INSERT INTO settings VALUES (8, 'charset', 'UTF-8');
	INSERT INTO settings VALUES (9, 'date_format', 'd.m.Y. H:i');
	INSERT INTO settings VALUES (10, 'article_limit', '3');
	INSERT INTO settings VALUES (11, 'rss_limit', '5');
	INSERT INTO settings VALUES (12, 'display_page', '');
	INSERT INTO settings VALUES (13, 'display_new_on_home', '');
	INSERT INTO settings VALUES (14, 'display_pagination', '');
	INSERT INTO settings VALUES (15, 'num_categories', 'on');
	INSERT INTO settings VALUES (16, 'approve_comments', '');
	INSERT INTO settings VALUES (17, 'comments_order', 'ASC');
	INSERT INTO settings VALUES (18, 'comment_limit', '30');
	INSERT INTO settings VALUES (19, 'word_filter_enable', '');
	INSERT INTO settings VALUES (20, 'word_filter_file', '');
	INSERT INTO settings VALUES (21, 'word_filter_change', '');
	INSERT INTO settings VALUES (22, 'username', '098f6bcd4621d373cade4e832627b4f6');
	INSERT INTO settings VALUES (23, 'password', '098f6bcd4621d373cade4e832627b4f6');

2. Edit Settings

Editing the "snews.php" file:
The values for the database variables (used in all functions in the file) will need to be edited, at the top of the file, to suit your installation, as follows:

full web site address with trailing slash - http://www.your-domain-name.com/
$db['website'] = 'http://localhost/sNews/';

MySQL Host - provided by hosting company, usually "localhost":
$db['dbhost'] = 'localhost';

Database Name - created through phpmyadmin or similar database editor:
$db['dbname'] = 'snews';

Database Username - created through phpmyadmin or similar database editor:
$db['dbuname'] = 'username';

Database password - created through phpmyadmin or similar database editor:
$db['dbpass'] = 'password';

Database prefix - created through phpmyadmin or similar database editor, used usually when a hosting company provides only one DB:
$db['prefix'] = '';

3. Upload files

Copy all the files from sNews 1.6 package to your server. If you add a folder in your domain root, to upload images into (eg. img or images), you will need to change the permissions on the folder (referred to as chmodding) to 777. You would also do the same with any other folders you would upload files to. NOTE - DO NOT upload the SQL folder to your server. It has no purpose there.

4. The .htaccess file

The default installation package comes with a file called .htaccess. Mac OS X users will not see this file, unless you use a text editor or FTP client that allows you to view invisible files. For that reason, we also include a text file named htaccess.txt, that is visible and editable on any OS, including the Mac. To use this file, open it in your text editor, make changes if necessary and save as .htaccess (without any other file extension (file-type) — .htaccess is a file extension (file-type) all by itself).

If you are a Windows OS User:
Upload the .htaccess file and DO NOT upload the htacess.txt file. Again, the latter is only required when the .htaccess file is not visible to you (Mac OS users).

Why would you need to edit .htaccess?
If you install the snews files on the server root, you do not. But if you install them in a subfolder, for example if you drop the entire snews folder on your server, then you must edit the RewriteBase line to incorporate that folder name and location. Example:

RewriteBase /snews

Note that there is no # at the start of the RewriteBase, meaning that it is active, and that there is no trailing slash at the end, which is necessary in snews.php, but not here.

Done!

You are ready to go!

Default username is test and password is test.

Access the Home Page in your browser. Use the Login link in the footer to log in, start adding content, and manage your site content.

Additional info

Bug reports, suggestions, comments, questions: sNews Forum

© Copyright 2007-2009, Solucija · sNews is licenced under a Creative Commons Licence.