From 7e755aa879f6df1f66f9b460f970c71732a94e6e Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Thu, 11 Dec 2008 18:41:12 +0100 Subject: [PATCH] =?UTF-8?q?[wiki-lenny]=20D=C3=A9buggage=20du=20portail=20?= =?UTF-8?q?(les=20liens=20sont=20pars=C3=A9s=20apr=C3=A8s)=20+=20pimpage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20081211174112-bd074-5d5f6992aae94438a7333d53f2b55a5e00cbbc17.gz --- wiki-lenny/local/parser/Portail.py | 4 +-- wiki-lenny/share/formatter.pagelinks.orig.py | 31 ++++++++++++++++++ wiki-lenny/share/formatter.pagelinks.py | 33 ++++++++++++++++++++ wiki-lenny/share/formatter.text_html.py | 25 ++++++++++----- 4 files changed, 83 insertions(+), 10 deletions(-) create mode 100644 wiki-lenny/share/formatter.pagelinks.orig.py create mode 100644 wiki-lenny/share/formatter.pagelinks.py diff --git a/wiki-lenny/local/parser/Portail.py b/wiki-lenny/local/parser/Portail.py index 3ec31583..86e33c03 100644 --- a/wiki-lenny/local/parser/Portail.py +++ b/wiki-lenny/local/parser/Portail.py @@ -62,8 +62,8 @@ class Parser: ## self.request.write('') pass else: - # On récupère l'url de l'image - pic = AttachFile.getAttachUrl(current_pagename, items[0].strip(), self.request).replace('& ','&') + # On récupère le nom de l'image + pic = items[0].strip() # On va formatter le titre et la légende tit_buf = StringIO.StringIO() diff --git a/wiki-lenny/share/formatter.pagelinks.orig.py b/wiki-lenny/share/formatter.pagelinks.orig.py new file mode 100644 index 00000000..8819b7bc --- /dev/null +++ b/wiki-lenny/share/formatter.pagelinks.orig.py @@ -0,0 +1,31 @@ +# -*- coding: iso-8859-1 -*- +""" + MoinMoin - pagelinks Formatter + + @copyright: 2005 Nir Soffer + @license: GNU GPL, see COPYING for details. +""" + +from MoinMoin.formatter import FormatterBase + +class Formatter(FormatterBase): + """ Collect pagelinks and format nothing :-) """ + + def pagelink(self, on, pagename='', page=None, **kw): + FormatterBase.pagelink(self, on, pagename, page, **kw) + return self.null() + + def null(self, *args, **kw): + return '' + + # All these must be overriden here because they raise + # NotImplementedError!@#! or return html?! in the base class. + set_highlight_re = rawHTML = url = image = smiley = text = null + strong = emphasis = underline = highlight = sup = sub = strike = null + code = preformatted = small = big = code_area = code_line = null + code_token = linebreak = paragraph = rule = icon = null + number_list = bullet_list = listitem = definition_list = null + definition_term = definition_desc = heading = table = null + table_row = table_cell = attachment_link = attachment_image = attachment_drawing = null + transclusion = transclusion_param = null + diff --git a/wiki-lenny/share/formatter.pagelinks.py b/wiki-lenny/share/formatter.pagelinks.py new file mode 100644 index 00000000..ebe03272 --- /dev/null +++ b/wiki-lenny/share/formatter.pagelinks.py @@ -0,0 +1,33 @@ +# -*- coding: iso-8859-1 -*- +""" + MoinMoin - pagelinks Formatter + + @copyright: 2005 Nir Soffer + @license: GNU GPL, see COPYING for details. +""" + +from MoinMoin.formatter import FormatterBase + +class Formatter(FormatterBase): + """ Collect pagelinks and format nothing :-) """ + + def pagelink(self, on, pagename='', page=None, **kw): + FormatterBase.pagelink(self, on, pagename, page, **kw) + return self.null() + + def null(self, *args, **kw): + return '' + + # All these must be overriden here because they raise + # NotImplementedError!@#! or return html?! in the base class. + set_highlight_re = rawHTML = url = image = smiley = text = null + strong = emphasis = underline = highlight = sup = sub = strike = null + code = preformatted = small = big = code_area = code_line = null + code_token = linebreak = paragraph = rule = icon = null + number_list = bullet_list = listitem = definition_list = null + definition_term = definition_desc = heading = table = null + table_row = table_cell = attachment_link = attachment_image = attachment_drawing = null + transclusion = transclusion_param = null + ### HACK SAUVAGE 1/1 + crans_box = crans_portal = null + ### FIN HACK 1/1 diff --git a/wiki-lenny/share/formatter.text_html.py b/wiki-lenny/share/formatter.text_html.py index 9c3d31c9..8fe6c0aa 100644 --- a/wiki-lenny/share/formatter.text_html.py +++ b/wiki-lenny/share/formatter.text_html.py @@ -1009,7 +1009,7 @@ document.write(' + width: 38%%; height: 5em; padding: 1.5em 20px 0 60px; float:left;">