Extension talk:SimpleCalendar

Source code displaying on page
This extension is not working for me. When enabled, all code from the script starting from "setFunctionHook" to the end is displayed at the top of my Main Page. Any ideas? Thanks. --Joshuaholland 20:57, 30 April 2007 (UTC)
 * The script being displayed in the output page usually means that the php opening delimeter (&lt;?) is missing. --Nad 22:23, 30 April 2007 (UTC)
 * I have the opening delimiter (&lt;?) there, and it is interesting that the code desplayed on the Main Page starts at setFunctionHook and not at the beginning of the script, which is what you think would happen if the &lt;? was missing. Josh 00:45, 1 May 2007 (UTC)
 * Hmmm that's pretty weird alright, what's the way you've included it into localsettings? is it pasted directly in, or included as a file? are other extensions working? --Nad 01:47, 1 May 2007 (UTC)
 * That character before setFunctionHook is a "&gt;", so my guess is that you've pasted the code directly into LocalSettings rather than including from file, and therefore there should be no delimeters since it's already in php context (it would make the opening delimeter a tag which would close when it got to the &gt; before the setFunctionHook) - just a guess tho ;-) --Nad 01:50, 1 May 2007 (UTC)
 * Okay, I just made it <?php and then it worked... Josh 02:43, 1 May 2007 (UTC)
 * Cool, ok I guess I should really make the tags like that for everything. --Nad 02:55, 1 May 2007 (UTC)

Could I create tasks whose title have some variables

 * I want to create some tasks with titles like "Michael's log 2007_05_01" instead of ""Michael's log 2007_05_01_01_MAY_2007" by using ( and "&preload=Template:Michael's log", any ideas? Thinks!--Roc michael 12:59, 1 May 2007 (UTC)
 * I'm not sure completely what you mean, but the query-string bit is a good idea which I've just added. I've changed to named parameters now instead of an ordered list, and added a new query parameter which allows query-string items to be added to the newly created dates. --Nad 23:45, 1 May 2007 (UTC)
 * Hi, Thank you very much! How wonderful it is that we can use peload parameter on the Calendar. I am Chinese in Taiwan and I want to use this extension and DPL in my wiki located in a intranet. So the people here would more like to use the date form of task title like "2007/05/02" than "02/May/2007" or "2007/May/02". I guess that Japanese people may think so. So if we can choose which date form we can use that will be a nice thing. Thank you!--Roc michael 15:00, 2 May 2007 (UTC)
 * I added another parameter called format, you can change to the format you asked for of 2007/05/02 with the following,
 *  
 * Thank you, Nad. I appreciate you for what you did.--Roc michael 13:35, 3 May 2007 (UTC)

Adding a prefix to day links?
$table .= "|$t|$day\n";" and mostly it works, but it seems there should be a more elegant way. Also, this makes the subpage have a colon instead of a slash before it, which is what I want. Thanks. Josh 14:15, 2 May 2007 (UTC)
 * Can the variable $prefix be used like this? I'd like the days to link to a page in the current namespace and subpage.  I tried giving it a value to $prefix but that didn't work.  I was able to code it into this line
 * Actually, I got the formatting to work right, but still wondering if there is a better way for me to code it. Thanks.  Josh 17:00, 2 May 2007 (UTC)
 * I think putting mediawiki-variables in the code like that would just hardwire them into the code when its saved, they wouldn't be dynamic. You can add dynamic prefixes like this:
 *  

Could it be possible that this great calendar could get a new face with a parameter?
When I displayed this great calendar with dpl some people marvel at the wonderful result of the two extensions. But since I've used another calendar (User:Hex2bit/Calendar), some body used to using it. If Simple Calendar could get a new face with a parameter, I think it will be a nice thing. Nad, I believe that you can make it be possible to find a way to Integrate them, right? :-) --Roc michael 01:21, 8 May 2007 (UTC)
 * Not sure about that, you'll need to explain in more detail what you're wanting to be done... do you mean a skin? It defines all its parts with CSS classes so you can change the look of it easily. --Nad 04:00, 8 May 2007 (UTC)


 * Yes, Some people like the interface of calendar (User:Hex2bit/Calendar). It can be used to show which members in a department on duty at each day. But unfortunately, It cannot generate articles with custom-made titles. Especially,something like "2007/05/07". Nowadays, it can only use like "2007/5/7" to be a title of an article and it disadvantage working with DPL to list all the events. On the other hand, Simple Calendar is a Parser function extension. So it well be more useful than other calendar extensions.
 * The skin of Simple Calendar is good for some of my coworkers, but others prefer the one which User:Hex2bit/Calendar used ,particularly, to be used for a public calendar.
 * Nad, sorry, I am not a programer, :-( I can only use a few CAD softwares and edit some simple web pages with Dreamweaver. I very like Mediawiki, because it is powerful, useful and has countless advanced programers 'like you' to improve itself. So please do me a favor, Nad.--Roc michael 13:01, 8 May 2007 (UTC)

Could I use the functions preload and format in the same time
Nad, if I use the preload function, it seems that I cannot use the format function which like the followed all together.

Could you give me a hand?--Roc michael 16:04, 8 May 2007 (UTC)
 * Use pipes to separate the parameters in a parser-function or template, eg:


 * Thank you! Nad.--Roc michael 11:27, 9 May 2007 (UTC)

Remove # character in parser-function name on 1.6.x
Hey Nad - first of all, I wanted to thank you very-very much; I really appreciate all this wiki-work you do, and I wish I could do the same, in order to publish these works freely...

Anyway, I liked your SimpleCalendar extension, but I just couldn't make it work, I don't know why... I'll detail here the phases I have done in order to make it work, and I'll be happy if you could tell me what have I missed/done wrong.

I do have experience with extensions; I have built some of my own (too specific to be included here... :-) ).

