Extension talk:Calendar (Barrylb)

From MediaWiki.org

Jump to: navigation, search

Contents

[edit] Where do i add event information?

I don't understand where to add event information. Can anyone help? I also can't get the ajax <> to work, the whole thing just disappears when clicked. And when i click 'More >>', two calendars appear and i can't edit that page. Help! Thanks.

[edit] Dates need leading Sero

  • I installed your nice calendar (thank you a lot!!) and after a while SpecialEvents did not work I found out the Category-Date-String needs leading seros if month or day numbers are less than ten.

won't work:

[[Category:2006/7/13]]

will work:

[[Category:2006/07/13]]

maybe You think about mention this in your documentation.

  • Is it possible that there is a message at the Special page if no events are in the selected month?--Hans Glück 17:33, 7 February 2008 (UTC)

[edit] A few changes for compatibility

Made a few updates to make it compliant with my webserver which absolutely has kittens if a PHP script uses an undefined variable. In SpecialEvents.php, beginning at line 41: Commented out:

$year = $_REQUEST['year'];
$month = $_REQUEST['month'];
$day = $_REQUEST['day'];

and replaced it with:

$year = isset($_GET['year']) ? $_REQUEST['year'] : null;
$month = isset($_GET['month']) ? $_REQUEST['month'] : null;
$day = isset($_GET['day']) ? $_REQUEST['day'] : null;

At line 48, I placed in quotes the parameter to the date():

if ($year == "")
    $year = date("Y");
if ($month == "")
    $month = date("m");

And at line 72, I changed the append operator to an equals operator:

$sSqlOrderby = ' ORDER BY catlike1 ASC';

because since $sSqlOrderby hadn't been defined, it couldn't be appended to. ---Quentin Baker w:User:Bakerq


[edit] Correction for SpecialEvents.php page

Must be placed in Include directory and not extension one Works fine after

--> WHY is this noticed here without changing the original Text??

Can you confirm this is necessary? I haven't had any such issue - I put mine in the extension directory... -- Barrylb 11:49, 27 August 2007 (UTC)
works fine in the extension directory for me as well (MediaWiki 1.11.0) Herta 18 December 2007

[edit] Change needed for "ugly url" sites

A change is needed for sites that are forced to run php5 in CGI mode and thus have the "ugly url" thing turned on. The script generates URLs in the form of "Special:Events?..." but if you're running with "ugly urls", you end up with "index.php?title=Special:Events?..." which isn't valid. Needs to be "?title=Special:Events&..." ... I just hacked mine to always have the & instead of ? but a real patch would check settings and handle both cases.

  • Yes I am having this issue. How did you "just hack" yours? It works if I manually replace the ? with & in the URL, but just clicking on the appropriate links in the calendar gives me errors....Please help, not experienced with PHP or CGI, here...Thanks [-dj]
Go change all the "events?year" to "events&year" in the calendar.php file, then it will work. --Swessels 07:33, 4 August 2008 (UTC)

[edit] Some thoughts

Po0ky 10:08, 8 December 2006 (UTC)

[edit] Using col & colgroup to hilight weekends

It might be easier to use col & colgroup to color the weekends in a different color. Add following lines after the first $output = statement.

$output .= '<col class="cal-weekend"/>';
$output .= '<colgroup span="5"></colgroup>';
$output .= '<col class="cal-weekend"/>';

By doing this you can reduce the check for day 7 to

//removed the if ($count > 6) block
if (($i == $this->today) && ($this->month == $todaysMonth) && ($this->year == $todaysYear)) {
     $output .= '<td class="cal-today"><b>' . $full_link . '</a></b></td>';
}
else {
     $output .= '<td>' . $full_link . '</a></td>';
}
if ($count > 6){
     $output .= '</tr><tr>';
     $count = 0;
}
$count++;

This should also make it easier to adjust if the First Day Of The Week can be specified. (if we ever implement it.

Excellent contribution - I have updated the code based on this. -- Barrylb 12:09, 22 August 2007 (UTC)

[edit] Fill in all days

By doing this the empty spaces get filled with the days of the next and previous month.

replace

 $count = 1;
 $output .= '<tr'>;
 for($i=1;$i<=$wday;$i++) {
     [...]
 }

with

 $count = 1;
 $output .= '<tr>';
 $previousdays = mwCalendar::daysInMonth($lastmonth,$lastyear);

 for($i = 1; $i <= $wday; $i++) {
      $prevday = $previousdays - ($wday - $i);
      $output .= '<td class="calendarPrevNextMonth">'.$prevday.'</td>';
      $count++;
 }

And for the next month's days: replace

for($i=$count;$i<=7;$i++) {
    $output .= "<td> </td>";
}

with

$nextday = 1;
for($i=$count;$i<=7;$i++) {
    $output .= '<td class="calendarPrevNextMonth">'.$nextday.'</td>';
    $nextday++;
}

Add .calendarPrevNextMonth to your main.css file and set the color to whatever you want.

[edit] No Such Special Page Problem

I'm not sure whether I'm the only person having this problem, but whenever I click on a specific date on the calendar, it always says that there is no such special page.

Having worked my way through Calendar.php, I changed line 215 to the following:

 $alinkedit = str_replace('$1', "Category:".$this->year."/".$this->month."/".$dayNr, $wgArticlePath);

I've never done php before, so I'm not sure whether there is a better way to overcome this, so if you have anything better, please post, thanks ;)

[edit] Change category name

Hello, Is there a way to change the name of the category used? For example, Articles instead of Events? Many Thanks, PRoth

In Calendar.php where you find the text c1.cl_to='Events' replace with c1.cl_to='Articles' -- Barrylb 00:13, 23 August 2007 (UTC)

[edit] Cannot display the calendar on the left hand navigation

I cannot display the calendar on the left hand-side.

I have to place the code <? $this->msgWiki('Leftnav') ?> in the MonoBook.php, but only display <Leftnav> on the left hand-side.

Anyone can help?

I had the same problem. Look the MediaWiki:Leftnav in the search box. If this page doesn't exist, just create it with the text <calendar /></calendar>

[edit] Unable to see events

I am not able to see my events. When I create a page with an event my calendar disappears along with the toxbox under it. Can anyone offer some insight?

[edit] Prepared days

Is it possible to have all days like links?

Like if u click on date which is empty, new page ll apears.

