contact bv news
bv n e w s
t h e   e a s y   w a y   t o   u p d a t e   n e w s   o n   y o u r   w e b s i t e
bv news
main menu  
  »  HOME
  »  FEATURES
  »  ONLINE DEMOS
  »  BUY BV NEWS
  »  INSTALLATION
  »  USER MANUAL
  »  FORUM
  »  LINKS
 



The installation instructions that follow are for the BV News Standard edition. The installation steps for BV News Pro are pretty much identical and are included in the readme.doc file that comes in the zip download.

INSTALLATION
INSTRUCTIONS

We have tried to make the following installation guide as clear, thorough and unambiguous as possible. For this reason the instructions may appear rather lengthy and daunting if you are not familiar with perl script installation. However it is straightforward. For those familiar with script installation many of the following instructions will be unnecessary.

INSTALLATION ON WEB SERVER

Any Unix based web server with cgi access supporting Perl 5 or higher will do. You don’t have to worry about what perl modules have been installed or anything like that. All functionality is built into the single script.

Using WS_FTP or any other ftp software, simply upload the bvnews.pl file to the cgi-bin directory and change the file permission to 755.

Make sure you upload the file in ASCII format.
Some web servers require you to name your files with a *.cgi extension rather than *.pl. If this is the case then simply change the file extension from bvnews.pl to bvnews.cgi.

