Talk:Calendar
From Monaro Folk Society
Technical Reference The MFS Calendar is an implementation of MediaWiki DPL Calendar: http://semeb.com/dpldemo/index.php?title=Calendar
The DPL Calendar page "Current Events" is renamed to "Calendar" in the MFS implementation.
For an introduction to Mediawiki Templates, please see http://www.mediawiki.org/wiki/Help:Templates
27Apr10 PCUG/TIP upgraded MediaWiki from version 1.7 to v1.12. The day of week then became mis-matched to the date. Changed the constant from 15 back to its original value 16 in:
http://www.mfs.org.au/wiki/index.php?title=Template:CalendarSingle&action=edit
--LanceC 06:24, 27 April 2010 (UTC)
10Jan10 Looks like no ideas on recurring dates but copying an existing entry doen't take long. I am finding it tedious to >> along to the month I want when entering far-out events, because it is sometimes quite slow, so I thought I might put Jan Feb Mar ... Oct Nov Dec links above the calendar (above the << Month >> line). Also, to complete the renaming of Current_events to Calendar (that was so that Calendar appears in the navigation pane not Current Events), I thought I might change the basepage entries from "Current events" to "Calendar". Any issues do you reckon? Cheers Lance
23Oct09 Any ideas about how to enter recurring dates? Google seems to indicate that this is a feature missing from DPL Calendar and our weekly event organisers could find it a bit onerous maybe?
We could have text at the top giving the term dates
REGULAR EVENTS
Every Monday 12 May to 31 August 2012, except 8 June: Bush Dance Group
Every Monday 10 October to 29 November 2012: Bush Dance Group
First and Third Tuesday every month 13 May to 12 November, except 8 June and 3 October: Canberra Contra Club
Readers would see the regular events before going on to the events listed in the calendar.
Regular event organisers could also put all the dates into the calendar if they have the time and inclination, but the regular events summary could be useful to give the reader an overview of the pattern of events and the term dates.
For discussion please
--LanceC 19:34, 23 October 2009 (EST)
31Mar09
- Uploaded replacement inputbox extension from http://www.ipbwiki.com/forums/index.php?automodule=downloads&showfile=78
- Not suitable for DPL Calendar
- Uplaoded inputbox extension from http://semeb.com/dpldemo/index.php?title=Download
--LanceC
19Mar09
- Uploaded /extensions/RHL-test
- Added to end of $mediwikipath/wiki/LocalSettings.php
- require_once("../extensions/RHL-test/RHL-test.0.php");
- Tested in Sandbox, result "Here is your test"
- Ditto test.1, result "This has been a test "
- Ditto test.2, result "Another test version... "
- Re-uploaded from https://svn.wikia-code.com/wikia/branches/Bartek/extensions/inputbox/
- Added to end of $mediwikipath/wiki/LocalSettings.php
- require_once("../extensions/Inputbox/inputbox.php");
- site loads ok!
- Deleted from $mediwikipath/wiki/LocalSettings.php
- require_once("../extensions/RHL-test/RHL-test.2.php");
--LanceC 19:53, 19 March 2009 (EST)
18Mar09
- Added to end of $mediwikipath/wiki/LocalSettings.php:
- require_once("../extensions/Call/Call.php");
- Site still works
- Added to end of $mediwikipath/wiki/LocalSettings.php:
- require_once("../extensions/InputBox/inputbox.php");
- White Screen
- Tried:
- require_once("../extensions/InputBox/InputBox.i18n.php");
- White Screen
- Removed InputBox line from $mediwikipath/wiki/LocalSettings.php
--LanceC
17Mar09 LC:
- Downloaded Semeb_extensions.zip from http://semeb.com/dpldemo/index.php?title=Download
- Unzipped, deleted all subdirectories except DynamicPageList, Call and InputBox
as per http://www.mediawiki.org/wiki/Extension:DPL_Calendar - Uploaded to $mediwikipath/extensions/DynamicPageList, Call and InputBox
- Added to end of $mediwikipath/wiki/LocalSettings.php:
require_once("../extensions/DynamicPageList/DynamicPageList2.php"); - Tested- main page loads.
--LanceC
17Mar09 LC:
- Copied php code (1) from http://www.mediawiki.org/wiki/Extension:VariablesExtension#Installing into a blank Wordpad doc and saved as C:\OurData\www_mfs\extensions\Variables\Variables.php
- Uploaded to $mediwikipath/extensions/Variables/Variables.php
- Copied php code (2) from http://www.mediawiki.org/wiki/Extension:VariablesExtension#Installing into a blank Wordpad doc and saved as C:\OurData\www_mfs\extensions\Variables\Variables.i18n.php
- Uploaded to $mediwikipath/extensions/Variables/Variables.i18n.php
- Added to end of $mediwikipath/wiki/LocalSettings.php:
- require_once( "../extensions/Variables/Variables.php" );
- Checked http://www.mfs.org.au/wiki/index.php/Main_Page still works
- Downloaded StringFunctions.php from http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/StringFunctions/
- Revision 44097 downloaded to To C:\OurData\www_mfs\extensions\StringFunctions and uploaded to $mediwikipath/extensions/StringFunctions
- Added to end of $mediwikipath/wiki/LocalSettings.php:
- require_once ("../extensions/StringFunctions/StringFunctions.php");
--LanceC
16Mar09 LC:
1 Downloaded v1.10.x ParserFunctions from http://www.mediawiki.org/wiki/Special:ExtensionDistributor To C:\OurTemp\Download\ParserFunctions
2 Downloaded as ParserFunctions-MW1.10-r19892.tar.tar
3 Used 7-zip to extract from .tar.tar to .tar
4 Used 7-zip again to extract from ParserFunctions-MW1.10-r19892.tar to folder ParserFunctions-MW1.10-r19892
5. Uploaded ParserFunctions folder from ParserFunctions-MW1.10-r19892 to /extensions directory
6. Downloaded /wiki/LocalSettings.php
7. Deleted
$$wgExpensiveParserFunctionLimit = 300; require_once "../extensions/ParserFunctions/Expr.php"; require_once "../extensions/ParserFunctions/ParserFunctions.i18n.magic.php"; require_once "../extensions/ParserFunctions/ParserFunctions.i18n.php"; require_once "../extensions/ParserFunctions/ParserFunctions.php"; require_once "../extensions/ParserFunctions/SprintfDateCompat.php";
Replaced by
require_once("../extensions/ParserFunctions/ParserFunctions.php");
8.. Uploaded /wiki/LocalSettings.php
--LanceC
Trying to get ParserFunctions to work. In LocalSettings.php:
Delete:
require_once("../extensions/ParserFunctions/ParserFunctions.php");
Replace by:
$$wgExpensiveParserFunctionLimit = 300;
require_once "../extensions/ParserFunctions/Expr.php";
require_once "../extensions/ParserFunctions/ParserFunctions.i18n.magic.php";
require_once "../extensions/ParserFunctions/ParserFunctions.i18n.php";
require_once "../extensions/ParserFunctions/ParserFunctions.php";
require_once "../extensions/ParserFunctions/SprintfDateCompat.php";
--LanceC
Added the following to the end of LocalSettings.php:
>require_once("../extensions/ParserFunctions/ParserFunctions.php");LanceC
So far, "#ifexist" does not work, it seems to always return "false". The code:
*{{#ifexist: Main Page | Main Page yes | Main Page no }}
*{{#ifexist: Help:Contents | Help:Contents yes | Help:Contents no }}
*{{#ifexist: Rubbish | Rubbish yes | Rubbish no }}
returns:
- Main Page yes
- Help:Contents yes
- Rubbish no
(expect "yes", "yes", "no").
Most of the other functions seem to work.
Thurstan 09:40, 9 March 2009 (EST)
Extension:ParserFunctions
Some test cases for Extension:ParserFunctions:
| Code | Result | OK? |
|---|---|---|
| {{#time: Y-m-d | 20 December 2000 12:00}} | 2000-12-20 | yes |
| {{#time: j-M-Y | 20 December 2000 12:00}} | 20-Dec-2000 | yes |
| {{#expr: 3259 mod 100}} | 59 | yes |
| {{#expr: (1+2+3)*7}} | 42 | yes |
| {{#expr: blah}} | Expression error: Unrecognised word "blah" | yes |
| {{#ifeq: 01 | 1 | true | false}} | true | yes |
| {{#ifeq: foo | bar | true | false}} | false | yes |
| {{#iferror: {{#expr: 1 + 2 }} | error | correct }} | correct | no |
| {{#iferror: {{#expr: 1 + X }} | error | correct }} | Expression error: Unrecognised word "x" | no - should give "error" |
| {{#ifexpr: 1 > 0 | true | false }} | true | yes |
| {{#ifexpr: 1 < 0 | true | false }} | false | yes |
| {{#ifexist: Main Page | exists | doesn't exist }} | exists | yes |
| {{#rel2abs: . }} | Talk:Calendar | yes |
| {{#switch: test | foo = Foo | #default = Bar | baz = Baz }} | Bar | yes |
| {{#switch: baz | foo = Foo | #default = Bar | baz = Baz }} | Baz | yes |
| {{#switch: foo | foo = Foo | #default = Bar | baz = Baz }} | Foo | yes |
(I have checked the table by running it in <http://en.wikipedia.org/wiki/Wikipedia:Sandbox>, which however is running version 1.15alpha of MediaWiki, rather than our 1.7.1).
Thurstan 13:44, 9 March 2009 (EST)
Extension:StringFunctions
Some test cases:
| Code | Result | OK? |
|---|---|---|
| {{#len:1234567 }} | 7 | yes |
| {{#len: }} | 0 | yes |
| {{#pos: 01234567|5}} | 5 | yes |
| {{#pos: 01234567|X}} | yes | |
| {{#pos: X01234567|5|1}} | 6 | yes |
| {{#pos: X01234567X|X|1}} | 9 | yes |
| {{#rpos: X01234567X|X}} | 9 | yes |
| {{#sub:Icecream|3}} | cream | yes |
| {{#sub:Icecream|-3}} | eam | yes |
| {{#sub:Icecream|3|3}} | cre | yes |
| {{#pad:Icecream|20|.}} | ............Icecream | yes |
| {{#pad:Icecream|20|.|right}} | Icecream............ | yes |
| {{#replace:Mary had a little lamb|a|XY}} | MXYry hXYd XY little lXYmb | yes |
| {{#explode:Mary had a little lamb|a|1}} | ry h | yes |
| {{#urlencode: ( ) ? }} | %28+%29+%3F | yes |
| {{#urldecode: %28+%29+%3F }} | ( ) ? | yes |
Looking good! See http://www.mediawiki.org/wiki/Extension:StringFunctions for documentation.
Thurstan 21:33, 17 March 2009 (EST)
Extension:VariablesExtension
(see http://www.mediawiki.org/wiki/Extension:VariablesExtension for documentation). Some test cases:
| Code | Result | OK? |
|---|---|---|
| {{#vardefine:TheAnswer|42}} | ||
| {{#var:TheAnswer}} | 42 | yes |
| {{#vardefineecho:Now|St Patrick's}} | St Patrick's | yes |
| {{#var:Now}} | St Patrick's | yes |
| {{#var:Rubbish}} | yes |
Looking good!
Thurstan 21:42, 17 March 2009 (EST)
Extension:Extension:DynamicPageList (DPL)
{{#dpl:
|category=Dance Events
}}
generates:
- End of Month Dance/25 Apr 09
- End of Month Dance/26 Sep 09
- End of Month Dance/27 Jun 09
- End of Month Dance/28 Feb 09
- End of Month Dance/28 Nov 09
- End of Month Dance/29 Aug 09
- End of Month Dance/30 May 09
- End of Month Dance/31 Jan 09
- End of Month Dance/31 Oct 09
This is the simplest possible DPL query, and lists all the pages at Category:Dance Events
{{#dpl:
|category=Dance Events
|titlematch=%28%
}}
selects only those with "28" in the page name, so generates:
I think that is a success.
Thurstan 22:00, 17 March 2009 (EST)
Calendar Test
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
No events planned.
Dance Events
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
No events planned.
Dance Events with width=80%
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
No events planned.
Test inputbox
Thurstan 19:41, 31 March 2009 (EST)
