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