User talk:Simsong/Calendar

No input file specified
I'm really looking forward to using this extension. I installed the extension (1.11.0 on IIS) and made a calendar. I can see the calendar in my wiki but once I click on anything, be it "add event" or a choosing a month or whatever from one of the menus I get a white page that says simply: No input file specified.

Anyone know how to fix?

Thanks

Getting Event titles to show up with FCKEditor installed
This is definitely the best calendar extension out there!

Just wondering if there is a way I could get it to show the event headings in the calendar with the FCKEditor installed using the heading html tags or something?

Thanks!

Add event fixed using mediawiki 1.10.0
I had to hard code all the instances of $wgLocalPath in CalendarAjust.php and the "paths to important files" in Calendar.php. It worked fine after that!

-Ryan (bergmann_"at"hotmail.com) - July 4, 2007.

Feature Request
Fantastic extension, Hex2bit!

I wonder if it's possible to add support for events that span multiple dates?

Thanks!

Dhenderson 16:35, 13 February 2007 (UTC)


 * It's very hard to do with the current structure. Simsong 20:24, 12 November 2007 (UTC)

Hi Hex2bit

This looks like a very useful extension. Is there a test wiki where I can see it in action?

--HappyDog 01:33, 20 October 2006 (UTC)

Hi Hex2bit

I have two requests for new features

1) I would like to put the calendar into it's own namespace to reduce clutter in main and allow it to work with namespace security.

2) Below the fork to this calendar "DschosCalendar" keeps all the events for one day in one page. This does make editing the events for a day easier. The problem with this fork is that it only allows one calendar for the site. --164.44.67.4 16:20, 25 October 2007 (UTC) marvinp@chubb.com

Happy Happy Joy Joy
Thanks for the great extension. Its really easy to use! Thanks for sharing.--Magick 07:44, 7 December 2006 (UTC)

Installation
I would like more details regarding how to setup this Calendar in Mediawiki. I have added the files to the extensions folder as mentioned, but I am not sure how I need modify the   file to include the calendar in the wiki.

I have tried just using. Once I save this change, the wiki pages no longer load, they appear as blank white pages.

156.77.108.71 19:37, 20 October 2006 (UTC)

Make sure you add this line to the end of. 205.210.232.62 16:23, 13 February 2007 (UTC)

How do you make it not say event in the calandar view? --67.87.142.233 03:27, 23 October 2006 (UTC)

Looks like a good tool, i did have a couple questions:


 * I tried changing the code to reference extensions/Calendar/ instead of just extensions/, but while it displayed I got Extensions/Calendar/CalendarAdjust.php does not have anything on it. It says There is currently no text in this page, you can search for this page title in other pages or edit this page.
 * I tried also the default extensions directory, still no go. Any ideas?

Answer (working 1.6.8, Jan. 6 2007): add the following lines to your localsettings.php: include("extensions/Calendar.php"); include("extensions/CalendarAdjust.php"); When you change months/years, Mediawiki will momentarily display the "No text" message; wait and it will display the required month/year.

