Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: I need help how to setup this data below to servage.net MySQL Database Thanks  (Read 2770 times)

Kwok

  • Newbie
  • *
  • Karma: 0
  • Posts: 2

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', '[email protected]');
   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');
   INSERT INTO settings VALUES (24, 'system_email', '[email protected]');
   INSERT INTO settings VALUES (25, 'system_name', 'Site Admin');

I use Servage.net, can anyone help me please?
Logged

Joost

  • Guest

Not sure, why you posted this code, it seem like the default sql data coming with the package.
Anyway, how to create these tables, depends on your hosting company.
Most of them provide access to phpmyadmin or cpanel. There you can create a database and then populate it with the code from readme.html.
Past the code into a sql window, and submit.
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca

If you are still not sure what to do, this old tutorial I posted for sNews 1.5 is pretty much the same for 1.6 and may help a bit.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Kwok

  • Newbie
  • *
  • Karma: 0
  • Posts: 2

Thanks all, i already create my data base, what i can do next? I don't know where snews.php located?

The second step :

2. Edit Settings
Open the snews.php file with your preferred text editor and enter your settings at the top of the file:

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 is "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'] = '';

Thank you...
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca

Thanks all, i already create my data base, what i can do next? I don't know where snews.php located?

Thank you...

The snews.php file is one of the files that came in your un-zipped package folder. You need to open this file in your Code Editor application and make the necessary configuration changes as described. If this project is running a host server, after making the changes you then upload the changed file to your domain root on the host server... along with all the other other files that came in your package.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU