=head1 NAME config.pod - documents BSE configuration file options =head1 DESCRIPTION BSE historically used Constants.pm to keep most configuration information. The plan is to make sure any new configuration is kept in bse.cfg, and to slowly move most configuration information into bse.cfg. Keeping configuration information in Constants.pm makes it difficult to perform upgrades and makes it impossible to use tools such as mod_perl, at least if you want more than one site on the machine. =head1 CONFIGURATION ENTRIES =head2 [site] Contains URL configuration for the site. =over =item url The normal URL for the non-secure parts of the site. =item secureurl The secure URL for the shop, products and other portions of the site that should use SSL. This isn't checked to make sure it is https. =item name Used as the site "name" in a few places. =item adminurl If set, this is used as the base URL for accessing the administrative functions of your site. =item secureadmin Ignored if C is set. If this is true then C is used as the base URL for accessing the administrative functions of your site, otherwise C is used as the base URL. Default: false (C's value is used) =item forward_from Configure the IP address of one or more front-end proxies. This can be a regular expression except that C<.> is translated to C<\.> and C<*> is tranlated to C<.*> to give more glob() like matching. If the reqesting host matches then admin site URL matching is done against HTTP_X_FORWARDED_SERVER instead of SERVER_NAME. Default: no front-end server configured. =back =head2 [paths] Contains various file system paths. =over =item downloads This is where the files uploads with the file wizard are stored. It must be writable by the web server user. =item admin_templates Directory containing administrative templates. Note: this is not completely implemented for now, so assume the default. Default: admin directory under $TMPLDIR. =item templates Directory base for most templates. =item local_templates Local Directory base for templates. This is searched before the templates directory. =item images Where uploaded images are stored. This is not yet completely implemented. Default: $IMAGEDIR. =item libraries Local search path for BSE::Custom, or the class configured by C in [basic]. =item siteuser_images Where uploaded siteuser images are stored. This must be set in the config file. The default bse.cfg include an entry to use the current values of [paths].downloads =item dynamic_cache Pregenerated dynamic article pages are stored here. This must be defined if you site contains any dynamicly generated pages. =item scalecache The directory where cached versions of scaled thumbnails are stored. Defaults to image_dir/scaled. This must be in the document tree. If you set this you should also set scalecacheurl. =item scalecacheurl The URL to the directory represented by scalecache. Defaults to /images/scaled. =back =head2 [extensions] This section is used by the file wizard to map uploaded file extensions to MIME content types. This can be used to extend BSE::FileEditor's internal extension map. It cannot override that map. The key for each entry is the extension, without the leading '.'. eg. xls = application/msexcel =head2 [templates] Used for translating symbolic template names into full names under the template directory. In each case the default is the name with a C<.tmpl> extension. =over =item user/logon user logon page =item user/register user registration page =back =head2 [admin templates] Used for translating the names of administration templates into filenames. In each case the default is the name with a C<.tmpl> extension. =over =item filelist article file wizard =item catalog Catalog editor page. Default admin/edit_catalog.tmpl =item 1 =item 2 =item 3 =item 4 =item 5 Article edit pages. Default admin/edit_.tmpl =item steps Step child/parent management page. Default admin/edit_steps.tmpl =back =head2 [html] Minor html items. =over =item charset The value of the charset keyword when outputting HTML from a script. Set to the empty string to suppress the charset keyword. Default: iso-8859-1. =item redirect_links If this is a non-zero number, then all but mailto links are redirected to C so you can display a diclaimer. If this contained alphabetics it's treated as a comma separated list of url schemes that should be handled via C. If 0 or not present, no redirection is done. The redirect URL includes a hash of the url, title and the redirect salt to prevent using this mechanism by external sites for cookie stealing attacks. =item redirect_salt The salt used in generating the has for redirect_links. Default: an empty string. =back =head2 [basic] =over =item cookie_lifetime The expiry time for cookies. This should be in the form supported by CGI.pm for the -expires parameter. Typically you want a plus ('+'), a number, and a time character (s - seconds, m - minutes, h - hours, d - days, M - months). Default: +3h =item cookie_domain This overrides the domain value set for cookies. This is useful if you allow the site to run under both example.com and www.example.com, if you set cookie_domain to example.com then a user visiting www.example.com will still have their cookies when they visit example.com. =item cookie_name This overrides the cookie name used to store the session id. Default: sessionid. This is useful when you have 2 sites under the same top-level domain, and helps disambiguate the cookie returned by the browser. =item minpassword Minimum password length in characters. Default: 4. =item randomdata Device to read random data from. This device should not block when it runs out of entropy. =item sign If this is true then the encrypted messages containing the customer's credit card number are sent to the shop owner signed. To avoid keeping a passphrase and signing key on the server you can set this to false (0). This has the effect that anyone could send you an unsigned message encrypted with your public key, though this may not be a security threat. Default: True. =item link_titles If this is true then the links to your articles within BSE will be followed by a / and then by a simplified version of the article title. The aim is to include at least some title information in the URL without modifying the name of the HTML file. Default: False. =item access_control If this is true then the user/group/permissions database is used to control access to the system. Default: False. =item access_filter_steps If this is true, then the drop-down lists of possible stepparents and stepchildren on the article edit pages are filtered for access control. Default: False. =item access_filter_parents If this is true, then the drop-down lists of possible parents on the newsletter edit pages are filtered for access control. Default: False. =item server_auth Set this to non-zero to enable authentication via server authentication (usually Basic Authentication.) You should normally set this if you set htusers below. Default: 0 (disabled) =item htusers This should be the path to a file to be updated with the list of users and crypt() versions of their passwords. If this is set then the security system will check for a user set by the browser before attempting a form based logon. Default: None. =item custom_class The name of the custom class for your site. This is currently only used for article editing customizations. This class should derive from BSE::CustomBase. Default: BSE::Custom. =item jit_dynamic_pregen If this is true, then pre-generation for dynamic pages will be delayed until the page is displayed to a user. Default: off. =item staticajax If true, the ifAjax and ajax tags will be active for static pages. =item cache_thumbnails If set to zero the results of the thumbimage/gthumbimage body/template tags will not be cached. Default: 1 (caching is enabled). =item static_thumbnails If true and cache_thumbnails is true then thumbnails for the thumbnail cache will be generated when a static page is regenerated, and the link from the page will link to the image in the cache rather than to C. Default: 1 (static thumbnails enabled). =item alias_prefix The prefix applied to articles that use a linkAlias url. This should start with a /. =item use_alias If this is non-zero then an article with linkAlias set will use an alias url instead of the "real" url. You will need to configure a RewriteRule or ErrorDocument to page.pl to direct the user to the correct URL. Default: 1. =item alias_suffix If this is non-zero then the title is cleaned up (all but alphanumerics removed) and appended to the alias URL generated. =item default_popupimage This is the default popup image class for the popimage[] and gpopimage[] tags. Default: popup. =item warn_obsolete Some obsolete tags will warn to stderr if this is non-zero. Default: don't warn. =back =head2 [mail] This section controls how BSE sends email. =over =item smtp_server The host or IP address of your mail server. If this is not set C will be used instead. If this is set you must also set I. =item helo The name that BSE uses to identify itself when sending mail via SMTP. Required if I is set. =item sendmail The path to the C binary. Default: /usr/lib/sendmail =item sendmail_opts The options supplied to sendmail. Default: -t -oi You may want to add the -odq option to this if you want mail queued rather than sent immediately. =item set_errors_to_from If true, we add an Errors-To header set to the same as the From header. Default: true. =item html_system_email If non-zero then emails sent via the compose mail system that aren't being sent to a member record, will be sent as HTML, if the HTML template is available. =back =head2 [children of I] Where I is the identifier for an article. =over =item template the name of the default template for children of the given parent =item template_dirs a comma-separated list of extra directories under $TMPLDIR to search for templates that can be used for children of the given parent article. =back =head2 [article I] Where I is the identifier of an article. =over =item template_dirs A comma-separated list of extra directories under $TMPLDIR to search for templates that can be used for children of the given parent article. =item extra_templates A comma-separated list of extra templates under $TMPLDIR that can be used for the given article. =back =head2 [level I] =over =item template The default template for this level of article, assuming it hasn't been set in the [children of I
] section. =item template_dirs A comma-separated list of extra directories under $TMPLDIR to search for templates that can be used for articles at the given I. =back =head2 [catalogs] =over =item template The default template for catalogs. =back =head2 [products] =over =item template The default template for products. =item extra_templates A comma separated list of extra templates that can be used for products. =back =head2 [messages] This can be used to control translation of error messages. Each key has a prefix identifying the module that uses the error, followed by '/' followed by a specific identifier for the message. Message parameters, expressed as $I, are replaced with the parameters passed to the message. C<$$> is replaced with C<$>. Each message identifier below is documented with the id, when it occurs, the default message, and any parameters. =over =item user/needlogon the user attempted to logon without entering a logon name. Default: "Please enter a logon name". No parameters. =item user/needpass the user attempted to logon without entering a password. Default: "Please enter your password." No parameters. =item user/baduserpass the user's logon name or password was not found or did not match. Default: "Invalid user or password". No parameters. =item user/notloggedon the user attempted to logoff while not logged on. Default: "You aren't logged on". No parameters. =item user/optsoldpass the user entered a new password on the options page without entering their old password. Default: "You need to enter your old password to change your password". No parameters. =back =head2 [downloads] =over =item must_be_paid if non-zero, the order must be marked as paid for before the file can be downloaded. =item must_be_filled if non-zero the order must be marked as filled before the files can be downloaded. =item require_logon if non-zero the user must be registered/logged on to download I file. =back =head2 [confirmations] Control over confirmation emails. =over =item subject The subject of email confirmation emails. Default: Subcription Confirmation. =item from The from field for the email. Default: $SHOP_FROM =back =head2 [subscriptions] Control over subscription messages. =over =item from The from field for the email. Default: $SHOP_FROM. =item testname Default for the "Test Name" field for sending test subscription messages. =item testemail Default for the "Test Email" field for sending test subscription messages. =item testtextonly Set to 1 if you want the "Test Text Only" box checked by default for sending test subscription messages. =item testing Set to 0 to disable display of the test subscription messages portions of the subscriptions send form. =item text_link_inline Set to format links as they appear in the text version of emails. C<$1> is replaced with the title, C<$2> with the URL and C<$3> with the index. C<$$> is replaced with '$'. Default: C<$1 [$3]> =item text_link_list Set to format links as they appear at the footer of the body text. If this is set to the empty string then no list appears. C<$1>, C<$2>, C<$3>, C<$$> are replaced as for I and $n is replaced with newline. Default: C<[$3] $2> =item text_link_list_prefix A line of text produced above the list of URLs if there is one. Default: C<----->. $n in this is replaced with newlines. =back For example, if the configuration is: text_link_inline="$1" ($3) text_link_list_prefix=$n$n------- text_link_list=($3) "$1"$n => $2 and the body text is: doclink[3] link[http://www.example.com/|Example] the result will be: "The Shop" (1) "Example" (2) ------- (1) "The Shop" => http://www.yoursite.com/shop/index.html (2) "Example" => http://www.example.com/ =head2 [search] =over =item highlight_partial If this is true then partial matches will be highlight in search result excerpts. Default: True =item keep_inaccessible If this is true then resulting articles that can't be accessed by the user are listed in the search results. Default: false. =back =head2 [search highlight] Sets the prefix and suffix used for highlighting matches for different fields. These are used by the highlight_result, excerpt, pageTitle, author, keywords and matchFile tags. Each field has a prefix and suffix entry. The key is I_prefix or I_suffix. For file fields this is file_I. The default suffix is . For example you can do: [search highlight] body_prefix= body_suffix= =head2 [shop] =over =item enabled Used by some templates to check if the shop is enabled. Set this to 1 to enable the shop, or 0 to disable it. =item secureurl_articles If this is false then shop articles will not use the secureurl as their baseurl. Default: True =item register_if_files If true the customer is required to register before checkout if there are any for sale files attached to products in the cart. Default: True =item require_logon If true the customer is required to be logged on before checkout, whether or not for sale files are attached to products in the cart. Default: False. =item payment_types A comma-separated list of acceptable payment types. Default: 0 The possible payment types are: =over =item * 0 - the user enters a credit card number, name and expiry date =item * 1 - the customer will send a cheque =item * 2 - contact customer for details =back Other types can be added by adding entries to the [payment type names] and [payment type descs] sections. =item address1 =item address2 =item address3 These are used by various shop templates to present an address that a cheque payment should be sent to. =item from From email address for emails sent by the shop. Overides $SHOP_FROM in Constants.pm =item to_name To name for emailed orders sent by the shop. Overrides $SHOP_TO_NAME in Constants.pm =item to_email To email for emailed orders sent by the shop. Overrides $SHOP_TO_EMAIL in Constants.pm =item noencrypt If this is true then orders sent to you by the shop will not be encrypted. Enabling this disabled acceptance of credit card orders, and the default for C will become C<1> instead or C<0>. Please realize that other potentially commercially sensitive information is being sent in the clear to a central location, unencrypted. =item email_order If true, then the order is email to to_email, possibly with credit card information included. Default: $SHOP_EMAIL_ORDER. =item display_I Used to translate the stored order field name into a presentation name suitable for error messages. =item cardprocessor The name of a class to load to process credit card transactions online. Currently this can be either DevHelp::Payments::Test or DevHelp::Payments::Inpho. =item crypt_module Name of the encryption module to use. Default: $SHOP_CRYPTO. =item crypt_signing_id Id of the key to sign the order email with. If this is non-empty then the email is signed even if [basic].sign is false. Default: $SHOP_SIGNING_ID. =item crypt_gpg Path to the GnuPG program. Default: $SHOP_GPG =item crypt_passphrase Passphrase of the key used to sign the email. Default: $SHOP_PASSPHRASE. =item show_card_type If true, request the card type when requesting credit card information. Default: False. =item cart_entry_limit Maximum number of entries in the cart. This limits the number of distinct products (with options) in the cart, not the total quantities. Default: Unlimited. =back =head2 [Shop Order Validation] This section can contain extra order validation information, including specifying required fields, display names and extra validation rules. =head2 [fields] =over =item title_size The maximum length of the article title field. Default: 255. Should not be set higher than this unless you change the database schema. =back =head2 [interest] Controls the interest.pl script. =over =item notify Email address that is notified of the interest. Defaults to $SHOP_FROM. =back =head2 [debug] Used for debugging. =over =item logon_cookies When a user logs on, and the site url is different to the secure url BSE attempts to refresh to the other "side" of the site to set the same cookie. BSE does some simple comparisons to attempt to determine whether the logon form was triggered on the secure side of the site (possibly from the shop) or on the insecure side. Since CGI doesn't necessarily give us all the information required, it's possible it will guess wrong. Setting this option to 1 will enable debugging information sent to standard error, which will be sent to the error log on Apache. This probably isn't useful on IIS. =item file_unlink Reports errors to STDERR (hence to the error log on Apache) if there is a problem deleting the actual file when an attached file is removed. =item mail_encryption Reports debugging information to standard error while encrypting your mail. =item cookies Reports cookies received from the browser and sent to the browser to STDERR (hence to the error log on Apache.) =item dump_session If nonzero the session hash is dumped to STDERR after it is retrived from the database. =item subscription_expiry If non-zero then subscription expiry date calculations are dumped to STDERR. =item jit_dynamic_regen If non-zero then information about jit_dynamic_regen is sent to STDERR. =item ifUserCan If non-zero then the ifUserCan tag will output some trace information to STDERR. =back =head2 [uri] Contains various URIs. This is underused, so don't rely on it yet. =over =item cgi The URI to the CGI directory. Default: /cgi-bin =item images The URI where images are kept. Default: /images =item shop =item articles =back =head2 [articles] This will provide translations from symbolic names to article ids. Currently this is used for converting article ids in the access control code, and for looking up the id of the shop. =head2 [printable type] If the user supplies a template name to printable.pl then you can use a different content type by adding an entry to this section. The key is the template name, and the value is the full content type. =head2 [search index scores] This section is used when generating the search index to override the default scores for each field in the articles. The default scores are: Field Score Notes ----- ----- ----- title 5 body 3 keyword 4 pageTitle 5 author 4 summary 0 description 0 Products only product_code 0 Products only file_displayName 2 displayName for files file_description 2 description for files file_notes 1 notes for files =head2 [article flags] =head2 [product flags] =head2 [catalog flags] Flags that can be set for articles, products and catalogs respectively. Note that flags for articles are also visible in products and catalogs. All flag Ids are single letters or digits. Uppercase letters are reserved for use by BSE internally, leaving lower-case letters and digits for your own use. Use the id of the flag as the key, and a description of the flag as it's value. =head2 [article uris] Each key is an article id, the values are base URIs to store the HTML form of those articles and their children under. =head2 [protect link] The keys are ids of articles that shouldn't have their link field overwritten. The value should be a true value, but is otherwise ignored. =head2 [datadump] =over =item to The recipient for the data dump email sent by datadump.pl. Default: $DATA_EMAIL. =item from the From for the data dump email sent by datadump.pl. Default: $SHOP_FROM. =back =head2 [site users] Configuration for site users. =over =item nopassword If this is set to true then no passwords are required during registration, a confirmation email is sent immediately upon registration and that confirmation email contains a link the user can use to manage their details. This option has some security concerns since it can leave links to the user's information in the browser history. This option is not recommended. You cannot use this to control access to the shop. =item require_name1 =item require_name2 =item require_address =item require_city =item require_state =item require_postcode =item require_telephone =item require_facsimile =item require_country =item require_title =item require_organization Set these to true to require the corresponding field during registration, and to keep it required after modification. Default: false. If you enable any of these, you should enable C as well, or modify the registration template to include the given fields. =item display_I Controls how the given field is displayed in error messages. If you change the field names on the registration and/or options forms you should probably change them here too. Default: internal field name with the first character converted to upper-case. =item info_on_register If this is set then the user info is prompted for during user registration. The information still isn't required unless the appropriate require_I option is set. Default: false. =item register_refresh The default URL to refresh to on completing registration if no r parameter is supplied. =item subscribe_all If this is set then the subcription checkboxes are all checked on registration by default. Default: false. The user will only receive the subscriptions if they leave them checked and follow the link in the confirmation email. =item subscribe_I Where I is the number identifying a subscription. If this is set then the subscription checkbox for that subscription will be checked by default on the registration form. Default: false. The user will only receive the subscriptions if they leave it checked and follow the link in the confirmation email. You can get the I of a subcription by looking at the Edit link on the subscriptions management page, the number after "id=" is the id. =item billing_on_main_opts If set to zero then user billing options will be managed on a separate page. This is controlled by the user/options_base.tmpl template. =item user_register If set to zero then users cannot register themselves. Default: true, allowing users to register themselves. =item notify_register If true then an email is sent when a new user registers on your site. The email address sent to is the first set of [site users].notify_register_email, [shop].from or $SHOP_FROM from Constants.pm No email is sent if a new user is created from the administration user interface. See also: notify_register_email, notify_register_subject. =item notify_register_email The email to sent the registration notification too. See notify_register above. =item notify_register_subject The subject of the notification email sent when a new user registers. Any {I} is replaced with the given field from the registered user. See notify_register above. Default: New user {userId} registered =back =head2 [payment type names] This section and [payment type descs] are used to configure new paymeny type ids. The key is the integer representing the payment type. The value is the name used in tags for checking the payment type. You can also add a description (currently unused) to [payment type descs]. You should use numbers starting from 10 to avoid conflicts with future BSE payment types. =head2 [payment type descs] See [payment type names]. =head2 [payment type required] Set the key given by the payment type id to a value of a comma-separated list of fields required for that payment type. =head2 [help style I] This type of configuration section is used to set values for a style of help icon. Only the C