Easy.
Oh, one more thing … you may have to change the very first line of the script [#!/bin/perl5 in our script] to match the set up on your server. If you’re not sure, check through the support section on your ISP/web hoster’s site, or email them.

SET UP VARIABLES

You will need to configure the set up variables section of the script to match your web space.

Most web hosting companies / ISP’s normally have a good help section that will assist you in setting up these variables.

It is very easy; what you need is basically three bits of information; the ‘server path’ to your home directory, the web url of your home directory and the web url of your cgi-bin directory.

The first batch of setup variables below need the ‘server path’.

The example ‘server path’ we have used below is:

"/docs/www.mysite.com/

You will need to find the actual server path to your webspace. It might look nothing like the example we have given. It really depends on how your hoster’s server is set up, for example your server path could look something more like /root/home/fredbloggs/ … it really depends and you’ll have to check.
 
Assuming that you’ve now sussed what your own ‘server path’ is, we can get on configuring the variables [these are close to the top of the perl script and are identified as such].

$storyfiledir = "/docs/www.mysite.com/bvnews/";
This is the server path to the sub-directory that contains all the text and javascript files created for your news database. So, for example if your server path happened to be /docs/www.mysite.com/ then you would just add /bvnews/ [note the trailing slash]. We have referred to this directory in the text that follows as the /bvnews documents directory.


You also have to physically create this sub-directory using WS_FTP or other ftp program. Also make sure the permissions are changed to 777.

$catfile="/docs/www.mysite.com/bvnews/categories.txt";
Just add /bvnews/categories.txt to the server path.

$database="/docs/www.mysite.com/bvnews/database.txt"; 
Just add /bvnews/database.txt to the server path.

$storycountfile="/docs/www.mysite.com/bvnews/storycount.txt";
Just add /bvnews/storycount.txt to the server path.

$image_files_path="/docs/www.blueview.co.uk/bvnews/images/";

This is the path to the directory where your uploaded images (if any) will be stored. Just add /bvnews/images/ to the server path
(and don’t forget the trailing / at the end!).

$imgdbase= "/docs/www.blueview.co.uk/bvnews/imagedb.txt";
Just add /bvnews/imagedb.txt to the server path.

$homepagefile="/docs/www.mysite.com/bvnews/bvnewshomepage.js";

Just add /bvnews/bvnewshomepage.js to the server path.

$maincatindx = /docs/www.mysite.com/bvnews/maincatindex.js";
Just add /bvnews/maincatindex.js to the server path.

$catcountfile = "/docs/www.mysite.com/bvnews/catcount.txt";
Just add /bvnews/catcount.txt to the server path.


The second part of the variables setup section relates to variables identified by means of your site’s web url. If you have your own domain name then the url will obviously be http://www.yourdomain.com ;
however if you have a sub-domain, for example which is just web space allocated by your isp, the form of the url might be something like http://www.yourisp.com/homepages/fredbloggs . Either way, it should be pretty easy to suss out.

$newsurl = "http://www.mysite.com/bvnews/news.html?nid=";
Just add /bvnews/news.html?nid= to your url. Be sure not to forget the ?nid= bit at the end.

$caturl = "http://www.mysite.com/bvnews/categories.html?cid= "

Just add /bvnews/categories.html?cid= to the end of your url. Don’t forget the ?cid= bit at the end.

$mainindexurl="http://www.mysite.com/bvnews/maincatindex.html"
Just add /bvnews/maincatindex.html to the end of your web url.

$main_cgi_url="http://www.mysite.com/cgi-bin/bvnews/bvnews.pl";
With this one you need to find out the url of your cgi-bin directory, then add /bvnews/bvnews.pl to it [or /bvnews/bvnews.cgi if you had to change the extension of the script].

You will also have to physically create this directory using WS_FTP or similar. Make sure the permissions of the file are changed to 755.

$image_files_url ="http://www.mysite.com/bvnews/images/";
This is the web path to the directory where any uploaded images will be stored. Just add /bvnews/images/ to your url and don’t forget the slash on the end!Again, you will need to create this url on your system using WS_FTP or any other ftp program. Chmod the directory to 777.


PAGE LOOK VARIABLES


That’s the ‘hard’ bit done. All we need to do now is configure a few simple variables that affect how the news looks on your site. It’s best to experiment a little with these values until you get the best match with the overall look and feel of your particular site.

The ‘Page Look Variables’ are towards the top of the script and are identified as such.

$firstparalen = 150;

This is the length in characters of the first paragraph of a news story as it appears on your news front page and in individual story pages. We reckon 150 is about right, however a value anywhere between 75 and 300 would probably be OK. Whatever you do, don’t make it zero.

$fface = "Verdana, Arial, Helvetica, sans-serif";
Set this variable to the font typeface you would like to use. Marry it in with your own site design.


$linkcolour = "gray";
This is the colour of text hyperlinks throughout the site. Set to match your own site.

$hlcolour = "#3333cc";
This sets the colour of the headline on individual story pages. Note that rather than using ‘hex’ values like this, you can use values like “blue” or “gray”.

$datecolour = "#666666";

This sets the colour of the date stamp for the story. The default is a nice grey.

$bgcolour = "#cceeff";

This sets the background colour to the main story text on each story page.

$linecolour = "#3333cc";
This is the colour of the border on the table border on individual story pages and the line that separates news headlines on the front page. If you don’t want these lines to appear, just set the colour to the background colour of the particular page.

$newstwidth = "400";
This is the width of the table that contains the news story on each individual story page. Change this value to fit in with your own site design. We would recommend a value of between 350 and 800. Not zero though!

$maxperpage = 10;
This sets the maximum number of links on each news category index page. We would recommend a value between 10 and 25. Again, make sure it’s not zero.

$twidth = "400";
This the width of the table that contains the headlines on your news front page. Similar to $newstwidth above and value probably should be the same.

$fpstories = 6;

This is the number of stories that appear on your news front page. We’d recommend a value between 5 and 8. Please note the minimum is 2.

$pagelen=25;
This is the number of story links that will appear, per page, in the ‘Delete Stories’ section of the Admin system. Set this to pretty much what you want, but we would recommend a value between 25 and 100.

$houradjust=0;
Every story is date stamped and you can use this variable to adjust the time that appears on stories to your own local time zone. This can be useful if your server is located in a different time zone to you, or for seasonal time adjustments, eg GMT to BST. As an example, say the time that is appearing on posted news stories is two hours ahead of what you want it to be then if you set $dateadjust to –2 it would make the time appear as you want it.

$mouse_over_colour="#C0C0C0";
This is the colour that appear when the mouse is hovered over headlines on your news front page. Set the colour to blend in with your own site design.


HTML FILES AND TXT FILES

Before you start using BV News you need to create and upload a few simple text and html files:

Text files:

First create three empty txt files called categories.txt, database.txt and imagedb.txt respectively and upload them in ASCII format to the /bvnews documents directory.

Alternatively you can just upload the three ready-made empty files included in the zip package.

HTML files:

There are four html files that need to be considered here.

a. The news front page html file:

This file could either be the ‘home’ page of your website or the front page of your news section. Either way all you have to do is include the following code in the relevant position within that page:

<script language=javascript src=
"http://www.mysite.com/bvnews/bvnewshomepage.js">
</script>




Don’t forget this is only an example. You’ll need to change the ‘www.mysite.com’ bit to refer to your own url.

What do we mean by ‘relevant position’? Well the position where you want the news headlines to appear. The code above ‘sucks in’ the headlines from a separate file and displays them in the page.

For the technically minded, this javascript code works much like ssi does, except of course that many isp’s and hosting companies don’t allow ssi, but javascript is standard to all browsers.

b. Individual news story page:

Create an html file called news.html and upload it to the /bvnews document directory (change permissions to 777). Create the file to the same design as the rest of your site and include the following code in chosen position:

<script language="javascript"><!--
xa=location.href;
xx=xa.indexOf("nid") + 4;
xy=xa.length;
pagenum = xa.substring(xx,xy);
srce = "http://www.mysite.com/bvnews/"+pagenum+".js";
document.write('<script language=\"javascript\" src=\"'+srce+'\"></script>');
// --></script>












Again, you’ll need to change the ‘www.mysite.com’ bit to refer to your own url. Be sure not to change anything else though.

What happens is that the code above sucks in the relevant news story from a separate file.

c. The individual category html file:

Create an html file called categories.html. Create the file to the same design as the rest of your site and include the following code in chosen position:

<script language="javascript"><!--
xa=location.href;
xx=xa.indexOf("cid") + 4;
xy=xa.length;
pagenum = xa.substring(xx,xy);
srce = "http://www.mysite.com/bvnews/"+pagenum+".js";
document.write('<script language=\"javascript\" src=\"'+srce+'\"></script>');
// --></script>












Again, you’ll need to change the ‘www.mysite.com’ bit to refer to your own url.

Be sure not to change anything else though.This page is used to suck in the individual stories related to a particular category.
d. The News Main Index html file:

Create an html file call maincatindex.html and upload it to the /bvnews document directory (change permissions to 777). Create the file to the same design as the rest of your site and include the following code in chosen position:

<script language=javascript src="http://www.mysite.com/bvnews/maincatindex.js">
</script>


Again, you’ll need to change the ‘www.mysite.com’ bit to refer to your own url.This html page is used to create and keep current the main index file for the various categories of news.

Simple example html files of 1 – 4 above are included in the program zip package. Either modify the examples or create your own including the javascript code specified above.

SECURITY

The script is not in itself password protected in any way. The best method of security is to protect the cgi-bin directory in which bvnews.pl is located [referred to in this example as http://www.mysite.com/cgi-bin/bvnews/] using ‘htaccess’ protection.

There are many good tutorials on how to do this on the web, including this one at Demon Internet.

Again, this is easy to do and will only take five minutes but if you don’t want to create the htaccess manually there is a free perl utility script called Deadbolt that will do the job for you.

Alternatively, you may choose not to password protect the script, though this is not recommended.

The url to the news main admin page will, depending of course on your site specific url, be:

http://www.mysite.com/cgi-bin/bvnews/bvnews.pl?task=mainmenu

It is unlikely that the casual intruder will stumble across your news admin section by accident, but it’s possible that a malicious individual with a modicum of knowledge could hack into your news system and change or delete all your work.

Accordingly we would strongly recommend you implement htaccess security just in case.
bv news Copyright © Doug Bennett 2002