Revision: 7129
Author: siebrand
Date: 2009-08-07 17:25:10 +0000 (Fri, 07 Aug 2009)
Log Message:
-----------
Update documentation - missed details
Modified Paths:
--------------
trunk/pywikipedia/commonsdelinker/plugins/replace_with_dummy.py
Modified: trunk/pywikipedia/commonsdelinker/plugins/replace_with_dummy.py
===================================================================
--- trunk/pywikipedia/commonsdelinker/plugins/replace_with_dummy.py
2009-08-07 17:15:59 UTC (rev 7128)
+++ trunk/pywikipedia/commonsdelinker/plugins/replace_with_dummy.py
2009-08-07 17:25:10 UTC (rev 7129)
@@ -3,13 +3,14 @@
import re
class DummyReplacement(object):
+ # only overrides delinks inside <gallery> tags.
hook = 'gallery_replace'
def __init__(self, CommonsDelinker):
self.CommonsDelinker = CommonsDelinker
def __call__(self, page, summary, image, replacement, match, groups):
site = page.site()
if (site.lang, site.family.name) == ('nl', 'wikipedia') and
replacement.get() is None:
- # Do not delink from pages in categories mentioned in
[[User:CommonsDelinker/DummyReplacements]]
+ # Do not delink inside galleries of pages in categories mentioned
in [[User:CommonsDelinker/DummyReplacements]]
# but replace the target file with another file (used in for
example flag or coat of arms galleries).
# Format of the configuration page (see example on
http://nl.wikipedia.org/wiki/Gebruiker:CommonsDelinker/DummyReplacements):
# <!--begin-dummyreplace Sin escudo.svg-->
_______________________________________________
Pywikipedia-svn mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn