From 3454f2fe04f5efa39f95656883fee7c6fde4f1ef Mon Sep 17 00:00:00 2001
From: Badlop
Examples: -
{language, "ru"}. -
{language, "es"}. -
-======= <language>.msg in ejabberd’s msgs directory.
For example, to set Russian as default language:
{language, "ru"}. -
Appendix A provides more details about internationalization and localization.
-The option include_config_file in a configuration file instructs ejabberd to include other configuration files immediately.
The basic usage is: -
{include_config_file, <filename>}. -
It is also possible to specify suboptions: -
{include_config_file, <filename>, [<suboption>, <suboption>, ...]}. -
The filename can be indicated either as an absolute path, -or relative to the main ejabberd configuration file. -It isn’t possible to use wildcards. -The file must exist and be readable.
The allowed suboptions are: -
This is a basic example: -
{include_config_file, "/etc/ejabberd/additional.cfg"}. -
In this example, the included file is not allowed to contain a listen option. -If such an option is present, the option will not be accepted. -The file is in a subdirectory from where the main configuration file is. -
{include_config_file, "./example.org/additional_not_listen.cfg", [{disallow, [listen]}]}. -
In this example, ejabberd.cfg defines some ACL and Access rules, -and later includes another file with additional rules: -
{acl, admin, {user, "admin", "localhost"}}. -{access, announce, [{allow, admin}]}. -{include_config_file, "/etc/ejabberd/acl_and_access.cfg", [{allow_only, [acl, access]}]}. -
and content of the file acl_and_access.cfg can be, for example: -
{acl, admin, {user, "bob", "localhost"}}. -{acl, admin, {user, "jan", "localhost"}}. --
In the ejabberd configuration file, -it is possible to define a macro for a value -and later use this macro when defining an option.
A macro is defined with this syntax: -
{define_macro, '<MACRO>', <value>}. -
The MACRO must be surrounded by single quotation marks, -and all letters in uppercase; check the examples bellow. -The value can be any valid arbitrary Erlang term.
The first definition of a macro is preserved, -and additional definitions of the same macro are forgotten.
Macros are processed after -additional configuration files have been included, -so it is possible to use macros that -are defined in configuration files included before the usage.
It isn’t possible to use a macro in the definition -of another macro.
There are two ways to use a macro: -
{define_macro, '<MACRO>', <defaultvalue>}. -'<MACRO>' -
This example shows the basic usage of a macro: -
{define_macro, 'LOG_LEVEL_NUMBER', 5}. -{loglevel, 'LOG_LEVEL_NUMBER'}. -
The resulting option interpreted by ejabberd is: {loglevel, 5}.
This example shows that values can be any arbitrary Erlang term: -
{define_macro, 'USERBOB', {user, "bob", "localhost"}}. -{acl, admin, 'USERBOB'}. -
The resulting option interpreted by ejabberd is: {acl, admin, {user, "bob", "localhost"}}.
This complex example: -
{define_macro, 'NUMBER_PORT_C2S', 5222}. -{define_macro, 'PORT_S2S_IN', {5269, ejabberd_s2s_in, []}}. -{listen, - [ - {'NUMBER_PORT_C2S', ejabberd_c2s, []}, - 'PORT_S2S_IN', - {{use_macro, 'NUMBER_PORT_HTTP', 5280}, ejabberd_http, []} - ] -}. -
produces this result after being interpreted: -
{listen, - [ - {5222, ejabberd_c2s, []}, - {5269, ejabberd_s2s_in, []}, - {5280, ejabberd_http, []} - ] -}.-
->>>>>>> d106311... * doc/guide.tex: Provide only an example of language option:doc/guide.html +
ejabberd uses its internal Mnesia database by default. However, it is possible to use a relational database or an LDAP server to store persistent, diff --git a/doc/guide.tex b/doc/guide.tex index d3e570604..aa49e0cf2 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -299,7 +299,7 @@ To compile \ejabberd{} on a `Unix-like' operating system, you need: \item GCC \item Libexpat 1.95 or higher \item Erlang/OTP R10B-9 or higher. -\item OpenSSL 0.9.6 or higher, for STARTTLS, SASL and SSL encryption. Optional, highly recommended. +\item OpenSSL 0.9.8f or higher, for STARTTLS, SASL and SSL encryption. Optional, highly recommended. \item Zlib 1.2.3 or higher, for Stream Compression support (\xepref{0138}). Optional. \item Erlang mysql library. Optional. For MySQL authentication or storage. See section \ref{compilemysql}. \item Erlang pgsql library. Optional. For PostgreSQL authentication or storage. See section \ref{compilepgsql}. @@ -469,7 +469,7 @@ To compile \ejabberd{} on a Microsoft Windows system, you need: \item \footahref{http://www.gnu.org/software/libiconv/}{GNU Iconv 1.9.2} (optional) -\item \footahref{http://www.slproweb.com/products/Win32OpenSSL.html}{Shining Light OpenSSL 0.9.8d or higher} +\item \footahref{http://www.slproweb.com/products/Win32OpenSSL.html}{Shining Light OpenSSL 0.9.8f or higher} (to enable SSL connections) \item \footahref{http://www.zlib.net/}{Zlib 1.2.3 or higher} \end{itemize}