Extension talk:DschosCalendar

From MediaWiki.org
Jump to navigation Jump to search

Fyi, I noted the following when trying to use this extension:

  • The DschosCalendar.php file is missing a closing php tag.
  • The calendar_template.html file is not being loaded properly. The following line in DschosCalendar.php is incorrect: $calendarExtensionPath = ereg_replace("[^/]*$", "", __FILE__);
  • DschosCalendar.php contains a reference to CalendarAdjust.php (this isn't hurting anything but since that file is no longer used, references to it should be removed). —The preceding unsigned comment was added by (talkcontribs) . Please sign your posts!
Just a FYI: MediaWiki PHP files nowadays don't have the closing ?> tag, as per rev:23531. --Sayuri 22:00, 12 September 2007 (UTC)

I have just installed your DschosCalendar. I think I have followed the install instructions correctly.

  • I am using MediaWiki 1.11.0 on SuSe Linux 10.1 ...
  • I was getting vertical lines running through the Calendar template and also 'boxes' around the 'Add Event' comments.
  • I deleted the reference to CalendarAdjust.php in DschosCalendar.php and these lines disappeared.
  • Everything now looks similar as on the Calendar png sample in your page.
  • I must admit that instead of 'DschosCalendar.php' I have 'calendar.php' ...
  • Both the 'calendar.php' and the 'calendar_template.html' are in the 'extensions/Calendar' directory.

My Problem

  • I cannot add an event to any date.
  • This was happening before and even after I did the above changes.
  • If I click on 'Add Event' I get to an edit page and i can add text.
  • When i Preview the edit page, i see what I typed.
  • If i save the edit page, it returns to the Page where the text should be visible. Its not
  • Searching for the page, is unsuccessful. It appears as if the Page wasn't saved.
  • The calendar doesn't show this event.
  • I deleted all references to 'Calender-' the calendar.php file.
  • This allowed me to save an edit page with just the date 2007-09-27.
  • But still not visible in the Calendar.

Can you please assist me in trying to add an event to your very nice Calendar?

--User:zs6ro 09:25, 27 September 2007 (UTC)

Multiple Calendars[edit]

What's the easiest way to have multiple calendars on the same Wiki? Each department is wanting their own, and one department is looking to have multiple of their own.

  • I figured it out. :) [doh!]
 <calendar name="Provide New Calendar Name Here"></calendar>
  • Interesting. We would like to be able to do that, too. However, this extension works fine as a special page, but it doesn't seem to permit instantiation within other pages. If I put your markup in one of my pages, I just see the markup, not the calendar.


I made it work this way[edit]


$calendarExtensionPath = ereg_replace("[^/]*$", "", __FILE__);


$calendarExtensionPath = dirname(__FILE__) ;

-- Lorenzo Pedrotti

Php Error Message when viewing Calendar[edit]

When trying to load the Calendar Special page, I get this message...
Notice: Undefined property: Calendar::$name in C:\Web\WebServer\Apache2.2\htdocs\wiki\extensions\DschosCalendar.php on line 175
When viewing the error log provided by Apache, I get this message...
PHP Notice: Undefined property: Calendar::$name in C:\\Web\\WebServer\\Apache2.2\\htdocs\\wiki\\extensions\\DschosCalendar.php on line 175, referer: http://domain-name/wikia/Main_Page
Server stats (to alleviate guess-work)
Product Version
MediaWiki 1.12.0
PHP 5.2.6 (apache2handler)
MySQL 5.0.51b-community-nt

-- 19:04, 4 September 2008 (UTC)

Update One[edit]

  • I was able to correct this by '//'-ing $tag_calendarName = str_replace('_', ' ', $this->name); on line number 175. -- 21:14, 4 September 2008 (UTC)

This is really cool :) I didn't have any problems with it on my server (yet!)

I tried Hex2Bit's one, and had real issues with Action Paths cocking up the links.. but this one seems to work pretty well! 16:11, 16 September 2008 (UTC)

Will This Calendar Work with Short URLS?[edit]

Someone please put me out of my misery. Please.

I am running mediawiki 1.12 + apache + short urls

Here are my problems:

1) the calendar shows up just fine in "special pages" but when I go to add an event, I get the following error:

The requested URL /w/index.php5Calendar-2008-9-2 was not found on this server.

What's showing up in my address bar is this:


I am a total newbie but I think this must have to do with the shorturls. Is there a way to get this working?

2) I want to make the calendar show up on "regular" pages. I tried the trick suggested earlier of replacing

$calendarExtensionPath = ereg_replace("[^/]*$", "", __FILE__);


$calendarExtensionPath = dirname(__FILE__) ;

to no avail. Right now, I am having the same problem as the poster above who just sees the code and no calendar.

Suggestions? I suspect that I need to solve problem #1 first.

I would be grateful for any advice.