Here it is: include('extensions/SimpleCalendar.php');
 * I have created the file SimpleCalendar.php
 * I have copied into it the text from here:
 * Saved and uploaded to the extensions folder.
 * Inserted the following line into LocalSettings.php -
 * Uploaded that file (into the root directory)

First testings:
 * In my version page, I can see your credit (Simple Calendar (version 1.2.1, 2007-05-07), A simple calendar extension, by User:Nad )
 * I have created a "test" page, and put there only the following code:
 * Saving; refreshing; nothing. All I see is this:

It just ignores the extension, somehow.

Other extensions, as I said, work; I also installed the "Extension:Variables", and if I enter the following input in the test page: I save and get the following output: (Demowiki is the username...)

That's it, I think...

Oh - and I have:
 * 1)  MediaWiki: 1.6.10
 * 2) PHP: 4.4.1 (cgi)
 * 3) MySQL: 4.0.27-standard

If it matters.

Thanks ahead! Peleg 08:27, 13 May 2007 (UTC)
 * No problem - on MediaWiki version 1.6.x the parser functions don't use the # character by default, just remove that, eg
 *  
 * I've updated the Extension:Simple Calendar page to have a note about this. --Nad 21:37, 13 May 2007 (UTC)
 * hehe... AS simple as that... Thanks!! Peleg 07:27, 14 May 2007 (UTC)

Wrong link colouring
I've just installed the new version of the calendar and I have a problem... All the links (dates) are external links: http://img260.imageshack.us/img260/2333/sanstitrets6.png And I still have the problem of the language... I don't have access to the configuration server. YeTi 20:39, 3 May 2007 (NZST)
 * I'm experiencing this same issue. Anybody find a resolution? Jaofos 05:06, 30 May 2007 (NZST)
 * Did you add the CSS rule #bodyContent table.month a { background:none; padding:0 }? that makes the links plain --Nad 08:47, 30 May 2007 (NZST)
 * Yes, I figured out afterwards to add the styles for the calendar and everything works great. I have, however, run into another issue where after you add entries for a calendar day, the link will not change to indicate an existing entry for that day until after you edit and save the page with the  tag. Jaofos 02:59, 12 June 2007 (NZST)
 * I've tried adding a line into the code to disable the caching for calendar tables, but your problem doesn't happen on our wiki's, so I can't test it, give it a go now and see if it works any better --Nad 22:28, 11 June 2007 (UTC)

Other languages
Hi, a few questions:
 * How can I put the calendar in another language, for example french (january = janvier, etc...)?
 * I changed it slightly to work with locales, so download again from MW:Extension:Simple Calendar, and then set the PHP locale in LocalSettings.php with the following (the locale's must be configured on the server properly),
 * setlocale(LC_ALL,'fr_FR','fr','FR','french','fra','france','French','fr_FR.ISO8859-1');
 * if that doesn't work, use locale -a from your server's shell to see what local's are available.


 * In which file do I have to put the CSS code, knowing that I use the Monobook skin? --YeTi 19:58, 1 May 2007 (NZST)
 * You can add it to your MediaWiki:Monobook.css file, see our MediaWiki:Wikiskin.css for example. --Nad 21:08, 1 May 2007 (NZST)

Links showing up as external
I've just installed the new version of the calendar and I have a problem... All the links (dates) are external links: http://img260.imageshack.us/img260/2333/sanstitrets6.png And I still have the problem of the language... I don't have access to the configuration server. YeTi 20:39, 3 May 2007 (NZST)
 * I'm experiencing this same issue. Anybody find a resolution? Jaofos 05:06, 30 May 2007 (NZST)
 * Did you add the CSS rule #bodyContent table.month a { background:none; padding:0 }? that makes the links plain --Nad 08:47, 30 May 2007 (NZST)
 * Yes, I figured out afterwards to add the styles for the calendar and everything works great.

Link colour not changing to indicate newly created entry
I have, however, run into another issue where after you add entries for a calendar day, the link will not change to indicate an existing entry for that day until after you edit and save the page with the tag. Jaofos 02:59, 12 June 2007 (NZST)
 * I've tried adding a line into the code to disable the caching for calendar tables, but your problem doesn't happen on our wiki's, so I can't test it, give it a go now and see if it works any better --Nad 22:28, 11 June 2007 (UTC)
 * Seems to be working now, thanks! --Jaofos 02:37, 13 June 2007 (NZST)

CSS style
The CSS style to any calendar containing articles can be applied using Extension:CSS now --Zven 20:44, 1 July 2007 (UTC)

Unable to get individual days in calendar to link properly

 * Running MediaWiki version 1.10 on latest version of XAMPP (running as localhost on my own Windows XP machine)
 * Using Simple Calendar version 1.2.2 from Organic Designs wiki site (having edited minor syntax error in the loop in the function that displays calendar from passed month and year).
 * calendar.php resides in my extensions directory.
 * LocalSettings.php includes the line include( "extensions/calendar.php" );
 * Calling the calendar display on the wiki page with the line

The calendar display is visually perfect. However, every individual date links to the same page, July 2007, without including the actual day value in the link.

If I call the calendar using, now I get date links but the table alignment for the first line of dates is offset to the right by the width of the calendar display, and negative dates are displayed (meaning for example that the display would include -13 as a date, which links to a date 13 days prior to July 1 2007 in this example).

The page July 2007 existed prior to the installation of Simple Calendar, if that is relevant.

Any thoughts, anyone? Clingonkelt 19:20, 15 July 2007 (UTC)
 * There shouldn't have been a syntax error to fix because it's the same version which is running properly on the organicdesign site... what was the error? is it possible to see the faulty site or is it behind firewall? --Nad 06:43, 16 July 2007 (UTC)