~ubuntu-it-wiki/wiki-ubuntu-it/wiki-repo

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