--- Hi Hex2bit, nice extension! I do have some tips though (and some answers for the above questions :

- @ the last question : To get this calendar working properly, you should adjust the way the URL is shown. Default it is set to , but it should be set to. Change it in Localsettings.php and it should work fine.

- @ 156.77.108.71 : to load extensions, you should add the following in LocalSettings.php:

- @ 67.87.142.233 : In Calendar.php there's this string:. Change it to  and it will say "Add ..."

Ah, now I know what you mean. You should start each entry with, that way it will show your title.

- @ Hex2bit : I think it is better to make the extension 'path' independant, so people can place a complete directory in /extentions instead of cluttering it up with a lot if files.

cheers,

Davidem 22:11, 5 November 2006 (UTC)

Special Pages
I love it, except for one thing: When the calendar event pages show up in my Special:Newpages I'm getting

Notice: Undefined offset: -2 in /home/danlyke/mediawiki-1.8.2/languages/Language.php on line 354

Which I believe comes from something about those event pages having a funky date. Just to make things even more complex, I'm running on PostgreSQL, so there may be an interaction with default dates.

If this bothers me enough I'll drop a patch on you at some point, but I'm a PHP n00b and haven't started to dig too deep yet.

DanLyke

Hello, the calendar loads fine for me and looks great but when I click to change month, year or add event it dosent work, just links to "The Page Cannot Be Found" ??

I see what there error is, it is in the CalenderAdjust.php path

"http://www.humbolpedia.com/edia.com/extensions/CalendarAdjust.php?day=6&month=11&year=2006&title=Current_events&name=&path=

Note the edia.com repeating.

I dont know how to fix this though.
 * Hi. I had the same prob. Was kinda in a hurry so just went to line 412 in Calendar.php and hardcoded it to:

$tag_addEvent = "month . "&year=" . $this->year . "&title=" . urlencode($this->title) . "&name=" . urlencode($this->name) . "&path=" . urlencode($wgScriptPath) . "\">Add Event";
 * Change http://www.mydomain.com/wiki/extensions/CalendarAdjust.php so it fits you domainename and path to wiki. Ugly but it worked for me.


 * Hi, I'm having the same issue. I changed the addEvent, as you suggest, and that's working now.  But I can't seem to get the month and year selections to work right.  I know that this is due to my re-writing the URL to display 'wiki' instead of 'index.php'.  Any help?  Thanks!  --Kirgan


 * This is Kirgan again. I fixed most of my issues by backing out the changes I'd made, and instead changing the following line in Calendar.php from this:

$calendarExtensionPath = str_replace("\\", "/", substr(dirname(__FILE__), strlen($wgLocalPath)));
 * To this:

$calendarExtensionPath = '/wiki/extensions';
 * The only thing I'm still having issues with, is when I change the month or year, it returns with the following URL:

https://mywiki.domain.com/index.php?title=Mobile_Search
 * Instead of what it should be returning:

https://mywiki.domain.com/wiki/Mobile_Search
 * But, I think this may be an apache issue, so I'm looking at the rewrites I'm doing now to see if I can fix it that way. Thanks for an awesome extension!  --Kirgan

Extension namespace
Hi Hex2bit - as there is now a dedicated Extension: namespace, would you consider moving your calendar extension there? I would recommend giving it a more distinctive name than just 'Extension:Calendar' to avoid confusion (as I know there are several calendar extensions out there), but that's your prerogative :-) --HappyDog 00:29, 29 November 2006 (UTC)

Wrong link
Great tool, however I am having the same issue as another user, a portion of the URL duplicated: http://www.ecuaserver.net/wiki/iki/extensions/CalendarAdjust.php?day=8&month=1&year=2007&title=Calendar&name=Test_calendar&path=%2Fwiki

The extra "/iki" should not be there, if I fix the link manually it works and I can add events or browse to other months/years

Compliments
This is one of many extensions I have installed on my wiki, but it's the first that runs without any problems just as it is supposed to. Just great! Thanks a lot!

URL Link to CalendarAdjust.php is incorrect
The calendar shows up just fine, however, when I try to add an event I get "Page not found". In addition the URL Link is incorrect, it reads http://www.themusicrevolution.com/wiki/mediawiki/21/user/1049983/htdocs/wiki/mediawiki/extensions/CalendarAdjust.php?day=29&month=1&year=2007&title=Creating_a_Calendar&name=YOUR_BAND_NAME_Calendar&path=%2Fwiki%2Fmediawiki and it seems to be adding extra "Htdocs/wiki/mediawiki" much like the person pointed out with the extra link above. How can I change the path so that it looks for the CalendarAdjust.php in the correct folder?

It cann't work nicely withAuth_phpbb.php
It cann't work nicely with Auth_phpbb.php. When I tried to add an new event. I would see the error code following:

Warning: require_once(./extensions/Auth_phpbb.php) [function.require-once]: failed to open stream: No such file or directory in  C:\AppServ\www\mediawiki\LocalSettings.php on line 192

Fatal error: require_once [function.require]: Failed opening required './extensions/Auth_phpbb.php' (include_path='C:\AppServ\www\mediawiki; C:\AppServ\www\mediawiki/includes;C:\AppServ\www\mediawiki/languages;. ;C:\php5\pear') in C:\AppServ\www\mediawiki\LocalSettings.php on line 192


 * WIN XP
 * AppServ 2.5.7
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a


 * Could anybody give me a hand.

--Roc michael 16:09, 21 January 2007 (UTC)

Questions
Hi,

I've some questions.
 * Is it possible to remove the event once it is added? I tried and couldn't and I think this would be a good feature.
 * Is there a way to have all the content of an event displayed in an event window? (not only a title)
 * Is it possible to change event window width?

You can answer here and on my User_talk:Aretai
 * I'd like to write my own extension based on your code is it possible? Of course I'd mention you.

Regards, Aretai 11:00, 6 February 2007 (UTC)

Some Answers
@Aretai: Here are some of the answers you're looking for :

1 Yes, it is possible to remove an event, you'll have to be sysop or admin to do that. Log in as such, go to the event and you'll notice a 'delete' tab at the top...

2 Well, I thought I had an answer to this one, but what I came up with did not work...

3 This is also possible, but only on a 'daybasis'. In calendar_template.html you can change the width of each day. Search for witdth and change the values at .calendarSunday/Monday/etc...

cheers,

davidem

Hi Hex2bit,

first of all thanks for that easy-to-work-no-causing-problem extension which I installed on and adapted to my still young wiki ZonaCostera.Info. My questions are: why do I see not the titles but only Event 1 etc on the respective event page, even tough having properly used sections titles? Should the event title not show up also here and not only in the calendar? And: is there a way to have all events (of one calendar) summarized on one event page, or at least those for one day?

Thanks for your kind atention to this! --Horst Salzwedel 02:44, 8 March 2007 (UTC)

Only blank white pages
I just installed your Calendar extension but I only get blank white pages. The log files say nothing about crashes or something. Are these versions tested anywhere? Thanks!
 * MediaWiki: 1.9.3
 * PHP: 5.0.5 (cgi-fcgi)
 * MySQL: 4.0.15

I too am having this blank white pages problem. I had this extension working with mediawiki 1.9.3 just fine but now I only get these blank white pages when I try to add an event. We do not use the add events every day so I am not sure when it stopped working. Since it's last known time of working I have added a few new extensions and upgraded to MW 1.10.0. To test that it is not a conflic with extensions I have removed the require_once from LocalSettings.php for all extensions except Hex2bit/calendar. Still it does not work. I have been careful to clear cache of reloading the calendar page. I do not know where to do from here. Any thoughts?

Thanks, Paul 6/11/2007

- - - - - - - - - - - - - - - -

More information on my issue above: I did a clean install of 1.9.3 then added the calendar extension. It worked just fine. I then upgraded to 1.10.0 and it still works! What I noticed is that the URL when it works is different from the URL when it fails.

Working URL: http:// /index.php?title=A_calendar%2FCalendar_%286-11-2007%29_-_Event_3&action=edit failing URL: http:// /extensions/CalendarAdjust.php?day=11&month=6&year=2007&title=Inspection_Calendar&name=CSI_IT_Inspections&path=%2Fcsiit

The new install is on the same server as the install that is failing so PHP and MySQL are the same.

Thanks, Paul 6/11/2007

- - - - - - - - - - - - - - - -

I got it fixed!!

The problem is that I do not know enough about PHP behavior. Because I pass the LocalSetting.php to other administrators I had moved some information into external files. These files where referenced with require_once(file). This worked fine until the files were moved to another directory so the reference because require_once(../etc/file). By changing require_once to include(../etc/file) fixed the problem except with one file. This file set values $wgDBuser and $wgDBpassword. For some reason this had to stay as a reference in the same directory as LocalSetting.php. Why this breaks "add event" in calendar I defer to PHP guru's.

Thanks, Paul 6/11/2007

Could I creat a page with title "test/Calendar "IT Calendar" (03-01-2007) - Event 1"

 * The date format included in article title name must be such as 03-03-2007 or 2007-03-03.
 * If It could be possible. Then we could use dpl to collect the pages generated by the calendar with a better order.

Add Event - bad URL
First, I need to tell you that this is the best calendar function for a wiki out there (here?). It Suits my needs perfectly, looks great, but I just cannot get it running. If anyone can help, please do... So: My setup is FC7T2 with all the required tools installed.
 * Mediawiki is installed as /var/mediawiki
 * Httpd is installed as /etc/www/html
 * I have a wiki.conf located in /etc/httpd/conf.d/ that contains 1 line: Alias /wiki /var/mediawiki.
 * The Calendar package is located in extensions/
 * LocalSettins has the require_once extensions/Calendar.php at the end, and $wgScriptPath = /wiki

What I get is a broken url that has an extra 'awiki' stuck in it. So trying to take apart Calendar.php where the URL is created, I mate a test script like this. It is placed in /var/mediawiki/extensions and called directly ( http://domain.name/wiki/extensions/test.php) with this result:

test.php: PHP Test  local path'; echo 'ScriptFileName=> '. $_SERVER["SCRIPT_FILENAME"]; echo 'ScrriptName=> '. $_SERVER["SCRIPT_NAME"]; $LenScriptFileName = strlen($_SERVER["SCRIPT_FILENAME"]); echo 'LenScriptFileName=> '.$LenScriptFileName; $wgLocalPath = str_replace("\\", "/", substr($_SERVER["SCRIPT_FILENAME"], 0, strlen($_SERVER["SCRIPT_FILENAME"]) -   strlen($_SERVER["SCRIPT_NAME"]))); echo 'LocalPath=> '.$wgLocalPath; echo 'StringLenScriptName=> '.strlen($_SERVER["SCRIPT_NAME"]); $calendarExtensionPath = str_replace("\\", "/", substr(dirname(__FILE__), strlen($wgLocalPath))); echo 'CalanderExtensionPath=> '.$calendarExtensionPath; echo 'Need CalendarExtensionPath=> /wiki/extensions'; ?>

Result: local path is => local path ScriptFileName=> /var/mediawiki/extensions/test.php ScrriptName=> /wiki/extensions/test.php LenScriptFileName=> 34 LocalPath=> /var/medi StringLenScriptName=> 25 CalanderExtensionPath=> awiki/extensions Need CalendarExtensionPath=> /wiki/extensions

Not sure of the reasons for what is going on here. So without solving it this way, I hard coded the correct paths. Not the URL is not wrong, but I go to edit page extensions/CalendarAdjust.php, and not the correct page.

So if anyone can advise me on what I have wrong, or ask some pointed questions, I would be grateful. Until then, I'm stuck.

Update So I kept at it, went back to it because its the best calendar. I decided to hardcode several locations in Calendar.php and CalendarAdjust.php. In Calendar.php: line 135 // path to the root of the web server line 136 $wgLocalPath = $wgScriptPath;    #'/wiki'; # Comment out original $wgLocalPath statement on line 137 line 258 // the path to this extension (install location line 259	$calendarExtensionPath = $wgLocalPath.'/extensions';    #comment out original $calendarExtensionPath.

In CalendarAdjust.php line 5 // determine the local base path to this wiki (rather than using server variable DOCUMENT_ROOT) line 6 $wgLocalPath = $wgScriptPath;          # Comment out original $wgLocalPath statement line 7 $local_wiki = '/var/mediawiki';     # new variable path = mediawiki location line 27 require_once( $local_wiki. '/includes/Defines.php' );	   # $local_wiki was $wgLocalPath. $_GET["path"] line 29 require_once( $local_wiki. '/LocalSettings.php' );     # $local_wiki was $wgLocalPath. $_GET["path"] line 31 if (file_exists($local_wiki. '/includes/ProfilerStub.php')) { line 32 	require_once( $local_wiki. '/includes/ProfilerStub.php'); line 33 } #    $local_wiki was $wgLocalPath. $_GET["path"] (2 locations) line 35 require_once( $local_wiki. '/includes/Setup.php' );    # $local_wiki was $wgLocalPath. $_GET["path"]

As I said in the previous update,
 * the wiki is located at /var/mediawiki;
 * wiki.conf ( http config file) contains Alias /wiki /var/mediawiki
 * my URL on main page shows: http://domain.name.co/wiki/index.php/Main_Page

Mjf55 04:36, 11 April 2007 (UTC)

Parse Wiki code in title
Hi Hex2bit,

Back again with a question this time.

How do I make it possible to parse Wiki/html code in the title? For example, the title is == Title== I would like to have it appear as Title in the calendar. Or with HTML to provide colors: == Title == which would show Title in the calendar.

If that would be possible, great :)

Cheers,

Davidem

Partly fixed...
Hi, back again... tinkered with the script myself and figured out how to use some color. We needed an easy way to see if something needs to be prepared for an event, so I adjusted the following to Calendar.php:* Somewhere near line 422 where links are written out, I changed $tag_eventList .= "". $this->getArticleSummaryLink($events[$k]). ""; to $tag_eventList .= "getArticleSummaryLink($events[$k]) . " ";

and further below at the getArticleSummaryLink function (around line 540), I added these if statements:

if ($linkText{0} == "!") { $linkBgClr = "tomato"; }  elseif ($linkText{0} == "*") { $linkBgClr = "lightgreen"; }  else    { $linkBgClr = "yellow";

and changed $text = ''. htmlspecialchars($linkText). '';

to $text = $linkBgClr. '">' . htmlspecialchars($linkText) . '';

This way I can easily generate a background color to emphasize the status of an event by adding a character befor the title (like ! or *). For example a title like == ! Title== will be seen in the calendar as Title. A different character gives a different color (if defined in the if statements off course). For the moment, this works alright for us...

cheers, Davidem

re. Partly fixed...
Parse error: parse error, unexpected T_VAR in D:\AppServ\www\testwiki\extensions\Calendar\Calendar.php on line 647 The code where the line 647 is var $month = 1;
 * I'v tried it ,but it didn't work.


 * Mediawiki 1.9.2
 * The AppServ Open Project - 2.5.7 for Windows
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a

--Roc michael 10:57, 16 April 2007 (UTC)

--davidem 15:08, 19 April 2007 (UTC)
 * Strange, because my tweak doesn't do anything with that part of the script. Are you sure all brackes, apostrophs and semicolons close correctly?


 * Could you post the all codes you changed here or somewhere, please! I will try it again.
 * --Roc michael 11:56, 20 April 2007 (UTC)

Fix for 1.8.4
Has anyone fixed this Calendar to work with Mediawiki version 1.8.4?


 * So what is wrong? What are you running as an OS, what versions of MySQL, PHP, Apache do you have.  Tell us some symptoms and maybe we can help  Mjf55 22:25, 19 April 2007 (UTC)

'Move' option for event
How could an 'move' process be added to the calendar. Of course 'move' in the wiki sense doesn't really work as the page just redirects and the calendar does not see the 'new' date. --Dtsig 21:56, 25 April 2007 (UTC)

Assigning to a Category
What would be the best way to force the 'event' page to be forced to a specific category? Along with this might be how best to start the page with "== Event Title == ". This would make it easier for new users to *know* that they have to put something in there. --Dtsig 21:59, 25 April 2007 (UTC)

Bug with IIS, PHP5 and MW 1.10.0
I came across a bug in this calendar where the line $article = new Article(Title::newFromText($articleName)); would never evaluate, and the result would invariably be a blank page.

It took me a while to figure it out, but eventually, by replacing every occurrence of this line with $article = new Article((Title::newFromText($articleName))); (note the extra pair of brackets), everything went ok.

I do not know whether this is because of PHP5 or something else, but the fact remains that every other use of new Article in MediaWiki code uses a $variable as an argument, never Title::newFromText</tt>.

143.196.159.101 10:46, 29 August 2007 (UTC)

Fork of Hex2bit/Calendar: DschosCalendar
Hi,

I just released a fork of this great extension: Extension:DschosCalendar. As I had some issues, I made quite a few modifications:


 * no more need for CalendarAdjust.php. It just opens a new window to edit the appropriate section.  (Unfortunately, this means that you have to reload the Calendar after editing the even)
 * the events no longer have their own page; each day has an own page now, and its sections are the events
 * it is no longer configurable. That's easy to fix, but I do not have the need.

Have fun, --Dscho 11:03, 30 August 2007 (UTC)

Calendar Won't Parse
I recently updated to MW 1.11.0 and the calendar won't parse unless I change its name (obviously, if I do this, I won't see the events). So, I did some testing and found that the calendar won't parse if any event for that calendar was "made" before the calendar was made. Is there any way I can fix this? --Qsheets 16:36, 15 September 2007 (UTC)

Calendar Doesnt Show
I installed the Hex2bit calendar but i keep getting this --> UNIQ165d7abe71de95ef-calendar-00000002-QINU displayed instead of the calendar. It shows up when i add a new event. The calendar will not reappear again no matter what i do. Creating another calendar with a different name however makes the calendar appear, but the whole issue just replays itself. Im using Media Wiki 1.11.0. Any idea how i can resolve this?

Thanks 22 Sep 2007

Calendar will now show next month etc
When putting events on current month. Upon clicking the next month button I get a "The Page cannot be found" however if I click on IE's back button it displayed the correct month I wanted to go to in the first instance!

I am using 1.10.0 Mediawiki.

Also any tips for entering bulk enteries of events in one go? I.e. one month's worth of Annual Leave enteries? Not keen on manually creating new event for every day!

Thanks and keep up the good work

Paul 02-10-2007

New Developer/Mediawiki 1.11
I will no longer be maintaining this extension for Mediawiki. Another person, has graciously stepped in and will continue to develop and support this extension. His name is Simson Garfinkel and you can find more information on Simson's User Page. His first contribution is a version of the Calendar that works with Mediawiki 1.11. For anyone using that version (or newer), please download from his page.

Here's a direct link to his download, which works on Mediawiki 1.11:

Simson's Calendar Extension (Zip file)

Thank you everyone for your support and I wish Simson the best of luck with the future development of this great extension.

Hex2bit

Events URL in display not correct/complete
Hi, when a new event is created, it shows up in the display fine. But when clicking the event in the display, it redirects me to the homepage of the wiki for the URL of the event is not complete/correct.

hovering the event in display mode of the calendar, it shows: '..index.php?titel=' without the correct direction to the event page.

Logfile shows: PHP Warning: htmlspecialchars expects parameter 1 to be string, object given in Calendar.php on   line 539,referer: http://mywiki.com/index.php?title=Sandbox&action=edit

Any clues please? TIA

Hfwang

Bad Link for Event
I had a problem where the link from the Event in a day of the calendar was bad. It reverted back to the Main Page, because the title of the article was bad. I had to update calendar.php:Line 545 to get it to work. As...

$title       = $article->getTitle->getText;

(the original form of the file doesn't have the ->getText; at the end.

09 Jan 2008, v1.11 - This appears to fix the htmlspecialcharacters issue too.

Typo in Calendar.php version 2.0.3
I think line 430 should read:

$numWeeks = floor(($this->getDaysInMonth($<this->year,$this->month) - $dayOffset + 6) / 7);

Toddnet 21:42, 21 November 2007 (UTC)

Not working with 1.11
Just after installing your calendar on fresh install of 1.11, I get this error message on the top of my pages when viewing a month containing one event or more:

Warning: htmlspecialchars expects parameter 1 to be string, object given in /wiki/extensions/Calendar/Calendar.php on line 529

The links to the events seam to be broken too... I am using MediaWiki 1.11.0. You can see the result by going to december 07 here: http://opensv.ch/mediawiki/index.php?title=Main_Page

XApple 12:10, 25 November 2007 (UTC)
 * Me too--61.231.189.33 15:33, 25 November 2007 (UTC)
 * Me too41.240.31.81 14:51, 18 December 2007 (UTC)

Blank Page when hitting "Add Event" (Posted Nov 27, 2007)
I don't know how to fix this - when I click on "Add Event" I get directed to a blank page at wiki.***mydomain***.org/extensions/Calendar/CalendarAdjust.php?day=3&month=12&year=2007&title=Network_Operations&name=IT_Calendar&path=

Any idea what I need to do?

Calendar is version 2.0.3 MediaWiki 1.11.0 PHP 5.2.3

Now people have more another choosing

 * See the powerful calendar kit