Reference manual for creating a front end for hitchhikers.org

In construction

This manual describes how to create a front end for the web site http://www.hitchhikers.org. Here are a few characteristics of our front end service:

We hope that combining your front end front end with our database would give you a valuable addition to your site and would help us to become the hitchhikers database for Europe.

Front end installation

Directory structure

All data for a front end is stored in one directory. The name of that directory should be equal to the domain name which you will use for the site, like "hitchhiking.yahoo.com". The scripts will choose the front end from the domain name in the URL of the request. Note that "www." should be omitted; the scripts will select your front end independent of whether the URL started with "www." or not. In your front end directory, there must be one file called settings.txt. This file contains all the front end dependent settings. A directory structure for a single language front end might look like this:

rideshare.yahoo.com/
    settings.txt
    dictinaries/
        en/
            internal.txt
    email_templates/
        addquery_en.tmpl
        addride_en.tmpl
        notification_en.tmpl
        passwordrequest_en.tmpl
        reaction_en.tmpl
        tellafriend_en.tmpl
    templates/
        index_en.tmpl
        form_en.tmpl
        entry_en.tmpl

A setup for a multi-language front end, might look like this (see also multi language support):

rideshare.yahoo.com/
    settings.txt
    dictinaries/
        en/
            internal.txt
            general.txt
        fr/
            internal.txt
            general.txt
    email_templates/
        :
    templates/
        index.tmpl
        form.tmpl
        entry.tmpl
or like this:
rideshare.yahoo.com/
    settings.txt
    dictinaries/
        en/
            internal.txt
        fr/
            internal.txt
    email_templates/
        :
    templates/
        index_en.tmpl
        index_fr.tmpl
        form_en.tmpl
        form_fr.tmpl
        entry_en.tmpl
        entry_fr.tmpl

Uploading files

You can manage your front end directory through http://www.hitchhikers.org/protected/fileman.cgi. You will be prompted for a username and password. The username is equal to the name of your front end directory and the password will be given to you by your hitchhikers.org contact person. After logging in, you will see a list with all the files and directories in your front end directory. From here, you can upload or delete your files. Note that you will not be able to download your files, so you have to keep a copy of your files locally.

There is also a possibility to provide you with an ftp account. As this costs more time and effort to setup, these accounts will be provided on an individual basis.

Settings file

The following variables can be set in the configuration file:
default_query
The query to be used if there is no query specified in the request. This happens when a user comes to index.cgi for the first time. Default is the empty string.
supported_languages
The list with languages that your front end supports. Make sure that there is an internal dictionary for each language in dictionaries/languagecode/internal.txt. The languages should be provided as two letter lower case language codes, separated by vertical bars ('|'). The first language code in the list is used as the default language. This is the language used by your frontend if the preferred language of the visitors user agent is not supported by your frontend.
fe_timezone
The main time zone of your front end. Should be an integer between -12 and 12, specifying the time difference with GMT. So western Europe would be +1 and US Pacific time would be -8.
The format of each setting should be as follows:
variable_name => 'variable value'.

Dictionaries

Dictionaries are used for creating multi language front ends and for providing the backend with wordts that are requiredc for operation (like like the days of the week). Each dictionary file contains a list with codes and their meaning for one language (a possible code might be 'intro' and its meaning might be 'Welcome to our ridesharing service').

In your front end directory, there should be a directory with the name dictionaries. This directory should contain a directory for each language that your front end supports (the name of these directories should be its two letter lowercase language code, a list with language codes can be found here) plus optionally a directory called all. Each of these directories may contain the following files:

internal.txt
This file is different from all the other dictionary files, because it is the only one where the list with codes is fixed and that needs to exist. It should contain all the code that the back end needs to operate. The complete list with codes can be found in appendix 2. You might consider copying these files from our front end.
general.txt
This files contains codes and meanings that you want to use in your front end. You can choose if you need such a file (see section multi language support) and if so, which codes it should contain. Note that these codes are only accessible within the main body of your templates; not within loops.
rides.txt
This file is quite simular to general.txt. The only difference is, that the codes in the dictionary are accessible within the rides loop in index.cgi.
months.txt
For each month in the year, you can add extra words. name might be an appropriate one. Or if your front end concerns a yearly event to be held in juli, you could add something like is_after_juli to find out if your users want to add a ride for this year or for next year. The key is the two digit month number starting from 01.
countries.txt
For each country, you can add extra words. name might be an appropriate one. The key is the upper case country code. See Appendix 1 for a list with all country codes. You only have to include the ones that you are using in your front end.
currencies.txt
For each currency, you can add extra words. name might be an appropriate one. This list can also be used for specifying how to show an amount in the different currencies in the different languages. The key is the three letter upper case currency code.
languages.txt
For each language, you can add extra words. name might be an appropriate one. We also use it for specifying information about the translator. The key is the two letter lower case language code.

There are two kind of dictionaries. internal.txt, general.txt and rides.txt are simple lists with codes and their meanings. The other dictionaries are a little more complex. They contain a kind of sub-dictionary for each element in the list. For example, in the file currencies.txt, there will be a subdictionary for currency 'XEU' and one for 'USD'.

Values in the dictionaries in the directory all are meant for strings that are not language specific (like the name of a language in its local language in languages.txt or is_after_juli in months.txt) and will be accessible in all languages.

For an example of the exact format of the different dictionaries, you can have a look at a few examples from our front end.

Images

Images should be hosted on your own server.

Reading statistics

You can find out how your front end is doing, by going to http://www.hitchhikers.org/protected/stats.cgi. You will be prompted for a username and password. The username is equal to the name of your front end directory and the password will be given to you by your hitchhikers.org contact person. After logging in, you will get tables with the number of added rides and the number of reactions for your front end. If you feel some statistics are missing, just let us know. It does not include web server statistics.

Name server configuration

There are two ways for the scripts to select your front end. The second one looks much more elegant and would hide the name of our server. The first option is mainly intended for testing, before you configured your name server.

Creating templates

Templates are the method of creating customized front ends for the hitchhikers website. There are two types of templates: templates for creating web pages and templates for creating email messages. Both types are regular text files with some added markup. The scripts will process the templates and replace the added markup by generated values. The actual codes that can be used, are described per script.

The easiest way to learn how to write a front end for hitchhikers.org is to have a look at some example front ends. If you don't have any examples yet, please ask your hitchhikers.org contact person. The long list with input and output variables in chapter The Scripts is intended as a reference.

Template file names

All web templates should be stored in the directory templates within the front end directory. The email templates should be stored in the directory email_templates

The scripts can automatically select a language specific template, they can automatically select a language independent template or you can specify a template yourself, in the URL. The different options are explaied below in the order in which they are executed:

Selection through URL
The scripts will use the template with the name specified as tmpl in the URL, like http://hitchhikers.org/general.cgi?tmpl=about.tmpl. This option is only used with web templates
Automatic selection of language specific template
You can create a seperate template for all the languages that you want to support. The following templates can automatically be selected:
Automatic selection of language independent template
You can create one template that will be used for more the one language. if you use one template for multiple languages, the words will be substituted from the dictionary file of the current language. The following templates can automatically be selected:
The other scripts use their own design (scripts for administrative use) or redirect to one of the scripts that do require templates.

Template markup language

The HTML::Template module is used for combining the front ends with the scripts. read the online documentation (section 'The Tags') to find out more about the template language. The actual codes that can be used, are described per script.

Web template format

The format should be a html file with possibly some added markup.

Email template format

Each email template should begin with some headers, followed by a white line and then the body text. The headers start with a field name (like 'To' or 'From'), followed by a colon and a space and then the value. Each fieldname can only appear once in the headers and 'From', 'To' and 'Subject' are required. The 'From' and 'To' fields should contain a valid email addres between '<' and '>'.

The following is an example of a valid email template:

From: "The hitchhackers" <deletecodes@hitchhikers.org>
To: "<TMPL_VAR NAME="_name">" <<TMPL_VAR NAME="_email">>
Subject:  Thank you for your new ride in hitchhikers.org

Thank you for adding a ride from <TMPL_VAR NAME="_from_city"> to 
<TMPL_VAR NAME="_to_city"> on <TMPL_VAR NAME="_startdayname"> 
<TMPL_VAR NAME="_startmonth_name"> <TMPL_VAR NAME="_startdaynr">, 
<TMPL_VAR NAME="_startyear4">. 

Remember the remove-code to be able to remove your submission. Your code is: 
<TMPL_VAR NAME="_deletecode">. You can view or remove your entry at 
<TMPL_VAR NAME="_entryurl">.

Have fun, the hitchhackers

Note that whitespace and newlines will appear in the email message exactly as you put it in the templates.

Multi language support

For each template that you want to create, you have a choice of two ways to combine the texts and the design. If a language specific template is available, that one will be used (option 1). Otherwise, the language independent template will be used (option 2). See section template file names for more info on how to name the files.

Access to your own parameters

All parameters in the URL will be provided in the template (including the ones that you added to the URL), prepended with an underscore ('_'). If there is more then one value for a parameter, it will be provided as a HTML::Template list. The variable will have the name "_value". So if you have a list with colors as part of the URL, you can access them in the following way:

<HTML_LOOP NAME="colors">
  <HTML_VAR NAME="_value">
</HTML_LOOP>

