Talk:Calendar

From Monaro Folk Society

Jump to: navigation, search

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

  1. Uploaded replacement inputbox extension from http://www.ipbwiki.com/forums/index.php?automodule=downloads&showfile=78
  2. Not suitable for DPL Calendar
  3. Uplaoded inputbox extension from http://semeb.com/dpldemo/index.php?title=Download

--LanceC

19Mar09

  1. Uploaded /extensions/RHL-test
  2. Added to end of $mediwikipath/wiki/LocalSettings.php
    1. require_once("../extensions/RHL-test/RHL-test.0.php");
  3. Tested in Sandbox, result "Here is your test"
  4. Ditto test.1, result "This has been a test "
  5. Ditto test.2, result "Another test version... "
  6. Re-uploaded from https://svn.wikia-code.com/wikia/branches/Bartek/extensions/inputbox/
  7. Added to end of $mediwikipath/wiki/LocalSettings.php
    1. require_once("../extensions/Inputbox/inputbox.php");
  8. site loads ok!
  9. Deleted from $mediwikipath/wiki/LocalSettings.php
    1. require_once("../extensions/RHL-test/RHL-test.2.php");


--LanceC 19:53, 19 March 2009 (EST)


18Mar09

  1. Added to end of $mediwikipath/wiki/LocalSettings.php:
    1. require_once("../extensions/Call/Call.php");
  2. Site still works
  3. Added to end of $mediwikipath/wiki/LocalSettings.php:
    1. require_once("../extensions/InputBox/inputbox.php");
  4. White Screen
  5. Tried:
    1. require_once("../extensions/InputBox/InputBox.i18n.php");
  6. White Screen
  7. Removed InputBox line from $mediwikipath/wiki/LocalSettings.php


--LanceC

17Mar09 LC:

  1. Downloaded Semeb_extensions.zip from http://semeb.com/dpldemo/index.php?title=Download
  2. Unzipped, deleted all subdirectories except DynamicPageList, Call and InputBox
    as per http://www.mediawiki.org/wiki/Extension:DPL_Calendar
  3. Uploaded to $mediwikipath/extensions/DynamicPageList, Call and InputBox
  4. Added to end of $mediwikipath/wiki/LocalSettings.php:
    require_once("../extensions/DynamicPageList/DynamicPageList2.php");
  5. Tested- main page loads.

--LanceC


17Mar09 LC:

  1. 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
  2. Uploaded to $mediwikipath/extensions/Variables/Variables.php
  3. 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
  4. Uploaded to $mediwikipath/extensions/Variables/Variables.i18n.php
  5. Added to end of $mediwikipath/wiki/LocalSettings.php:
  • require_once( "../extensions/Variables/Variables.php" );
  1. Checked http://www.mfs.org.au/wiki/index.php/Main_Page still works
  2. 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
  1. 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:

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

<<

February 2012

>>
Mo Tu We Th Fr Sa Su
    01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
       
<< 2012 >> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

 Filters: Dance | Music | MFS | All events

No events planned.


Dance Events

<<

February 2012
Category:Dance Events

>>
Mo Tu We Th Fr Sa Su
    01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
       
<< 2012 >> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

 Filters: Dance | Music | MFS | All events

No events planned.


Dance Events with width=80%

<<

February 2012
Category:Dance Events

>>
Mo Tu We Th Fr Sa Su
    01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
       
<< 2012 >> Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

 Filters: Dance | Music | MFS | All events

No events planned.


Test inputbox


Thurstan 19:41, 31 March 2009 (EST)

Personal tools