Frankie Chow
|
|
Email: <frankie AT SPAMFREE openworkshop DOT org>
I am webmaster of
http://www.samba.hk (samba.hk is sub part of samba.org, you can find the link on http://www.samba.org/)
I am about ten year in Open Source.
Blog
blog of stock chinese
Like
- Python
- Linux
- OpenBSD I am interested in all internet services (e.g. samba, ldap, email, sql, web, ...).
TODO
- Patch the SSHA password hash.
Done
Patch the security_string to cookie handle. see: MoinMoinPatch/SecurityString
Patch the Auth_Url use security_string logic. see: MoinMoinPatch/SecurityString
Patch the security_rules to under SecurityPolicy obj. see: MoinMoinPatch/SecurityRules
Idea
- siteredirect
- siteredirect.patch
1 * looking for arch@arch.thinkmo.de--2003-archives/moin--main--1.5--patch-393 to compare with 2 * comparing to arch@arch.thinkmo.de--2003-archives/moin--main--1.5--patch-393 3 M MoinMoin/Page.py 4 5 * modified files 6 7 --- orig/MoinMoin/Page.py 8 +++ mod/MoinMoin/Page.py 9 @@ -1064,12 +1064,16 @@ 10 # cascaded redirection 11 pi_redirect = args 12 if request.form.has_key('action') or request.form.has_key('redirect') or content_only: continue 13 - 14 request.http_redirect('%s/%s?action=show&redirect=%s' % ( 15 request.getScriptname(), 16 wikiutil.quoteWikinameURL(pi_redirect), 17 wikiutil.url_quote_plus(self.page_name, ''),)) 18 return 19 + elif verb == "siteredirect": 20 + pi_redirect = args 21 + if request.form.has_key('action') or request.form.has_key('redirect') or content_only: continue 22 + request.http_redirect('%s' % pi_redirect) 23 + return 24 elif verb == "deprecated": 25 # deprecated page, append last backup version to current contents 26 # (which should be a short reason why the page is deprecated)
Less Page Header
this is the less page header in NinePage
- LessHeader.py
1 # -*- coding: iso-8859-1 -*- 2 #||<tablestyle="width: 100%; background: #f39036;"> '''[[DisplayDate]]''' ||<style="font-size: 0.8em"> [[EditIcon]][[ReadMore]] || 3 #{u'tablestyle': u'"width: 100%; font-size: 0.8em;"', 'align': '"center"', 'rowspan': u'"7"', 'colspan': u'"4"'} 4 5 """ 6 MoinMoin - ReadMore Macro 7 """ 8 Dependencies = [] 9 10 def execute(macro, args): 11 themedict = macro.request.themedict 12 theme = macro.request.theme 13 pagename = macro.request.themedict['q_page_name'] 14 display_date = pagename.split('/')[1] 15 iconlink = theme.make_iconlink('edit', themedict ) + theme.make_iconlink('up', themedict ) + theme.make_iconlink('attachments', themedict ) + theme.make_iconlink('view', themedict ) 16 formatter = macro.request.formatter 17 attrs = {u'tablestyle': u'"width: 100%; background: ' + args + u';', 'align': '"center"'} 18 result = formatter.table(True, attrs) 19 result += formatter.table_row(True) 20 cell_attrs = {'align': '"center"'} 21 result += formatter.table_cell(True, cell_attrs) 22 result += formatter.strong(True) 23 result += display_date 24 result += formatter.strong(False) 25 result += formatter.table_cell(False) 26 result += formatter.table_cell(True) 27 result += iconlink 28 result += formatter.table_cell(False) 29 result += formatter.table_row(False) 30 result += formatter.table(False) 31 return result
Thinking in Mandara
- this is keep your a thinking way like Mandara.
- NinePages.py
1 # -*- coding: iso-8859-1 -*- 2 """ 3 MoinMoin - Create list of stockCat Blog. 4 """ 5 6 Dependencies = ['namespace'] 7 8 from MoinMoin.action import LikePages 9 import MoinMoin.macro.Include 10 11 def execute(macro, args): 12 request = macro.request 13 14 display_row = 3 15 display_item = 3 16 display_total = display_row * display_item 17 18 this_pagename = "%s" % macro.request.themedict['q_page_name'] 19 20 formatter = macro.request.formatter 21 attrs = {} 22 attrs['valign'] = '"top"' 23 result = formatter.table(True) 24 result += formatter.table_row(True) 25 for n in range(display_total): 26 result += formatter.table_cell(True, attrs) 27 result += include_link(macro, this_pagename + '/' + '%s' %n ) 28 result += formatter.table_cell(False) 29 if not divmod(n + 1, display_item)[1]: 30 result += formatter.table_row(False) 31 result += formatter.table_row(True) 32 result += formatter.table_row(False) 33 result += formatter.table(False) 34 return '%s' % ( result ) 35 36 def include_link(macro, args): 37 include_page = MoinMoin.macro.Include.execute(macro, args) 38 if include_page: 39 return include_page 40 else: 41 theme = macro.request.theme 42 themedict = macro.request.themedict 43 themedict['q_page_name'] = args 44 return theme.make_iconlink('view', themedict )
I suggest you can write your sub_pages using this template.
[[LessHeader(#ffaccd)]] * One Point
Please care in LessHeader.py
iconlink = theme.make_iconlink('edit', themedict ) + theme.make_iconlink('up', themedict ) + theme.make_iconlink('attachments', themedict ) + theme.make_iconlink('view', themedict )
maybe modify to:
iconlink = theme.make_iconlink('edit', themedict ) + theme.make_iconlink('up', themedict ) + theme.make_iconlink('view', themedict )
Messages to me