If URLs are provided in the template, they will not contain the parameters you added.

Handling errors

If there is an error in the input parameters, the script might use the default value (this happens in index.cgi) or set some error variables for the template (this happers in form.cgi and most process scripts).

If an error has occured that did not happen because incorrect user input (like a database error or a bug), the script will show the template with the name 'error.tmpl' (for a front end that uses a template dictionary) or 'error_languagecode.tmpl' (for a front end that use a different template for each language). The error template will get an error code and a short (English) description of the error. As with all variables, the front end designer can choose whether or not to use this message. The codes that can be used in the error template, are described in error.tmpl.

If the error is so severe that it cannot reach your template, a boring white screen, plain English error will be shown. This should never occur.

Currencies

hitchhikers.org currently supports the following currencies: USD (US Dollar), XEU (Euro). If you need an other currency for your front end, please let us know.

You can choose to limit the currency options during submission of a new ride, by making your own list of currencies or by making the currency a hidden field in your ride submission form (if you just ont to support a single uccrency). But remember that the rides that you are showing (in index.cgi and entry.cgi) might have different currencies then the ones that you allow in your submission form, as some rides might be submitted by other front ends. If you really only want your own currencies, you can make sure that index.cgi and entry.cgi will only show rides that are posted by your front end, by setting the variable frontendids to the id of your front end(s).

Powered by hitchhikers.org button

The only requirement for the design of your front end is, that you include a clickable image with 'powered by hitchhikers.org' on all your pages. The image must be included in your pages by inserting the following template code in your templates (a header or footer might be a good location):

<TMPL_VAR NAME="_poweredby">
This will insert html code for a clickable button on your page. If the code is not included, the script will produce an error to remind you.

The scripts

Overview

There are four scripts that produce all the output. These can be considered the main scripts of the web site.

general.cgi
This script is provided for pages that need info from the scripts, but that don't use any hitchhikers.org specific actions. An example of the use of this cript can be found in the 'about us' page on the hitchhikers.org website. It accepts a front end, a language and a template as input variables. When producing URLs (like _form_url), only the front end and the language are included.
index.cgi
This script is used as welcome page and as search page. It will show the rides that are found. Only rides that are not deleted are shown. It accepts all input that is also accepted by general.cgi and many varables that limit the ride search (like freeridesonly). When producing URLs, all these (except for tmpl) parameters are included.
entry.cgi
This page shows one specific ride. The ride to show can be selected by giving the script the id of the ride (this can be an outdated ride) or some search criterions and an index to specify which ride in the resulting list should be shown.
form.cgi
This script is used for submitting a form. Note that this script has no input variables (other then the ones from general.cgi). All form input is send to process_addride.cgi, which redirects the result to this script.

Then there are a few scripts that do some work, but don't produce any output. When they are finished with their work, they redirect the user to one of the four main scripts (including all the input parameters that they got). They are normally called by forms on your pages or by URLs that are send to the user by email.

process_deleteride.cgi
This script deletes a ride from the database, given the id of the ride and the users password. After processing the request, the user will be redirected to entry.cgi.
process_addride.cgi
This script adds a ride to the database and sends an email to the driver, specifying the code to delete the entry. After processing the request, the user will be redirected to form.cgi.
process_passwordrequest.cgi
This script resends the users password to its email address. After processing the request, the user will be redirected to index.cgi.
process_addreaction.cgi
This script sends a reaction from a hitchhiker to the poster of a ride. After processing the request, the user will be redirected to entry.cgi.
process_deletequery.cgi
This script ends a query from a hitchhiker (a query is started by sending the newquery_add parameter and a name and email address to index.cgi). After processing the request, the user will be redirected to index.cgi.

And finaly, there is the possibility that an error occures. If the error is so severe that it can not be solved, it will use the error template (see section handling errors):

error.tmpl
There is no specific error script that you can call. The other scripts will use your error template whenever they can not produce a satisfactory output. See handling errors for a more detailed description.

How to read the script descriptions

The tables in the following sections describe how to use the different parameters. The tables can contain the following columns:

Name
The name of the variable.
If the name contains XX, this part should be replaced with a value. The possible value(s) of XX are described in Description.
If the name ends with DATE, this can be replaced with the following strings: For example, if the name is _after0daysDATE, the variable _after0daysdate_formatted will give you a formatted string (formatted following the rules described in your internal dictionary file) for the current date.
In or Out
Describes if the variable is an input variable for the script or and output variable (which you can use in your templates).
Format
Describes the format of output variables. The format of input variables is described in input formats.
If the format is 'LOOP', this item can be used to loop over multiple entries, using the HTML::Termplate loop feature. The elements of the loop will be described as _loopname / _variablename. If a loop is used as a variable (using TMPL_VAR), it will ge the number of elements in the loop. This can be used to test if the loop is empty or not.
If the format is 'boolean', false is represented by 0 or the empty string and true is represented by everything else. In cases where the variable is used in forms, the true value is represented by ' selected', so you can use it as
<TMPL_LOOP NAME="_currencies">
  <TMPL_VAR NAME="_name">
</TMPL_LOOP>
Default
For input variables only: describes the value that is used if none is given. required means that the script will give an error if the value is not given.
Description
The description of the variable. The description might show the value of the variable for the current script (as you are reading it now). If a variable is not yet implemented (for output variables) or not yet used by the scripts (for input variables), this column will mention not yet implemented
(long term) Add 'on error' column to all input variables to explain what happens with invalid input (will normally be 'use default', 'set an error variable in result template to true' or 'show error template').

Some output variables return a URL. These URLs will always end with a '?' or ';', so you can append your own variables like this:

<a href="<TMPL_VAR NAME="_general_url">tmpl=about.tmpl">About us</a>

Scripts of which the name start with 'process_', will not produce a page. After doing their actions, they will redirect the user to another script (specified in the section for that script). This means that these scripts do not have any output variables.

Input formats

Different scripts require (or allow) input fields. This section describes for all field types what format is required. The use of the field, de default value and whether it is required or not are described in the following sections. Note that some of the items are described as regular expressions. The meaning of these Regular Expressions will not be explained here.
name
/^([-\w\.&, \(\)]{1,220})$/
email
A valid email address (verified with a complex regular expression)
phone
as name
country
/^[A-Z]{2}(_[A-Z]{2})?$/ A valid (upper case) country code.
city
as name
region
a valid region name (see appendix 1)
seats
1, 2, 3, 99 (more then 3) or 100 (unknown)
smoking
'undefined', 'no', 'allowed' or 'driversmokes'
sort key
'from_country', 'to_country', 'entry_date', 'cost', 'seats', 'smoking' or 'start_date'
amount
A positive real number, separator can be ',', '.' or the separator specified in the internal dictionary.
cost type
'pp' (per person), 'pppk' (per person, per kilometer) or 'total'
year
an integer between 2000 and 2100
month
an integer between 1 and 12
day
an integer between 1 and 31
id
a positive integer
index
a non-negative integer
message
Any text, any length.
password / delete code
/^[0-7]{_delete_code_length}$/
boolean
Undefined, 0 or the empty value will be interpreted as false, all other values as true.
fe
A name of a front end directory (not including 'www.') in _frontendroot.
lang
A valid two letter lower case language code.
tmpl
Template file name, including extension, relative to the front ends template directory.

general.cgi

Except for the variables mentioned in the table, the following variables are also included:

Name In
or
Out
Format Default Description
lang in See Input formats user agent default language or otherwise front end default language The language that the script should use to show the page in. The given language code will be included in URL's that are generated by the scripts.
fe in see Input formats domain name in URL or otherwise the script default front end The front END that the script should use to show the page in. The given front end will be included in URL's that are generated by the scripts.
tmpl in See Input formats the name of the script (see section template file names) The language that the script should use to show the page in. The given template will not be included in URL's that are generated by the scripts.
_scripturlroot out URL - The script root location (in URL form). Current value is '/'.
_frontendroot out directory path - The location of the directory containing all front end directories. Current value is '/home/hitch/www/frontends/'. Not supported
_delete_code_length out positive integer - The length of the code used to delete entries. Current value is '8'.
_max_list_length out positive integer - The maximum length of a list with rides. Current value is '500'.
_default_fe out name of a directory in _frontendroot - The front end that will be used if no other front end can be found. Current value is 'europe.hitchhikers.org'. Not supported.
_db_name out alphanumeric characters - The name of the database. Current value is 'hitch_main'. Not Supported.
_db_username out alphanumeric characters - The username for logging into the database. Current value is 'hitch_hitchhiker'. Not supported
_default_lang out two character language code - The default language for your front end. This variable is set in the front ends settings file. Current value is 'en'.
_default_query out any query string (in URL format) - The initial query string for your front end. This variable is set in the front ends settings file. Current value is 'isquery=1&sk1=start_date&sk2=from_country&fromregions=europe&toregions=europe'.
_tmpl_dir out an absolute directory path - The template directory of your front end, relative to your front end root directory. This variable is set in the front ends settings file. Current value is 'templates/'.
_poweredby out HTML sniplet - This variable produces some html code to show the 'powered by hitchhikers.org' button. It is required that you show this button on all of your pages. Current value is 'powered by datagroceries.com'.
_lang out a language code - Will be set to the current two character language code. Current value is 'en'.
_language_is_XX out '1' - Will be set to true for the current language. XX will be replaced by a two character language code.
_tmplname out '1' - The name of the template in use (will be set to the name of the name of the template that should have been used in case of an error). Current value is ''.
_tmplname_is_XX out '1' - Will be set to true for the current template name. XX will be replaced by a template name.
_scriptname_is_XX out '1' - Will be set to true for the current script name. XX will be replaced by a script name (without path).
_developer out string - The name of the developer which version of the scripts are being executed.Current value is 'production'.
_developer_is_XX out '1' - Will be set to true for the current developer name. XX will be replaced by a developer name.
_frontend out domain name without 'www.' - The name of the current frontend. Current value is 'europe.hitchhikers.org'.
_domainname out domain name - The name of the domain of the current URL. Current value is 'europe.hitchhikers.org'.
_frontend_is_XX out '1' - Will be set to true for the current front end name. XX will be replaced by a front end name (without 'www.').
_useragent_is_XX out '1' - Will be set to true for many characteristics about the user agent (browser type, browser version, operating system type and operating system version. Currently the following values are supported for XX:
browsers: netscape nav2 nav3 nav4 nav4up nav45 nav45up navgold nav6 nav6up gecko ie ie3 ie4 ie4up ie5 ie55 neoplanet neoplanet2 mosaic aol aol3 aol4 aol5 aol6 webtv opera lynx emacs staroffice lotusnotes icab konqueror java
operating systems: windows win16 win3x win31 win95 win98 winnt win32 win2k winme mac mac68k macppc os2 unix sun sun4 sun5 suni86 irix irix5 irix6 hpux hpux9 hpux10 aix aix1 aix2 aix3 aix4 linux sco unixware mpras reliant dec sinix freebsd bsd vms amiga
other devices: wap audrey iopener palm avantgo
robots: wget getright yahoo altavista lycos infoseek lwp webcrawler linkexchange slurp google
Note that multiple values can be true. More info can be found at http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
_useragent_majorversion_is_XX out '1' - Will be set to true for the major version number of the users browser. for example, if the user is using Internet Explorer 5.1b2, _useragent_majorversion_is_5 will be set to true.
_useragent_minorversion_is_XX out '1' - Will be set to true for the minor version number of the users browser. for example, if the user is using Internet Explorer 5.1b2, _useragent_minorversion_is_1 will be set to true.
_useragent_betaversion_is_XX out '1' - Will be set to the beta version number of the users browser (this is any non-numeric characters after the version number. for example, if the user is using Internet Explorer 5.1b2, _useragent_betaversion_is_b2 will be set to true.
_general_url out URL - The URL to the general page. Does include the current language and front end settings, but not the template name and variables that are set by the user. Current value is 'general.cgi?'.
_index_url out URL - The URL to the index page. Does include the current language and front end settings, but not the template name and variables that are set by the user. Might include index specific variables. Current value is 'index.cgi?'.
_form_url out URL - The URL to the form page. Does include the current language and front end settings, but not the template name and variables that are set by the user. Does not include form specific variables. Current value is 'form.cgi?'.
_this_url out URL - The URL to the current page. Does include the current language and front end settings, but not the template name and variables that are set by the user. Does include page specific variables. Current value is ''. Not yet implemented.
_general_params out partial URL - A string to include to URLs if you want to keep the current front end and language settings. Current value is ''.
_general_form out HTML - The HTML form elements to include hidden fields for the language and front end setting. Current value is ''.
_debug_info out HTML - This should be a list with all parameters available to the template. Can be used for documentation and debugging purposes. Actually, if we would include a description with each parameter and value, we would not need this list!!!. Not yet implemented.
_afterXXdaysDATE out dateinfo - Information for the date, XX days after today. Currently provided for the following values of XX: 0, 1, 2, 3, 4, 5, 6, 7, 14, 15, 21, 30, 60, 90, 365. Let us know if you need other values for your front end
_currencies out LOOP - Loop over all supported currencies. The list is sorted alphabetical on the code.
_currencies / _currency_code out three letter code - The currency code of the currency in the loop
_currencies / user defined out user defined - All entries in dictionaries/languagecode/currencies.txt will be added to this list. See hitchhikers.org/dictionaries/en/currencies.txt for an example of the use and the format. Can be used for specifying the currency name and formatting rules.
_languages out LOOP - Loop over all supported languages. The list is sorted alphabetical on the code.
_languages / _language_code out two letter code - The language code of the language in the loop
_languages / _language_url out URL - The URL to switch to the language in the loop
_languages / _is_current_language out undefined or '1' - Whether the language in the loop is the current language. Will only be true for one of the languages.
_languages / user defined out user defined - All entries in dictionaries/languagecode/languages.txt will be added to this list. See hitchhikers.org/dictionaries/en/languages.txt for an example of the use and the format.
_countries_XX out LOOP - A list with all countries in region XX. See appendix 1 for a overview of all regions and their countries. If the user dictionary contains an element with name as name, it will sort on the value for that entry and on the code otherwise. Note that you can invluence the sorting by prepending hidden characters to the name (like '<!--001-->').
_countries_XX / _code out a country code - The country code of the current country in the list.
_countries_XX / user defined out user defined - All entries in dictionaries/languagecode/countries.txt will be added to this list. See hitchhikers.org/dictionaries/en/countries.txt for an example of the use and the format. Will mainly be used for specifying the country name
_months out LOOP - A list with all months.
_months / _month_number out between 1 and 12 - The number of the month in the list (starts with 1).
_months / _month_number_is_XX out '1' - True for the number of the month in the list (starts with 1).
_months / _is_current_month out boolean. Value of true is ' selected' - Whether the month in the list is the current month. Exactly one entry will have a true value.
_months / _in_this_year out boolean - Whether the month in the list is will still occur in this year (is also true for the current month).
_months / user defined out user defined - All entries in dictionaries/languagecode/months.txt will be added to this list. See hitchhikers.org/dictionaries/en/months.txt for an example of the use and the format. Will mainly be used for specifying the month name.
_days out LOOP - A list with all days of the month.
_days / _day_number out between 1 and 31 - The number of the day in the list (starts with 1).
_days / _day_number_is_XX out '1' - True for the number of the day in the list (starts with 1).
_days / _is_current_day out boolean. True value is ' selected' - Whether the day in the list is the current day. Exactly one entry will have a true value.
_days / user defined out user defined - All entries in dictionaries/languagecode/days.txt will be added to this list. No examples yet. But hitchhikers.org/dictionaries/en/months.txt should give you an idea. I cannot think of any use of it, but I included it for consistency.

index.cgi

All input and output variables from general.cgi and the variables listed below are supported by index.cgi

Name In
or
Out
Format Default Description
isquery in boolean false If this variable is not true, index.cgi will ignore all other index.cgi specific parameters and use the parameters that are described in the front ends settings file (see section settings file)
begindepyear in year see below Only rides that departure on or after begin date are shown.
begindepmonth in month see below Only rides that departure on or after begin date are shown.
begindepday in day see below Only rides that departure on or after begin date are shown.
begindepdate_from_now in non-negative integer, representing days 0 Only rides departing begindepdate_from_now days after today or later are shown.
enddepyear in year see below Only rides on or before end date are shown.
enddepmonth in month see below Only rides on or before end date are shown.
enddepday in day see below Only rides on or before end date are shown.
enddepdate_from_now in non-negative integer, representing days infinite Only rides departing enddepdate_from_now days after today or earlier are shown.
max_depdate_interval in non-negative integer, representing days infinite Only rides departing max_depdate_interval days after the begindate (this is the maximum of begindepyear-begindepmonth-begindepday and begindepdate_from_now) or earlier are shown.
beginentryyear in year see below Only rides that are entered on or after begin entry date are shown.
beginentrymonth in month see below Only rides that are entered on or after begin entry date are shown.
beginentryday in day see below Only rides that are entered on or after begin entry date are shown.
beginentrydate_from_now in integer, representing days minus infinity Only rides entered beginentrydate_from_now days after today or later are shown. Will normally be a negative integer, because there are no rides added in the future.
endentryyear in year see below Only rides that are entered on or before end entry date are shown.
endentrymonth in month see below Only rides that are entered on or before end entry date are shown.
endentryday in day see below Only rides that are entered on or before end entry date are shown.
endentrydate_from_now in integer, representing days 0 Only rides entered endentrydate_from_now days after today or earlier are shown. Will normally be a negative integer, because there are no rides added in the future.
max_entrydate_interval in integer, representing days infinite Only rides entered max_entrydate_interval days after the start entrydate (this is the maximum of beginentryyear-beginentrymonth-beginentryday and beginentrydate_from_now) or earlier are shown.
maxrideid in id infinite Only rides with id lower or equal to maxrideid are shown.
minrideid in id 1 Only rides with id higher or equal to minrideid are shown.
minseats in integer 1 Only rides with minseats or more free seats are shown (rides where the number of seats is not known, are always shown).
findsmoking in 'no' or 'allowed' undefined If the value is 'no', only rides where the driver is not smoking are shown (both rides where the driver specified 'no smoking ride' or 'driver doesnt smoke, but passengers are allowed to smoke'). If the value is 'allowed', only rides where the passengers are allowed to smoke are shown (both rides where the driver specified 'driver smokes' or 'driver doesnt smoke, but passengers are allowed to smoke'). If the value is undefined or any other value, all rides will be shown.
freeridesonly in boolean false If set to true, only free rides are shown.
datedridesonly in boolean false If set to true, only rides with one date are shown (for hitchhiking). if set to true, undatedridesonly will be assumed false.
undatedridesonly in boolean false If set to true, only rides without a specific date are shown (for carpooling).
frontendids in list with ids empty list Only rides that are added using a front end in the list are shown. This enables you to show only rides that are posted on your front end. This enables you to make your own sub database, but remember that other front ends can always see your rides.
If no front end is specified, rides from all front ends are shown.
fromregions in list with regions empty list Only rides of which the departure country is within at least one of the specified regions are shown. If no region is specified, rides departing from any country are shown.
fc in list with country codes empty list Only rides of which the departure country is within the country list are shown. If no country is specified, rides departing from any country are shown. The name is abbreviated for performence reasons.
fromcities in list with cities empty list Only rides of which the departure city contains at least one of the stings in the city list are shown (so if 'Roskilde' is in the list, 'roskilde festival' will be shown. If no city is specified, rides departing from any city are shown.
toregions in list with regions empty list Only rides of which the destination country is within at least one of the specified regions are shown. If no region is specified, rides going any country are shown.
toregions_as_fromregions in boolean false Only rides to regions in fromregions and in toregions will be shown. So if toregions is the empty list, only rides to fromregions will be shown.
tc in list with country codes empty list Only rides of which the destination country is within the country list are shown. If no country is specified, rides going to any country are shown. The name is abbreviated for performence reasons.
tc_as_fc in boolean false Only rides to countries in fc and in tc will be shown. So if tc is the empty list, only rides to fc will be shown.
tocities in list with cities empty list Only rides of which the destination city contains at least one of the stings in the city list are shown (so if 'Roskilde' is in the list, 'roskilde festival' will be shown. If no city is specified, rides going to any city are shown.
tocities_as_fromcities in boolean false Only rides to cities in fromcities and in tocities will be shown. So if tocities is the empty list, only rides to fromcities will be shown.
newquery_add in boolean false If set to true, a notification is send to newquery_email, whenever a new ride is submitted, that matches all search requirements.
newquery_name in name required if newquery_add is true The name of the person where the notifications should be send to.
newquery_email in email required if newquery_add is true The email address where the notifications should be send to.
sk1 in 'from_country', 'from_city', 'to_city', 'to_country', 'entry_date', 'cost', 'seats' or 'start_date' sk2 Primary search key
sk2 in 'from_country', 'from_city', 'to_city', 'to_country', 'entry_date', 'cost', 'seats' or 'start_date' database default Secondary search key
limit in positive integer, less or equal to _max_list_length _max_list_length The maximum number of rides to be shown in the screen.
begin_index in index 0 The first item to be shown in the screen. So if the list contains 80 items, the limit is 20 and the begin index is 16, items 16 (starting from 0) to 35 are shown. If begin_index is 75, then items 75 to 79 are shown.
_sort_by_XX_url out URL - An url to the same page, but than sorted by XX. XX can be from_country, to_country, start_date, entry_date, smoking, seats or cost. The previous primary sort key well be the secondary sort key.
_is_sorted_by_XX out '1' - XX can be from_country, to_country, start_date, entry_date, smoking, seats or cost. Is true for the name of the primary seach key.
_sorting_params out URL - A parameter string to retrieve the current sort settings. Should be used as part of a URL.
_sorting_form out html - A html form to retrieve the current sort settings. Should be used as part of a form.
_begindepDATE out dateinfo - All date info about the beginning of the departure date interval.
_begindepdate_from_now out integer, representing days - Set to the number of days after today where the first departure date is set to. So if the list shows rides from tomorrow to next week, _begindepdate_from_now is set to 1.
_begindepdate_from_now_is_XX out '1' - True when XX is the number of days after today where the first departure date is set to. So if the list shows rides from tomorrow to next week, _begindepdate_from_now_is_1 will be true.
_enddepDATE out dateinfo - All date info about the last day of the departure date interval.
_enddepdate_from_now out integer, representing days - Set to the number of days after today where the last departure date is set to. So if the list shows rides from tomorrow to next week, _enddepdate_from_now is set to 7.
_enddepdate_from_now_is_XX out '1' - True when XX is the number of days after today where the last departure date is set to. So if the list shows rides from tomorrow to next week, _enddepdate_from_now_is_7 will be true.
_depdate_interval out non-negative integer - The number of days in the departure date interval.
_depdate_interval_is_XX out '1' - Is true if XX is the number of days in the departure date interval.
_beginentryDATE out dateinfo - All date info about the beginning of the entry date interval.
_beginentrydate_from_now out integer, representing days - Set to the number of days after today where the first entry date is set to. So if the list shows rides from tomorrow to next week, _beginentrydate_from_now is set to 1.
_beginentrydate_from_now_is_XX out '1' - True when XX is the number of days after today where the first entry date is set to. So if the list shows rides from tomorrow to next week, _beginentrydate_from_now_is_1 will be true.
_endentryDATE out dateinfo - All date info about the last day of the entry date interval.
_endentrydate_from_now out integer, representing days - Set to the number of days after today where the last entry date is set to. So if the list shows rides from tomorrow to next week, _endentrydate_from_now is set to 7.
_endentrydate_from_now_is_XX out '1' - True when XX is the number of days after today where the last entry date is set to. So if the list shows rides from tomorrow to next week, _endentrydate_from_now_is_7 will be true.
_entrydate_interval out non-negative integer - The number of days in the entry date interval.
_entrydate_interval_is_XX out '1' - Is true if XX is the number of days in the entry date interval.
_minseats_is_XX out '1' - Is set to true where XX is the minimum number of free seats in the previous query.
_findsmoking_is_XX out '1' - Is set to true where XX is the specified smoking selection. Can be 'undefined', 'no' or 'allowed'.
_total_number_of_entries out non-negative integer - The number of entries in the selection (can be more then the number of entries in the current screen).
_number_of_rides_in_screen out non-negative integer - The number of entries in the current screen. This is the number of entries that will be shown on the current page. Might be less then the total number of rides that are found.
_number_of_screens_is_XX out '1' - Set to true for XX being the total number of screens for the whole selection. So if the query found 125 rides and the screensize is 20, _number_of_screens_is_7 will be set to true.
_previous_screen_url out URL - The url to the previous screen.
_next_screen_url out URL - The url to the next screen.
_countries_XX / _query_is_fromcountry out boolean. True value is ' selected' - Set to true if the current country in the list is an accepted departure country in the query. Multiple values can have true value.
_countries_XX / _query_is_tocountry out boolean. True value is ' selected' - Set to true if the current country in the list is an accepted departure country in the query. Multiple values can have true value.
_months / _query_is_begindepmonth out boolean - Set to true if the current month in the list is the begin departure month in the query.
_months / _query_is_enddepmonth out boolean - Set to true if the current month in the list is the end departure month in the query.
_months / _query_is_beginentrymonth out boolean - Set to true if the current month in the list is the begin entry month in the query.
_months / _query_is_endentrymonth out boolean - Set to true if the current month in the list is the end entry month in the query.
_days / _query_is_begindepday out boolean - Set to true if the current day in the list is the begin departure day in the query.
_days / _query_is_enddepday out boolean - Set to true if the current day in the list is the end departure day in the query.
_days / _query_is_beginentryday out boolean - Set to true if the current day in the list is the begin entry day in the query.
_days / _query_is_endentryday out boolean - Set to true if the current day in the list is the end entry day in the query.
_screens out LOOP - A list with all screens that are required to show all rides in the selection.
_screens / _screen_number out positive integer - The number of the screen in the loop (starts with 1).
_screens / _is_current out boolean - Whether the screen in the loop is the current screen.
_screens / _url out URL - URL to the screen in the loop.
_screens / _begin_index out non-negative integer - The index of the ride that is the first ride in the screen in the loop. So if the screensize is 15 and for screen number 4, _begin_index will be 45.
_rides out LOOP - A list with all rides within the current screen, that match the specified limitations.
_rides / _url out URL - The URL to the ride in the loop.
_rides / _drivername out string - The name of the driver for the ride in the loop.
_rides / _from_country_XX out user defined - Adds all data from countries.txt for the country of the ride in the loop. So if your dictionary contains the key-value pair name=>Spain for the country with code ES, the value of _from_country_name will be 'Spain' for all rides which have departure country code ES.
_rides / _to_country_XX out user defined - Adds all data from countries.txt for the country of the ride in the loop. So if your dictionary contains the key-value pair name=>Spain for the country with code ES, the value of _to_country_name will be 'Spain' for all rides which have destination country code ES.
_rides / _countries_are_equal out user defined boolean True if the destination country is equal to the departure country.
_rides / _from_city out string - The name of the departure city for the ride in the loop.
_rides / _to_city out string - The name of the destination city for the ride in the loop.
_rides / _from_city_url out string - The name of the departure city for the ride in the loop. URL escaped, so it can be used in an URL (like in a link to a route planner)
_rides / _to_city_url out string - The name of the destination city for the ride in the loop. URL escaped, so it can be used in an URL (like in a link to a route planner)
_rides / _dated out boolean - Whether the ride is dated or not.
_rides / _startDATE out dateinfo - The departure date of the ride in the loop
_rides / _entryDATE out dateinfo - The entry date of the ride in the loop.
_rides / _rideid out id - The ride id of the ride in the loop.
_rides / _remark out string - The remarks that the driver has specified.
_rides / _seats out '1', '2', '3', '>3' or '?' - The number of free seats of the ride in the loop.
_rides / _smoking out 'undefined', 'no', 'allowed', 'driversmokes' - The smoking selection of the driver.
_rides / _smoking_is_XX out boolean - True where XX is the smoking selection of the driver.
_rides / _cost out amount, '.' is used as separator. - The cost (this is the amount the driver wants to get) of the ride in the loop.
_rides / _cost_integer out positive integer - The integer part of the cost (this is the amount the driver wants to get) of the ride in the loop. To be used if the language does not have a dot as separator.
_rides / _cost_fraction out two digit positive integer - The fracrional part of the cost (this is the amount the driver wants to get) of the ride in the loop. To be used if the language does not have a dot as separator.
_rides / _cost_is_XX out boolean - True where XX is the cost. the notation is first the integer part, then a dot and then the fraction.
_rides / _currency_code out a three letter uppercase currency code - The currency code in which the cost is specified.
_rides / _currency_XX out user defined - Adds all data from currencies.txt for the currency of the ride in the loop. So if your dictionary contains the key-value pair name=>Euro for the currency with code XEU, the value of _currency_name will be 'Euro' for all rides where the currency code is XEU.
_rides / _costtype out code - The costtype of the ride in the loop.
_rides / _costtype_is_XX out boolean - True for the cost type of the ride in the loop.
_rides / user defined out user defined - All entries in dictionaries/languagecode/rides.txt will be added to this list. See hitchhikers.org/dictionaries/en/rides.txt for an example of the use and the format. Note that this list behaves different from the other user defined entries. In the other dictionaries, you had to specify a key. The data that belongs that key will only be included in the loop entry with that key. The name-value pairs in rides.txt will be included in all entries in the loop. This can be used to add language codes that you want to access within the loop.
_stopquery_success out boolean - Is set to true if this page is the result from process_deletequery.cgi and the script removed the query successfully.
_stopquery_wrong_password out boolean - Is set to true if this page is the result from process_deletequery.cgi and the script did not remove the query because the password was incorrect.
_newquery_success out boolean - Is set to true if the user specified in the query that (s)he wants to get a notification whenever a machting ride is added to the database and the request was processed successfully.
_newquery_wrong_name out boolean - Is set to true if the user specified in the query that (s)he wants to get a notification whenever a machting ride is added to the database but the name was invalid.
_newquery_wrong_email out boolean - Is set to true if the user specified in the query that (s)he wants to get a notification whenever a machting ride is added to the database but the email was invalid.
_passwordrequest_success out boolean - Is set to true if this page is the result from process_passwordrequest.cgi and the script has send an email with the password successfully to the user.
_passwordrequest_unknown_person out boolean - Is set to true if this page is the result from process_passwordrequest.cgi and the script could not find the specified person in the database.

As part of the query, you can specify four dates (the begin and end date for the departure date and the begin and end date for the entry date) by a year, a month and a day. Some of these values can be ommited. The way that the missing values are interpreted is described below:
specified valuesInterpretation for
begin entry datebegin departure dateEnd entry datedeparture date
nothingThe beginning of timeToday TodayThe end of time
yearJanuary 1st of the specified year December 31st of the specified year
monthfirst occurence of the last day of the specified month first occurence of the last day of the specified month
year-monthyear-month-01 last day of the specified year and month
month-dayfirst occurence of the specified month and day first occurence of the specified month and day
year-month-dayyear-month-day

entry.cgi

The variables to be used with this script include all variables from general.cgi, all input variables from index.cgi and all output variables from the list _rides in index.cgi.

The selection of the ride can be done by giving an ride id as input variable (see below), or by giving all the restrictions as in index.cgi to specify a query plus an index (see below) to specify which ride in the query to show.

Name In
or
Out
Format Default Description
Exactly one of the following two input variables is required.
id in non-negative integer required Ride id to be shown. The ride might be deleted or expired.
index in non-negative integer required The ride from the query with the given index will be shown. Normally this input variable is accompanied with other input variables to specify the query (see index.cgi). Starts from 0. Note as deleted and expired rides will never show up in a query, this will never show a deleted or exired ride.
_deletionDATE out dateinfo or undefined - The deletion date of the ride or undefined if the ride is not deleted.
_deletionremark out string - An (English) description why/by whom the ride is deleted or undefined if the ride is not deleted.
_is_fresh out boolean - Whether the ride is still open (not expired or deleted).
_back_to_list_url out URL - URL to go back to the list with rides (keeping the query).
_next_url out URL - URL to go to the next ride in the list.
_previous_url out URL - URL to go to the previous ride in the list.
_entry_deletion_success out boolean - Is set to true if a user (or administrator) just successfully deleted a ride.
_entry_deletion_wrong_password out boolean - Is set to true if a user (or administrator) just tried to delete a ride, but used an invalid password.
_reaction_success out boolean - Is set to true if a user just successfully send a reaction to a driver.
_reaction_wrong_email out boolean - Is set to true if a user just tried to send a reaction to a driver, but the email address (of the sender) was invalid.
_reaction_wrong_name out boolean - Is set to true if a user just tried to send a reaction to a driver, but the name (of the sender) was invalid.
_reaction_wrong_message out boolean - Is set to true if a user just tried to send a reaction to a driver, but the message (of the sender) was invalid.

form.cgi

All input and output variables from general.cgi and the variables listed below are supported by form.cgi

Name In
or
Out
Format Description
_returnseats_XX out boolean Is set to true where XX is the number of free seats in return journey.
_costtype_XX out boolean Is set to true where XX is the costtype in the submitted form. Will be 'total', 'pp' or 'pppk'.
_depyear_is_after_XX_years out boolean. True value is ' selected' Is set to true where XX is depyear minus the current year. XX will be a non-negative integer
_returnyear_is_after_XX_years out boolean. True value is ' selected' Is set to true where XX is returnyear minus the current year. XX will be a non-negative integer
_currencies / _newride_is_currency out boolean. True value is ' selected' Is set to true if the currency in the submitted form is equal to the currencyy in the loop. Exactly one country in the loop will have a true value.
_countries_XX / _newride_is_fromcountry out boolean. True value is ' selected' Is set to true if the departure country in the submitted form is equal to the county in the loop. Zero or one country in the loop will have a true value.
_countries_XX / _newride_is_tocountry out boolean. True value is ' selected' Is set to true if the destination country in the submitted form is equal to the county in the loop. Zero or one country in the loop will have a true value.
_months / _newride_is_depmonth out boolean. True value is ' selected' Is set to true if the departure month in the submitted form is equal to the month in the loop. Zero or one country in the loop will have a true value.
_days / _newride_is_depday out boolean. True value is ' selected' Is set to true if the departure day in the submitted form is equal to the day in the loop. Zero or one country in the loop will have a true value.
_months / _newride_is_returnmonth out boolean. True value is ' selected' Is set to true if the return month in the submitted form is equal to the month in the loop. Zero or one country in the loop will have a true value.
_days / _newride_is_returnday out boolean. True value is ' selected' Is set to true if the return day in the submitted form is equal to the day in the loop. Zero or one country in the loop will have a true value.
_newride_wrong_email out boolean Is set to true if there is an error in the email of the submitted ride.
_newride_wrong_name out boolean Is set to true if there is an error in the name of the submitted ride.
_newride_wrong_phone out boolean Is set to true if there is an error in the phone of the submitted ride. Note that the telephone number is not required, so an empty string will not generate an error.
_newride_wrong_depday out boolean Is set to true if there is an error in the departure day of the submitted ride.
_newride_wrong_depmonth out boolean Is set to true if there is an error in the departure month of the submitted ride.
_newride_wrong_depyear out boolean Is set to true if there is an error in the departure year of the submitted ride.
_newride_wrong_returnday out boolean Is set to true if there is an error in the departure day of the submitted ride. This field is not required if return_trip is set to false in the from.
_newride_wrong_returnmonth out boolean Is set to true if there is an error in the departure month of the submitted ride. This field is not required if return_trip is set to false in the from.
_newride_wrong_returnyear out boolean Is set to true if there is an error in the departure year of the submitted ride. This field is not required if return_trip is set to false in the from.
_newride_returndate_before_departure out boolean Is set to true if the return date is set and it is before the departure date in the submitted ride.
_newride_departuredate_in_the_past out boolean Is set to true if the departure date is before today in the submitted ride.
_newride_wrong_depseats out boolean Is set to true if there is an error in the number of free seats of the submitted ride. Note that the telephone number is not required, so an empty string will not generate an error.
_newride_wrong_cost out boolean Is set to true if there is an error in the cost of the submitted ride. Note that the cost is not required, so an empty string will not generate an error.
_newride_wrong_currency out boolean Is set to true if there is an error in the currency code of the submitted ride. Note that the costtype is required.
_newride_wrong_costtype out boolean Is set to true if there is an error in the cost type of the submitted ride. Note that the costtype is required.
_newride_wrong_fromcity out boolean Is set to true if there is an error in the departure city of the submitted ride.
_newride_wrong_tocity out boolean Is set to true if there is an error in the destination city of the submitted ride.
_newride_wrong_fromcountry out boolean Is set to true if there is an error in the departure country of the submitted ride.
_newride_wrong_tocountry out boolean Is set to true if there is an error in the destination country of the submitted ride.
_newride_XX_errors out boolean Is set to true where XX is the number of errors in the form. If _newride_0_errors is true, there are no errors and the ride is accepted.

error.tmpl

Name In
or
Out
Format Description
_is_error out "1" Set to true if there is an error. But as you are using it in the error template, this will always be true. I don't know why this variable exists....
_message out English text A short English description of the error. You recoomended not to use this variable unless you don't mind English technical nerd talk on your error page.
Only one of the next variables will be set to true:
_db_misc out boolean Is set to true if the error occured during a database related action.
_db_connecting out boolean Is set to true if the error occured during connecting to the database.
_entry_not_found out boolean Is set to true if the error occured while searching for a database entry and the id was invalid.
_invalid_language out boolean Is set to true if the scripts could not determine a valid language for the chosen front end.
_invalid_frontend out boolean Is set to true if the scripts could not determine a valid front end (from thew login name, the parameter list, the domain name and the default value).
_internal out boolen This is what we call 'a bug' in the software. The software came to a state which it was not suppose to come in. Hope your users will never see this error.....
_unknown out boolean The script was notr able to determine thew cause of the error.

process_deleteride.cgi

This script is used to delete a ride.
Name In
or
Out
Default Description
entry_id in required The id of the ride to be deleted.
delete_code in required The password of the user who posted the ride.

process_deletequery.cgi

This script is used to delete a query.
Name In
or
Out
Default Description
stopquery_id in required The id of the query to be deleted.
stopquery_password in required The password of the user who posted the query.

process_passwordrequest.cgi

Name In
or
Out
Default Description
Exactly one of the following variables should have a valid value:
passwordrequest_entry_id in required The password will be send to the submitter of the specified entry.
passwordrequest_email in required If a user with the given email address is known in the system, the password will be send to this email address.
passwordrequest_person_id in required The password will be send to this person.

process_addride.cgi

This script is used to add a ride.
Name In
or
Out
Default Description
name in required The full name of the poster of the ride.
email in required The email address of the poster of the ride.
telephone in empty The telephone number of the poster of the ride.
from_country in required The country code of the country where the driver is departing from.
from_city in required The city where the driver is departing from.
to_country in required The country code of the country where the driver is going to.
to_city in required The city where the driver is going to.
dateless in optional If set to true, a dateless ride will be assumed and all datefields will be ignored. Note that one
depday in required The day the driver is leaving.
depmonth in required The month number the driver is leaving.
depyear in the next occasion of depday-depmonth The year the driver is leaving.
return_trip in false whether a return trip is specified or not.
returnday in required if return_trip is true The day the driver is returning.
returnmonth in required if return_trip is true The month number the driver is returning.
returnyear in the next occasion of returnday-returnmonth, after departure date The year the driver is returning.
cost in 0 The amount of money the driver wants to have for the trip. Will be rounded at two digits after the separator. '.' and ',' can be used as a separator. if you want a different separator for your language, you can ask us to add it, or you can provide the user with a combo box of possible values (instead of a text field), so you can show something that is different from what is send to this script.
currency in required The currency in which the amount is specified.
costtype in required Describes what the amount means.
smoking in undefined the smoking selection of the driver. Can be 'undefined' (the driver did not specify the smoking selection), 'no' (the driver does not smoke and does not allow smoking), 'allowed' (the driver does not smoke, but allowes smoking) or 'driversmokes' (the driver smokes and allowes others to smoke as well).
depseats in 100 (unknown) The number of free seats in the car on the outward journey.
returnseats in as depseats The number of free seats in the car on the return trip. Note that as the default is as depseats, you can choose to ignore this field (in which case the number of free seats in the return journey would always be copied from the outward journey), make a combo box with the extra option "as onward jouney" (with a false value), of just make a combo with the five valid options.
message in empty Remarks about the ride. can be that the driver can be reached on a second telephone number, the duration of the trip, the route of the trip or that a drivers licence is prefered.

process_addreaction.cgi

This script is used for sending a reaction to a driver.
Name In
or
Out
Default Description
entry_id in required The id of the ride to which the user wants to send a reaction.
reaction_name in required The full name of the user who posts the message.
reaction_email in required The email address of the user who posts the message.
reaction_message in required The message that the user wants to send to the driver.

reaction.tmpl

This email template is used for sending a reaction email to the driver.
Name Format Description
_sendername a non empty string The name of the person that sends the reaction.
_senderemail a valid email address The email address of the person that sends the reaction.
_drivername a non empty string The name of the driver (that is the person that should receive this message).
_driveremail a valid email address The email address of the driver (that is the person that should receive this message).
_message a non empty string The message that the sender has written for the driver.

addride.tmpl

This email template is used for sending a notification to the driver. Informing that the ride ahs been added.
Name Format Description
_name a non empty string The name of the driver.
_email a valid email address The email address of the driver.
_deletecode a fixed length integer The code with which the ride can be deleted.
_from_city a non empty string The departure city of the ride.
_to_city a non empty string The destination city of the ride.
_entryurl a full URL The URL which will show the added ride.
_deletion_url a full URL The URL with which the submitted ride can be deleted (directly).

addquery.tmpl

This email template is used for sending a notification to someone who has added a query to the database. A query is a request for getting an email notification when a simular ride is submitted.
Name Format Description
_name a non empty string The name of the driver.
_email a valid email address The email address of the driver.
_removecode a fixed length integer The code with which the query can be deleted.
_remove_url a full URL The URL with which the query can be deleted (directly).

passwordrequest.tmpl

This email template is used for sending a password (also called 'delete code' or 'remove code') reminder to a user. This code can be used for deleting a ride or deleting a query.
Name Format Description
_name a non empty string The name of the user.
_email a valid email address The email address of the user.
_removecode a fixed length integer The actual code.

notification.tmpl

This email template is used for sending a notification to a user, that new rides are submitted that match the given query.
Name Format Description
_name a non empty string The name of the user.
_email a valid email address The email address of the user.
_newridecount positive integer The number of new rides found.
_newridesurl full URL The URL with which the rides can be viewed.

tellafriend.tmpl

This email template is used for sending information about a ride to a friend of the submitter. This feature is not yet implemented.

Appendix 1: Country codes per region

This chapter contains a list with all regions and the country codes that belong to that region. Note that countries can belong to more then one region. The country names are front end dependent (they are defined in the internal dictionary). So the names that you see here, are the names for the chosen front end and language. If you want to see the names in a different language, try to append lang=languagecode to the current URL.

If you need a new region for your front end, or if you think there is an error in the country code division, please contact your hitchhikers.org contact person.

Africa

AO (Angola), BF (Burkina Faso), BI (Burundi), BJ (Benin), BW (Botswana), CF (Central African Republic), CG (Congo), CI (Cote D'Ivoire), CM (Cameroon), CV (Cape Verde), DJ (Djibouti), DZ (Algeria), EG (Egypt), ER (Eritrea), ET (Ethiopia), GA (Gabon), GH (Ghana), GM (Gambia), GN (Guinea), GQ (Equatorial Guinea), GW (Guinea-Bissau), KE (Kenya), KM (Comoros), LR (Liberia), LS (Lesotho), LY (Libyan Arab Jamahiriya), MA (Morocco), MG (Madagascar), ML (Mali), MR (Mauritania), MU (Mauritius), MW (Malawi), MZ (Mozambique), NA (Namibia), NE (Niger), NG (Nigeria), RW (Rwanda), SC (Seychelles), SD (Sudan), SL (Sierra Leone), SN (Senegal), SO (Somalia), ST (Sao Tome And Principe), SZ (Swaziland), TD (Chad), TG (Togo), TN (Tunisia), TZ (Tanzania), UG (Uganda), ZA (South Africa), ZM (Zambia), ZW (Zimbabwe)

Asia

AE (United Arab Emirates), AF (Afghanistan), AM (Armenia), AZ (Azerbaijan), BD (Bangladesh), BH (Bahrain), BN (Brunei Darussalam), BT (Bhutan), CN (China), CY (Cyprus), ID (Indonesia), IL (Israel), IN (India), IQ (Iraq), IR (Iran), JO (Jordan), JP (Japan), KG (Kyrgyzstan), KH (Cambodia), KP (Korea, Democratic People's Republic of), KR (Korea, Republic of), KW (Kuwait), KZ (Kazakhstan), LA (Lao People's Democratic Republic), LB (Lebanon), LK (Sri Lanka), MM (Myanmar), MN (Mongolia), MV (Maldives), MY (Malaysia), NP (Nepal), OM (Oman), PH (Philippines), PK (Pakistan), QA (Qatar), SA (Saudi Arabia), SG (Singapore), SY (Syrian Arab Republic), TH (Thailand), TJ (Tajikistan), TM (Turkmenistan), TR (Turkey), TW (Taiwan), UZ (Uzbekistan), VN (Viet Nam), YE (Yemen)

Australia

AU_CT (Australia, Capital Territory), AU_NT (Australia, Northern Territory), AU_QL (Australia, Queensland), AU_SA (Australia, South Australia), AU_SW (Australia, New South Wales), AU_TM (Australia, Tasmania), AU_VT (Australia, Victoria), AU_WA (Australia, Western Australia)

Canada

CA_AB (Canada, Alberta), CA_BC (Canada, British Columbia), CA_MB (Canada, Manitoba), CA_NB (Canada, New Brunswick), CA_NF (Canada, Newfoundland), CA_NS (Canada, Nova Scotia), CA_NT (Canada, Northwest Territory), CA_NU (Canada, Nunavut Territory), CA_ON (Canada, Ontario), CA_PE (Canada, Prince Edward Island), CA_QC (Canada, Quebec), CA_SK (Canada, Saskatchewan), CA_YT (Canada, Yukon Territory)

Caribbean

AG (Antigua And Barbuda), AI (Anguilla), AN (Netherlands Antilles), AW (Aruba), BB (Barbados), BS (Bahamas), CU (Cuba), DM (Dominica), DO (Dominican Republic), GD (Grenada), GP (Guadeloupe), HT (Haiti), JM (Jamaica), KN (Saint Kitts And Nevis), KY (Cayman Islands), LC (Saint Lucia), MQ (Martinique), MS (Montserrat), PR (Puerto Rico), TC (Turks And Caicos Islands), TT (Trinidad And Tobago), VC (Saint Vincent And The Grenadines), VG (Virgin Islands (British)), VI (Virgin Islands (U.S.))

Centralamerica

BZ (Belize), CR (Costa Rica), GT (Guatemala), HN (Honduras), NI (Nicaragua), PA (Panama), SV (El Salvador)

Europe

AD (Andorra), AL (Albania), AT (Austria), BA (Bosnia And Herzegowina), BE (Belgium), BG (Bulgaria), BY (Belarus), CH (Switzerland), CZ (Czech Republic), DE (Germany), DK (Denmark), EE (Estonia), ES (Spain), FI (Finland), FR (France), GB (United Kingdom), GE (Georgia), GR (Greece), HR (Croatia), HU (Hungary), IE (Ireland), IS (Iceland), IT (Italy), LI (Liechtenstein), LT (Lithuania), LU (Luxembourg), LV (Latvia), MC (Monaco), MD (Moldova, Republic Of), MK (Macedonia (Yugoslav Republic)), MT (Malta), NL (Netherlands), NO (Norway), PL (Poland), PT (Portugal), RO (Romania), RU (Russian Federation), SE (Sweden), SI (Slovenia), SK (Slovakia), SM (San Marino), TR (Turkey), UA (Ukraine), VA (Vatican City State (Holy See)), YU (Yugoslavia)

Middleeast

AE (United Arab Emirates), AF (Afghanistan), AM (Armenia), AZ (Azerbaijan), BH (Bahrain), CY (Cyprus), IL (Israel), IQ (Iraq), IR (Iran), JO (Jordan), KG (Kyrgyzstan), KW (Kuwait), LB (Lebanon), OM (Oman), PK (Pakistan), QA (Qatar), SA (Saudi Arabia), SY (Syrian Arab Republic), TJ (Tajikistan), TM (Turkmenistan), TR (Turkey), UZ (Uzbekistan), YE (Yemen)

Northamerica

AG (Antigua And Barbuda), AI (Anguilla), AN (Netherlands Antilles), AW (Aruba), BB (Barbados), BS (Bahamas), BZ (Belize), CA_AB (Canada, Alberta), CA_BC (Canada, British Columbia), CA_MB (Canada, Manitoba), CA_NB (Canada, New Brunswick), CA_NF (Canada, Newfoundland), CA_NS (Canada, Nova Scotia), CA_NT (Canada, Northwest Territory), CA_NU (Canada, Nunavut Territory), CA_ON (Canada, Ontario), CA_PE (Canada, Prince Edward Island), CA_QC (Canada, Quebec), CA_SK (Canada, Saskatchewan), CA_YT (Canada, Yukon Territory), CR (Costa Rica), CU (Cuba), DM (Dominica), DO (Dominican Republic), GD (Grenada), GP (Guadeloupe), GT (Guatemala), HN (Honduras), HT (Haiti), JM (Jamaica), KN (Saint Kitts And Nevis), KY (Cayman Islands), LC (Saint Lucia), MQ (Martinique), MS (Montserrat), MX (Mexico), NI (Nicaragua), PA (Panama), PR (Puerto Rico), SV (El Salvador), TC (Turks And Caicos Islands), TT (Trinidad And Tobago), US_AK (USA, Alaska), US_AL (USA, Alabama), US_AR (USA, Arkansas), US_AZ (USA, Arizona), US_CA (USA, California), US_CO (USA, Colorado), US_CT (USA, Connecticut), US_DE (USA, Delaware), US_FL (USA, Florida), US_GA (USA, Georgia), US_HI (USA, Hawaii), US_IA (USA, Iowa), US_ID (USA, Idaho), US_IL (USA, Illinois), US_IN (USA, Indiana), US_KS (USA, Kansas), US_KY (USA, Kentucky), US_LA (USA, Louisiana), US_MA (USA, Massachusetts), US_MD (USA, Maryland), US_ME (USA, Maine), US_MI (USA, Michigan), US_MN (USA, Minnesota), US_MO (USA, Missouri), US_MS (USA, Mississippi), US_MT (USA, Montana), US_NC (USA, North Carolina), US_ND (USA, North Dakota), US_NE (USA, Nebraska), US_NH (USA, New Hampshire), US_NJ (USA, New Jersey), US_NM (USA, New Mexico), US_NV (USA, Nevada), US_NY (USA, New York), US_OH (USA, Ohio), US_OK (USA, Oklahoma), US_OR (USA, Oregon), US_PA (USA, Pennsylvania), US_RI (USA, Rhode Island), US_SC (USA, South Carolina), US_SD (USA, South Dakota), US_TN (USA, Tennessee), US_TX (USA, Texas), US_UT (USA, Utah), US_VA (USA, Virginia), US_VT (USA, Vermont), US_WA (USA, Washington), US_WI (USA, Wisconsin), US_WV (USA, West Virginia), US_WY (USA, Wyoming), VC (Saint Vincent And The Grenadines), VG (Virgin Islands (British)), VI (Virgin Islands (U.S.))

Oceania

AS (American Samoa), AU_CT (Australia, Capital Territory), AU_NT (Australia, Northern Territory), AU_QL (Australia, Queensland), AU_SA (Australia, South Australia), AU_SW (Australia, New South Wales), AU_TM (Australia, Tasmania), AU_VT (Australia, Victoria), AU_WA (Australia, Western Australia), CK (Cook Islands), FJ (Fiji), FM (Micronesia, Federated States Of), GU (Guam), KI (Kiribati), MH (Marshall Islands), MP (Northern Mariana Islands), NC (New Caledonia), NR (Nauru), NU (Niue), NZ (New Zealand), PF (French Polynesia), PG (Papua New Guinea), PN (Pitcairn), PW (Palau), SB (Solomon Islands), TK (Tokelau), TO (Tonga), TV (Tuvalu), UM (United States Minor Outlying Islands), VU (Vanuatu), WF (Wallis And Futuna Islands), WS (Samoa)

Pacific

AS (American Samoa), CK (Cook Islands), FJ (Fiji), FM (Micronesia, Federated States Of), GU (Guam), KI (Kiribati), MH (Marshall Islands), MP (Northern Mariana Islands), NC (New Caledonia), NR (Nauru), NU (Niue), NZ (New Zealand), PF (French Polynesia), PG (Papua New Guinea), PN (Pitcairn), PW (Palau), SB (Solomon Islands), TK (Tokelau), TO (Tonga), TV (Tuvalu), UM (United States Minor Outlying Islands), US_HI (USA, Hawaii), VU (Vanuatu), WF (Wallis And Futuna Islands), WS (Samoa)

Southamerica

AR (Argentina), BO (Bolivia), BR (Brazil), CL (Chile), CO (Colombia), EC (Ecuador), GY (Guyana), PE (Peru), PY (Paraguay), SR (Suriname), UY (Uruguay), VE (Venezuela)

Unitedstates

US_AK (USA, Alaska), US_AL (USA, Alabama), US_AR (USA, Arkansas), US_AZ (USA, Arizona), US_CA (USA, California), US_CO (USA, Colorado), US_CT (USA, Connecticut), US_DE (USA, Delaware), US_FL (USA, Florida), US_GA (USA, Georgia), US_HI (USA, Hawaii), US_IA (USA, Iowa), US_ID (USA, Idaho), US_IL (USA, Illinois), US_IN (USA, Indiana), US_KS (USA, Kansas), US_KY (USA, Kentucky), US_LA (USA, Louisiana), US_MA (USA, Massachusetts), US_MD (USA, Maryland), US_ME (USA, Maine), US_MI (USA, Michigan), US_MN (USA, Minnesota), US_MO (USA, Missouri), US_MS (USA, Mississippi), US_MT (USA, Montana), US_NC (USA, North Carolina), US_ND (USA, North Dakota), US_NE (USA, Nebraska), US_NH (USA, New Hampshire), US_NJ (USA, New Jersey), US_NM (USA, New Mexico), US_NV (USA, Nevada), US_NY (USA, New York), US_OH (USA, Ohio), US_OK (USA, Oklahoma), US_OR (USA, Oregon), US_PA (USA, Pennsylvania), US_RI (USA, Rhode Island), US_SC (USA, South Carolina), US_SD (USA, South Dakota), US_TN (USA, Tennessee), US_TX (USA, Texas), US_UT (USA, Utah), US_VA (USA, Virginia), US_VT (USA, Vermont), US_WA (USA, Washington), US_WI (USA, Wisconsin), US_WV (USA, West Virginia), US_WY (USA, Wyoming)

World

AD (Andorra), AE (United Arab Emirates), AF (Afghanistan), AG (Antigua And Barbuda), AI (Anguilla), AL (Albania), AM (Armenia), AN (Netherlands Antilles), AO (Angola), AR (Argentina), AS (American Samoa), AT (Austria), AU_CT (Australia, Capital Territory), AU_NT (Australia, Northern Territory), AU_QL (Australia, Queensland), AU_SA (Australia, South Australia), AU_SW (Australia, New South Wales), AU_TM (Australia, Tasmania), AU_VT (Australia, Victoria), AU_WA (Australia, Western Australia), AW (Aruba), AZ (Azerbaijan), BA (Bosnia And Herzegowina), BB (Barbados), BD (Bangladesh), BE (Belgium), BF (Burkina Faso), BG (Bulgaria), BH (Bahrain), BI (Burundi), BJ (Benin), BN (Brunei Darussalam), BO (Bolivia), BR (Brazil), BS (Bahamas), BT (Bhutan), BW (Botswana), BY (Belarus), BZ (Belize), CA_AB (Canada, Alberta), CA_BC (Canada, British Columbia), CA_MB (Canada, Manitoba), CA_NB (Canada, New Brunswick), CA_NF (Canada, Newfoundland), CA_NS (Canada, Nova Scotia), CA_NT (Canada, Northwest Territory), CA_NU (Canada, Nunavut Territory), CA_ON (Canada, Ontario), CA_PE (Canada, Prince Edward Island), CA_QC (Canada, Quebec), CA_SK (Canada, Saskatchewan), CA_YT (Canada, Yukon Territory), CF (Central African Republic), CG (Congo), CH (Switzerland), CI (Cote D'Ivoire), CK (Cook Islands), CL (Chile), CM (Cameroon), CN (China), CO (Colombia), CR (Costa Rica), CU (Cuba), CV (Cape Verde), CY (Cyprus), CZ (Czech Republic), DE (Germany), DJ (Djibouti), DK (Denmark), DM (Dominica), DO (Dominican Republic), DZ (Algeria), EC (Ecuador), EE (Estonia), EG (Egypt), ER (Eritrea), ES (Spain), ET (Ethiopia), FI (Finland), FJ (Fiji), FM (Micronesia, Federated States Of), FR (France), GA (Gabon), GB (United Kingdom), GD (Grenada), GE (Georgia), GH (Ghana), GM (Gambia), GN (Guinea), GP (Guadeloupe), GQ (Equatorial Guinea), GR (Greece), GT (Guatemala), GU (Guam), GW (Guinea-Bissau), GY (Guyana), HN (Honduras), HR (Croatia), HT (Haiti), HU (Hungary), ID (Indonesia), IE (Ireland), IL (Israel), IN (India), IQ (Iraq), IR (Iran), IS (Iceland), IT (Italy), JM (Jamaica), JO (Jordan), JP (Japan), KE (Kenya), KG (Kyrgyzstan), KH (Cambodia), KI (Kiribati), KM (Comoros), KN (Saint Kitts And Nevis), KP (Korea, Democratic People's Republic of), KR (Korea, Republic of), KW (Kuwait), KY (Cayman Islands), KZ (Kazakhstan), LA (Lao People's Democratic Republic), LB (Lebanon), LC (Saint Lucia), LI (Liechtenstein), LK (Sri Lanka), LR (Liberia), LS (Lesotho), LT (Lithuania), LU (Luxembourg), LV (Latvia), LY (Libyan Arab Jamahiriya), MA (Morocco), MC (Monaco), MD (Moldova, Republic Of), MG (Madagascar), MH (Marshall Islands), MK (Macedonia (Yugoslav Republic)), ML (Mali), MM (Myanmar), MN (Mongolia), MP (Northern Mariana Islands), MQ (Martinique), MR (Mauritania), MS (Montserrat), MT (Malta), MU (Mauritius), MV (Maldives), MW (Malawi), MX (Mexico), MY (Malaysia), MZ (Mozambique), NA (Namibia), NC (New Caledonia), NE (Niger), NG (Nigeria), NI (Nicaragua), NL (Netherlands), NO (Norway), NP (Nepal), NR (Nauru), NU (Niue), NZ (New Zealand), OM (Oman), PA (Panama), PE (Peru), PF (French Polynesia), PG (Papua New Guinea), PH (Philippines), PK (Pakistan), PL (Poland), PN (Pitcairn), PR (Puerto Rico), PT (Portugal), PW (Palau), PY (Paraguay), QA (Qatar), RO (Romania), RU (Russian Federation), RW (Rwanda), SA (Saudi Arabia), SB (Solomon Islands), SC (Seychelles), SD (Sudan), SE (Sweden), SG (Singapore), SI (Slovenia), SK (Slovakia), SL (Sierra Leone), SM (San Marino), SN (Senegal), SO (Somalia), SR (Suriname), ST (Sao Tome And Principe), SV (El Salvador), SY (Syrian Arab Republic), SZ (Swaziland), TC (Turks And Caicos Islands), TD (Chad), TG (Togo), TH (Thailand), TJ (Tajikistan), TK (Tokelau), TM (Turkmenistan), TN (Tunisia), TO (Tonga), TR (Turkey), TT (Trinidad And Tobago), TV (Tuvalu), TW (Taiwan), TZ (Tanzania), UA (Ukraine), UG (Uganda), UM (United States Minor Outlying Islands), US_AK (USA, Alaska), US_AL (USA, Alabama), US_AR (USA, Arkansas), US_AZ (USA, Arizona), US_CA (USA, California), US_CO (USA, Colorado), US_CT (USA, Connecticut), US_DE (USA, Delaware), US_FL (USA, Florida), US_GA (USA, Georgia), US_HI (USA, Hawaii), US_IA (USA, Iowa), US_ID (USA, Idaho), US_IL (USA, Illinois), US_IN (USA, Indiana), US_KS (USA, Kansas), US_KY (USA, Kentucky), US_LA (USA, Louisiana), US_MA (USA, Massachusetts), US_MD (USA, Maryland), US_ME (USA, Maine), US_MI (USA, Michigan), US_MN (USA, Minnesota), US_MO (USA, Missouri), US_MS (USA, Mississippi), US_MT (USA, Montana), US_NC (USA, North Carolina), US_ND (USA, North Dakota), US_NE (USA, Nebraska), US_NH (USA, New Hampshire), US_NJ (USA, New Jersey), US_NM (USA, New Mexico), US_NV (USA, Nevada), US_NY (USA, New York), US_OH (USA, Ohio), US_OK (USA, Oklahoma), US_OR (USA, Oregon), US_PA (USA, Pennsylvania), US_RI (USA, Rhode Island), US_SC (USA, South Carolina), US_SD (USA, South Dakota), US_TN (USA, Tennessee), US_TX (USA, Texas), US_UT (USA, Utah), US_VA (USA, Virginia), US_VT (USA, Vermont), US_WA (USA, Washington), US_WI (USA, Wisconsin), US_WV (USA, West Virginia), US_WY (USA, Wyoming), UY (Uruguay), UZ (Uzbekistan), VA (Vatican City State (Holy See)), VC (Saint Vincent And The Grenadines), VE (Venezuela), VG (Virgin Islands (British)), VI (Virgin Islands (U.S.)), VN (Viet Nam), VU (Vanuatu), WF (Wallis And Futuna Islands), WS (Samoa), YE (Yemen), YU (Yugoslavia), ZA (South Africa), ZM (Zambia), ZW (Zimbabwe)

Appendix 2: Required codes in the internal dictionary

This chapter contains a list with all the codes that are required in the internal dictionary and their current value for the front end that you are reading this manual in. The internal dictionaries (one for each language that your front end supports) should be stored in dictionaries/languagecode/internal.txt. If you want to see the meanings in a different language, try to append lang=languagecode to the current URL.
day1Mon
day2Tue
day3Wed
day4Thu
day5Fri
day6Sat
day7Sun
forbidden_wordssex|porn|naked|fuck|hitler

Appendix 3: Useful links

A list with all currency codes
http://www.id3.org/iso4217.html
A list with all country codes
http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
A list with all language codes
http://www.oasis-open.org/cover/iso639a.html
Template manual
http://www.perldoc.com/cpan/HTML/Template.html#The%20Tags
hitchhikers.org front end documents
http://www.hitchhikers.org/frontends/hitchhikers.org
example front end documents
http://www.hitchhikers.org/frontends/examplesite.hitchhikers.org
Filemanager: the place to upload your front end files
http://www.hitchhikers.org/protected/fileman.cgi
You can get an overview of the usage of your front end
http://www.hitchhikers.org/protected/stats.cgi