1 # Configuration variables for the TypeWriter (TW) application.
2
3 # This is on by default for blogs/wikis.
4 CSA_ENABLE_CPI = true
5
6 # These values must be available to _userproc(_O_REQUEST),
7 # that is before group+cf is read, so they must be set here.
8 TNS_CMT_MAXLEN = 2048
9 TNS_GROUP_MAXTITLE = 64
10 TNS_PAGE_MAXTITLE = 64
11 TNS_GROUP_MAXLEN = 64
12 TNS_PAGE_MAXLEN = 64
13 TNS_ATTACH_MAXDESC= 64
14
15 # Default value of rows in the recent-comments table (including header!).
16 # It can be overridden by group+cf.
17 TNS_RECENT_COMMENTS_NUM = 6
18
19 # Default value of rows in the recent-changes view (including header!).
20 # It can be overridden by group+cf.
21 TNS_RECENT_CHANGES_NUM = 11
22
23 # Default value of rows in the recent-pages view (including header!).
24 # It can be overridden by group+cf.
25 TNS_RECENT_PAGES_NUM = 11
26
27 # Default value of rows in the recent-headlines view (including header!).
28 # It can be overridden by group+cf.
29 TNS_RECENT_HEADLINES_NUM = 11
30
31 # Default sorting column and no. of rows in the recent-links view
32 # (including header!). It can be overridden by group+cf. By default,
33 # I prefer to sort the recent-links view on p_ctime rather than p_vtime,
34 # otherwise a recently created page referring to a p_vtime which is too
35 # far back in time would never show up in this view, which I think is wrong.
36 TNS_RECENT_LINKS_PROP = (p_ctime 11)
37
38 # Min. allowed occurrences of a tag for it to be listed in the Tag Cloud.
39 # It can be overridden by group+cf.
40 TNS_TAG_FREQ_MIN = 0
41
42 # Type of keywords used to built the tag cloud. It can be:
43 # k - keywords (default)
44 # g - Geo tags
45 # M - "My" tags
46 TNS_TAG_CLOUD_TYPE = ()
47
48 # Min. allowed occurrences of a meta-category for it to be listed
49 # in the Category Cloud. It can be overridden by group+cf.
50 TNS_CAT_FREQ_MIN = 0
51
52 # 'sorttable' options that are to be used by 'groupPageMap'.
53 TNS_PAGE_LIST_SORT = (p_name)
54
55 # Whether to always page listings by default.
56 TNS_PAGER_DEFAULT = false
57
58 # No. of results per page if paging is requested.
59 # The first value listed applies to pagemap and attachment listings,
60 # while the second value applies to comment listings. Non-numeric
61 # values in the list will trigger defaults.
62 TNS_PAGER_BLKSIZE = (10 30)
63
64 # 'sorttable' options that are to be used by 'groupTagSearch'.
65 TNS_TAG_LIST_SORT = (k_tag)
66
67 # Properties of the Blogger API end derivatives. Element n.1 tells
68 # whether we want to use numeric (n) or string (s) identifiers for
69 # blogging objects. The default is 's'. A local setting of this
70 # variable belongs into csa.rc, because it must be available to
71 # blogger.getUsersBlogs before any group+cf is read. If position
72 # n. 2 is set to 't' it means that the extended TW syntax will
73 # be used in post/pages titles sent to an API client. Said element
74 # *can* be overridden on a per-group basis in the relevant group+cf.
75 # In fact, as it stands, position n. 1 is currently used only at the
76 # beginning of 'blogger.getUsersBlogs', when non group+cf has been
77 # read yet, so any group+cf that wants to set a different value for
78 # position n. 2 can do so by simply setting the whole variable to null.
79 TNS_API_PROP = (s t)
80
81 # Misc. group-level values that do not deserve a separate environment
82 # variable each. These may be overridden by group+cf.
83 # 1. Used by gropPageMap as output row separator when tiled output is
84 # requested. It is used literally.
85 # 2. Used by showPage as the separator between tpl.var.tw.page.nav links.
86 # It will be XML-encoded before use.
87 # 3. Used by _rdfacpi.awk for top-level RDFa elements. This is 'div'
88 # by default, but sometimes 'span' may be preferable to prevent
89 # undesired line-breaks in the resulting HTML output.
90 # 4. If value is 'rdfa' then RDFa CPIs will be translated into RDFa
91 # XML elements, otherwise the parser will produce Microformat XML.
92 # 5. If value is 't[hreads]' then the listing of comments associated with
93 # a page is displayed in threaded format, otherwise "flat" format
94 # is be used (i.e. the traditional blog-style format). If neither
95 # t* nor f* are specified then the default is threaded mode.
96 # 6. If value is 'true' then hidden pages will have any associated
97 # private attachments also hidden to non-editors. The default is
98 # 'false', for backward-compatibility.
99 # 7. Max. limits for user-defined name/value pairs, e.g. '24:128:32'
100 # means that we can accept names of max. 24 characters, values of
101 # max. 128 characters and at most 32 name/value defs in total.
102 # This is meant not to have editors bloat the program environment.
103 # 8. Absolute URL to emoticon PNG images (i.e. "/....", without any
104 # leading "http://" nor "https://", and without the host name. The
105 # default value is "/icons" .
106 # 9. Emoticon filename extension. Defaults to "png" but if animated
107 # emoticons are desired then it will have to be set to "gif" in
108 # group+cf or other suitable TW configuration file.
109 # 10. "I'm Feeling Lucky" behavior enabled for 'groupPageMap' and
110 # 'groupTagSearch', whereby if a search returns only one result
111 # then the user gets immediately redirected to it.
112 TNS_GROUP_MISC_PROP = ('
' ' > ' div rdfa
113 threads false $nil /icons png false)
114
115 # Whether to try and ping referenced external and internal pages.
116 # It can be overridden by group+cf.
117 TNS_PING_XREF = false
118
119 # Whether to tell Technorati about local changes (ignored if TNS_PING_XREF
120 # is set to 'false'). It can be overridden by group+cf.
121 TNS_PING_TECHNORATI = false
122
123 # Not all XML-RPC client libraries understand datatypes in the form of
124 # true, so I override them here with numeric values.
125 CSA_RPC2_OK = '1'
126
127 # TW hosts that handle HTTPS requests with stunnel(8). Can be set in csa.rc
128 # as appropriate, but it should not be null (see lib/weblib.rc).
129 TNS_STUNNEL_HOSTS = (www.example.com)
130
131 # Default file containing the list of gifts certificates.
132 TNS_BUY_CREDITS = /dev/null
133
134 # The default cart system is the one supplied by TW.
135 # The only other value currently supported is "paypal",
136 # which can be set in the relevant group+cf .
137 TNS_BUY_CART = ()
138
139 # Default VAT percentage on shipping rates.
140 TNS_BUY_SHIP_VAT = 20
141
142 # No VAT exemption by default. Can be set to "true" in group+cf
143 # to mean that a missing VAT code in a purchase order is to be
144 # regarded as a VAT exemption for the buyer (i.e. for exporting the
145 # goods, etc.). If the buyer does enter a VAT code, then this
146 # flag will be ignored.
147 TNS_BUY_VAT_EXEMPT = false
148
149 # Dummy default RPX API Key and URLs.
150 TNS_RPX_API = (522c5649b60b286f0e2b1ff40dcade0949da211b
151 https://example-rpx-id.rpxnow.com/openid/v2/signin
152 https://rpxnow.com/api/v2/auth_info)
153
154 # I need to derive also a scalar from the above list, to be used
155 # as a replacement tag in templates.
156 TNS_RPX_URL = $TNS_RPX_API(2)
157
158 # Support for gravatars. The rating value can be overridden by 'group+cf'.
159 TNS_GRAVATAR_URL = http://www.gravatar.com/avatar
160 TNS_GRAVATAR_RATING = G
161
162 # E-mail defaults.
163 TNS_EMAIL_FROM = 'typewriter@localhost'
164 TNS_EMAIL_TO = 'typewriter@localhost'
165 TNS_EMAIL_MODERATOR = 'typewriter@localhost'
166 TNS_EMAIL_ORG = 'TypeWriter Blogging and Wiki Engine'
167 TNS_EMAIL_RCPT_MAX = 25
168 TNS_EMAIL_REPLY_TO = ()
169
170 # Self-registration defaults. These can be overridden by group+cf.
171 # If TNS_SELFREG_AUTH contains "editor", then the requesting user
172 # will be automatically granted the group-level editor status.
173 # a TW instance, because auth+dat is also global. Of course, since
174 # auth+dat is global, a registered user will become known also to
175 # all other groups in the same TW, albeit with possibly lesser
176 # privileges.
177 TNS_SELFREG_AUTH = ()
178 TNS_SELFREG_ANONYMOUS = false
179 TNS_SELFREG_APPROVE = false
180 TNS_SELFREG_AUTOASK = false
181 TNS_SELFREG_WELCOME = ()
182
183 # List of users who are allowed to create new page groups. This can be
184 # "ALL" if anyone is allowed, or it can be the list of those accounts
185 # who are granted such capability. Global editors are always allowed
186 # and they do not need to be listed here.
187 TNS_ALLOW_WRITERS = ()
188
189 # Page history defaults.
190 TNS_HISTORY_RESTRICT = true
191
192 # This can be set in group+cf to be a better UseMod parser, if available.
193 TNS_CMD_WIKI2HTML = (tw-parsewiki -f html)
194
195 # This can be set in group+cf to html2wiki(1) if available.
196 #TNS_CMD_HTML2WIKI = (html2wiki --dialect UseMod --encoding utf-8)
197 TNS_CMD_HTML2WIKI = (cat)
198
199 # List of allowed editing GUIs.
200 #TNS_ALLOW_GUI = (parsewiki rawhtml tinymce nicedit ckeditor)
201 #
202 # Security warning: although this will break backward-compatibility,
203 # this list should really be empty by default and only be set to
204 # the desired value(s) in group+cf .
205 TNS_ALLOW_GUI = ()
206
207 # Whether to allow and possibly other potentially
208 # unsafe tags in the page editing interface. This can be overridden in
209 # group+cf and is only effective if the editing GUI is other than
210 # "parsewiki".
211 TNS_CMS_UNSAFE = false
212
213 # Whether to add Google's "nofollow" attribute to outbound URLs.
214 # Can be overridden in group+cf .
215 TNS_EXT_NOFOLLOW = false
216
217 # Related-pages view properties. Can be overridden in group+cf .
218 # 1. Subcat separator in related links, in place of the default "."
219 # 2. max. no. of related pages to list.
220 # 3. max. length of HREF text shown.
221 TNS_RELATED_PAGES_PROP = (': ' 10 30)
222
223 # How to behave when a page description contains a redirection CPI.
224 # This can be overridden in group+cf, but most often in per-subcat+cf
225 # files if any.
226 # 1. Set to "true" if the redirection applies also to editors.
227 # 2. Set to "true" to *skip* the page in pagemap-type listings (default
228 # is "false" here, for backward-compatibility).
229 TNS_REDIR_PROP = (true false)
230
231 # Add more agents and the associated conditionals as needed, but beware
232 # of combinatorial explosions. These vars should be available right from
233 # the beginning, before group+cf is read, so I set them here.
234
235 switch ($HTTP_USER_AGENT) {
236
237 case *' MSIE '*
238 tpl.if.tw.agent.msie = ()
239 tpl.fi.tw.agent.msie = ()
240 tpl.if.tw.agent.not.msie = '(::DEL:)'
241 tpl.fi.tw.agent.not.msie = '(:DEL::)'
242
243 case *
244 tpl.if.tw.agent.msie = '(::DEL:)'
245 tpl.fi.tw.agent.msie = '(:DEL::)'
246 tpl.if.tw.agent.not.msie = ()
247 tpl.fi.tw.agent.not.msie = ()
248
249 case ()
250 tpl.if.tw.agent.msie = '(::DEL:)'
251 tpl.fi.tw.agent.msie = '(:DEL::)'
252 tpl.if.tw.agent.not.msie = ()
253 tpl.fi.tw.agent.not.msie = ()
254 }
255
256 # End of file