1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
from MoinMoin.config.multiconfig import DefaultConfig
# Required for OpenID login
from MoinMoin.auth.openidrp import OpenIDAuth
from MoinMoin.auth.openidrp_ext.openidrp_sreg import *
# Append to the global default url_schemas list. MoinMoin doesn't support this
# per wiki which is why this hack exists.
from MoinMoin.config import url_schemas
url_schemas.append('apt')
class Config(DefaultConfig):
# Wiki identity ----------------------------------------------------
sitename = u'Wiki di ubuntu-it'
logo_string = sitename
interwikiname = None
# Critical setup ---------------------------------------------------
data_dir = '/srv/wiki.ubuntu-it.org/www/data/'
data_underlay_dir = '/srv/wiki.ubuntu-it.org/www/underlay/'
url_prefix = '/htdocs'
# Security ----------------------------------------------------------
allowed_actions = ['AttachFile', 'DeletePage', 'RenamePage']
acl_enabled = 1
acl_rights_valid = ["read", "write", "revert", "delete", "admin"]
# Use this for locking the wiki
# acl_rights_before = u"All:read"
# page_header1 = "<p align=\"center\"><b>Il wiki è in fase di manutenzione, per cui è consultabile in sola lettura.</b></p>"
acl_rights_before = (u"GruppoAdmin:admin,revert,delete,read,write " u"GruppoOperatori:admin,revert,delete,read,write " u"GruppoEditori:read,write,revert,delete " )
acl_rights_default = (u"Known:read,write,revert " u"All:read ")
# Spam protection
# added by Milo
# Disabled on 19/07/07
# from MoinMoin.util.antispam import SecurityPolicy
# Mail --------------------------------------------------------------
mail_smarthost = "localhost"
# The return address, e.g "My Wiki <noreply@mywiki.org>"
mail_from = "Ubuntu-it Wiki <nonrispondere@ubuntu-it.org>"
mail_login = ""
# User interface ----------------------------------------------------
# Modified by Milo: set Documentazione as front_page
page_front_page = u"Documentazione"
navi_bar = [
# Will use page_front_page, (default FrontPage)
u"%(page_front_page)s",
u"[[CercaPagina|Cerca Pagina]]",
u"[[GruppoDocumentazione/Partecipa|Partecipa]]",
u"[[GruppoDocumentazione/Partecipa/FAQ|FAQ]]"
]
theme_default = 'light'
# Language options --------------------------------------------------
language_default = 'it'
# You must use Unicode strings here [Unicode]
#page_category_regex = u'^Category[A-Z]'
#page_dict_regex = u'[a-z]Dict$'
#page_form_regex = u'[a-z]Form$'
#page_group_regex = u'^Gruppo[A-Z]|^Gruppo[a-z]|^[a-z]Gruppo$'
#page_template_regex = u'[a-z]Modello$'
page_category_regex = ur'(?P<all>Category(?P<key>(?!Template)\S+))'
page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
page_group_regex = ur'(?P<all>Gruppo(?P<key>(?!Template)\S+))'
page_template_regex = ur'(?P<all>(?P<key>\S+)Modello)'
# Content options ---------------------------------------------------
# Overwritten by themefunciont
html_head = '''
<link rel="shortcut icon" href="/htdocs/favicon.ico">
<link href='https://fonts.googleapis.com/css?family=Ubuntu:300,400,700,300italic,400italic,700italic' rel='stylesheet' type='text/css' />
<script type="text/javascript" src="https://www.ubuntu-it.org/sites/all/themes/light-drupal-theme/js/cookies.js"></script>
<script type="text/javascript" src="https://www.ubuntu-it.org/sites/all/themes/light-drupal-theme/js/accessibility.js"></script>
'''
#Show login options
show_login = 1
# Show users hostnames in RecentChanges
show_hosts = 1
# Enumerate headlines?
show_section_numbers = 0
# Charts size, require gdchart (Set to None to disable).
chart_options = {'width': 600, 'height': 300}
#Enable the use of refresh (see HelpOnProcessingInstructions)
refresh = (4, 'external')
# Whatever footer or theme license, comment out these two
# for showing a link to the license page during editing
page_license_enabled = 1
page_license_page = u"LicenzaContenuti"
# Time format for the italian standard
# Used in default values
datetime_fmt = '%d/%m/%Y %H.%M.%S'
date_fmt = '%d/%m/%Y'
changed_time_fmt = '%H.%M'
# Offset for the italian hour from UTC
# Used in default values
tz_offset = 1.0
# Page locking for editing
# Users are warned
edit_locking = 'lock 5'
# Force to use text editor
editor_default='text'
editor_force= True
editor_ui = 'theonepreferred'
# Added by Giuseppe Terrasi in order to block supplementation page
supplementation_page = False
# Surge protection details
# Looks like people are experiencing this: http://moinmo.in/MoinMoinBugs/UnwantedSurgeProtection
surge_action_limits = None
surge_lockout_time = 0 # need testing!
# Xapian helps wiki to speed up drastically on search
# More Info in http://moinmo.in/HelpOnXapian
xapian_search = True
xapian_stemming = True
# This prints useful information about time page creation
# Use for debug
#show_timings = True
# Disable the event-log file -pietroalbini
# This file contains only an access log (we have apache for that) and an
# entry every time someone saves a page, which is already contained in
# edit-log with some extra information. Also, the file keeps growing at a
# steady rate. The edit-log is saved even if this is disabled.
log_events_format = 0
# OpenID configuration ----------------------------------------------
# See HelpOnOpenID, HelpOnAuthentication and HelpOnConfiguration for more info.
auth = [
OpenIDAuth( forced_service='https://login.ubuntu.com',
modify_request=openidrp_sreg_modify_request,
update_user=openidrp_sreg_update_user,
create_user=openidrp_sreg_create_user),
]
cookie_lifetime = (1, 12)
# allow only certain OP's .. with directed identities
openidrp_allowed_op = []
openidrp_allow_registration = True
openidrp_registration_url = '' # url to your provider's registration page
# configurable SREG request values
# possible values:
# nickname, email, fullname, dob, gender, country, language, timezone
# match these up with OpenIDRP.auth_attribs
# ['name', 'email', 'aliasname', 'language', 'tz_offset']
openidrp_sreg_required = ['nickname', 'email', 'timezone']
openidrp_sreg_optional = ['fullname']
openidrp_sreg_username_field = 'nickname' #'fullname'
# don't let users change password or have multiple openid's
user_form_disable = ['changepass', 'oid']
# remove some options from the large user preferences form
user_form_remove = ['css_url', 'quicklinks', 'password', 'password1', 'password2']
#user_homewiki = 'LaunchpadHomepage'
superuser = ["jeremie2", "l3on", "mlazzari2", "vipri-alessandro", "mapreri"]
# END OpenID
# Textchas ----------------------------------------------------------
#textchas_disabled_group = u"TrustedEditorGroup" # members of this don't get textchas
# textchas = {
# 'en': {
# u"PRIMA DI SALVARE RISPONDERE ALLA DOMANDA: cosa indossiamo per tenere al caldo le mani?": ur"guanti|Guanti|GUANTI",
# u"PRIMA DI SALVARE RISPONDERE ALLA DOMANDA: cosa indossiamo per proteggere gli occhi dal sole o per leggere meglio?": ur"occhiali|Occhiali|OCCHIALI",
# },
# 'it': {
# u"PRIMA DI SALVARE RISPONDERE ALLA DOMANDA: cosa indossiamo per tenere al caldo le mani?": ur"guanti|Guanti|GUANTI",
# u"PRIMA DI SALVARE RISPONDERE ALLA DOMANDA: cosa indossiamo per proteggere gli occhi dal sole o per leggere meglio?": ur"occhiali|Occhiali|OCCHIALI",
# },
# }
|