SwiftlyTilting: usability, reusability

Thursday, November 1, 2007

Winter 2.1.1

Just a quick bugfix for Winter.

  • fixed NOTICE of undefined variable
  • fixed count command which would return the incorrect value

And since it’s been a while since I posted these links:
Winter Homepage on Mediawiki.org
Winter Documentation

Download Winter 2.1.1
Downloaded 1495 times

5 Comments Leave Comment

Wonderful - this seems to work great - note that the version number didn’t get bumped so it is still 2.1.0 in the file.

Comment by Jason — Thursday, November 1, 2007 @ 8:00 pm

Hah.. thats what I get for rushing things. I just copied and pasted the bug fixes from the development version into 2.1.0 but I forgot to switch the version numbers. I updated the file so now it says 2.1.1

Comment by swiftlytilting — Thursday, November 1, 2007 @ 11:50 pm

I couldn’t get the code to format a table from an array for me (using v2.1.1). It seem to matter where you put the , otherwise the table rows will be printed before the actual table. The below (test) code is just one of many tries in order to get it to work. This code will work, but try this: switch places between the functions “ShowRow” and “EndTable” and you’ll get strange behavior. Any ideas why?

{{#function | ShowTable ||

Col 1Col 2Col 3



{{#function | ShowRow ||

{{#function | EndTable ||


{{#array | file_inx | A | B | C}}
{{#ShowTable | “Header 1″ | “Text”}}
{{#foreach | file_inx || {{#ShowRow | {{#_v}}}}}}

{{#ShowTable | “Header 2″ | “Text 2″}}
{{#foreach | file_inx || {{#ShowRow | {{#_v}}}}}}


Comment by John — Wednesday, November 28, 2007 @ 6:32 am

Hm, all my HTML (table-tags) turned into … HTML … in the previous message.

For short: ShowTable renders a table with a heading and one row and without the ending-tag. ShowRow inserts td’s in the table. EndTable prints the actual ending-tag.

If you switch places between ShowRow and EndTable the inserted td’s end up above the table it self, including the tags.

Comment by John — Wednesday, November 28, 2007 @ 6:39 am

Hi John, sorry for the late reply

You must remember HTML is processed by the MediaWiki engine before Winter gets to it. What I suspect happens is Mediawiki recognizes the TD tags are not withing a table so it converts the angle brackets in the tags to their character code, so that they will not be interpreted as html.

The trick of defining the functions in order so that the html is actually valid is a good one actually haha :)

You could try defining the functions inside of a WinterPreWiki block and see if that gets more predictable results.

Comment by swiftlytilting — Friday, December 7, 2007 @ 6:26 pm

Leave a Comment

Validate XHTML | Word Press