Installation and Configuration Manual
Introduction
PrensaLibre is a system of editing and publishing any type of Web site whose contents change continuously, periodically, or in some combination. In principle it is designed to publish electronic newspapers and magazines, and even utilizes some of the terminology used in the publishing industry. In addition to creating your HTML documents PrensaLibre also offers services that can help enhance the delivery of your publication, such as generating text bulletins for delivery by electronic mail, allow mobile access to your publication (cellular telephone or PDA) using WAP support, as well as the generation of syndication services using RSS technology.
PrensaLibre uses a web-based interface for all aspects of its operation, taking you from the content creation phase, through prepress editing, to the publication and distribution phase, and allows you to manage your content in real time.
Distribution License
This software this distributed under General GNU Public Licence.
System Requirements
PrensaLibre has been tested on Windows NT 4.0 and Linux (specifically on RedHat 5.2 and Debian 2.0) but should work on any platform that supports Perl 5 on the Apache web server. If PrensaLibre has been installed successfully on any other systems we would like to hear about it.
In order to install this software it is necessary to be familiar with how your server is configured to run CGI scripts. If you are uncertain you can read the documentation provided by your service provider's technical support.
The single PrensaLibre script requires the Perl CGI module as well as read/write permissions to directories on the server. Those directories can be located in the personal directory of the user, as the program does not make use of any other modules for external data bases or connections.
Installation of PrensaLibre
The package that is distributed (PrensaLibre_1.0.0.tar.gz or similar) is capable of executing a very simple publication (simply news and analysis) that would work in a directory such as "/home/prensalibre", therefore for any different configuration it will be necessary to reconfigure the software.
In order to install the software in a directory such as /home/prensalibre or similar it will be enough to issue the following command:
tar -xvzf PrensaLibre-1.0.1-1.tar.gz
This will generate the minimum directory and files necessary to execute the example.
Configuration of Software
Once the software is installed on your server it will be necessary to configure a few parameters. Following is a list of things that should be changed for PrensaLibre to operate correctly.
Configuration of Users
By modifying the file .htaccess that appears in the program's base directory it is possible to indicate where the user file is located on your server. You will need to change "/home/prensalibre/users" to be the complete path of the user file, such as "/home/myaccount/prensalibre/data/users" or similar.
Configuration of the Script.
For the software to function correctly it will be necessary to change the variables listed at the beginning of the PrensaLibre script. As will all Perl scripts this is a text file, so you may edit it using your favorite text editor. Following is a list of the items you will need to change.
Location of Perl
The first line of the program marks the location where the Perl executable program is located on your server. This is usually something like /usr/bin/perl or /usr/local/bin/perl or similar. Edit this line to reflect the path where Perl can be found. If you are unsure where this is consult your server documentation or ask your administrator.
Web Site URL Definitions
$site_name
This indicates the generic name of the Web site that is managing PrensaLibre, and is also used as the channel name for the RSS file, for example "PrensaLibre Magazine".
$site_comment
This is the comment, or sub-title, which appears in RSS file that describes the nature of your web site or publication, for example "News and Updates for the PrensaLibre Program".
$home_url
The complete URL where the home page of your Web site is located, for example "http://mywebsite.com" or if we do not have your own domain name then something like "http://www.geocities.com/mywebsite". It is important not to include a trailing slash "/" at the end of the URL.
$www_site
The complete URL for the location of your publication on your Web site, for
example "http://mywebsite.com/prensalibre" or if we do not have your
own domain name then something like "http://www.geocities.com/mywebsite/prensalibre".
It is important not to include a trailing slash "/" at the end of the URL.
Note that could be the same as $home_url if you wanted the cover page of your
publication to also be the index page of your website.
$wap_site
The complete URL of the base of our WAP site (for cell phone and PDA users), for example "http:/wap.mywebsite.com" or if you do not have your own domain name then something like "http://www.geocities.com/mywebsite/wap". It is important not to include a trailing slash "/" at the end of the URL.
$img_site
The complete URL of the directory that will hold alll of your publication's images, for example "http:/wap.mywebsite.com/images/" or if you do not have your own domain name then something like "http://www.geocities.com/mywebsite/images". It is important to note that for this variable it is necessary to include a trailing slash "/" at the end of this URL.
$site_icon
This is the complete URL of the logo graphic that will be used in the RSS file, for example "http://mywebsite.com/images/logo.gif".
Web Site Data Paths
$home_dir
Path to the home (root) directory used by PrensaLibre, which should include a trailing slash and point to the same location as $home_url, for example "/home/prensalibre/"
$dat_base
Path of the directory which will contain all of the program's data files, which must include a trailing slash, for example $home_dir."data/"
$ana_base
Path of the directory which will contain database files specific to analysis articles, which must include a trailing slash, for example $dat_base."ana/"
$not_base
Path of the directory which will contain database files specific to news articles, which must include a trailing slash, for example $dat_base."not/"
$col_base
Path of the directory which will contain database files specific to columns articles, which must include a trailing slash, for example $dat_base."col/"
$layout_base
Path to the directory which will contain the page layout templates you will use to personalize the presentation of your publication, which must include a trailing slash, for example $dat_base."layout/"
$fch_users
Name of the user authorization file, a flat file database of user names, passwords, and permissions, for example $dat_base."users.txt"
$www_base
Path to the publication home directory for HTML files, which should include a trailing slash and point to the same location as $www_site, for example "/home/prensalibre/www/"
$wap_base
Path to the publication home directory for WAP files, which should include a trailing slash and point to the same location as $wap_site, for example "/home/prensalibre/wap/"
$img_base
Path to the directory where all your images will be uploaded, which should include a trailing slash and point to the same location as $img_site, for example $www_base."images/"
$bol_base
Path to the directory where the TEXT bulletins generated by PrensaLibre will be stored, which should include a trailing slash, for example $bol_base."bulletin/"
Configuration Options
$not_max
Maximum number of news articles which will be listed at one time on the cover page of your publication, by default "4". Tip: Try to keep this number as small as practical.
$not_menu
Number of the news article titles only which will be listed at one time on the cover of your publication (forming a menu of articles), by default "10". Tip: The sum of $not_menu and $not_max will be the total number of news articles that will appear on the cover of the HTML news page and of the WAP news page.
$not_edit
Maximum number of the news items that will appear in the article editing list, by default "20".
$ana_max
Maximum number of analysis articles which will appear on the cover page of the Web site and on the cover of the analysis page.
$ana_old
Number of archived analyses articles that will appear on the cover page of the web site.
$ana_subpor
Maximum number of old analysis articles that will appear in the analysis cover page.
$backup
If this variable is equal to "true" the system it will generate a file called "backup.txt" in the data directory in which will be stored all the user's key changes (username:password). This option is here for being able to recover a lost key or to allow the administrator to make adjustments to a user account.
$adjust_wap
This variable allows you to adjust the size of WAP pages, which are limited to 1600 characters in size. In the event the WAP browser indicates that the page is too large it is advised to reduce the value of this variable.
$OS
In this variable we define the operating system on which PrensaLibre will run, at the moment it recognizes two possible values, "UNIX" for all the UNIX-like systems (BSD, GNU/Linux, etc.) and "WINDOWS" for Windows NT/ME/9x systems.
Once these variables are set a sample publication (of the PrensaLibre magazine) will be available with a single administrator whose username is "admin" and key (password) is "admin".
Notes for Windows installations.
Because Apache and Perl are available on the Win32 platform is possible to execute PrensaLibre on a Windows system starting with version 1.0.1. There are a few minor changes that should be made to the script to make PrensaLibre compatible with those systems.
File "users.txt"
In the users file of the distribution you will find line starting with:
admin:adpexzg3FUZAk:PrensaLibre Administrator:
Because Apache for Windows does not use encryption in the user authentication files it will be necessary to change the encrypted password "adpexzg3FUZAk" to plain text, such as "admin".
It is necessary to consider that PrensaLibre, when executed in a Windows environment, will always maintain the keys in the file "user.txt" without encryption so it will be necessary to make sure that the file is secure. Due to the lack of encryption the option of password backup does not apply.
Script "manager.cgi
On UNIX-like systems the first line of the PrensaLibre program, manager.cgi, points to the path to your Perl program, such as "#!/usr/bin/perl". Since the organization of files in Windows is different you can change this line to represent to actual path used, such as "c:\perl\bin\perl.exe", but be aware that Windows relies on the file type to indicate how a program should be executed. Therefore it will be necessary to change the variable $OS in the configuration section of the script to have the value of "WINDOWS", and rename the file from "manager.cgi" to "manager.pl" if your system is set up to execute Perl scripts with the ".pl" suffix.Various Directories
The standard distribution format of PrensaLibre is a compressed .tar.gz or .zip file. It will be necessary to decompress the archive before setting it up. On Windows systems you can use the WinZip utility available from NicoMac Software. The following directory heirarchy will be created when the archive is recreated:
- ~/doc/
- ~/layout/
- ~/www/
- ~/www/images/
- ~/www/manager/
Personalization of Presentation
The look of your publication is totally customizable using template files that describe the format of entire pages or components of those pages. This is accomplished by inserting special commands inside the template files that will mark where your content will be inserted. PrensaLibre commands have the format [!COMMAND-]) that specifies which content will be inserted into the page. Following is a list of the available groups of templates and their allowed commands:
cover.html - Cover page of the web site
- [!DATE-]
- Date and hour of the last update.
- [!MAJOR-]
- Version number of publication of periodic contents.
- [!MINOR-]
- Revision number of publication of real time contents since the last periodic update.
- [!SECTIONS.MENU-]
- Creates a small menu of the existing sections separated by <BR>.
- [!COLUMNS.MENU-]
- Creates a small menu of the existing columns separated by <BR>.
- [!NOTICES.MAX-]
- Creates the titles and summaries of the latest news items. Each element of the list will be formatted according to the
layout of commands contained in the news.htt file:
- [!URL-]
- [!TITLE-]
- [!AUTHOR-]
- [!DATE-]
- [!CONTENT-]
- [!NOTICES.MENU-]
- Creates a list of the titles of older news items. Each element of the list will be formatted according to the layout of the news_m.htt template, which can contain the following commands:
- [!URL-]
- [!TITLE-]
- [!ANALYSIS-]
- Creates a list of the titles and summaries of the analysis articles. Each element of the list will be formatted according to the layout contained in the file analysis.htt, which can contain the following commands:
- [!URL-]
- [!TITLE-]
- [!AUTHOR-]
- [!SUMMARY-]
- [!ICON-]
- [!ANALYSIS.OLD-]
- Creates a list of the titles of the archived analysis articles. Each element of the list will be formatted according to the layout contained in the file analysis_v.htt, which can contain the following commands:
- [!ANALYSIS.OLD-]
- [!COLUMNS-]
- Creates the titles and summaries of the columns of the publication. Each column will be formatted according to the layout contained in the file columns.htt, which can contain the following commands:
- [!COLUMN-]
- [!AUTHOR-]
- [!ICON-]
- [!URL-]
- [!TITLE-]
- [!SUMMARY-]
- [!SECTIONS-]
- Creates a list of the titles and summaries of the sections of the publication. Each section will be formatted according to the layout contained in the file section.htt, which can contain the following commands:
- [!COLUMN-]
- [!AUTHOR-]
- [!ICON-]
- [!URL-]
- [!TITLE-]
- [!SUMMARY-]
p_notices.html - Page of the news articles carried
Web page where the latest news articles are introduced, all following the same format as in the cover page. The command that is active on this page is:
- [!NOTICES-]
- Creates a listing of news articles.
news.html - News article page
This is the document used to generate the news article itself. In this page the following commands will be active:
- [!TITLE-]
- [!AUTHOR-]
- [!DATE-]
- [!CONTENT-]
- [!CONTENT2-]
p_analysis.html - Previous analysis article page
Page where all the last analysis articles are listed following the same format as on the cover page. In this page the following commands will be active:
- [!ANALYSIS-]
- [!ANALYSIS.OLD-]
analysis.html - Analysis article page
This is the document used to generate an analysis article. In this page the following commands will be active:
- [!TITLE-]
- [!AUTHOR-]
- [!CONTENT-]
p_all_columns.html - Columns carried page
This is the document that lists all of the columns carried by the publication. The active commands are:
- [!COLUMN-]
- Place where all the columns of the publication are listed following the same format that in the cover.
p_columns.html - Page of a column carried
This document will give a listing of the articles available in an individual column. The active commands are:
- [!COLUMN-]
- Name of the column.
- [!COLUMNS-]
- [!COLUMNS.OLD-]
- Place where all the last columns are introduciran following the same format that in the cover.
column.html - Column article page
This is the document that defines an article in a column. The active commands are:
- [!COLUMN-]
- [!AUTHOR-]
- [!TITLE-]
- [!SUBTITLE-]
- [!CONTENT-]
section.html - Section page
This document defines a page for a section of the publication. The following commands are active:
- [!COLUMN-]
- [!TITLE-]
- [!SUBTITLE-]
- [!CONTENT-]
cover.wml - WAP cover page
The publication's wireless customers will use this document as the cover page. The active commands are:
- [!NOTICES-]
- Placeholder where the last news articles are listed, all following a fixed format.
news.wml - WAP page for a single news article
This document defines the layout of a single news item for a wireless customer. The following commands are active:
- [!AUTHOR-]
- [!TITLE-]
- [!CONTENT-]
To get a better idea of how to use these templates you may browse through the example files in the /layout directory.