Hello there,
I am trying to show different images, dependent on some conditions:
Scenario 1: if the pagename is the same as a given pagename,
image_1.gif is shown.
Scenario 2: if the pagename is not the same as the given pagename, the
existence of the given pagename is checked:
Scenario 2a: if the given pagename exists, image_2a.gif is shown.
Scenario 2b: if the given pagename does not exist,
image_2b.gif is shown.
So i wrote:
{{if:
{{ifeq:
{{NAMESPACE}}:{{PAGENAME}} | {{NAMESPACE}}:{{BASEPAGENAME}}/subpage | true
}}
| [[Image = image_1.gif]]
| {{ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}/subpage
| [[Image = image_2a.gif]]
| [[Image = image_2b.gif]]
}}
}}
The problem is that image_1.gif does not appear, even if
{{NAMESPACE}}:{{PAGENAME}} has the same value as
{{NAMESPACE}}:{{BASEPAGENAME}}/subpage (e.g. image_2a.gif appears then
instead because the page exists). Does the parserfunction "ifeq"
compares the values litterally without interpreting the magicwords?
I don't think there is any mistake in the above wiki-code because when
i substitute "{{NAMESPACE}}:{{PAGENAME}}" by "a" end
"{{NAMESPACE}}:{{BASEPAGENAME}}/subpage" by "a", so that the
comparison is "a=a" (which is true) the image_1.gif is correctly
displayed.
Does anyone know whether the magicwords in the parserfunction "ifeq"
are recognized and what the cause of the problem is? If this
parserfunction does not interpret magic words, is there another
solution to display image_1.gif in case the pagename is the same as a
given pagename?
Thanks in advance!
B.
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test Magic Word: {{CURRENTMONTHNAMEGEN}}... FAILED!
Running test Template with thumb image (wiht link in description)... FAILED!
Running test message transform: <noinclude> in transcluded template (bug 4926)... FAILED!
Running test message transform: <onlyinclude> in transcluded template (bug 4926)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Running test 5 quotes, code coverage +1 line... FAILED!
Running test HTML Hex character encoding.... FAILED!
Running test dt/dd/dl test... FAILED!
Passed 412 of 429 tests (96.04%) FAILED!
Hello
That might be a obvious question (however I did not find a solution
when looking up the documentation).
So I have my own private wikipedia running on one Laptop using
mediawiki 1.7.
Now I have installed the same setting on a different laptop. In both
cases the mysql database in question is called wikidb.
I thought I just could pack (tar.gz) the one wikidb and transfer it to
the other laptop, unpack it (rename the old one) and off you go.
Not so! When I go to All pages in that Laptop, I still see the "old"
pages.
Shall I execute a special command?
Thanks
Uwe Brauer
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test Magic Word: {{CURRENTMONTHNAMEGEN}}... FAILED!
Running test Template with thumb image (wiht link in description)... FAILED!
Running test message transform: <noinclude> in transcluded template (bug 4926)... FAILED!
Running test message transform: <onlyinclude> in transcluded template (bug 4926)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Running test 5 quotes, code coverage +1 line... FAILED!
Running test HTML Hex character encoding.... FAILED!
Running test dt/dd/dl test... FAILED!
Passed 412 of 429 tests (96.04%) FAILED!
On this page:
http://en.wikipedia.org/wiki/Zone_plate
I'm getting "Failed to parse (Can't write to or create math output
directory): r_{n} = \sqrt{n f \lambda}" in place of the mathtex
equations.
However:
When I click "edit", the equations display correctly in the preview.
I'm guessing purging the cache or something might fix it, but in case
no one has seen this before I thought I'd report it.
Steve
An automated run of parserTests.php showed the following failures:
Running test Table security: embedded pipes (http://mail.wikipedia.org/pipermail/wikitech-l/2006-April/034637.html)... FAILED!
Running test Link containing double-single-quotes '' (bug 4598)... FAILED!
Running test Magic Word: {{CURRENTMONTHNAMEGEN}}... FAILED!
Running test Template with thumb image (wiht link in description)... FAILED!
Running test message transform: <noinclude> in transcluded template (bug 4926)... FAILED!
Running test message transform: <onlyinclude> in transcluded template (bug 4926)... FAILED!
Running test BUG 1887, part 2: A <math> with a thumbnail- math enabled... FAILED!
Running test HTML bullet list, unclosed tags (bug 5497)... FAILED!
Running test HTML ordered list, unclosed tags (bug 5497)... FAILED!
Running test HTML nested bullet list, open tags (bug 5497)... FAILED!
Running test HTML nested ordered list, open tags (bug 5497)... FAILED!
Running test Parsing optional HTML elements (Bug 6171)... FAILED!
Running test Inline HTML vs wiki block nesting... FAILED!
Running test Mixing markup for italics and bold... FAILED!
Running test 5 quotes, code coverage +1 line... FAILED!
Running test HTML Hex character encoding.... FAILED!
Running test dt/dd/dl test... FAILED!
Passed 412 of 429 tests (96.04%) FAILED!