elogd.cfg
contains entries which define
the structure of logbooks and the behavior of elogd. The file has a simple ASCII
format. Each logbook is defined by a [<name>]
section
where <name> is the name of the logbook. The [global]
section is used for settings common to all logbooks. Each line contains a setting
name, followed by an equal sign and the value for this setting. Lines starting with
";" are treated as comments.Here is a simple example, which define two logbooks "Linux" and "PC":
[global] Logbook tabs = 1 Tab cellpadding = 2 SMTP host = mailsend.your.domaine [Linux] Theme = default Comment = General linux tips and tricks Data dir = /usr/local/elog/linux Attributes = Author, Type, Category, Subject Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other Options Category = General, Hardware, Software, Network, Account, Other Options Author = Stefan, Linus, unknown Required Attributes = Author [PC] Comment = Database PC installations Data dir = /usr/local/elog/pc Attributes = Location, OS, Owner Options Location = Building1, Building2 Options OS = Linux, Windows ME, Windows 2000 Required Attributes = Location, Owner Email All = name@address, othername@otheraddress Mail Subject = Location
[global]
section:
Language = <name>
If a language name is given (currently only "german" and "french" are supported by now), the system searches for a translation file eloglang.<name> which contains string translations from English into that language. If new languages are added by someone, please send it back to the author so it can be included in future distributions.
The online help for elogd is contained in the file eloghelp_xx.html where xx are the first two letters of the language (like "en", "ge" and "fr"). For new languages, a new file of that type has to be created as well.
Tab cellpadding
Logbook Tabs = 0/1
Main Tab = <string>
string
is used for the
contents of the tab.
Welcome Title
<img src="welcome.gif">
.
These images must be present in the same directory as the elodg.cfg file.
Following line is an example Welcome Title:
Welcome title = <img src="welcome.jpg"><p><font size=5 color=white>Welcome to our Elog</font>
This displays an image and a text below.
Page title = <string>
Selection page = <file>
SMTP host
[global]
section. Thus if the
following options are placed in the [global]
section, they are defaults for
all logbooks. If they are present in the [global]
and in the logbook
section, the logbook option is used.Following options are available:
Data dir
Number Attachments
Comment
Theme
Date format = <string>
Welcome Page = <file>
<h1>Welcome to the test logbook</h1> <ul> <li><a href="?cmd=new">Enter</a> a new message <li><a href="?cmd=find">Search</a> the logbook </ul>The file has to be present in the same direcotry as the elogd.cfg file.
Submit Page = <file>
<h1>You successfully submitted a message</h1> <a href="linux">Back</a> to the logbook<p> <a href="linux?cmd=new">Enter</a> another messageThe reference "linux" in this case corresponds to the logbook name. The file has to be present in the same direcotry as the elogd.cfg file.
Message comment
This optional comment is displayed on top of the text entry field when submitting
a new message. It can contain a sentence like "Please enter your message here:".
Menu commands = <list>
This option specifies the menu commands displayed on top of the logbook page. For
certain installations, it can be useful to disable some commands. Following
commands are possible:
If this option is not present, following default is used:
Menu commands = New, Edit, Delete, Reply, Find, Last day, Last 10, Config, Help
Find Menu commands = <list>
This option specifies the menu commands displayed on top of the listing page
resulting from a "find" command. Although all commands from a above are possible,
only the commands New, Find, Back, Last, Last day, Last 10, config, Change
password, Logout
and Help
make sense. There is one
special command in addition to the above commands: The command Last x
gets expanded to "Last 2 days", "Last 4 days" or "Last 20 entries", "Last 40
entries" and so on, similar to the standard behaviour without the "Find Menu
commands" option.
Bottom text = <file>
If this option is present, the HTML contents of file
is displayed at
the bottom of an Elog page instead of the little Elog home page link. It can contain for
example a link back to the main logbook selection page like:
<center><a href="/">Main page</a></center>Or it can contain other useful links. The file has to be present in the same directory as the elogd.cfg file.
Help URL
This URL is used for the Help button. By default, the file eloghelp.html is
returned with the contents of the help page. One can either edit this file directly to
add site-specific help for all logbooks. Alternatively, one can use the Help URL
option to specify different help pages for different logbooks.
It can point to a site-specific help page via
http://...
or to a local file like
file://c:/tmp/config.html
. Alternatively, a HTML file can be
directly specified, which must be present in the same directory as the elogd.cfg file.
Attributes = <list>
Options <attribute> = <list>
MOptions <attribute> = <list>
<value1> | <value2> | ...In the "find" page only one of these values can be specified, which is then treated as a substring in the search filter.
Options <attribute> = boolean
Preset <attribute> = <string>
Preset Author = $long_nameIf the attribute should be locked at the Web submission, use the "Locked Attributes = ..." option. If a preset value is given for an attribute which has an options list, the preset value is selected in the drop down box by default.
Preset text = <string> or <file>
Locked Attributes = <list>
Required Attributes = <list>
Page title = <string>
Display search = <list>
Subst <attribute> = <string>
Following example use this feature to add the remote host name to the author:
Subst Author = $author from $remote_host
Remove on reply = <list>
Read password
Write password
Admin password
Write password expiration = <hours>
Admin password expiration = <hours>
-r
, -w
and -a
flags. To set the write password of logbook "linux" to "test", on would
enter:
elogd -w test -l linux
The read password is queried by the browser with a pop-up window and usually stays
active for the entire browser session. The write and admin passwords are stored in
cookies on the browser side and have an expiration time of 24h. After that time, the
passwords have to be re-submitted. This time can be changed with the statement
Write Password Expriation = x
or Admin Password Expriation
= x
, where x is the expiration time in hours. It should be noted
that on some systems the daylight saving time is calculated incorrectly, which can
cause time offsets of one hour between a server PC and a client PC. In this case one
hour has to be added to the expiration time. If the expiration is set to "0", the
passwords are kept for the current browser session only. When the browser is restarted,
the password has to be re-entered.
Password file = <file>
Login expiration = <hours>
<login name1>:<password1>:<full name1> <login name2>:<password2>:<full name2> <login name3>:<password3>:<full name3> ...The passwords are encoded. To create or change them, one can use the "Change Password" menu point. To creat a new user, one has to edit the password file manually and use an empty password (like "<login name>::<full name>"), which can then be changed via the "Change password" menu point.
The presence of a password file requires all users to "log in" using their name and password. An additional advantage of this method is that the user name can be used as an attribute value for creating logbook entries. To do so, following line can be added to the configuration file in order to use the username for the author attribute:
Options author = $long_name from $remote_hostSince the author name cannot be changed then during logbook entry, this ensures that the original user name is contained in the entry. For a full listing of substitutions, see the "Subst
The user name and password are stores as cookies on the user side. They expire after 24
hours by default, which can be changed with the Login expriation
options. If the expiration is set to "0", the passwords are kept for the current browser
session only. When the browser is restarted, the password has to be re- entered.
Allow <command> = <user list>
Hosts allow = <list>
Hosts deny = <list>
123.213.
(note the trailing '.') or .mit.edu
,
or the word All
. Following rules are applied:
Email <attribute> <value> = <list>
Use Email Subject = <string>
Use Email From = <string>
SMTP host =
entry has to be present in the [global]
section
of the configuration file. To submit an email based on an attribute value, one
needs the statement Email <attribute> <value> =
<list>
. Whenever an entry is submitted where
attribute
is equal to value
, an email
notification is sent to the email addresses in list
.
Several mail addresses might be supplied, separated by commas. Multiple
Email xxx
statements might be present in a configuration
file. If either the attribute or the value contains one or more blanks the string
must be enclosed with quotation marks like
Email type "Normal routine" = ...The statement
Email All = <list>
sends an
email notification independent of the type and category. The Use
Email Subject = <string>
statement specifies which text ist
used as the email subject. The text can contain $<attribute>
statements which are subsituted by the current value of that
attribute. For a full list of possible substitutions, see the
"Subst <attribute>" option. The option Use Email From = <string>
is used for the "from" field in the email.Show text = 0/1
This flag controls if logbook entries contain a body text. If an installation
only requires attributes, this flag can be set to 0. Default is
1.
Show attachments = 0/1
This flag controls the display of attachments such as images on normal
logbook pages. For logbooks with large images, this flag can be turned off,
so that attachments are only displayed when they are clicked on. Default
is 1.
Summary on default = 0/1
If this flag is 1, the buttons "Last day" and "Last 10"
produce summary listings instead displaying full messages. In the "Find"
page, the "Summary only" check box is checked by default.
Summary lines = x
This specifies the number of text lines displayed in a summary page. Zero displays
no text at all. The default is 3.
Reverse sort = 0/1
If this flag is 1, the result of the "last day" and "last 10" queries
is sorted in reverse order (newest entry down to oldest). Default is
0.
Enable browsing = 0/1
If this flag is 1, browsing (hitting the next/previous button) is enabled.
For some rare occations it might be necessary to disable browsing. Default is
1.
Filtered browsing = 0/1
If this flag is 1, browsing (hitting the next/previous button) can be
filtered by individual attributes. If the checkbox next to an attribute is checked,
only messages with the same attribute value are displayed. Default is 1.
HTML default = 0/1/2
This specifies the default state of the "Submit as HTML text" button on the
new message entry from. For installations where entries are nomally submitted
as HTML, the default can be set to 1. If this value is set to 2
, the check box is not displayed at all, so that only text submissions
are possible. The default is 0.
Suppress default = 0/1/2
This specifies the default state of the "Suppress Email notification" button on the
new message entry from. For installations where normally a Email notification is
not necessary, the default can be set to 1. Only if an urgent message is
entered, the users can then uncheck the suppress box. If this value is set to 2
, the suppress box is not displayed at all, so that an email notification is
always produced. The default is 0.
Resubmit default = 0/1/2
This specifies the default state of the "Resubmit as new entry" button on the
edit message entry from. If this button is checked, the current message is removed
from its current position in the database and submitted as a new message. This
can for example be useful for applications where one wants to see which records
have been updated recently. If this value is set to 2, the resubmit box
is not displayed at all. The default is 0.
Display Email recipients = 0/1
If this flag is 1, the email recipients are displayed when a logbook
entry is entered which produces an email notification. Setting this flag to 0
can suppress this display, in case one does not want that users to see that
email is actually sent and to whom. The default is 1.
Email message body = 0/1
If this flag is 1, the email notification send by elog contains the
full message body in addition to the attributes. The default is 0.
Back to main = 0/1
If this flag is 1, the "Back" button takes you back to the logbook
selection page instead to the last entry of the current logbook.
The default is 0.
theme = <dir>
option in the configuration file. The directory
contains the file theme.cfg
and a couple of images, which are used
for the title banner and the browse buttons. A default theme is contained in the
distribution. If new themes are developed by users, they can send them back to the author,
so they can be included in future releases.
Most of the options in the theme.cfg
are self-explanatory, the colors
are coded as #RRGGBB, where RR is a 8-bit hexadecimal value for the red part, GG for the
green and BB for the blue part, repectively. Since theme configuration files are re-read
at each access, the elogd daemon does not have to be restarted after a change in the
theme configuration file.
Following two images display the same logbook page using different themes:
Feature | Votes |
---|---|
Get message from standard input in elog submission program | 1 |
Users can only edit their own entries | 1 |
Make user file editable through web interface | 1 |
Implement groups of users | 1 |
Add email address field to user file, so that user name can be specified for "Email <attribute> <value> =" option which gets automatically substituted by email address | 1 |
Change internal database format from offset oriented to index oriented (lots of work, need also conversion program) | 2 |
Implement new listing mode in between "summary only" and "full listing" where a few text lines are displayed below the attribute fields | 1 |