I`d like to do it easyer for my users.

[edit] Changes for PostgreSQL

For PosgreSQL8.1.3 , I needed to modify

"SELECT page_title, clike1.cl_to catlike1 " .

in Calendar.php(178) to

"SELECT page_title, clike1.cl_to AS catlike1 " .

othewise MediaWiki reports query error. There are another line in Calendar.php and one in SpecialEvents.php which needs similar modification.

[edit] User enhancement (etc) Suggestions

One of our users has listed the following requests or, in one case perhaps an error. 89.104.51.141 08:23, 8 March 2007 (UTC)

[edit] Issue with left navbar (needs div, add to instructions)

The instructions do not mention it, but it does help to have a div that defines the area for the calendar.

In Monobook.php, I made the following changes.

<div class="portlet" id="event-calendar">
<?php $this->msgWiki( 'Leftnav' ) ?>
</div>

Without this enclosure, I was having problems in Internet Explorer. Firefox worked just fine without the change.

Also, this extension does work in 1.9.3. I thought I would mention that, since no one else had previously.

[edit] ISO 8601 date format

could you use ISO 8601 in the following: [[Category:2006/07/12]], [Events/2006/07/12/Employee dinner] and also for the display? And week starting with Monday? This is more international. http://en.wikipedia.org/wiki/ISO_8601

[edit] Any support for US formated dates?

Can anyone post what modification I'd need to do to get it to display dates in the MM/DD/YYYY format instead of DD/MM/YYYY?

To change the format in the 'upcoming events' section, simply change this line:
 $eventDate =  substr($row->catlike1,8,2) . '-' . substr($row->catlike1,5,2) . '-' . substr($row->catlike1,0,4); 

to

 $eventDate =  substr($row->catlike1,5,2) . '-' . substr($row->catlike1,8,2) . '-' . substr($row->catlike1,0,4); 

-- Barrylb 10:56, 22 August 2007 (UTC)

[edit] Show only events

I would like to be able to show only events (in the sidebar). I would like to add a 'calendar=off' option. How would I go about that?

Simply edit MediaWiki:Leftnav and place <calendar>calendar=off</calendar> in it. -- Barrylb 11:34, 22 August 2007 (UTC)

[edit] Problems with MediaWiki version 1.10.1?

Hello -- lovely extension, am very excited to get it working. One problem I am having with MediaWiki version 1.10 --

  1. The in-page AJAX-based scrolling between months using <calendar>ajaxprevnext=on</calendar> doesn't seem to work.
    • I have copied the Common.js and Common.css settings and have allowed AJAX in my LocalSettings.php
    • With the ajaxprevnext parameter on, nothing happens at all when I press the < > arrows.
    • Without the ajaxprevnext parameter, the < > arrows do correctly link to the appropriate month within the Special:Events page.

Am going to try to upgrade to version 1.11 -- maybe this will help? Otherwise I'm at a loss .. --Jacki Buros 15:25, 5 October 2007 (UTC)

Same problem, I see a wonderful blank calendar. Any links to working installs? --Gmillerd 02:18, 29 December 2007 (UTC)

[edit] Problems getting extension to run

I followed all of your posted instructions and yet, for some reason, <calendar/> tags show up as plain text. Any advice on how I can fix this? 129.93.191.52 08:19, 13 October 2007 (UTC)

Same for me (running MW 1.9.3) 213.136.49.54 09:57, 1 November 2007 (UTC)
Found out what I did wrong. I added the common.css to the file under skins/common instead of editing the page MediaWiki:Common.css and pasting the code there, then it just took a while for the cache to reload the new stuff. 213.136.49.54 11:49, 1 November 2007 (UTC)

[edit] Any way to exclude date categories?

When using this extensions, people create a lot of new categories which are useless for purposes other than the Calendar itself. I'm talking about the dates. Is there a way to exlude showing such categories in, for example, the Special:Categories page? --150.254.36.110 11:44, 29 October 2007 (UTC)

I second this request. Would using a different namespace to store these pages be an option? --Hvdeynde

I also hate them! well MW 1.13 has a new feature: __HIDDENCAT__, but that would require to add that to every date category and save it. --Subfader 08:08, 25 July 2008 (UTC)

[edit] Special:Events page ignores < noinclude > etc

Is there a way to stop content on an event page from appearing on Special:Events?

I want to be able to write a lot about an event on a single page, but just show a summary on Special:Events. Is there any way of doing this? (includeonly and noinclude tags do not appear to be recognised).

EdJogg (at Wikipedia) -- 21:10, 10 January 2008 (UTC)

You can use this workaround: Replace
$parserOutput = $wgParser->parse( $wl, $title, $parserOptions );
in SpecialEvents.php with
if (strpos($wl,'==')) {
   $parserOutput = $wgParser->parse( substr($wl,0, strpos($wl,'==')) , $title, $parserOptions );
}
else {
   $parserOutput = $wgParser->parse( $wl, $title, $parserOptions );
}
This shows only the Text in an Article befor the first caption. --stu 62.104.154.69 16:42, 8 July 2008 (UTC)

[edit] Categories for Events lasting 2+ days

Hi
anyone knows if there is a possibility to add some code that I can define a sequence of dates?
My event i.e. holydays last from 2008/07/01 to 2008/08/15. Normally I have to add to this article 48 categories. But it would be easier if I could define a "range category" 20008/07/01-2008/08/15... Ben

[edit] Broken Category Links on Event Pages

On my event pages, when I add [[Category:Events]] and (e.g.) [[Category:2008/05/09]], the events are included on Special:Events correctly, but the category links on the event pages themselves are broken. That is, it shows a link to a Category:Events page, which does not exist (not Special:Events). Same for the date link.

Am I doing something wrong? I'm running MediaWiki 1.6.9 (stuck with PHP 4).

Thanks, Bob 21:43, 4 February 2008 (UTC)

That's because there is no article on Category:Events just a list of articles in the Events kategory.
You can write one or include one using {{:Events}} or any other article. But it cant be the Special:Events.
Ubernissen 20:29, 20 February 2008 (UTC)

[edit] Reoccurring Events

Just checking if there was any easy way to put in reoccurring events, like birthdays or holidays into the calendar. Thanks for the excellent extension.

Eric

I am having the following problem.


Warning: require_once(extensions/Calendar.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\mediawiki-1.11.0\LocalSettings.php on line 134

Fatal error: require_once() [function.require]: Failed opening required 'extensions/Calendar.php' (include_path='C:\xampp\htdocs\mediawiki-1.11.0;C:\xampp\htdocs\mediawiki-1.11.0/includes;C:\xampp\htdocs\mediawiki-1.11.0/languages;.;C:\xampp\php\pear\') in C:\xampp\htdocs\mediawiki-1.11.0\LocalSettings.php on line 134

I am really weak with this stuff.

Your MediaWiki failed to open the file Calendar.php and it expects the file to be located directly in the extensions directory. --Sayuri 12:11, 15 March 2008 (UTC)

Hi, just wanted to check if there is any solution for the birthday-questions? Cheers Christian

[edit] Group Events on the same Page

Hello!

Is ist possibly to have more than one Events on the same Page (like Birthdays)?

And one Question about the Date Format - how can I change it to DD/MM/YYYY?

Thanks in Advance! REC

[edit] Feature requests

Hi great extension. I would like to know if is possible to add an option to the same event appear on all next years without need to change the date? Something like add just the day and month dd/mm on category. The other request is option to show a small image next upcomming events. We could have something like: <calendarimage>test.jpg</calendarimage> on the event articles.

[edit] Another problems getting the extension running

There are three different problems showing up after I have done all steps as described:

  • The following warning is showing up:
Warning: Cannot modify header information - headers already sent by 
(output started at G:\xampp\htdocs\extensions\SpecialEvents.php:1) 
in G:\xampp\htdocs\includes\User.php on line 1947

And sometimes the Wiki isn't displayed anymore - only repetitions of this warning.

  • the font-size suddenly is too big and the layout is destroyed when both files are included in localsettings.php (using skin modern; I tried the same with monobook: same effect).
  • the left navigation bar is not displayed anymore

Thanks for assistance. Tanja - --Tanja.Koch 14:08, 7 July 2008 (UTC)

The problem may just be that you have spaces before the opening <?php tag in the SpecialEvents.php file. Make sure there is nothing before that tag. -- Barrylb 23:17, 29 July 2008 (UTC)

[edit] Past events

Past events of the same month show up in the calendar but not in the Events Upcoming section. Can't there be a css class for those to hide or differ them? --Subfader 22:21, 10 July 2008 (UTC)

Probably best to add an option so that the SQL query looks for all events in the month. At the moment the query looks for events after today's date:
clike1.cl_to >= '" . date('Y/m/d') . "' "
which could be changed to:
clike1.cl_to >= '" . date('Y/m') . "/1' "
-- Barrylb 23:15, 29 July 2008 (UTC)

[edit] css class for Event Today?

There are .cal-today and .cal-eventday but when the event is Today, it is not clear that it's today. It just looks like all other eventdays of the month. So it would be helpful if one could define a .eventtoday which would be more highlighting and indicating that the event is today. --Subfader 08:12, 25 July 2008 (UTC)

Also it would be good to give calendarupcomingTop an own if -today css class. so it's easy to spot what is going on today --Subfader 12:16, 29 July 2008 (UTC)

Ok, you could achieve the first request with the following code in Calendar.php:

if (($i == $this->today) && ($this->month == $todaysMonth) && ($this->year == $todaysYear) && isset($eventsByDay[$dayNr]))
  $cell_class .= ' cal-eventtoday';

You should add it immediately after this existing code:

if (isset($eventsByDay[$dayNr]))
  $cell_class .= ' cal-eventday';

Then add some css to MediaWiki:Common.css:

td.cal-eventtoday { 
}

For the upcoming events, replace this line:

$output .= '<tr><td class="' . $rowClass . '">' . $sk->makeKnownLinkObj($title, "&raquo; " . $title_text . '<br />' . $eventDate) . '</td></tr>';

with this:

$output .= '<tr><td class="' . $rowClass;
if ($row->catlike1 == date('Y/m/d'))
  $output .= ' calendarupcoming-today';
$output .= '">' . $sk->makeKnownLinkObj($title, "&raquo; " . $title_text . '<br />' . $eventDate) . '</td></tr>';

Then add .calendarupcoming-today to the css.

If this works, let me know and I can add it to the official version (or you could add it yourself). Barrylb 23:10, 29 July 2008 (UTC)

Thanks a lot bro! Works fine. I added the changes to: css, Calendar.php. Now it's perfect and everyone can highlight today as needed. --Subfader 07:07, 30 July 2008 (UTC)
Looks like the color setting of .calendarupcomingRow1 a and 2 a can't be overridden by the color setting of .calendarupcoming-today a. I set .calendarupcoming-today a to bold now to make a difference. --Subfader 07:20, 30 July 2008 (UTC)

[edit] The contents of php files

I've installed everything as you said, but the contents of the 2 php files is shown on my Main Page. What am I doing wrong? --Swessels 10:40, 26 July 2008 (UTC)

The only thing I can think is to check you have included the <?php tag at the top of each file ? Barrylb 22:24, 29 July 2008 (UTC)
Thanks, yes, it was not in the php files. I've changed that. And when I add the code to Localsettings.php...I just get a blank screen on my website when I go to the default page (http://www.agriwiki.co.za/index.php?title=Main_Page). Do you have an idea what may the reason for this? Also, the css file, is that just a normal wiki-page? (http://www.agriwiki.co.za/index.php?title=MediaWiki:Common.css) Thanks in advance! --Swessels 09:06, 30 July 2008 (UTC)
Blank page after addding require... to local settings mostly has 2 main reasons. either the path to is wrong or you placed at a bad position of the file (try above all other extension includes). do you added both requires?
require_once("extensions/Calendar.php");
require_once("extensions/SpecialEvents.php");
--Subfader 10:31, 30 July 2008 (UTC)
Yes, I've added both. I also placed it at the top for declaring extentions...but it still shows a blank page when I activate it...any further ideas? Thanks. --Swessels 17:22, 3 August 2008 (UTC)
Got it to work, dont know what I did, but I copied another require_once line and just edited its contents, and now it works. Thanks for all the help!--Swessels 18:01, 3 August 2008 (UTC)

[edit] Best way of adding events?

What's the best way for adding events? I don't necessarily want to have to make links to them on a page, they will only be linked to from the calendar itself and maybe the current events page -- so how do I go about creating a new event? Are the calendar dates supposed to be clickable even when you have no events? That would make sense to me, but it's not doing that.

Also, I'm not sure if I'm doing something wrong, or not understanding how it's supposed to work, but my links don't seem to be going to the right place, and I am using the standard naming, without the php?title= stuff.

Thanks, DG

What my users do wrong is they don't create the date cat, e.g. [[Category:2008/08/13]]. You could use Extension:CreateArticle. --Subfader 18:25, 3 August 2008 (UTC)

[edit] Upcoming events order for same day

Upcoming events from the same day are sorted by artcle page creation date not by article page title :(
I use titles like "2008-08-20 (01:30-02:30) Some event". It shoudl order properly in the time schedule of the upcoming events section as on categories etc. --Subfader 18:47, 20 August 2008 (UTC)

This shouldn't be hard to implent? Just sort by page name (for each day) instead of creation date.

[edit] Easy way to add calendar to sidebar in 1.13?

Now that we can edit MediaWiki:Sidebar, is there an easier way to get the calendar into the sidebar that doesn't involve hacking up themes or php? it doesn't look like MW:Sidebar is parsed like normal wiki code and adding <calendar/> to it certainly does nothing. any ideas? or do we still have to hack up some ugly php?

[edit] Fixed Validation Errors

This extension was causing my site to fail validation under the XHTML 1.0 Transitional DTD. I traced the problem to Calendar.php (I'm not using SpecialEvents.php). The fix appears to be easy enough, I just added some new line characters to the output of the calendar. It's now easier to read the output of the script and it validates too.

       /**
       * Show calendar
       **/
      $output = '';
      $output .= "\n\n" . '<table align="center" border="0" cellpadding="0" cellspacing="0" class="calendar">' . "\n";
      for($i=0;$i<7;$i++)
        if (((($i + $this->wday_start) % 7) == 6) || ((($i + $this->wday_start) % 7) == 0))
          $output .= '<col class="cal-weekend"/>';
        else
          $output .= '<col/>';
 
      $output .= "\n";
 
      if (!$this->bShowUpcoming)
        $showupcoming_href = '&upcoming=off';
      else
        $showupcoming_href= '';
      if ($this->catname != 'Events')
        $catname_href = '&category=' . $this->catname;
      else
        $catname_href = '';
      $output .= '<tr class="calendarTop"><td><a href="'. str_replace('$1', "Special:Events?year=".$lastyear."&month=".$lastmonth.$catname_href, $wgArticlePath) . '"';
      if ($this->bAjaxPrevNext)
        $output .= ' onclick="makeRequest(\'' . str_replace('$1', "Special:Events?year=".$lastyear."&month=".$lastmonth.$showupcoming_href.$catname_href, $wgArticlePath) . '&ajax\'); return false;"';
      $output .= ">&lt;</a></td>\n";
      $output .= '<td colspan="5" class="cal-header"><center>'.
        '<a href="'. str_replace('$1', "Special:Events?year=".$this->year."&month=".$this->month.$catname_href, $wgArticlePath) .'">' . $this->wmonth_names[$this->pmonth] . ' ' .$this->year .'</a></center></td>' . "\n";
      $output .= '<td><a href="'.
        str_replace('$1', "Special:Events?year=".$nextyear."&month=".$nextmonth.$catname_href, $wgArticlePath) .'"';
      if ($this->bAjaxPrevNext)
        $output .= ' onclick="makeRequest(\'' . str_replace('$1', "Special:Events?year=".$nextyear."&month=".$nextmonth.$showupcoming_href.$catname_href, $wgArticlePath) . '&ajax\'); return false;"';
      $output .= ">&gt;</a></td></tr>\n";
      $output .= '<tr class="calendarDayNames">';
      for($i=0;$i<7;$i++)
        $output .= '<td>'. $this->wday_names[($i + $this->wday_start) % 7]. '</td>';
      $output .= "</tr>\n";
 
      $wday = date("w",mktime(0,0,0,$this->month,1,$this->year)); // get day of week  0-6 of first day of month (0 = Sunday thru 6=Saturday)
      $wday = $wday - $this->wday_start;
      if ($wday < 0)
        $wday = 7 + $wday;
 
      $no_days = date("t",mktime(0,0,0,$this->month,1,$this->year)); // number of days in month
      $count = 1;
      $output .= '<tr>';
      for($i=1;$i<=$wday;$i++) {
        $output .= '<td> </td>';
        $count++;
      }
      /**
       * every day is a link to that day
       **/
      $todaysMonth = date("m");
      $todaysYear = date('Y');
      for($i=1;$i<=$no_days;$i++) {
        if ($count == 1)
          $output .= '<tr>';
 
        $dayNr = ($i<10?"0".$i:$i);
        $alinkedit = str_replace('$1', "Special:Events?year=".$this->year."&month=".$this->month."&day=".$dayNr.$catname_href, $wgArticlePath);
 
        if (isset($eventsByDay[$dayNr]))
          $full_link = '<a title="' . str_replace('_',' ',$eventsByDay[$dayNr]) . '" href="'.$alinkedit.'">' . $i . '</a>';
        else
          $full_link = $i;
 
        $cell_class = '';
        if (($i == $this->today) && ($this->month == $todaysMonth) && ($this->year == $todaysYear))
          $cell_class .= ' cal-today';
        if (isset($eventsByDay[$dayNr]))
          $cell_class .= ' cal-eventday';
        if (($i == $this->today) && ($this->month == $todaysMonth) && ($this->year == $todaysYear) && isset($eventsByDay[$dayNr]))
          $cell_class .= ' cal-eventtoday';
        if ($cell_class != '')
          $cell_class = ' class="' . $cell_class . '"';
 
        $output .= '<td ' . $cell_class . '>' . $full_link . '</td>';
 
        if ($count > 6) {
          $output .= '</tr>' . "\n";
          $count = 1;
        }
        else
          $count++;
      }
      if ($count > 1) {
        for($i=$count;$i<=7;$i++)
          $output .= "<td> </td>";
        $output .= '</tr>' . "\n";
      }
      $output .= '</table>';
    } // end if show calendar

[edit] Past events in upcoming events

Hello, When I display upcoming events, the events of previous month are displayed as well... I did some modifications to have categories like DD/MM/YYYY. Maybe it comes from here...

In Calendar.php :

"AS clike1 ON page_id = clike1.cl_from AND clike1.cl_to LIKE '__/__/____' AND clike1.cl_to >= '" . date('d/m/Y') . "' " .

Any idea would be welcome, Thanks, --Marineam 16:57, 01 September 2008 (UTC)

I solved the problem with :

"AS clike1 ON page_id = clike1.cl_from AND clike1.cl_to LIKE '__/__/____' AND STR_TO_DATE(clike1.cl_to, '%d/%m/%Y') >= CURDATE() " . It works properly :-)

[edit] Category Date.

Is there any way to change the category date to work when entered as a standard dd/mm/yyyy instead of yyyy/mm/dd? Some members of my wiki cannot grasp the concept of entering a reverse date format no matter how many times they are told.

Read thze page. been answered before.--Subfader 12:16, 8 November 2008 (UTC)

[edit] events not showing on calendar

i added the "[[Category:Events]] [[Category:2008/10/20]]" but when i click on the link in the calendar it comes up with an invalid special page anyone know how i can fix it.

[edit] Calendar does not load Stylesheet.

Im just in the beginning of impementing Extensions to our MediaWiki. I tried Calendar an all works fine, but the calendar just contains the month und days in numbers without any stylesheet loaded. Any one have a clue ?

[edit] I am afraid I may be retarded

I am having real difficulties using this app. I add a calendar with <calendar/>, and then the events as:
[[Category:Events]]
[[Category:2008/10/20]] But where do I put the actual text for the event? I have tried in the Category:date one, I tried as a separate page. I am getting frustrated and hope that I am not that dumb.

Thanks!

That's October browse to October on Special:Events or use a November date and check Special:Events or add <calendar/> (or the ajax version) on a page like Main Page. --Subfader 18:23, 7 November 2008 (UTC)

I have the same problem, i don't know how to add information about an event. I can't edit the Special:Events page.

[edit] Calendar not updating

My calendar pages initialy show the current month, but clicking on the > by the month does not update the calendar itself. (The upcoming section does change to the correct display). AJAX is working well for other extension (CategoryTree). Problem is same for IE and Firefox. --- Kenn Atkinson

Did you correctly add the code on the page?
<div id="p-calendar">
<calendar>ajaxprevnext=on</calendar>
</div>
--Subfader 09:36, 12 November 2008 (UTC)
Sorry if this is a hi-jack of your issue, Kenn, but from what I've read, I'm having a similar issue. It seems the only ways to get the calendar to update is by switching months with '<' or '>' or by resaving whichever articles that use the
tags. Even with caching disabled on my user account and holding ctrl+refresh, calendars embedded in articles don't update when a new event is created without editing and resaving the original article afterward. Is this how it's supposed to function, or did I miss a configuration step?
149.32.192.33 14:09, 26 November 2008 (UTC) --Trevor

[edit] Do not show calendar in sidebar unless user is logged in

I am developing a corporate wiki which only allows access to users created by the breaucrat and logged in. I have successfully added the calendar to the side bar, however, it is always shown.

Is there a way to only display the calendar in the side bar for users who are logged in? Any help would be appreciated.

I found my own solution. I edited MonoBook.php to include the check
if ($this->data['loggedin']==1)
before outputting the search, toobox & languages portlets.

[edit] Let day end 6am instead of midnight

Is it possible to trick the calendar so it thinks the day ends at 6am instead of midnight? So e.g. if you enter an event for tomorrow 4am so it is still listed as today in upcoming events? I know I could just add 4am events in the according "today" category, but that would produce a false order (I changed it to sort by article name instead of article creation date). --Subfader 20:09, 30 January 2009 (UTC)

It's beyond my php programming abilities but I think you need to modify the date/time before the event is posted to subtract 6 hours from the actual time. You might also need to increase the date/time by 6 hours when displaying the event

[edit] Saving the Events in a dbTable

Is there a way to save the Events in a dbTable? Because the dates are screwing up my categoriesite and I would love to keep useing this extension. AndiRay 11:36, 24 April 2009 (UTC)

[edit] Upcoming events

Is it possible to increase the amount of showed upcoming events (>5) ?

Or decrease it for that matter (<5)? 85.101.107.42 21:06, 14 September 2009 (UTC)