SquirrelMail Addressbook Internals
==================================
-This document describe how the SquirrelMail address book works. It is
+This document describes how the SquirrelMail address book works. It is
primarily intended for developers.
functions/addressbook.php is called. This function will create an
AddressBook object, add one backend for a personal address book (file
based storage), and add the LDAP backends defined in the $ldap_server
-configuration directive (is any).
+configuration directive (if any).
An addressbook can also be initialized like this if you want to:
For the result of a search, lookup or list_addr, one or more result
arrays are used. These arrays contain the following keys:
- nickname: Unique identifier for this name in this backend. Onlu
+ nickname: Unique identifier for this name in this backend. Only
usable for the local_file backend, and possibly LDAP.
name: Person's full name.
email: Person's e-mail address.
On sites with many users you might want to store your user data in a
-database instead of in files. This document describe how to configure
+database instead of in files. This document describes how to configure
SquirrelMail to do this.
Methods for storing both personal addressbooks and user preferences in
-a database is as a part of the distribution.
+a database is included as a part of the distribution.
The table structure should be similar to this (for MySQL):
CREATE TABLE address (
- owner varchar(16) DEFAULT '' NOT NULL,
+ owner varchar(128) DEFAULT '' NOT NULL,
nickname varchar(16) DEFAULT '' NOT NULL,
firstname varchar(128) DEFAULT '' NOT NULL,
lastname varchar(128) DEFAULT '' NOT NULL,
addressbooks). Create a table similar to this (for MySQL):
CREATE TABLE userprefs (
- user varchar(32) DEFAULT '' NOT NULL,
+ user varchar(128) DEFAULT '' NOT NULL,
prefkey varchar(64) DEFAULT '' NOT NULL,
- prefval blob DEFAULT '' NOT NULL,
+ prefval BLOB DEFAULT '' NOT NULL,
PRIMARY KEY (user,prefkey)
);
Object Structure
----------------
-There are two objects that are used: "message" and "msg_header". here is a
+There are two objects that are used: "message" and "msg_header". Here is a
brief overview of what each object contains.
msg_header
---------------------
Previously (version 0.4 and below), SquirrelMail handled all the parsing of
the email message. It would read the entire message in, search for
-boundaries, and created an array similar to the $message object discribed
+boundaries, and create an array similar to the $message object described
above. This was very inefficient.
Currently, all the parsing of the body of the message takes place on the
Getting the Body
----------------
-Once all of the structure of the message has been read into the $message
+Once all the structure of the message has been read into the $message
object, we then need to display the body of one entity. There are a number
of ways we decide which entity to display at a certain time, and I won't go
into that here.
three hooks you will need to use.
1. options_link_and_description
- This creates the link and has a description that are shown on the options
+ This creates the link and has a description that is shown on the options
page. This should output HTML that looks like this. Make sure to read
- the section on outputting your own pages.
+ the section on outputing your own pages.
-----cut here-----
function my_plugin_name_my_function() {
The validate.php script will include internationalization support,
config.php variables, strings.php functions, and also authenticate that the
-user is truly logged in. Validate.php also calls stripslashes() on incoming
+user is truly logged in. validate.php also calls stripslashes() on incoming
data (if gpc_magic_quotes() is on). You should never need to worry about
that stuff again. As a warning, this has only really been ironed out in
1.1.1. If you create/modify a plugin to follow these rules, you must
Copy squirrelmail/po/squirrelmail.po into this directory. This is the
file that is going to be translated.
-c) To translate the actual strings fill inn the msgstr after each
+c) To translate the actual strings fill in the msgstr after each
msgid with the appropiate translation. There are a few tools which
- kan make this job a bit easier at
+ can make this job a bit easier at
<URL:http://i18n.kde.org/translation-howto/gui-specialized-apps.html>.
Convert the translated squirrelmail.po into a binary file by
2. Maintaining translations
---------------------------
-the text strings in the program will change over time. This means that
-strings that are already translated is no longer used and new strings
-are added. Therefore it is neccessary to maintain the translations.
+The text strings in the program will change over time. This means that
+strings that are already translated are no longer used and new strings
+are added. Therefore it is necessary to maintain the translations.
a) There should always be an updated template containing all strings
in SquirrelMail in squirrelmail/squirrelmail.po. To merge all new
Since English is not my strong point you probably can't tell, but I hope it
helps.
-The help files, at this point, are devided into functional areas. Each .hlp
+The help files, at this point, are divided into functional areas. Each .hlp
file represents a different functional block of how the program looks to the
user.
-Hopefully as SquirrelMail is more widely used, non-english translations will
+Hopefully as SquirrelMail gets more widely used, non-english translations will
be used to make other non-english translations. You might want to keep this
in mind when writing yours. Remember that these will be used all over the
world and in many different environments so local language dialects might
==============
All translated files should be placed under the help directory. Under the
-help directory create another directory. This directory MUST be named to the
+help directory create another directory. This directory MUST be named in the
two letter standard abbreviation for the language. English is "en" and Polish
would be "pl" for example.
There are two types of main tags: <chapter> and <section>. There can be only
one <chapter> tag in a .hlp file. However, there can be many <section> tags.
-Inside both of these tags, their can be any combination of any of the following
+Inside each of these tags, there can be any combination of any of the following
tags: <title>, <description>, <summary>. Here is an example:
| <chapter>
Translating
===========
-To translate, just copy all the .hlp files from help/en into your new directory
+To translate, just copy all the .hlp files from help/en into the new directory
that you created for this language (i.e. help/pl). You only need to translate
-what is inbetween the tags. Do not translate the actual tags such as <chapter>
+what is between the tags. Do not translate the actual tags such as <chapter>
or <summary>. The tag names need to remain in English. You should only translate
the text between tags.
a new node in the tree. Check the documentation in the code for
more info on this.
-Basically all we had to do as loop through each of the items that
+Basically all we had to do was loop through each of the items that
need to be in the tree (folders, subfolders), find their parent,
let their parent know it has a new child, and insert the values
into the child.