[Zope] Newbie's ZWiki patch
Jean Jordaan
Jean@mosaicsoftware.com
Mon, 21 Aug 2000 10:25:05 +0200
Hi all
I've overreached myself and patched ManagedMode ZWiki (love it,
by the way), 'cause I couldn't stand the tag-abuse of the
annotations, involving a table with explicit border- and color-
specifications, all in the face of users editing the source of
zwikipages. I've changed it to::
<p class="wiki_edited">....</p>
<p class="wiki_approved">....</p>
<p class="wiki_rejected">....</p>
Of course, this presupposes a couple of CSS specs in the
'standard_zwiki_header' or someplace ..
My changes to 'ZWikiPage.py' are marked 'njj:' in the following::
###
# If edit marker hasn't already been filled in by approval activity
# then append one
if s <> '':
# njj: this is blatantly abusing 'bgc'. I could have changed
# njj: 'bgc' everywhere to, for example, 'edit_class', assigning
# njj: it the values 'wiki_edit', 'wiki_approved', and
# njj: 'wiki_rejected' in the first place.
text = text + '\n<p class="'
if bgc == '#f0f0f0': # njj: light silver = 'Contributed by ' or
'Edited by '.
text = text + 'wiki_edited">' + s + '</p>\n'
if bgc == '#99ff66': # njj: light green = 'Approved by '.
text = text + 'wiki_approved">' + s + '</p>\n'
if bgc == '#ffcc33': # njj: light red = 'Rejected by '.
text = text + 'wiki_rejected">' + s + '</p>\n'
# njj: text = text + '\n<p><table class=mm width="100%" bgcolor='
# njj: text = text + bgc
# njj: text = text + ' cellspacing="0" frame="box" border="1"><tr><td>'
# njj: text = text + s + '</td></tr></table></p>\n'
Do any of you know of anyplace this is going to break? Does
anyone think it's worthy of proper integration? I don't know
if legacy browser support is an overriding issue here, since
Lynx and W3, for example, certainly wouldn't do any better with
the table than with the CSS .. AFAIK ..
--
Jean Jordaan -- technical writer --
Mosaic Sofware -- Zope 2.1.6 on WinNT and W2K