]> git.imager.perl.org - bse.git/blob - site/docs/config.pod
default <:= ... :> tags to html formatting
[bse.git] / site / docs / config.pod
1 =head1 NAME
2
3 config.pod - documents BSE configuration file options
4
5 =head1 DESCRIPTION
6
7 BSE historically used Constants.pm to keep most configuration
8 information.  The plan is to make sure any new configuration is kept
9 in bse.cfg, and to slowly move most configuration information into
10 bse.cfg.
11
12 Keeping configuration information in Constants.pm makes it difficult
13 to perform upgrades and makes it impossible to use tools such as
14 mod_perl, at least if you want more than one site on the machine.
15
16 F<bse.cfg> is read as a utf-8 encoded file.
17
18 =head1 CONFIGURATION ENTRIES
19
20 =head2 [site]
21
22 Contains URL configuration for the site.
23
24 =over
25
26 =item url
27
28 The normal URL for the non-secure parts of the site.
29
30 =item secureurl
31
32 The secure URL for the shop, products and other portions of the site
33 that should use SSL.  This isn't checked to make sure it is https.
34
35 =item name
36
37 Used as the site "name" in a few places.
38
39 =item adminurl
40
41 If set, this is used as the base URL for accessing the administrative
42 functions of your site.
43
44 =item secureadmin
45
46 Ignored if C<adminurl> is set.
47
48 If this is true then C<secureurl> is used as the base URL for
49 accessing the administrative functions of your site, otherwise C<url>
50 is used as the base URL.  Default: false (C<url>'s value is used)
51
52 =item forward_from
53
54 Configure the IP address of one or more front-end proxies.  This can
55 be a regular expression except that C<.> is translated to C<\.> and
56 C<*> is tranlated to C<.*> to give more glob() like matching.
57
58 If the reqesting host matches then admin site URL matching is done
59 against HTTP_X_FORWARDED_SERVER instead of SERVER_NAME.
60
61 Default: no front-end server configured.
62
63 =item secret
64
65 A secret used (currently) for hashing cookie values passed between the
66 secure and non-secure parts of the site.  This must be set.  A
67 suitable value can be created with:
68
69   openssl rand -base64 32
70
71 =back
72
73 =head2 [paths]
74
75 Contains various file system paths.
76
77 =over
78
79 =item downloads
80
81 This is where the files uploads with the file wizard are stored.  It
82 must be writable by the web server user.
83
84 =item admin_templates
85
86 Directory containing administrative templates.  Note: this is not
87 completely implemented for now, so assume the default.  Default: admin
88 directory under $TMPLDIR.
89
90 =item templates
91
92 Directory base for most templates.  This can contain references like
93 $(section/key) to other configuration entries.  Split on the systems
94 PATH separators (run: perl -V:path_sep)
95
96 =item local_templates
97
98 Local Directory base for templates.  This is searched before the
99 templates directory.  This can contain references like $(section/key)
100 to other configuration entries.  Split on the system's PATH separator.
101
102 =item public_html
103
104 Web server document root.  Static pages are generated under this
105 directory.  Default: $CONTENTBASE.
106
107 =item images
108
109 Where uploaded images are stored.  This is not yet completely
110 implemented.  Default: $IMAGEDIR.
111
112 =item libraries
113
114 Local search path for BSE::Custom, or the class configured by
115 C<custom_class> in [basic].
116
117 =item scalecache
118
119 The directory where cached versions of scaled thumbnails are stored.
120 Defaults to I<[paths].images>F</scaled>.  This must be in the document tree.  If
121 you set this you should also set I<[uri].scalecache>.
122
123 =item siteuser_images
124
125 Where uploaded siteuser images are stored.  This must be set in the
126 config file.  The default bse.cfg include an entry to use the current
127 values of [paths].downloads
128
129 =item dynamic_cache
130
131 Pregenerated dynamic article pages are stored here.  This must be
132 defined if you site contains any dynamicly generated pages.
133
134 =item public_files
135
136 The directory to store public BSE::TB::File content in (currently used
137 for application specific files.)
138
139 =back
140
141 =head2 [extensions]
142
143 This section is used by the file wizard to map uploaded file
144 extensions to MIME content types.  This can be used to extend
145 BSE::FileEditor's internal extension map.  It cannot override that
146 map.
147
148 The key for each entry is the extension, without the leading '.'.
149
150 eg.
151
152   xls = application/msexcel
153
154 =head2 [templates]
155
156 Used for translating symbolic template names into full names under the
157 template directory.
158
159 In each case the default is the name with a C<.tmpl> extension.
160
161 =over
162
163 =item user/logon
164
165 user logon page
166
167 =item user/register
168
169 user registration page
170
171 =back
172
173 =head2 [admin templates]
174
175 Used for translating the names of administration templates into filenames.
176
177 In each case the default is the name with a C<.tmpl> extension.
178
179 =over
180
181 =item filelist
182
183 article file wizard
184
185 =item catalog
186
187 Catalog editor page.  Default admin/edit_catalog.tmpl
188
189 =item 1
190
191 =item 2
192
193 =item 3
194
195 =item 4
196
197 =item 5
198
199 Article edit pages.  Default admin/edit_<number>.tmpl
200
201 =item steps
202
203 Step child/parent management page.  Default admin/edit_steps.tmpl
204
205 =back
206
207 =head2 [html]
208
209 Minor html items.
210
211 =over
212
213 =item charset
214
215 The value of the charset keyword when outputting HTML from a script.
216 Set to the empty string to suppress the charset keyword.  Default:
217 iso-8859-1.
218
219 =item redirect_links
220
221 If this is a non-zero number, then all but mailto links are redirected
222 to C<nuser.pl/redirect> so you can display a diclaimer.  If this
223 contained alphabetics it's treated as a comma separated list of url
224 schemes that should be handled via C<nuser.pl/redirect>.  If 0 or not
225 present, no redirection is done.
226
227 The redirect URL includes a hash of the url, title and the redirect
228 salt to prevent using this mechanism by external sites for cookie
229 stealing attacks.
230
231 =item redirect_salt
232
233 The salt used in generating the has for redirect_links.  Default: an
234 empty string.
235
236 =item validate
237
238 If non-zero then any HTML output is validated with HTML::Tidy.
239 Validation errors and warnings are sent to the audit log.  See [html
240 tidy].
241
242 =item tagformat
243
244 The default tag formatting to use for C<< <:= ... :> >> tags.
245 Default: C<html>.
246
247 =back
248
249 =head2 [basic]
250
251 =over
252
253 =item access_control
254
255 If this is true then the user/group/permissions database is used to
256 control access to the system.  Default: False.
257
258 =item access_filter_parents
259
260 If this is true, then the drop-down lists of possible parents on the
261 newsletter edit pages are filtered for access control.
262 Default: False.
263
264 =item access_filter_steps
265
266 If this is true, then the drop-down lists of possible stepparents and
267 stepchildren on the article edit pages are filtered for access control.
268 Default: False.
269
270 =item alias_prefix
271
272 The prefix applied to articles that use a linkAlias url.  This should
273 start with a /.
274
275 =item alias_recursive
276
277 If this is non-zero then the link is formed by the C<alias_prefix>,
278 followed by slash (C</>) separated aliases from the ancestors starting
279 from the section, followed by the C<alias_suffix>.  You may need to
280 change your redirect handling if you enable this.  Default: Off.
281
282 =item alias_suffix
283
284 If this is non-zero then the title is cleaned up (all but
285 alphanumerics removed) and appended to the alias URL generated.
286
287 =item all_dynamic
288
289 If true then all articles are treated as dynamic.  Default: false.
290
291 =item auto_images
292
293 By default, if the author doesn't use any image tags, BSE will insert
294 any unnamed article images into the body text of an article.  You can
295 disable this on a per-article basis in the image tool, or disable it
296 globally by setting C<auto_images> to 0.
297
298 An alternative is to set C<imagePos> in C<[article defaults]> to
299 C<xx> which will default articles to not auto-inserting images.
300
301 =item cache_templates
302
303 If true, BSE will cache compiled templates using the configured BSE
304 cache, if any.  Depending on the configured cache this may slow things
305 down.  Default: disabled.
306
307 =item cache_templates_locally
308
309 If true, BSE will cache compiled templates in memory.  This may
310 significantly improve performance but may increase memory use.
311 Default: disabled.
312
313 =item cache_thumbnails
314
315 If set to zero the results of the thumbimage/gthumbimage body/template
316 tags will not be cached.  Default: 1 (caching is enabled).
317
318 =item cookie_domain
319
320 This overrides the domain value set for cookies.  This is useful if
321 you allow the site to run under both example.com and www.example.com,
322 if you set cookie_domain to example.com then a user visiting
323 www.example.com will still have their cookies when they visit
324 example.com.
325
326 =item cookie_lifetime
327
328 The expiry time for cookies.  This should be in the form supported by
329 CGI.pm for the -expires parameter.  Typically you want a plus ('+'), a
330 number, and a time character (s - seconds, m - minutes, h - hours, d -
331 days, M - months).  Default: +3h
332
333 =item cookie_name
334
335 This overrides the cookie name used to store the session id.  Default:
336 sessionid.  This is useful when you have 2 sites under the same
337 top-level domain, and helps disambiguate the cookie returned by the
338 browser.
339
340 =item custom_class
341
342 The name of the custom class for your site.  This is currently only
343 used for article editing customizations.  This class should derive
344 from BSE::CustomBase.  Default: BSE::Custom.
345
346 =item default_popupimage
347
348 This is the default popup image class for the popimage[] and
349 gpopimage[] tags.  Default: popup.
350
351 =item dynamic_access_filter
352
353 If set to 0, dynamic article iterators will no access control filter
354 their results.  Default: 1.
355
356 =item http_only_session
357
358 If this is non-zero, the default, the session cookie sent to the
359 browser has the C<HttpOnly> attribute set.  This can prevent session
360 cookie hijacking.  Default: 1.
361
362 =item htusers
363
364 This should be the path to a file to be updated with the list of users
365 and crypt() versions of their passwords.  If this is set then the
366 security system will check for a user set by the browser before
367 attempting a form based logon.  Default: None.
368
369 =item index_file
370
371 The name of the file to generate for static articles when the link is
372 terminated by "/".  Default: C<index.html>.
373
374 =item jit_dynamic_pregen
375
376 If this is true, then pre-generation for dynamic pages will be delayed
377 until the page is displayed to a user.  Default: off.
378
379 =item link_titles
380
381 If this is true then the links to your articles within BSE will be
382 followed by a / and then by a simplified version of the article title.
383 The aim is to include at least some title information in the URL
384 without modifying the name of the HTML file.  Default: False.
385
386 =item make_userid_cookie
387
388 If this is non-zero, the default, then when the site member logs in, a
389 javascript visible cookie, C<userid> will be set that contains the
390 login name of the user.  BSE's back-end doesn't use this cookie, its
391 only use is for Javascript to enable/disable user interface elements.
392 Default: 1.
393
394 =item minpassword
395
396 Minimum password length in characters.  Default: 4.
397
398 =item no_cache_dynamic
399
400 If non-zero, the default, dynamic responses will include a
401 C<Cache-Control: no-cache> header.  This can be overridden for
402 articles via , article flags, C<[template >
403 I<templatename>C<].no_cache_dynamic> and [article].no_cache_dynamic.
404 Default: 1.
405
406 =item preload_template
407
408 Preload the named template, searching the template search part.  Any
409 text that would normally be produced by the preloaded template is
410 ignored.  This can be useful for common definitions and variables for
411 use in many templates.  Default: none.
412
413 =item randomdata
414
415 Device to read random data from.  This device should not block when it
416 runs out of entropy.
417
418 =item redir_to_alias
419
420 If true then page.pl will 301 redirect (Moved Permanently) requests
421 for an article by its id to the generated link if the article has a
422 link alias.  Default: false.  Must only be used with use_alias true.
423
424 =item secure_session
425
426 If this is non-zero then the session cookie sent to the browser has
427 the C<Secure> attribute set.  This means that the cookie will only be
428 visible over https.  This is only useful when the only URL the site is
429 visited over is a https URL.  Default: 0.
430
431 =item server_auth
432
433 Set this to non-zero to enable authentication via server
434 authentication (usually Basic Authentication.)  You should normally
435 set this if you set htusers below.  Default: 0 (disabled)
436
437 =item sign
438
439 If this is true then the encrypted messages containing the customer's
440 credit card number are sent to the shop owner signed.  To avoid
441 keeping a passphrase and signing key on the server you can set this to
442 false (0).  This has the effect that anyone could send you an unsigned
443 message encrypted with your public key, though this may not be a
444 security threat.  Default: True.
445
446 =item staticajax
447
448 If true, the ifAjax and ajax tags will be active for static pages.
449
450 =item static_thumbnails
451
452 If true and cache_thumbnails is true then thumbnails for the thumbnail
453 cache will be generated when a static page is regenerated, and the
454 link from the page will link to the image in the cache rather than to
455 C<thumb.pl>.  Default: 1 (static thumbnails enabled).
456
457 =item track_uploads
458
459 If this is non-zero, and a cache is configured (see [cache]), file
460 uploads are tracked in entries in the cache.
461
462 The fileprogress.pl script can be called by Ajax to display file
463 upload progress information to the user.  The upload state is updated
464 a maximum of once a second.
465
466 =item use_alias
467
468 If this is non-zero then an article with linkAlias set will use an
469 alias url instead of the "real" url.  You will need to configure a
470 RewriteRule or ErrorDocument to page.pl to direct the user to the
471 correct URL.  Default: 1.
472
473 =item warn_obsolete
474
475 Some obsolete tags will warn to stderr if this is non-zero.  Default:
476 don't warn.
477
478 =back
479
480 =head2 [mail]
481
482 This section controls how BSE sends email.
483
484 =over
485
486 =item smtp_server
487
488 The host or IP address of your mail server.  If this is not set
489 C<sendmail> will be used instead.  If this is set you must also set
490 I<helo>.
491
492 =item helo
493
494 The name that BSE uses to identify itself when sending mail via SMTP.
495 Required if I<smtp_server> is set.
496
497 =item sendmail
498
499 The path to the C<sendmail> binary.  Default: /usr/lib/sendmail
500
501 =item sendmail_opts
502
503 The options supplied to sendmail.  Default: -t -oi
504
505 You may want to add the -odq option to this if you want mail queued
506 rather than sent immediately.
507
508 =item set_errors_to_from
509
510 If true, we add an Errors-To header set to the same as the From
511 header.  Default: true.
512
513 =item html_system_email
514
515 If non-zero then emails sent via the compose mail system that aren't
516 being sent to a member record, will be sent as HTML, if the HTML
517 template is available.
518
519 =item inline_css
520
521 If this is C<style> (the default) then use CSS::Inliner to attempt to
522 inline CSS in mail if the text "<style" is found in the generated
523 HTML.
524
525 If this is C<force> then we always attempt to inline CSS.
526
527 If this is any other value then don't inline CSS.
528
529 =item inline_css_flags
530
531 A comma separated list of flags to supply to CSS::Inliner->new().
532 Reasonable flags are C<strip_attrs> to strip C<id> and C<class>
533 attributes, and C<leave_style> to leave the HTML style block in place.
534
535 Default: no flags.
536
537 =item inline_css_report
538
539 If this is true and CSS inlining fails, log an error to the audit
540 log. This is intended for use in debugging and should be disabled in
541 production.  Default: false (disabled)
542
543 =back
544
545 =head2 [children of I<id>]
546
547 Where I<id> is the identifier for an article.
548
549 =over
550
551 =item template
552
553 the name of the default template for children of the given parent
554
555 =item template_dirs
556
557 a comma-separated list of extra directories under $TMPLDIR to search
558 for templates that can be used for children of the given parent article.
559
560 =back
561
562 =head2 [article I<id>]
563
564 Where I<id> is the identifier of an article.
565
566 =over
567
568 =item template_dirs
569
570 A comma-separated list of extra directories under $TMPLDIR to search
571 for templates that can be used for children of the given parent
572 article.
573
574 =item extra_templates
575
576 A comma-separated list of extra templates under $TMPLDIR that can be
577 used for the given article.
578
579 =back
580
581 =head2 [level I<level>]
582
583 =over
584
585 =item template
586
587 The default template for this level of article, assuming it hasn't
588 been set in the [children of I<article id>] section.
589
590 =item template_dirs
591
592 A comma-separated list of extra directories under $TMPLDIR to search
593 for templates that can be used for articles at the given I<level>.
594
595 =back
596
597 =head2 [catalogs]
598
599 =over
600
601 =item template
602
603 The default template for catalogs.
604
605 =back
606
607 =head2 [products]
608
609 =over
610
611 =item template
612
613 The default template for products.
614
615 =item extra_templates
616
617 A comma separated list of extra templates that can be used for
618 products.
619
620 =back
621
622 =head2 [messages]
623
624 This can be used to control translation of error messages.  Each key
625 has a prefix identifying the module that uses the error, followed by
626 '/' followed by a specific identifier for the message.
627
628 Message parameters, expressed as $I<digit>, are replaced with the
629 parameters passed to the message.  C<$$> is replaced with C<$>.
630
631 Each message identifier below is documented with the id, when it
632 occurs, the default message, and any parameters.
633
634 =over
635
636 =item user/needlogon
637
638 the user attempted to logon without entering a logon name.  Default:
639 "Please enter a logon name".  No parameters.
640
641 =item user/needpass
642
643 the user attempted to logon without entering a password.  Default:
644 "Please enter your password."  No parameters.
645
646 =item user/baduserpass
647
648 the user's logon name or password was not found or did not match.
649 Default: "Invalid user or password".  No parameters.
650
651 =item user/notloggedon
652
653 the user attempted to logoff while not logged on.  Default: "You
654 aren't logged on".  No parameters.
655
656 =item user/optsoldpass
657
658 the user entered a new password on the options page without entering
659 their old password.  Default: "You need to enter your old password to
660 change your password".  No parameters.
661
662 =item shop/logonrequired
663
664 Displayed if the user attempts to checkout when [shop].require_logon
665 is true.
666
667 =back
668
669 =head2 [downloads]
670
671 =over
672
673 =item must_be_paid
674
675 if non-zero, the order must be marked as paid for before the file can
676 be downloaded.
677
678 =item must_be_filled
679
680 if non-zero the order must be marked as filled before the files can be
681 downloaded.
682
683 =item require_logon
684
685 if non-zero the user must be registered/logged on to download I<any>
686 file.
687
688 =item log_downufile
689
690 if non-zero, downloads of userfiles will be logged.  Default: 0
691
692 =item log_downufile_maxage
693
694 the maximum age of entries in the user file download log, in days.
695 Default: 30.
696
697 =back
698
699 =head2 [confirmations]
700
701 Control over confirmation emails.
702
703 =over
704
705 =item subject
706
707 The subject of email confirmation emails.  Default: Subcription
708 Confirmation.
709
710 =item from
711
712 The from field for the email.  Default: $SHOP_FROM
713
714 =back
715
716 =head2 [subscriptions]
717
718 Control over subscription messages.
719
720 =over
721
722 =item from
723
724 The from field for the email.  Default: $SHOP_FROM.
725
726 =item testname
727
728 Default for the "Test Name" field for sending test subscription
729 messages.
730
731 =item testemail
732
733 Default for the "Test Email" field for sending test subscription
734 messages.
735
736 =item testtextonly
737
738 Set to 1 if you want the "Test Text Only" box checked by default for
739 sending test subscription messages.
740
741 =item testing
742
743 Set to 0 to disable display of the test subscription messages portions
744 of the subscriptions send form.
745
746 =item text_link_inline
747
748 Set to format links as they appear in the text version of emails.
749 C<$1> is replaced with the title, C<$2> with the URL and C<$3> with
750 the index. C<$$> is replaced with '$'. Default: C<$1 [$3]>
751
752 =item text_link_list
753
754 Set to format links as they appear at the footer of the body text.  If
755 this is set to the empty string then no list appears. C<$1>, C<$2>,
756 C<$3>, C<$$> are replaced as for I<text_link_inline> and $n is
757 replaced with newline.  Default: C<[$3] $2>
758
759 =item text_link_list_prefix
760
761 A line of text produced above the list of URLs if there is one.
762 Default: C<----->. $n in this is replaced with newlines.
763
764 =back
765
766 For example, if the configuration is:
767
768   text_link_inline="$1" ($3)
769   text_link_list_prefix=$n$n-------
770   text_link_list=($3) "$1"$n  => $2
771
772 and the body text is:
773
774   doclink[3]
775   link[http://www.example.com/|Example]
776
777 the result will be:
778
779   "The Shop" (1)
780   "Example" (2)
781   
782   
783   -------
784   (1) "The Shop"
785     => http://www.yoursite.com/shop/index.html
786   (2) "Example"
787     => http://www.example.com/
788
789 =head2 [search]
790
791 =over
792
793 =item highlight_partial
794
795 If this is true then partial matches will be highlight in search
796 result excerpts.  Default: True
797
798 =item keep_inaccessible
799
800 If this is true then resulting articles that can't be accessed by the
801 user are listed in the search results.  Default: false.
802
803 =item wordre
804
805 The default regular expression used to match words in text during
806 indexing.  Default: \w+
807
808 =item wordre_I<fieldname>
809
810 The field specific word match regular expression for the built-in
811 search indexer.  Default: the value of C<wordre>.
812
813 =item indexer
814
815 Module used to build the search index.  Default: BSE::Index::BSE.
816
817 =item index_priority
818
819 For C<BSE::Index::BSE>, the optimization priority.  The default of
820 C<speed> builds the index in memory and is very fast, but can consume
821 a lot of memory.  Otherwise, set this to C<memory> to reduce memory
822 usage.
823
824 C<memory> priority index building requires that the C<DBM::Deep>
825 module be installed.
826
827 =item level
828
829 Articles with a higher level than this are indexed as their ancestor.
830 Default: C<$SEARCH_LEVEL> which defaults to 5.
831
832 =back
833
834 =head2 [search highlight]
835
836 Sets the prefix and suffix used for highlighting matches for different
837 fields.
838
839 These are used by the highlight_result, excerpt, pageTitle, author,
840 keywords and matchFile tags.
841
842 Each field has a prefix and suffix entry.  The key is
843 I<fieldname>_prefix or I<fieldname>_suffix.  For file fields this is
844 file_I<fieldname>_prefix and file_I<fieldname>_suffix.
845
846 The default prefix is <b>.  The default suffix is </b>.
847
848 For example you can do:
849
850   [search highlight]
851   body_prefix=<span class="searchfound">
852   body_suffix=</span>
853
854 =head2 [shop]
855
856 =over
857
858 =item enabled
859
860 Used by some templates to check if the shop is enabled.  Set this to 1
861 to enable the shop, or 0 to disable it.
862
863 =item secureurl_articles
864
865 If this is false then shop articles will not use the secureurl as their 
866 baseurl.  Default: True
867
868 =item register_if_files
869
870 If true the customer is required to register before checkout if there
871 are any for sale files attached to products in the cart.  Default: True
872
873 =item require_logon
874
875 If true the customer is required to be logged on before checkout,
876 whether or not for sale files are attached to products in the cart.
877 Default: False.
878
879 =item payment_types
880
881 A comma-separated list of acceptable payment types.  Default: 0
882
883 The possible payment types are:
884
885 =over
886
887 =item *
888
889 0 - the user enters a credit card number, name and expiry date
890
891 =item *
892
893 1 - the customer will send a cheque
894
895 =item *
896
897 2 - contact customer for details
898
899 =item *
900
901 4 - paypal - see L<paypal.pod>
902
903 =back
904
905 Other types can be added by adding entries to the [payment type names]
906 and [payment type descs] sections.
907
908 =item address1
909
910 =item address2
911
912 =item address3
913
914 These are used by various shop templates to present an address that a
915 cheque payment should be sent to.
916
917 =item from
918
919 From email address for emails sent by the shop.  Overides $SHOP_FROM
920 in Constants.pm
921
922 =item to_name
923
924 To name for emailed orders sent by the shop.  Overrides $SHOP_TO_NAME
925 in Constants.pm
926
927 =item to_email
928
929 To email for emailed orders sent by the shop.  Overrides $SHOP_TO_EMAIL
930 in Constants.pm
931
932 =item bcc_email
933
934 BCC email address for order confirmation emails sent to the customer.
935 Default: No bcc.
936
937 =item noencrypt
938
939 If this is true then orders sent to you by the shop will not be
940 encrypted.  Enabling this disabled acceptance of credit card orders,
941 and the default for C<payment_types> will become C<1> instead or C<0>.
942
943 Please realize that other potentially commercially sensitive
944 information is being sent in the clear to a central location,
945 unencrypted.
946
947 =item email_order
948
949 If true, then the order is email to to_email, possibly with credit
950 card information included.  Default: $SHOP_EMAIL_ORDER.
951
952 =item display_I<field>
953
954 Used to translate the stored order field name into a presentation name
955 suitable for error messages.
956
957 =item cardprocessor
958
959 The name of a class to load to process credit card transactions online.
960
961 Currently this can be either DevHelp::Payments::Test or
962 DevHelp::Payments::Inpho.
963
964 =item crypt_module
965
966 Name of the encryption module to use.  Default: $SHOP_CRYPTO.
967
968 =item crypt_signing_id
969
970 Id of the key to sign the order email with.  If this is non-empty then
971 the email is signed even if [basic].sign is false.  Default:
972 $SHOP_SIGNING_ID.
973
974 =item crypt_gpg
975
976 Path to the GnuPG program.  Default: $SHOP_GPG
977
978 =item crypt_passphrase
979
980 Passphrase of the key used to sign the email.  Default:
981 $SHOP_PASSPHRASE.
982
983 =item show_card_type
984
985 If true, request the card type when requesting credit card
986 information.  Default: False.
987
988 =item cart_entry_limit
989
990 Maximum number of entries in the cart.  This limits the number of
991 distinct products (with options) in the cart, not the total
992 quantities.  Default: Unlimited.
993
994 =item currency_code
995
996 The shop currency as a 3-letter currency code.  Default: AUD.
997 Currencies other than "AUD" aren't supported by most of the system.
998
999 =item country_code
1000
1001 Set to non-zero if you're using country codes in the order country
1002 field.  If this is set then the delivCountry is supplied as is to
1003 various parts of the system, otherwise it is translated from a country
1004 name to a country code.  Default: 0.
1005
1006 =item require_fields
1007
1008 A comma separated list of extra fields to require during checkout.
1009 This is in addition to the usual fields required during checkout.
1010 Default: none.
1011
1012 =item require_delivery
1013
1014 If true, and the C<need_delivery> CGI parameter is true, treat the
1015 following delivery fields as required during checkout: delivFirstName,
1016 delivLastName, delivStreet, delivSuburb, delivPostCode and delivCountry.
1017 Default: true.
1018
1019 =item require_delivery_fields
1020
1021 If C<require_delivery> is true, and the C<need_delivery> CGI parameter
1022 is true, add the comma separated fields listed here to the required
1023 checkout fields list.  Default: none.
1024
1025 =back
1026
1027 =head2 [shipping]
1028
1029 =over
1030
1031 =item couriers
1032
1033 A space-separated list of modules under Courier::, e.g. "Fastway::Road
1034 AustraliaPost::Air". These will be made available as shipping methods
1035 on the checkout page.
1036
1037 =item quoted
1038
1039 If true then a default "Quote shipping charges later" shipping method
1040 will be added to the shipping methods list.
1041
1042 =item sourcepostcode
1043
1044 The post code from which products are shipped.
1045
1046 =item fastwayfranchisee
1047
1048 The name of the Fastway franchisee used to ship products from the
1049 sourcepostcode.
1050
1051 =item fastwayfranchiseecode
1052
1053 The Fastway franchisee code for the customer, if any.
1054
1055 =back
1056
1057 =head2 [Shop Order Validation]
1058
1059 This section can contain extra order validation information, including
1060 specifying required fields, display names and extra validation rules.
1061
1062 =head2 [fields]
1063
1064 =over
1065
1066 =item title_size
1067
1068 The maximum length of the article title field.  Default: 255.  Should
1069 not be set higher than this unless you change the database schema.
1070
1071 =back
1072
1073 =head2 [interest]
1074
1075 Controls the interest.pl script.
1076
1077 =over
1078
1079 =item notify
1080
1081 Email address that is notified of the interest.  Defaults to $SHOP_FROM.
1082
1083 =back
1084
1085 =head2 [debug]
1086
1087 Used for debugging.
1088
1089 =over
1090
1091 =item logon_cookies
1092
1093 When a user logs on, and the site url is different to the secure url
1094 BSE attempts to refresh to the other "side" of the site to set the
1095 same cookie.
1096
1097 BSE does some simple comparisons to attempt to determine whether the
1098 logon form was triggered on the secure side of the site (possibly from
1099 the shop) or on the insecure side.  Since CGI doesn't necessarily give
1100 us all the information required, it's possible it will guess wrong.
1101
1102 Setting this option to 1 will enable debugging information sent to
1103 standard error, which will be sent to the error log on Apache.  This
1104 probably isn't useful on IIS.
1105
1106 =item file_unlink
1107
1108 Reports errors to STDERR (hence to the error log on Apache) if there
1109 is a problem deleting the actual file when an attached file is
1110 removed.
1111
1112 =item mail_encryption
1113
1114 Reports debugging information to standard error while encrypting your
1115 mail.
1116
1117 =item cookies
1118
1119 Reports cookies received from the browser and sent to the browser to
1120 STDERR (hence to the error log on Apache.)
1121
1122 =item dump_session
1123
1124 If nonzero the session hash is dumped to STDERR after it is retrived
1125 from the database.
1126
1127 =item subscription_expiry
1128
1129 If non-zero then subscription expiry date calculations are dumped to
1130 STDERR.
1131
1132 =item jit_dynamic_regen
1133
1134 If non-zero then information about jit_dynamic_regen is sent to
1135 STDERR.
1136
1137 =item ifUserCan
1138
1139 If non-zero then the ifUserCan tag will output some trace information
1140 to STDERR.
1141
1142 =item trace_noimpl
1143
1144 Enables some trace messages from tags that return an ENOIMPL
1145 exception.  This can be useful for tracking down why a tag isn't being
1146 replaced.  This will produce a lot of output during page regeneration.
1147
1148 =back
1149
1150 =head2 [uri]
1151
1152 Contains various URIs.
1153
1154 This is underused, so don't rely on it yet.
1155
1156 =over
1157
1158 =item articles
1159
1160 =item cgi
1161
1162 The URI to the CGI directory.  Default: /cgi-bin
1163
1164 =item dist_images
1165
1166 The URI where images included with BSE can be found.
1167
1168 This includes images such as F<trans_pixel.gif> and C<admin/error.gif>.
1169
1170 Default: C</images>
1171
1172 =item images
1173
1174 The URI where managed images are kept which should correspond to
1175 C<images> in C<[paths]>.
1176
1177 Default: C</images> (from C<$Constants::IMAGES_URI>)
1178
1179 =item scalecache
1180
1181 The URL to the directory represented by scalecache.  Defaults to
1182 I<[uri].images>F</scaled>.
1183
1184 =item public_files
1185
1186 The URL to the directory configured as I<[paths].public_files>.
1187
1188 =item shop
1189
1190 =back
1191
1192 =head2 [articles]
1193
1194 This will provide translations from symbolic names to article ids.
1195
1196 Currently this is used for converting article ids in the access
1197 control code, and for looking up the id of the shop.
1198
1199 =head2 [printable type]
1200
1201 If the user supplies a template name to printable.pl then you can use
1202 a different content type by adding an entry to this section.  The key
1203 is the template name, and the value is the full content type.
1204
1205 =head2 [search index scores]
1206
1207 This section is used when generating the search index to override the
1208 default scores for each field in the articles.
1209
1210 The default scores are:
1211
1212   Field           Score  Notes
1213   -----           -----  -----
1214   title             5
1215   body              3
1216   keyword           4
1217   pageTitle         5
1218   author            4
1219   summary           0
1220   description       0    Products only
1221   product_code      0    Products only
1222   file_displayName  2    displayName for files
1223   file_description  2    description for files
1224   file_notes        1    notes for files
1225
1226 =head2 [article flags]
1227
1228 =head2 [product flags]
1229
1230 =head2 [catalog flags]
1231
1232 Flags that can be set for articles, products and catalogs
1233 respectively.  Note that flags for articles are also visible in
1234 products and catalogs.
1235
1236 All flag Ids are single letters or digits.  Uppercase letters are
1237 reserved for use by BSE internally, leaving lower-case letters and
1238 digits for your own use.
1239
1240 Use the id of the flag as the key, and a description of the flag as
1241 it's value.
1242
1243 =head2 [article uris]
1244
1245 Each key is an article id, the values are base URIs to store the HTML
1246 form of those articles and their children under.
1247
1248 =head2 [protect link]
1249
1250 The keys are ids of articles that shouldn't have their link field
1251 overwritten.  The value should be a true value, but is otherwise
1252 ignored.
1253
1254 =head2 [datadump]
1255
1256 =over
1257
1258 =item to
1259
1260 The recipient for the data dump email sent by datadump.pl. Default:
1261 $DATA_EMAIL.
1262
1263 =item from
1264
1265 the From for the data dump email sent by datadump.pl.  Default:
1266 $SHOP_FROM.
1267
1268 =back
1269
1270 =head2 [site users]
1271
1272 Configuration for site users.
1273
1274 =over
1275
1276 =item nopassword
1277
1278 If this is set to true then no passwords are required during
1279 registration, a confirmation email is sent immediately upon
1280 registration and that confirmation email contains a link the user can
1281 use to manage their details.
1282
1283 This option has some security concerns since it can leave links to the
1284 user's information in the browser history.  This option is not
1285 recommended.
1286
1287 You cannot use this to control access to the shop.
1288
1289 =item require_name1
1290
1291 =item require_name2
1292
1293 =item require_street
1294
1295 =item require_suburb
1296
1297 =item require_state
1298
1299 =item require_postcode
1300
1301 =item require_telephone
1302
1303 =item require_facsimile
1304
1305 =item require_country
1306
1307 =item require_title
1308
1309 =item require_organization
1310
1311 Set these to true to require the corresponding field during
1312 registration, and to keep it required after modification.  Default:
1313 false.
1314
1315 If you enable any of these, you should enable C<info_on_register> as
1316 well, or modify the registration template to include the given fields.
1317
1318 =item display_I<field name>
1319
1320 Controls how the given field is displayed in error messages.  If you
1321 change the field names on the registration and/or options forms you
1322 should probably change them here too.  Default: internal field name
1323 with the first character converted to upper-case.
1324
1325 =item info_on_register
1326
1327 If this is set then the user info is prompted for during user
1328 registration.  The information still isn't required unless the
1329 appropriate require_I<field> option is set.  Default: false.
1330
1331 =item register_refresh
1332
1333 The default URL to refresh to on completing registration if no r
1334 parameter is supplied.
1335
1336 =item subscribe_all
1337
1338 If this is set then the subcription checkboxes are all checked on
1339 registration by default.  Default: false.
1340
1341 The user will only receive the subscriptions if they leave them checked
1342 and follow the link in the confirmation email.
1343
1344 =item subscribe_I<id>
1345
1346 Where I<id> is the number identifying a subscription.  If this is set
1347 then the subscription checkbox for that subscription will be checked
1348 by default on the registration form.  Default: false.
1349
1350 The user will only receive the subscriptions if they leave it checked
1351 and follow the link in the confirmation email.
1352
1353 You can get the I<id> of a subcription by looking at the Edit link on the
1354 subscriptions management page, the number after "id=" is the id.
1355
1356 =item billing_on_main_opts
1357
1358 If set to zero then user billing options will be managed on a separate
1359 page.  This is controlled by the user/options_base.tmpl template.
1360
1361 =item user_register
1362
1363 If set to zero then users cannot register themselves.  Default: true,
1364 allowing users to register themselves.
1365
1366 =item notify_register
1367
1368 If true then an email is sent when a new user registers on your site.
1369 The email address sent to is the first set of [site
1370 users].notify_register_email, [shop].from or $SHOP_FROM from
1371 Constants.pm
1372
1373 No email is sent if a new user is created from the administration user
1374 interface.
1375
1376 See also: notify_register_email, notify_register_subject.
1377
1378 =item notify_register_email
1379
1380 The email to sent the registration notification too.  See
1381 notify_register above.
1382
1383 =item notify_register_subject
1384
1385 The subject of the notification email sent when a new user registers.
1386 Any {I<field>} is replaced with the given field from the registered
1387 user.  See notify_register above.
1388
1389 Default: New user {userId} registered
1390
1391 =item notify_register_customer
1392
1393 If non-zero then email id C<notify_register_customer> will be sent to
1394 new user on registration.  By default this uses template
1395 user/email_register, subject "Thank you for registering" which can be
1396 overridden in [email notify_register_customer] or via the
1397 C<set_subject> tag.
1398
1399 =item notify_register_customer_admin
1400
1401 If non-zero then the behaviour described for
1402 C<notify_register_customer> will take place when a new member is added
1403 by an administrator.  Defaults to the value of
1404 C<notify_register_customer>.
1405
1406 =back
1407
1408 =head2 [payment type names]
1409
1410 This section and [payment type descs] are used to configure new
1411 paymeny type ids.
1412
1413 The key is the integer representing the payment type.  The value is
1414 the name used in tags for checking the payment type.
1415
1416 You can also add a description (currently unused) to [payment type
1417 descs].
1418
1419 You should use numbers starting from 10 to avoid conflicts with future
1420 BSE payment types.
1421
1422 =head2 [payment type descs]
1423
1424 See [payment type names].
1425
1426 =head2 [payment type required]
1427
1428 Set the key given by the payment type id to a value of a
1429 comma-separated list of fields required for that payment type.
1430
1431 =head2 [help style I<style-name>]
1432
1433 This type of configuration section is used to set values for a style
1434 of help icon.  Only the C<template> and C<prefix> values are used
1435 directly by the code, the others are used by the default helpicon
1436 templates.
1437
1438 =over
1439
1440 =item prefix
1441
1442 The URI to the help files for this style.  Default: /help/ in style
1443 "user", /admin/help/ in style "admin".
1444
1445 =item template
1446
1447 The template used to produce the icon.  Default: helpicon in style
1448 user, admin/helpicon in style "admin".
1449
1450 =item icon
1451
1452 URI to the help icon image.   Default: /images/admin/help.gif
1453
1454 =item iconwidth
1455
1456 The width of the help icon image.  Default: 16
1457
1458 =item iconheight
1459
1460 The height of the help icon image.  Default: 16
1461
1462 =back
1463
1464 If you just want to change the help icon image for user help icons you
1465 might do:
1466
1467   [help style user]
1468   icon=/images/help.gif
1469
1470 =head2 [affiliate]
1471
1472 =over
1473
1474 =item allowed_referer
1475
1476 A semi-colon (;) separated list of referer domains that are allowed to
1477 link to the C<a_set> target of L<affiliate.pl>.
1478
1479 If the user's browser supplies a referer header then it will be
1480 checked against this list.
1481
1482 =item require_referer
1483
1484 If this is set then the C<a_set> target of L<affiliate.pl> will
1485 require that the user's browser supply a Referer header.
1486
1487 =item default_refresh
1488
1489 If no C<r> parameter is supplied to the C<a_set> target of
1490 L<affiliate.pl> then this is used as the default refresh.
1491
1492 Default: the site base url.
1493
1494 =item subscription_required
1495
1496 This is either the numeric or text of a subscription for which the
1497 affiliate must have an active subscription.
1498
1499 =item flag_required
1500
1501 A single letter flag which the site administrator must set for the
1502 affiliate page to be displayed for the given member.
1503
1504 =item set_cookie
1505
1506 If this is set then affiliate.pl will set the named cookie to the
1507 affiliate id.
1508
1509 =item other_cookies
1510
1511 This is a comma-separated list of other cookies that should be set by
1512 the a_set target.  The values for the cookies should be passed to the
1513 a_set target.  For example with:
1514
1515   [affiliate]
1516   other_cookies=alpha,beta
1517
1518 if the url:
1519
1520   http://your.site.com/cgi-bin/affiliate.pl?a_set=1&id=someid&alpha=1&beta=2&gamme=3
1521
1522 is accessed, then the cookie alpha is set to "1", beta is set to "2".
1523 The cookie gamma will not be set since it's not listed.
1524
1525 =item linkbaseurl
1526
1527 Used as the link base URL for the afflink.tmpl side bar template when
1528 an affiliate id is set.  Default: example.com
1529
1530 =item linkbasedesc
1531
1532 Used at the text of the link for the afflink.tmpl side bar template
1533 when an affiliate id is set.  Default: Your Site.
1534
1535 =item linkdefurl
1536
1537 Used as the link URL for the afflink.tmpl side bar template when an
1538 affiliate id is not set.  Default: example.com
1539
1540 =item linkdefdesc
1541
1542 Used as the text of the link for the afflink.tmpl side bar template
1543 when an affiliate id is not set.  Default: Our site
1544
1545 =back
1546
1547 =head2 [BSE Siteuser Images]
1548
1549 Each key is the id of a member image, with a corresponding [BSE
1550 Siteuser Image I<image_id>] section.  The values are ignored.
1551
1552 =head2 [BSE Siteuser Image I<image_id>]
1553
1554 Provides information about a single member image "template".
1555
1556 =over
1557
1558 =item description
1559
1560 Short description on the image, like "Logo".  Used in error messages.
1561
1562 =item help
1563
1564 Longer description of the image.  Accessible with the member_image tag.
1565
1566 =item minwidth
1567
1568 =item minheight
1569
1570 =item maxwidth
1571
1572 =item maxheight
1573
1574 The minimum and maximum dimensions of the image.
1575
1576 =item widthsmallerror
1577
1578 =item heightsmallerror
1579
1580 =item widthlargeerror
1581
1582 =item heightlargeerror
1583
1584 Error messages displayed in the when the image is outside the
1585 configured dimensions.
1586
1587 =item largeerror
1588
1589 =item smallerror
1590
1591 Default error messages for the above.
1592
1593 =item maxspace
1594
1595 Maximum storage the image can use in bytes.  Default: 1000000.
1596
1597 =item spaceerror
1598
1599 Error message displayed if the image uses too much storage.
1600
1601 =back
1602
1603 =head2 [editor]
1604
1605 Various editor settings.
1606
1607 =over
1608
1609 =item allow_thumb
1610
1611 If this is non-zero the system will attempt to load the configured
1612 thumbnail class, and put thumbnail images on the image manager page
1613 rather than full-size images.  Default: off
1614
1615 =item thumbs_class
1616
1617 The name of a perl class that implement's BSE's thumbnail API.  At
1618 this point the only class that implements that is BSE::Thumb::Imager,
1619 supplied with BSE.  Default: None
1620
1621 =item default_thumbnail
1622
1623 URI to the default thumbnail image.  This is presented when the
1624 runtime production of a thumbnail image fails.
1625
1626 =item default_thumbnail_width
1627
1628 =item default_thumbnail_height
1629
1630 Dimensions of the default thumbnail image.
1631
1632 =item default_thumbnail_alt
1633
1634 Alt text for the default thumbnail image.
1635
1636 =item check_modified
1637
1638 If this is true then BSE will check the value of the lastModified
1639 parameter passed against the value in the article.  If these don't
1640 match the article isn't saved and is redisplayed with an error
1641 message.  This provides simple protection against one user saving
1642 changes over those made by another.
1643
1644 =back
1645
1646 =head2 [thumbnails]
1647
1648 =over
1649
1650 =item max_width
1651
1652 =item max_height
1653
1654 =item max_pixels
1655
1656 Default values for the thumbimage tag.
1657
1658 =back
1659
1660 =head2 [includes]
1661
1662 Each value is used as the relative or absolute name of a file or
1663 directory to load more configuration data from.
1664
1665 The keywords must remain unique.
1666
1667 Only the [includes] section from bse.cfg itself is used to locate more
1668 configuration data.
1669
1670 If the value references a directory, all files with an extension of
1671 C<.cfg> are read for configuration data.
1672
1673 The order the files are read (which later files overriding older
1674 files) is:
1675
1676 =over
1677
1678 =item 1.
1679
1680 bse.cfg is read
1681
1682 =item 2.
1683
1684 the entries in [includes] are sorted alphabetically (or rather
1685 asciily), so an entry with key "A" is read before one with key "B",
1686 one with key "01" is read before "02", but key "10" would be read
1687 I<before> key "2".
1688
1689 =item 3.
1690
1691 if an entry is a file then that is read and the values merged.
1692
1693 =item 4.
1694
1695 if an entry is a directory, then that is scanned and the files found
1696 read alphabetically as above.
1697
1698 =back
1699
1700 =head2 [error_img]
1701
1702 This is used to configure the error icon displayed next to fields that
1703 fail validation.
1704
1705 =over
1706
1707 =item image
1708
1709 URI to the image file.
1710
1711 =item width
1712
1713 =item height
1714
1715 The width and height of the error icon image.
1716
1717 =back
1718
1719 =head2 [site user flags]
1720
1721 Flags that can be set for site users.
1722
1723 All flag Ids are single letters or digits.  Uppercase letters are
1724 reserved for use by BSE internally, leaving lower-case letters and
1725 digits for your own use.
1726
1727 Use the id of the flag as the key, and a description of the flag as
1728 it's value.
1729
1730 =head2 [article defaults]
1731
1732 =head2 [catalog defaults]
1733
1734 =head2 [product defaults]
1735
1736 These sections contain defaults values for the corresponding article
1737 types.
1738
1739 Each key is the name of a column for the article type.
1740
1741 If an entry is not found in [catalog defaults] then [article defaults]
1742 is also checked.
1743
1744 If an entry is not found in [product defaults] then [article defaults]
1745 is also checked.
1746
1747 These sections are checked B<after> the C<[children of >I<id>C<]> and
1748 C<[level >I<level>C<]> sections.
1749
1750 These defaults are used when creating an article where no value is
1751 supplied, they can also be accessed via the <:default I<name>:> tag.
1752
1753 =head2 [newsletter filters]
1754
1755 Contains C<criteria>I<index> entries starting from C<criteria1>, then
1756 C<criteria2>, etc.
1757
1758 Each entry consists of a filter class name, followed by a ; followed
1759 by data passed to that filter.
1760
1761   ; user the original SQL based filter, configured from 
1762   ; section [foo]
1763   criteria1=BSE::NLFilter::SQL;foo
1764
1765 See the documentation for each filter to configure the filters.
1766
1767 =head2 [Query Groups]
1768
1769 The key of each entry is the numeric identifier of a query group, the
1770 values are the name of the query group.  For example:
1771
1772   [query groups]
1773   1=some name
1774
1775   [query group some name]
1776   sql=select id from bse_siteusers where id = ? and name1 like '%some%'
1777
1778 Each entry also has a corresponding [Query Group I<name>] section.
1779
1780 =head2 [query group I<name>]
1781
1782 This section corresponds to an entry in [Query Groups].
1783
1784 =over
1785
1786 =item sql
1787
1788 This is an SQL statement.  One placeholder is required and is passed
1789 the siteuser id (primary key) of the user to be checked.  If this
1790 query returns I<any> rows then the user is considered part of the
1791 group.
1792
1793 =back
1794
1795 =head2 [template types]
1796
1797 Each key is a template name, the value is the content type to be used
1798 when displaying the template dynamically.
1799
1800 =head2 [template descriptions]
1801
1802 Each key is a template name, the value is a description used in the
1803 template dropdown for that template.
1804
1805 =head2 [body class]
1806
1807 This section defines CSS class names for BSE's body text link tags.
1808 The key is the tag name, the value is the CSS class to be used.
1809
1810 By default the class used is the same as the name of the tag, but you
1811 can switch this off by adding an entry setting the class to the empty
1812 string, for example:
1813
1814   ; no class attribute for any of the links
1815   [body class]
1816   link=
1817   poplink=
1818   doclink=
1819   popdoclink=
1820
1821 You can set p here too to set the class for paragraphs generated as
1822 body text.  By default no class is set.
1823
1824 =head2 [popimage]
1825
1826 Controls the behaviour of the window displayed by the popimage[] body
1827 text tag.  If the Javascript for this has been customized then this
1828 may not apply.
1829
1830 =over
1831
1832 =item extrawidth
1833
1834 =item extraheight
1835
1836 Extra width and height for the window beyond the size of the image.
1837 Default: no extra width or height.
1838
1839 =item popmiddle
1840
1841 If set to non-zero popimage[] will attempt to centre the popup within
1842 the current window.  Default: 0.
1843
1844 =back
1845
1846 =head2 [inpho]
1847
1848 This is used to configure the DevHelp::Payments::Inpho module.
1849
1850 =over
1851
1852 =item test
1853
1854 If this is set then the test parameters are used instead of the
1855 product values.
1856
1857 =item url
1858
1859 The URL to process requests through.  
1860
1861 Default: https://extranet.inpho.com.au/cc_ssl/process
1862
1863 =item user
1864
1865 Inpho supplied user name.
1866
1867 =item password
1868
1869 Inpho supplied password.
1870
1871 =item test_url
1872
1873 The URL to process test requests through.
1874
1875 =item test_user
1876
1877 The user to supply to test requests.
1878
1879 =item test_password
1880
1881 The password to supply to test requests.
1882
1883 =back
1884
1885 =head2 [custom]
1886
1887 This section controls whether some custom class methods are called:
1888
1889 =over
1890
1891 =item saveopts
1892
1893 If this is non-zero then siteuser_saveopts is called.
1894
1895 =back
1896
1897 =head2 [levelI<level> menus]
1898
1899 Where I<level> is the article level at which the defined menu options will be available.
1900 Configure each menu value and description as I<key> and I<value>.
1901
1902 =over
1903
1904 For example:
1905
1906   [level1 menus]
1907   0=Default
1908   1=Sidebar
1909   2=Footer
1910
1911 To create a menus using such values, use the "allkids_of" iterator "filter" option.
1912
1913 For example:
1914
1915   <:iterator begin allkids_of -1 filter: [menu] == 2 :>
1916
1917 =back
1918
1919 =head2 [title alias]
1920
1921 Enable the "titleAlias" article field and set which level it will be available.
1922
1923 =over
1924
1925 =item levelI<level>
1926
1927 Where I<level> is the article "level" for which the "titleAlias" field should be enabled.  To enable
1928 set the value to non-zero.
1929
1930 For example:
1931
1932   [title alias]
1933   level1=1
1934
1935 The "titleAlias" can be used as an alternate "short" title for the given article, especially useful
1936 for space critical iterated menus.  A template conditional can be used to display the "titleAlias" 
1937 in place of the article "title" when appropriate.
1938
1939 =back
1940
1941 =head2 [thumb geometries]
1942
1943 Each key represents a geometry identifier for use by the thumbimage[],
1944 gthumbimage[] body text tags and the <:thumbimage ...:>, <:gthumbimage
1945 ...:>, <:dthumbimage ...:> template tags.
1946
1947 The key is the geometry identifier, the value is the geometry string
1948 as follows.
1949
1950 The geometry string consists of:
1951
1952 =over
1953
1954 =item *
1955
1956 dimensions
1957
1958 =item *
1959
1960 crop flag - if present
1961
1962 =item *
1963
1964 optional fill
1965
1966 =back
1967
1968 The dimensions can be in any of the following forms:
1969
1970 =over
1971
1972 =item *
1973
1974 <width>x<height> - the desired maximum width and height. eg 200x150
1975
1976 =item *
1977
1978 <width>x - the desired width, with the height calculated
1979 proportionally based on the source image size
1980
1981 =item *
1982
1983 x<height> - the designed height, with the width calculated
1984 proportionally based on the source image size.
1985
1986 =item *
1987
1988 <size> - the desired maximum size in both directions. so "200" is
1989 equivalent to "200x200"
1990
1991 =back
1992
1993 The crop flag is a single letter "c", if present then the image should
1994 be scaled so the smaller dimension matches the requested size, and the
1995 longer dimension will be cropped to fit.
1996
1997 The fill if present is: fill(color) where color is a color recognized
1998 by the underlying graphics implementation.  This should be at least
1999 hex web colors without the #, eg fill(FF0000) will fill with red.
2000
2001 =head2 [thumb classes]
2002
2003 Each key represents a geometry identifier for use by the thumbimage[],
2004 gthumbimage[] body text tags and the <:thumbimage ...:>, <:gthumbimage
2005 ...:>, <:dthumbimage ...:> template tags.
2006
2007 The value is used as the class for the generated img tag.
2008
2009 =head2 [targets]
2010
2011 Each value represents a handler or script name for the <:dyntarget
2012 I<script> I<target> ...:> tag.
2013
2014 Each key has a TARGET version and a no-TARGET version, with the key
2015 suffixed with C<_n>.
2016
2017 The default C<nuser> target is C</cgi-bin/nuser.pl/user/TARGET>.  The
2018 default no-target C<nuser> is C</cgi-bin/nuser.pl/user>.
2019
2020 For other targets the default is
2021 C</cgi-bin/>I<script>C<.pl?a_TARGET=1> and
2022 C</cgi-bin/>I<script>C<.pl>.
2023
2024 The string C<TARGET> is replaced with the target specified in the
2025 dyntarget tag.
2026
2027 This, along with dyntarget is intended to allow a more "Web 2.0" type
2028 of access to BSE.  eg. you might set:
2029
2030   [targets]
2031   shop=/xshop/TARGET
2032   shop_x=/xshop/
2033
2034 and have a rewrite rule:
2035
2036   RewriteRule ^/xshop/(.*)$ /cgi-bin/nuser.pl/shop/$1 [PT]
2037
2038 =head2 [popimage class I<classname>]
2039
2040 This defines the settings for a class of images generated by the
2041 popimage[] and gpopimage[] body text markup tags.  For example, the
2042 settings for C<popimage[imageid|foo]> can be found in section
2043 C<[popimage class foo]>.
2044
2045 =over
2046
2047 =item html
2048
2049 The html generated for this class.  Tags of the form
2050 C<{>I<identifier>C<}> are replaced, where I<identifier> can be
2051 C<inline_> or C<outline_> followed by an image field name, for example
2052 C<inline_src> is the URL to the inline image.
2053
2054 Default: <a href="{outline_src}" rel="lightbox[id]" target="_blank"><img src="{inline_src}" alt="{inline_alt}" width="{inline_width}" height="{inline_height}" border="0" /></a>
2055
2056 The default may be tuned as needed.
2057
2058 =item inline
2059
2060 The inline image geometry.  Default: editor (the value used for
2061 thumbnails on the admin side)
2062
2063 =item outline
2064
2065 The outline image geometry.  If no value is supplied then the original
2066 image values are used.
2067
2068 =back
2069
2070 =head2 [mail resources]
2071
2072 Each key is the identifier of a file that can be attached to
2073 BSE::ComposeMail emails.  The value is comma separated filename,
2074 content type, inline status.
2075
2076 The files are searched for through the template search mechanism, so
2077 the filename can be relative to either the master or local templates
2078 directories.
2079
2080 If the content type is not supplied, if the filename end in gif, png
2081 or jpg the appropriate content type is used, otherwise
2082 application/octet-stream.
2083
2084 If the inline status is not supplied then images are considered
2085 inline, and other files arent.
2086
2087 =head2 [shop registration]
2088
2089 Each key represents a message id from attempts to checkout.  Except
2090 the all key which covers all cases.
2091
2092 If the C<all> key or the message id key is non-zero then the checkout
2093 page will redirect to registration instead of login if the cart or
2094 configuration requires that the user be logged in.
2095
2096 =head2 [template I<template-name>]
2097
2098 Settings for articles based on a particular template.
2099
2100 =over
2101
2102 =item no_cache_dynamic
2103
2104 Controls whether a cache-control: no-cache header will be produced.
2105 Can be overridden with the A and B article flags.  If not set the
2106 value of [article].no_cache_dynamic is used.
2107
2108 =back
2109
2110 =head2 [article]
2111
2112 Global settings for articles.
2113
2114 =over
2115
2116 =item no_cache_dynamic
2117
2118 Controls whether a cache-control: no-cache header will be produced.
2119 Can be overridden with the A and B article flags or [template
2120 I<template-name>].no_cache_dynamic.  If not set the value of
2121 [basic].no_cache_dynamic is used.
2122
2123 =back
2124
2125 =head2 [recaptcha]
2126
2127 For the <:recaptcha:> tag currently only used for fmail.pl.
2128
2129 =over
2130
2131 =item api_public_key
2132
2133 =item api_private_key
2134
2135 The public and private key you receive when you register with reCAPTCHA.
2136
2137 =item error_I<error_code>
2138
2139 Replace the error message for the given I<error_code> where
2140 I<error_code> is the reCAPTCHA error code
2141 (eg. "incorrect-captcha-sol") with dash replaced by underscore.
2142
2143 eg.
2144
2145   error_incorrect_captch_sol=VERY BAD INPUT
2146
2147 =back
2148
2149 =head2 [global file metadata]
2150
2151 Each key represents an item of metadata for files attached to
2152 articles.
2153
2154 The values are ignored.
2155
2156 For each key, extra information is defined in the [file metadata
2157 I<name>] section.
2158
2159 =head2 [file metadata I<name>]
2160
2161 Definition for the file metadata item I<name>.
2162
2163 =over
2164
2165 =item *
2166
2167 title - descriptive name of the metadata.  Defaults to I<name>.
2168
2169 =item *
2170
2171 rules - validation rules, separated by ;.  Custom rules can be defined
2172 in [file metadata validation].
2173
2174 =item *
2175
2176 ro - if non-zero the metadata cannot be modified directly by the admin
2177 (applications can still generate it). Default: writable.
2178
2179 =item *
2180
2181 type - the data type of the metadata, any of string, text, enum,
2182 integer, real, image.  If this is enum values must be defined and
2183 labels should be.  Default: string.
2184
2185 The types are:
2186
2187 =over
2188
2189 =item *
2190
2191 string - single line of text
2192
2193 =item *
2194
2195 text - one or more lines of text
2196
2197 =item *
2198
2199 integer - whole number
2200
2201 =item *
2202
2203 real - number with decimal points
2204
2205 =item *
2206
2207 enum - select from a list of possible values.
2208
2209 =item *
2210
2211 image - image file.
2212
2213 =back
2214
2215 =item *
2216
2217 values - semi-colon separated list of values for this metadata.
2218
2219 =item *
2220
2221 labels - semi-colon separated list of labels for the values
2222
2223 =item *
2224
2225 help - help html to display for the metadata
2226
2227 =item *
2228
2229 data_name - (images only) the key to use to store the image data.
2230 Default: I<name>_data.
2231
2232 =item *
2233
2234 width_name - (images only) the key to use to store the image width.
2235 Default: I<name>_width.
2236
2237 =item *
2238
2239 height_name - (images only) the key to use to store the image height.
2240 Default: I<name>_height.
2241
2242 =item *
2243
2244 cond - a perl expression indicating whether the metadata should be
2245 prompted for, for this file.  $file is the file object.  Default: 1.
2246
2247 =item *
2248
2249 unit - text displayed after the entry box for the metadata.  Default:
2250 empty.  Useful for including a unit ("pixels") or format help
2251 ("hh:mm").
2252
2253 =back
2254
2255 =head2 [session cleanup]
2256
2257 Controls the processing of the bse_session_clean.pl script.
2258
2259 =over
2260
2261 =item *
2262
2263 days - the minimum age in days of sessions to be removed.  Default: 30.
2264
2265 =item *
2266
2267 per - the number of records to remove per SQL delete request.
2268 Default: 1000.
2269
2270 =item *
2271
2272 count - the number of SQL delete requests to perform, maximum.
2273 Default: 1000.
2274
2275 =item *
2276
2277 optimize - whether to perform a table optimization after deleting
2278 records.  Default: 1 (set to 0 to skip optimization)
2279
2280 =back
2281
2282 =head2 [nightly work]
2283
2284 Controls the bse_nightly.pl script.
2285
2286 =over
2287
2288 =item *
2289
2290 jobs - a comma separated list of BSE background processes to run when
2291 bse_nightly.pl is run.  Default: bse_session_clean
2292
2293 =item *
2294
2295 I<other keys> - each key is a sort key, and the value is a single
2296 background task name.  This allows add-ons to setup extra tasks
2297 without overwriting each other.  The sugessted key format is:
2298
2299   99 - two digit priority - 00 is executed first, 99 last
2300   package-name - name of package the task is for
2301   unique - extra text to make the key unique, if necessary
2302
2303 =back
2304
2305 =head2 [cache]
2306
2307 Parameters controlling where cached information - eg. file upload
2308 progress is stored.
2309
2310 =over
2311
2312 =item *
2313
2314 class - the BSE::Cache compatible cache class.  See the documentation
2315 of BSE::Cache::Cache, BSE::Cache::CHI or BSE::Cache::Memcached.
2316
2317 =back
2318
2319 =head2 [db]
2320
2321 Database connection parameters.  These override the settings in
2322 Constants.pm which are deprecated.
2323
2324 =over
2325
2326 =item *
2327
2328 dsn - the DBI dsn used to connect to the database. Default:
2329 $Constants::DSN.
2330
2331 =item *
2332
2333 user - the logon to the database.  Default: $Constants::UN
2334
2335 =item *
2336
2337 password - the password for the user.  Default: $Constants::PW.
2338
2339 =item *
2340
2341 dbopts - a perl expression that should evaluate to a hash reference.
2342 Default: $Constants::DBOPTs, or an empty hashref.
2343
2344 =item *
2345
2346 class - the database wrapper class to use.  Default: BSE::DB::Mysql.
2347 No other values are currently supported.
2348
2349 =back
2350
2351 =head2 [extra a_config]
2352
2353 Defines extra configuration to be returned from the BSE system
2354 configuration.
2355
2356 Each key is the keyword in the returned JSON object.  If the key
2357 already exists it is not overwritten.
2358
2359 Each value is the name of a section in the BSE configuration.  The
2360 strings "{level}", "{generator}", "{parentid}", "{template}" are
2361 replaced with their values from the article that config is being
2362 requested for.
2363
2364 So:
2365
2366   [extra a_config]
2367   menu=level{level} menu
2368
2369   [level1 menu]
2370   alpha=One
2371   beta=Two
2372
2373 will include:
2374
2375   menu: { alpha: "One", beta: "Two" }
2376
2377 in the returned configuration
2378
2379 =head2 [cookie names]
2380
2381 This section maps BSE's default cookie names to alternate names.  This
2382 can be useful if you have two BSE sites under the same domain and need
2383 to ensure they use different cookies.
2384
2385 eg.
2386
2387   [cookie names]
2388   userid=altuserid
2389
2390 =head2 [siteuser updates]
2391
2392 Each key identifies an update specification for userupdate.pl, the
2393 value is a description of the specification.
2394
2395 See L<< [siteuser update I<specid>] >> for the rest of the import
2396 specification.
2397
2398
2399 =head2 [siteuser update I<specid>]
2400
2401 Currently contains only a single key:
2402
2403 =over
2404
2405 =item *
2406
2407 fields - a semi-colon separated list of fields to import.  Must
2408 contain one of C<id> or C<userId> which is used as a key to identify
2409 the user to update.  An C<x> entry is a field to ignore.  Some fields,
2410 such as C<confirmed> may not appear in this list.
2411
2412 =back
2413
2414 =head2 [paypal]
2415
2416 Configuration for BSE's PayPal integration.
2417
2418 It shouldn't be necessary to change any of the URLs.
2419
2420 =over
2421
2422 =item *
2423
2424 test - if true, then the PayPal sandbox is used, and the configuration
2425 entries starting in C<test_> are used.  If false, PayPal is live, and
2426 configuration entries starting in C<live_> are used.  Default: 1.
2427
2428 =item *
2429
2430 test_api_username, test_api_password, test_api_signature - API
2431 credentials for test mode.  Required in test mode.
2432
2433 =item *
2434
2435 live_api_username, live_api_password, live_api_signature - API
2436 credentials for live mode.  Required for live mode.
2437
2438 =item *
2439
2440 test_ws_url - URL to make NVP requests through in test mode.  Default:
2441 https://api-3t.sandbox.paypal.com/nvp
2442
2443 =item *
2444
2445 test_refresh_url - PayPal URL to refresh to in test mode.  Default:
2446 https://www.sandbox.paypal.com/webscr
2447
2448 =item *
2449
2450 live_ws_url - URL to make NVP requests through in live mode.  Default:
2451 https://api-3t.paypal.com/nvp
2452
2453 =item *
2454
2455 live_refresh_url - PayPal URL to refresh to in live mode.  Default:
2456 https://www.paypal.com/cgibin/webscr
2457
2458 =back
2459
2460 =head2 [paypal custom]
2461
2462 Extra parameters supplied to the SetExpressCheckout API.  See the
2463 Express Checkout Advanced Features Guide (from PayPal) for details.
2464
2465 Some settings that may be useful:
2466
2467 =over
2468
2469 =item *
2470
2471 PAGESTYLE - the style of payment page to use from those listed in your
2472 account profile.
2473
2474 =item *
2475
2476 HDRIMG - https URL to an image to use in the payment page header.
2477
2478 =item *
2479
2480 HDRBACKCOLOR - a 6 hex digit color to use as the background of the
2481 payment page header.
2482
2483 =item *
2484
2485 HDRBORDERCOLOR - a 6 hex digit color to use as the border of the
2486 payment page header.
2487
2488 =back
2489
2490 =head2 [audit log]
2491
2492 =over
2493
2494 =item *
2495
2496 mail - if non-zero any emails sent through BSE::ComposeMail are logged
2497 in the audit log.  Default: 0.
2498
2499 =item *
2500
2501 mail_max_dump - if non-zero this is the size limit of the dump stored
2502 in the audit log when [audit log].mail is enabled.
2503
2504 =back
2505
2506 =head2 [audit log I<facility>]
2507
2508 Most commonly C<[audit log bse]>.  Controls whether given events or
2509 families of events are logged.
2510
2511 The key is one of:
2512
2513 =over
2514
2515 =item I<component>
2516
2517 =item I<component>C<:>I<module>
2518
2519 =item I<component>C<:>I<module>C<:>I<function>
2520
2521 =back
2522
2523 with the longer keys overriding the shorter keys, and defaulting to
2524 all actions being logged.
2525
2526 =head2 [mail audit log]
2527
2528 This enables sent when an event is logged in the audit log.  Warning:
2529 for common events this will result in large amounts of email.
2530
2531 =over
2532
2533 =item *
2534
2535 to - the email address to send the email to
2536
2537 =item *
2538
2539 emerg, alert, crit, error, warning, notice, info, debug - if present
2540 and true then events at these levels result in an email.  If the value
2541 contains an C<@> then the value is used as the recipient address.
2542
2543 =item *
2544
2545 I<facility>-I<component>
2546
2547 =item *
2548
2549 I<facility>-I<component>-I<module>
2550
2551 =item *
2552
2553 I<facility>-I<component>-I<module>-I<function>
2554
2555 Controls sending an email for specific events or families of events.
2556 If the value is true, send an email for that event.  If the value
2557 contains an C<@> then the value is used as the recipient address.
2558
2559 =back
2560
2561 with the longer keys overriding the shorter keys, and defaulting to
2562 all actions being logged.
2563
2564 =head2 [html tidy]
2565
2566 Contains options to pass to HTML::Tidy.  Anything not listed below is
2567 passed directly to HTML::Tidy->new.
2568
2569 =over
2570
2571 =item *
2572
2573 ignore_types - types of message to ignore separated by commas, any,
2574 all or none of info, warning, error.
2575
2576 =item *
2577
2578 ignore_text_I<key> - messages to ignore, I<key> is not used, just the
2579 value.
2580
2581
2582 =back
2583
2584 =head2 [email I<token>]
2585
2586 Controls emails sent via F<cgi-bin/admin/sendemail.pl>.
2587
2588 =over
2589
2590 =item *
2591
2592 template - plain text template
2593
2594 =item *
2595
2596 html_template - HTML template (defaults to the value of I<template>
2597 followed by C<_html>
2598
2599 =item *
2600
2601 subject - subject of the email, can be overridden with the
2602 C<set_subject> tag.
2603
2604 =item *
2605
2606 from - from email address, defaults to the shop from address
2607
2608 =item *
2609
2610 from_name - from name
2611
2612 =item *
2613
2614 allow_html - controls whether HTML is allowed.  By default this is
2615 based on the user's settings.
2616
2617 =back
2618
2619 =head2 [lost password]
2620
2621 =over
2622
2623 =item *
2624
2625 daily_limit - the number of recovery attempts permitted per day.
2626 Default: 3.
2627
2628 =item *
2629
2630 age_limit - the id included in the email is valid for this many days.
2631 Default: 7.
2632
2633 =back
2634
2635 =head2 [link replacement]
2636
2637 For formatted text, this is a list of URL prefixes to replace.
2638
2639 The key is a sort key, replacements are checked in alphabetical order.
2640
2641 The value is the original prefix, followed by ";", followed by the
2642 replacement.
2643
2644 Replacement is performed case-insenitively.  Regexp metacharacters
2645
2646 =head2 [article categories]
2647
2648 =over
2649
2650 =item *
2651
2652 ids - a comma separated list of category ids.  There are (currently)
2653 no restrictions on the contents of these ids, but alphanumerics are
2654 recommended to simplify templates.
2655
2656 =item *
2657
2658 I<id> - a description for a particular category id.  Overridden by the
2659 C<name> key in C<< [article category I<id>] >>.  Default: ucfirst of
2660 the id.
2661
2662 =back
2663
2664 =head2 [article category I<id>]
2665
2666 =over
2667
2668 =item *
2669
2670 name - name of the article category.
2671
2672 =back
2673
2674 Other keys may be used as desired, eg. to make it simpler to configure
2675 article behaviour based on the category.
2676
2677 =head2 [article menu]
2678
2679 This section can be used to add new menu items to the menu displayed
2680 on article edit pages.
2681
2682 The keys are used for sorting only.
2683
2684 The value is comma-separated:
2685
2686 =over
2687
2688 =item *
2689
2690 target script name
2691
2692 =item *
2693
2694 target identifier, to be set to 1 on making a request to the script.
2695
2696 =item *
2697
2698 the label for the item in the menu.
2699
2700 =back
2701
2702 eg.
2703
2704   sample,a_foo,Sample Item
2705
2706 will generate a link like:
2707
2708   <a href="/cgi-bin/admin/sample.pl?id=10&amp;a_foo=1">Sample Item</a>
2709
2710 where 10 is the id of the article being edited.
2711
2712 Keys with a prefix of C<bse_> are reserved for BSE internal use.
2713
2714 =head2 [undeletable articles]
2715
2716 Keys are the ids of articles that may not be deleted.
2717
2718 This applies if the value of the entry is a true perl value.
2719
2720   [undeletable articles]
2721   1=home page
2722   2=more home page
2723   ; article 3 is deletable
2724   3=
2725
2726 =head2 [dummy shipping methods]
2727
2728 Configures extra shipping methods only selectable from the order
2729 detail page.
2730
2731 Entries are sorted by value.
2732
2733 If the value contains a comma the text up to the comma is removed and
2734 the remains used as the label, otherwise the key is used as the label.
2735
2736 =head2 [article custom fields]
2737
2738 =head2 [product custom fields]
2739
2740 =head2 [catalog custom fields]
2741
2742 These can be used to define article, product and catalog custom fields
2743 respectively, in a similar manner to L<formmail>.
2744
2745 The field names are predefined, C<customDate1>, C<customDate2>,
2746 C<customInt1>, C<customInt2>, C<customInt3>, C<customInt4>,
2747 C<customStr1> and C<customStr2>, but are only active if a description
2748 is defined for the field:
2749
2750   [article custom fields]
2751   customInt1_description=Stock Level
2752
2753 =head1 AUTHOR
2754
2755 Tony Cook <tony@develop-help.com>
2756
2757 =cut