[Mediawiki-l] Implementing a Wikipedia "Infobox Single" template
Tim Ware
tim at hyperarts.com
Sun Apr 20 03:44:50 UTC 2008
Using 1.12.0
I'm trying to get the Template:Infobox Single
from Wikipedia to work on my wiki.
I've tried going to the page on Wikipedia, clicking "Edit this page"
and copying the source to create the same template on my wiki.
I copied the styles as best I could (although I can't find the styles
for the class "vevent"). However, when copying the code from Wikipedia
for a song, and putting that in my wiki, it's totally messed up.
I'm using ParserFunctions.php, written by Tim Starling.
When the page that utilizes the "infobox single" template renders, it
writes the html table code but closes the <th> tags before including
the rest of what's in the template. Here's the beginning of the
template code. It renders fine through the "Single by" row, then all
bets are off.
{| class="infobox vevent" style="width: 20em;"
|-
! colspan="3" scope="col" class="summary" style="background: khaki;" |
“{{{Name}}}”
|-
| colspan="3" style="text-align:center;" | {{#if:{{{Cover|}}}|
{{#ifeq:{{{Cover}}}|none| |[[Image:{{{Cover}}}|{{min|200|{{{Cover
size|}}}}}px|{{#ifeq:{{{Border|}}}|yes|border{{!}}}}“{{{Name}}}”
cover]]}}| }}
{{#if:{{{Caption|}}} | <div style="font-size: 0.8em; line-height:
1.4em;">{{{Caption}}}</div>
}}
|-
! colspan="3" scope="col" class="description" style="background:
khaki;" | [[Single (music)|Single]] by {{{Artist}}}{{#if:{{{Album|}}}
{{{from Album|}}} | <br>from the album ''{{{Album|}}}{{{from
Album|}}}''}}
|-
{{#if:{{{A-side|}}} |
! scope="row" style="width: 5.2em; text-align: left;" {{!}} [[A-side
and B-side|A-side]]
{{!}} colspan="2" style="width: 14em;" {{!}} {{{A-side}}}
{{!}}-
}}
{{#if:{{{B-side|}}} |
! scope="row" style="width: 5.2em; text-align: left;" {{!}} [[A-side
and B-side|B-side]]
{{!}} colspan="2" style="width: 14em;" {{!}} {{{B-side}}}
{{!}}-
}}
Any help great appreciate!
Thanks.
Tim
......................................................... ! .............................................................
Tim Ware .. HyperArts .. 201 4th Street, Ste 404 .. Oakland CA 94607
t: (510) 339-6084 .. f: (510) 339-6086 .. e: tim at hyperarts.com
http://www.hyperarts.com
Map
More information about the MediaWiki-l
mailing list