SwiftlyTilting Wiki (re)Launches!
The wiki at SwiftlyTilting.com has received a face lift. I’ve also added documentation for all of my MediaWiki extensions, and there is a new sandbox area for users to try out Winter and my other extensions as well.
The wiki at SwiftlyTilting.com has received a face lift. I’ve also added documentation for all of my MediaWiki extensions, and there is a new sandbox area for users to try out Winter and my other extensions as well.
It’s been quite a while since I’ve updated Winter, but recently I discovered how to access content from other pages so perhaps we’ll see some new features. For now, I’ve added #include and #include_raw. #include will include the text from another page and run it through the Winter engine. #include_raw is not run through the Winter engine before being dumped into the page. Wikitext markup is not interpreted during this stage.. if you need the content to be formatted, you should use the #include command within a <winterprewiki> block. I also fixed a few bugs.
Winter Homepage on Mediawiki.org
Winter Documentation
Download Winter 2.2.0
Downloaded 400 times
Just a quick bugfix for Winter.
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 781 times
One thing that has been bugging me about Winter is that code must be left aligned or else MediaWiki will format it with some HTML. This made it impossible to write neat code, especially in longer programs. I finally hit upon a decent workaround and now program code is much more readable.
Before:
{{#function | formatNum ||
{{#if | {{#1}} | {{#1}} | no more }} bottle{{#if | {{#1 == 1}} | | s }}
}}
{{#for | {{#i = 99}} || {{#i >= 0}} || {{#i --}} ||
{{#bottles | @= | {{#formatNum | {{#i}} }} }}
{{#ucfirst | {{#bottles}} }} of beer on the wall, {{#bottles}} of beer.
{{#if | {{#i}} |
Take one down and pass it around, {{#formatNum| {{#i - 1}} }} |
Go to the store and buy some more, 99 bottles
}} of beer on the wall
}}
After
{{#function | formatNum ||
{{#if | {{#1}} || {{#1}} || no more }} bottle{{#if | {{#1 == 1}} || || s}}
}}
{{#for | {{#i @= 99}} || {{#i >= 0}} || {{#i --}} ||
{{#bottles | @= | {{#formatNum | {{#i}} }} }}
{{#ucfirst | {{#bottles}} }} of beer on the wall, {{#bottles}} of beer.
{{#if | {{#i}} ||
Take one down and pass it around, {{#formatNum| {{#i - 1}} }}
||
Go to the store and buy some more, 99 bottles
}} of beer on the wall.
}}
I’ve also added features to access the various template parameter variables used on a page, as well as various other upgrades and bug fixes.
Download Winter 2.1.0
Downloaded 384 times
A user left a comment notifying me about a warning message which would appear if allow_call_time_pass_reference was set to off in PHP settings. I’ve fixed the problem along with a few other minor bugs for this release. I also added a new comment syntax {{#| You comment here }}
Change log:
* Fixed allow_call_time_pass_reference bug
* Fixed bug with <nowinter> tag
* Fixed bug when undefined variables were referenced
* Added alternative comment syntax
Download Winter 2.0.2
Downloaded 300 times
I finished up the initial stages of the Winter 2.0 documentation today, so now you should be able to fully take advantage of all the new features. I noticed a few minor issues as I was documenting the code so I corrected them and have released the changes as Winter 2.0.1.
Change log:
Download Winter 2.0.1
Downloaded 312 times
It’s been over a year since I last released an update for Winter. Since then MediaWiki introduced support for parser function extensions, which provide some of the same basic functionality as Winter. Winter code does not interfere with parser functions, and they can be used on the same page, though care must be taken when combining both types of code together.
This new version of Winter has been in the works for a few months now. Many new features and functions have been added, and some bugs have been corrected as well. The program code has increased in size by nearly 80% since 1.5.0!
Download
Homepage on Mediawiki.org
Documentation
About Winter:
Winter is the Wiki Interpreter, a complete programming language plug-in for MediaWiki, the software which powers Wikipedia and many other wikis across the internet.
Change log:
Download Winter 2.0.0
Downloaded 379 times
* Added new shortcut syntax: {{#command param1 param2 … paramN}} is the same as {{#command| #param1 | #param2 | … | paramN }}. Each span of whitespace is converted to a pipe character. This is especially useful for math operations: {{#op 1 + 1}} = {{#op| 1 | +| 1}}
* #op can now accept any amount of operations. However, the order of operations is only left to right. ie {{#op 2 - 2 * 3}} will return 0 and not -4.
* Added #formula command
* Added #eval command
* Added #repeat command
* fixed some bugs in #strpos
Download Winter 1.5.0
Downloaded 607 times
* Added <nowinter> tag to allow Winter code to be displayed without being evaluated.
* Reworked escape character code. Escape characters are now only translated inside of a Winter command instead of anywhere on the page. This ensures that users who are unaware Winter is installed are not confused.
* #define actually works now.
* Switched to x.y.z version numbering system.
Download Winter 1.4.1
Downloaded 346 times
More bugfixes and other stuff.. added mod operator
Download Winter 1.3
Downloaded 395 times
Released a new version of winter.. this one allows for a new variable syntax that should save some typing.
Download Winter 1.2
Downloaded 288 times
As expected, some bugs were discovered in Winter v1.0. I’ve fixed them and released a new version.
Download Winter 1.1
Downloaded 299 times
Recently I started playing around with MediaWiki, the software that powers Wikipedia and other similar wikis. The software has a useful template system, but as a programmer, I wasn’t satisified with the lack of basic useful features like conditional statements and looping.
I discovered MediaWiki is pretty easy to create extensions for, and so I set out to create useful scripting language that was easy to understand and matched the syntax of other WikiMedia commands. What I ended up with was a full fledged scripting language, with if statements, for and while loops, and even function declarations.
For more information, please see the Winter documentation over on MetaWiki.
Download Winter 1.0
Downloaded 366 times