[Moin-devel] moin-1.2.3 changes

Florian La Roche laroche at redhat.com
Sat Aug 7 14:54:01 EDT 2004


I have done the below changes to my moin src.rpm:
- If anyone can send in changes to a page, I at least don't want them
  to disable sending diffs to people watching the page. Removed support
  for this and also changed the docu file.
- Config changes to personal taste, probably not something you want to
  add as defaults:
	- The page trail list confuses me. (Yeah, I'm getting old.)
	- SiteNavigation is also good at the top, not easy enough to
	  find this in the footer.
	- No reason to show a random page in RecentChanges
- README.redhat to clarify what needs doing on a Red Hat system, no need
  to include this anywhere and just FYI

Thanks a lot, I like moinmoin a lot since I have looked closer
at it due to http://wiki.specifixinc.com, regards,

Florian La Roche


--- moin-1.2.3/MoinMoin/config.py.lr	2004-08-07 13:31:06.994436691 +0200
+++ moin-1.2.3/MoinMoin/config.py	2004-08-07 14:11:34.161641447 +0200
@@ -43,7 +43,7 @@
 
 # default config values
 _cfg_defaults = {
-    'acl_enabled': 0,
+    'acl_enabled': 1,
     'acl_rights_default': "Trusted:read,write,delete,revert Known:read,write,delete,revert All:read,write",
     'acl_rights_before': "",
     'acl_rights_after': "",
@@ -55,7 +55,7 @@
     'allow_xslt': 0,
     'attachments': None, # {'dir': path, 'url': url-prefix}
     'auth_http_enabled': 0,
-    'bang_meta': 0,
+    'bang_meta': 1,
     'backtick_meta': 1,
     'caching_formats' : ['text_html'],
     'changed_time_fmt': '%H:%M',
@@ -64,20 +64,20 @@
     # chart_options = {'width': 720, 'height': 540}
     'chart_options': None,
     'cookie_lifetime': 12, # 12 hours from now
-    'data_dir': './wiki/data/',
+    'data_dir': './data/',
     'date_fmt': '%Y-%m-%d',
     'datetime_fmt': '%Y-%m-%d %H:%M:%S',
     'default_lang': 'en',
     'default_markup': 'wiki',
     'edit_locking': 'warn 10', # None, 'warn <timeout mins>', 'lock <timeout mins>'
-    'edit_rows': 30,
+    'edit_rows': 25,
     'hosts_deny': [],
     'html_head': '',
     'html_pagetitle': None,
     'httpd_host': 'localhost',
     'httpd_port': 8080,
     'httpd_user': 'nobody',
-    'httpd_docs': './wiki-moinmoin',
+    'httpd_docs': '/usr/share/moin/wiki/htdocs',
     'interwikiname': None,
     'logo_string': '<img src="/wiki/classic/img/moinmoin.png" alt="MoinMoin">',
     # XXX UNICODE fix
@@ -90,6 +90,7 @@
         'FrontPage',
         'RecentChanges',
         'FindPage',
+        'SiteNavigation',
         'HelpContents',
     ],
     'nonexist_qm': 0,
@@ -141,7 +142,7 @@
     'refresh': None, # (minimum_delay, type), e.g.: (2, 'internal')
     'shared_intermap': None, # can be string or list of strings (filenames)
     'show_hosts': 1,
-    'show_section_numbers': 1,
+    'show_section_numbers': 0,
     'show_timings': 0,
     'show_version': 0,
     'sitename': 'An Unnamed MoinMoin Wiki',
--- moin-1.2.3/MoinMoin/PageEditor.py.lr	2004-08-07 14:40:39.782661552 +0200
+++ moin-1.2.3/MoinMoin/PageEditor.py	2004-08-07 14:40:05.112986653 +0200
@@ -366,12 +366,6 @@
 <p>
 ''' % (save_button_text, _('Preview'), button_spellcheck, cancel_button_text,))
 
-        if config.mail_smarthost:
-            self.request.write('''<input type="checkbox" name="notify" value="1"%s><label>%s</label>''' % (
-                ('', ' checked="checked"')[preview is None or (form.get('notify',['0'])[0] == '1')],
-                _('Send mail notification'),
-            ))
-
         self.request.write('''
 <input type="checkbox" name="rstrip" value="1"%s>
 <label>%s</label>
@@ -705,7 +699,6 @@
         @param newtext: text to save for this page
         @param datestamp: ...
         @keyword stripspaces: strip whitespace from line ends (default: 0)
-        @keyword notify: send email notice tp subscribers (default: 0)
         @keyword comment: comment field (when preview is true)
         @keyword action: action for editlog (default: SAVE)
         @rtype: string
@@ -793,8 +786,8 @@
             eventlog.EventLog().add(self.request, 'SAVEPAGE',
                                     {'pagename': self.page_name})
 
-            # send notification mails
-            if config.mail_smarthost and kw.get('notify', 0):
+            # send notification mails, never allow to not send emails
+            if config.mail_smarthost:
                 msg = msg + self._notifySubscribers(kw.get('comment', ''))
 
         # remove lock (forcibly if we were allowed to break it by the UI)
--- moin-1.2.3/wiki/cgi-bin/moin_config.py.lr	2004-08-07 14:12:08.394385057 +0200
+++ moin-1.2.3/wiki/cgi-bin/moin_config.py	2004-08-07 14:30:23.752296769 +0200
@@ -38,11 +38,18 @@
 nonexist_qm = 0                         # show '?' for nonexistent?
 backtick_meta = 1                       # allow `inline typewriter`?
 allow_extended_names = 1                # allow ["..."] markup?
-edit_rows = 20                          # editor size
+edit_rows = 25                          # editor size
 max_macro_size = 50                     # max size of RecentChanges in KB (0=unlimited)
 bang_meta = 1                           # use ! to escape WikiNames?
 show_section_numbers = 0                # enumerate headlines?
 
+mail_from = None                        # "user at example.com"
+mail_smarthost = None                   # "127.0.0.1"
+acl_enabled = 1
+acl_rights_before = ""                  # 'AdminName:read,write,admin,delete,revert'
+acl_rights_default = 'Trusted:read,write,delete,revert Known:read,write,delete,revert All:read,write'
+acl_rights_after = ""
+
 # charting needs "gdchart" installed!
 # you can remove the test and gain a little speed (i.e. keep only
 # the chart_options assignment, or remove this code section altogether)
@@ -55,6 +62,7 @@
 # values that depend on above configuration settings
 logo_string = '<img src="%s" alt="%s">' % (logo_url, sitename)
 
+allowed_actions = ['DeletePage']
 # security critical actions (deactivated by default)
 if 0:
     allowed_actions = ['DeletePage', 'AttachFile']
@@ -62,7 +70,7 @@
 
 # for standalone server (see cgi-bin/moin.py)
 httpd_host = "localhost"
-httpd_port = 80
+httpd_port = 8080
 httpd_user = "nobody"
 httpd_docs = "/usr/share/moin/wiki/htdocs/"
 
--- moin-1.2.3/wiki/data/text/RecentChanges.lr	2004-08-07 14:28:37.073659239 +0200
+++ moin-1.2.3/wiki/data/text/RecentChanges	2004-08-07 14:28:53.516137342 +0200
@@ -3,8 +3,6 @@
 
 [[RecentChanges]]
 
-last, but not least, a randomly chosen page: [[RandomPage(1)]]
-
 ||<:> [[Icon(diffrc)]] || marks older pages that have at least one backup version stored (click for an author diff)||
 ||<:> [[Icon(updated)]] || marks pages edited since you set your bookmark (click for a bookmark diff)||
 ||<:> [[Icon(new)]] || marks pages created since you set your bookmark, and were not edited after creation||
--- moin-1.2.3/README.redhat.lr	2004-08-07 14:46:37.429735899 +0200
+++ moin-1.2.3/README.redhat	2004-08-07 14:52:51.933237798 +0200
@@ -0,0 +1,10 @@
+Steps to setup moin for your apache server:
+- mkdir /var/www/mywiki
+- cp -a /usr/share/moin/data /var/www/mywiki
+- cp -a /usr/share/moin/cgi-bin/* /var/www/mywiki
+- chown -R apache.apache /var/www/wiki/data
+- vi /etc/httpd/conf.d/mywiki.conf
+  Alias /wiki/ "/usr/share/moin/htdocs/"
+  ScriptAlias /mywiki "/var/www/mywiki/moin.cgi"
+- vi /var/www/mywiki/moin_config.py  # to set the default configuration
+- service httpd restart
--- moin-1.2.3/wiki/data/text/HelpOnConfiguration_2fEmailSupport.lr	2004-08-07 22:01:54.362395817 +0200
+++ moin-1.2.3/wiki/data/text/HelpOnConfiguration_2fEmailSupport	2004-08-07 22:02:40.387253351 +0200
@@ -19,4 +19,4 @@
 
 === Change Notification ===
 
-Any user can subscribe to changes of wiki pages by either clicking on the envelope icon [[Icon(subscribe)]], or by adding a regex to the "Subscribed wiki pages" field of his UserPreferences. The system then sends, whenever a page is changed and the author doesn't uncheck the "[[GetText(Send mail notification)]]" checkbox, an email with the author, a link to the page, and the diff of the change.
+Any user can subscribe to changes of wiki pages by either clicking on the envelope icon [[Icon(subscribe)]], or by adding a regex to the "Subscribed wiki pages" field of his UserPreferences. The system then sends, whenever a page is changed, an email with the author, a link to the page, and the diff of the change.
--- moin-1.2.3/MoinMoin/user.py.lr	2004-08-07 23:25:53.285373103 +0200
+++ moin-1.2.3/MoinMoin/user.py	2004-08-07 23:26:59.146401968 +0200
@@ -167,7 +167,7 @@
         # create checkbox fields (with default 0)
         for key, label in self._checkbox_fields:
             setattr(self, key, 0)
-        self.show_page_trail = 1
+        self.show_page_trail = 0
         self.show_fancy_links = 1
         self.show_emoticons = 1
         self.show_toolbar = 1




More information about the Moin-devel mailing list