LaNewsFactory User's Guide
Maintained by Christophe Brocas
30/01/2001
This is the LaNewsFactory User's Guide. It covers the installation, configuration
and usage of the 0.6.2 LNF version.
1. Introduction
During 2000 summer, I start to search an easy to use and install software for
web news management. I found a lot of interesting things with nice and sophisticated
features. Unfortunately, almost all of them require MySQL or others RDMS software.
Databases provide powerfull functionnalities but when you use a free ISP for example,
MySQL is not often included. So, I start to code LaNewsFactory under PHP.
1.1 What is LaNewsFactory ?
LaNewsFactory (LNF) is a PHP web news and forums engine. It requires
no database stuff, only a PHP enabled web server. LNF is a file-oriented
tool.
1.2 Features
LaNewsFactory provides following functionnalities :
- forums and news system behaviours,
- topics,
- threaded comments,
- HTML templates support,
- moderation and news management with edit/delete/commit functionnalities,
- 2 user authentification levels : site admin and topic moderator,
- search capacity,
- accurate news display status on the main screen : number of answers, writer
name and date of the last update,
- web interface for site and topics options, moderation and news management,
- support for 7 languages (french, english, spanish, german, dutch, swedish
and portuguese).
1.3 License
LaNewsFactory is free software distributed under the GNU General Public License
(GPL). See the files "Copying" and "Copyright" supplied with the distribution
for additional info. For more info on GPL, see the Free
Software Foundation.
2. Installation
2.1 Getting it
LaNewsFactory can be downloaded from LaNewsFactory web
site. New version announcement are made on freshmeat
site and by lnf-announce mailing-list : to
subscribe.
The only thing you need is a PHP-enabled web server. But, I currently
test LaNewsFactory under a linux 2.2.12 / Apache 1.3.12 / PHP 4rc1 configuration.
Windows version of PHP may be taken carefully. For instance, cryptographic functions
are not fully supported under Win32 PHP version.
2.3 Installing LaNewsFactory
Installing LaNewsFactory is done via an unzip/untar of the distribution file
in the directory you want to install it. Current distribution contains 4 directories
:
- a subdirectory called "images",
- a subdirectory called "templates" and "templates/lnf"
that contains HTML templates files (*.tpl) .
- a subdirectory called "news" that will contain the topics files and the
news files,
- a subdirectory called "news/mod" that will contain the news up to moderation
for all the topics,
- a subdirectory called "lang" that contains the language files.
IMPORTANT : your web server has to allow access to the LNF directory.
If it is not configure for it, you have to configure your web server before
starting using LNF.
That's all.
2.4 Upgrading LaNewsFactory
from 0.4.2 and before
In 0.4.3 version, topics are implemented. It changes the localisation of the
news articles. So, to use under this version the news already written :
- rename all the *.art files in "general" directory in a "*-general.art"
form,
- move all those renamed files in the new "news" directory.
Use the same procedure for the file in the "mod" directory.
from 0.4.4 and before
The 0.4.5 version implements the threaded comments. So, you can reply to a
reply. By the way, the news format has changed. To convert the news format to
this new format, you have to run the newsconv.php3 script.
Take care to make the upgrade actions in the right order : first the
"from 0.4.2 and before" step and then "from 0.4.4 and before"
step.
3. Configuration
3.1 First step
You edit the "sitesettings.php3" file in the install directory.
Just put the LNF directory access URL in the $url variable value instead of
"http://foo.com/lnf/" value.
IMPORTANT : Don't forget the last /.
3.2 Permissions
If it is not already done, set the following permissions :
- read permission for everybody on all files in install directory,
- read/write permissions for everybody on "*pass.php3", "original-*.php3"
and "*settings.php3" files in install directory,
- general (rwx) permission for everybody on "news", "news/mod"
directories,
- read/write permissions for everybody on "general*.*" files in
"news" directory,
- read/write permissions for everybody on "*.tpl" files in "templates"
and "templates/lnf" directories and on these directories.
3.3 Setting password
Because LNF uses PHP crypt function whose results have OS dependencies, you
have to generate original password (value : LNF). Do the following tasks :
- type the following URL : http://.../lnf-directory/init.php3.
- copy "original-pass.php3" to :
- "pass.php3", "news-pass.php3" and "news-modpass.php3"
files in the LNF install directory
- "general-modpass.php3" and "general-pass.php3" in
the "news" directory.
For security purposes, please change the original password by using the admin
menu.
IMPORTANT : if you are into trouble with password, you can come back
to original value (ie LNF) by copying "original-pass.php3" on "pass.php3"
in LNf install directory (Site Admin password). For problems in topics, copy
"original-pass.php3" on "<topicname>-modpass.php3"
(topic moderator's password) or "<topicname>-pass.php3" (topic
admin's password) scripts.
3.4 Running LaNewsFactory
Now, you just have to type the following URL : http://.../lnf-directory/listdir.php3.
It is going to be the only URL you need to have access to all LNF functionnalities.
Now you just have to go in the admin menu to create your first topic. There
is no more default topic, you have to create it.
Select the "Admin" item on the top of the screen. Choose Admin
as login type and enter LNF as password or the value you set if you have already
change it when it is asked to you. The only site options you can set are :
- URL
is the URL of the LNF install directory. Don't forget the last "/".
- Title
is the site title that appears on top of the clent's browser.
- Site behaviour
is the way you want your site to work. You can choose between a news system
and a forum. In a news system, users can view all news on the same page or
news that talk about a specific topic. In a forum, users can access only to
a single topic at the same time. In an admin point of view, in a forum, each
topic has its own options, moderator and admin. In a news system, topic has
only got its own moderator.
The rest of the configuration is available at the topic level.
3.5 LaNewsFactory authentification system
To write and answer a news, you need no authentification at all. But, if you
want to modify settings or edit news, an authentification system is provided.
You can access to admin functions by clicking on Admin item in the menu. 2 choices
are available [ATTENTION : Topic Admin is not longer supported]:
- Admin It is the site admin profile. You can create/delete a topic,
modify site and all topic options, change all passwords, edit and moderate
news of all topics.
- Moderator You can moderate and edit news of this topic.
4. Topics
4.1 Understanding
What a topic is :
- a topic is a theme for news.
- a topic is created by the site admin.
- a topic has got a moderator forum/news] .
- a topic has its own options [forum] . The only things that
are site-level configurable are the URL of LNF directory and the site title.
The available options are :
- Language
is the language used by LNF for text outside the news contents. You can
choose between french (fr), english (us), spanish (es), german (de), portuguese
(pt) and swedish (se).
- Number of news per page
is the number of news displayed per page on the main screen.
- Moderated site
is the setting of the site behavior against posting. Yes implies that
a news post has to wait for moderator agreement before publication.
- Moderator's email adress
is the adress (if a value is entered) which is going to receive an
email at each news submission if site is moderated.
IMPORTANT : the PHP version of the server needs to have PHP mail
function enabled and the given adress needs to be correct.
- Enable HTML in news
is the capability of allowing/prevent display of HTML statements in
news. Allowing it can be unsecure. Anyway, it does not prevent the user
to write HTML statements. If you prevent HTML, HTML statements will be
displayed as-is.
- Number of lines per news header
is the number of lines displayed in the preview form for a news on the
main screen.
- Description
is the description of the current topic.
- Answers depth
is the depth of answers you want to display.
Nota Bene : in the case of a news system site, these options
can be set only for the site and not for each topic.
4.2 Operations
List of the different possible operations (site admin toolbar displayed, TAKE
CARE : see "Options" instead of "Topic/Site Options") :
- create/delete a topic :
- click on topic creation/delete.
- login type required : site admin.
- the topic name can only contains letters and figures.
- change options :
- click on "options".
- login type required : site admin,
- manage/moderate news :
- click on news management or moderation.
- login type required : site admin, moderator.
- change password :
- click on change password,
- login type required : site admin.
5. Moderation
5.1 Understanding
Topic moderation status is the topic behavior against posting
:
- If the topic is moderated, news that are written will wait after
the moderator choice before being published. Since 0.4.5 version, you can
either select a group of news to delete or accept them. You can also, after
reading a news, choose to publish the news, to delete it or to modify it.
TAKE CARE : For the moment, only original posts are currently moderated.
Not the answers. It is simply due to the fact it is not obvious to code it.
It is on the TODO list to answer to the hope of Krzysztof Kudlacik ;-).
- If the topic is not moderated, all written news are directly published.
5.2 Operations
- You can switch the topic moderation status by web interface (topic options)
as seen in the "running LaNewsFactory" section.
- You have to click on "Moderation" menu to see if news are up to
publication.
- To read each of them, click on its title and then choose if you want
to modify it, publish it or delete it.
- To directly delete or publish news, select options boxes and click on
the correct button.
In fact, on unmoderated sites, news are directly written in the "news"
directory. On moderated sites, news are written in "news/mod" directory.
6. News management
News management is the possibility of deleting/editing an already published
news. Since 0.4.5 version, you can either select a group of news to delete them.
You can also read a news to delete or modify it. Click on "News management"
to do it.
7. RDF/RSS export
You just have to execute rss.php3 script via a browser. You receive
then a file in RSS 1.0 format containing the first lines of each news. Interesting
with RSS
format is that RSS is a normalized (RSS 1.0 is at a specification proposal stage
in fact) export format. You can trust it to run automated LNF import job in
another web site for instance.
8. Customization : HTML Templates
Since 0.6.1 version, LaNewsFactory's HTML aspect is stored under HTML templates
files. Thoses files are in the "templates/lnf" directory. Look at
the source of a LNF HTML page under your browser : comments will help you to
identify the HTML template file to modify. For colors, I use 3 files (colour1.tpl,
colour2.tpl, colour3.tpl) that I use in the PHP scripts. Change color values
in it to set your LNF colors.
From a technical point of view, I use PHP
FastTemplate library. Thank to Sascha Schumann for his clear and straightforward
FastTemplate tutorial.
A. Appendixes
Main documentation is provided by this document. A FAQ file also exists
on the web site.
Two mailing-lists are opened :
Please, read carefully this document and the FAQ file before doing anything
else. To make a bug report, just send me an email
with the following informations :
- problem description,
- the different error messages that appears on the screen,
- the LNF version.
Final notes
LaNewsFactory intends to be an usefull web news software with less product
dependencies as possible. I am always interested by your suggestions and even
more by code ;-) Just send me both to me.
And, last but not the least, thank to Richard M. Stallman and the FSF crew for
creating GPL without nothing could have been happened.
Christophe Brocas.
PS : Sorry for my english but I am french ;-)