################################################################################
# TOPSTORY BASIC Version 1.0 , Released: 02-08-2003
# Copyright (C) 2001 MERT YALDIZ - mertyaldiz@superonline.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
TOPSTORY
BASIC Version 1.0
Top Story Basic is a news publishing script. You can post news any time any
where to your website by using the password protected administration section.
TopStory Basic uses MySQL database to store the data
COPYRIGHT
------------
This
script is distributed with GPL licence. Please read GPL
Licence text for more information.
Please do not exclude my name and the links to my site in order to support myphpscripts.com
serving for free.
SETUP
------
1)
Create a folder named 'topstory',
2) Modify the lines below in the 'config.php' file 'inc' folder;
/**
* PATHS AND URLS
*/
$url="enter the url of your website here";
$path="enter/the/physical/path/to/your/public/directory/here";
$tst["folder"]="topstory"; // This is the name of the folder that you will upload
your files
$tst["headerfile"]="enter/the/physical/path/to/your/header/file/here";
$tst["footerfile"]="enter/the/physical/path/to/your/footer/file/here";
/**
* DATABASE VARIABLES
*/
$tst["db"]["host"]="localhost";// This is the host for your database
$tst["db"]["name"]="";// Enter your database name here
$tst["db"]["user"]="root"; // Enter your database username here
$tst["db"]["pass"]="1111";// Enter your database password here
$tst["tbl"]["articles"]="articles"; // This is the name of the table that will
store your data
/**
* USERNAME AND PASSWORD FOR ADMINISTRATION SECTION
*/
$tst["admin"]["usrName"]="admin";// Enter your adminstration username here
$tst["admin"]["usrPass"]="password"; // Enter your adminstration password here
/**
* OTHER CONFIGURATION VARIABLES
*/
$tst["conf"]["laps"]=604800; // Enter the time (in seconds) here that how long
an article will be displayed as new
$tst["conf"]["topNewsList"]=5;// Enter the number of articles displayed in the
latest articles section
$tst["conf"]["allowHtml"]=1;// Enter 0 here if you do not want to allow html
code in the articles else enter 1 to allow html
$tst["langf"]="turk"; // Enter "eng" for english Or "turk"
for turkish
3)
Modify the header.php and footer.php in "inc" directory to fit the script looks
like your website.
4) Also you may want to modify the language packs in the "lang" folder
and the css file in "lib" directoy. But this is optional.
5) Upload your files to the directory you have created.
6) Goto your admin pages (e.g:http://www.your-website.com/topstory/admin)
7) Enter your username and password
8)
If this is the first time you run the script, the script will search the database
for the table needed to store your data,
if the table not found, the script will create it for you with the name you
have entered above.
9) After the table created succesfully, you will be redirected to admin pages and now you will be ready to use the script.
* UPLOAD THE SCRIPT IN ASCII MODE
USAGE
-------
How to give link to the script :
- www.your-site.com/topstory/index.php is the main file that lists the
summary of the all news.
Give a link to this file for all the news
-www.your-site.com/topstory/topStory.php and www.your-site.com/topstory/topStory_js.php
are the files that display the latest articles
The number of articles that will be displayed is determined in the config file
with $tst["conf"]["topNewsList"] variable.
You can call these files in two ways:
1) you can include topStory.php to your home page as include("topstory/topStory.php");
2) You can call topsStory_js.php from any HTML page as
<script language="javascript" src="http://www.your-site.com/topstory/topStory_js.php></script>
They
both will display the same thing.
-fullStory.php is the file that displays the news fully.
Adminsintration
:
Your
administration section is at http://www.your-site.com/topstory/admin/
When you enter your username and password You will be redirected to main page
of admin section.
You will see the statistics about your articles on the main page.
1) Post News :
Click on the link 'Post News' on the top of the admin pages to post news.
Fill out the form here to post your news.
-To the header field enter the brief summary of your article
-Enter your article in the body field
-If you select the status of your article as passive, your news will
be added to the database but will not be displayed to your visitors.
-If you select the status of your article as active, your news will be
added to the database and will be displayed to your visitors.
** You can change the status of your articles whenever you want from the
List / Manage News section.
2)List
/ Manage News :
Here the news will be listed that are stored in your database
You can edit the news by clicking on the Edit button located on
the right side of the news
You can delete the individual news by clicking on the Delete button
located on the right side of the news
You can check the boxes on the left of the news and clicking on the button "DELETE
THE SELECTED MESSAGES" you will be able to delete multiple news at
once
You can click on the DELETE ALL THE NEWS button to delete all the news.
3)
Changing the status of an article
When you are in the listing mode , on the left side of each article header,
There is a light (red/green) indicating the status of the article.
The green light indicates that the status of the article is active.
If you click on the green light, the status of the article will be passive and
the light will turn to red.
The red light indicates that the status of the article is passive.If
you click on the red light, the status of the article will be active and the
light will turn to green.
**Please do not hesitate to write your comments and questions to mert@myphpscripts.com **