Page 1 of 3
Calendar 0.6
Posted: Fri Mar 25, 2005 10:32 pm
by Akrabat
Download [iurl=
http://wiki.cmsmadesimple.org/tiki-down ... p?attId=39]Calendar-0.6.zip[/iurl]. (0.9rc4 or higher)
Changes:
* Fix event display so that if the end date is not set, we don't display "to".
* Filter by category when displaying an upcominglist.
* Fix End date setting that was off by one.
* Fix odd behaviour of year when transitioning from Jan to Dec or Dec to Jan in the calendar view.
* Support mutli-day events in the calendar view.
As always, post any comments/suggestions/bugs here!
Re: Calendar 0.6
Posted: Sat Mar 26, 2005 1:05 am
by Greg
Single day events with the time entered show up in every day of the month on the calendar. If no time is entered and the start and end date are the same it works, the event shows on the one day as it should.
An event with a start date and end date (with or without time defined) shows up from the begining of the month to the event end date.
Re: Calendar 0.6
Posted: Sat Mar 26, 2005 8:22 am
by Akrabat
Greg wrote:
Single day events with the time entered show up in every day of the month on the calendar. If no time is entered and the start and end date are the same it works, the event shows on the one day as it should.
An event with a start date and end date (with or without time defined) shows up from the begining of the month to the event end date.
aargh! I'm going to have to get better testing procedures! *grin*
Re: Calendar 0.6
Posted: Sat Mar 26, 2005 8:36 pm
by Akrabat
Greg wrote:
Single day events with the time entered show up in every day of the month on the calendar. If no time is entered and the start and end date are the same it works, the event shows on the one day as it should.
I can't reproduce this one. Can you tell me the exact start and end date/times of an event that shows this bug?
Greg wrote:
An event with a start date and end date (with or without time defined) shows up from the begining of the month to the event end date.
Fixed in SVN I think. Hopefully I haven't broken something else at the same time...
Re: Calendar 0.6
Posted: Sun Mar 27, 2005 12:56 am
by Greg
If I insert an event with the following dates I get the event in the calendar from the 29th (start date) to the end of the month, If I select 2 categories it shows up twice in each day from the 29th (start date) to the end of the month.
Start -- 29 Mar 2005 17 00
End -- 29 Mar 2005 19 00
Re: Calendar 0.6
Posted: Sun Mar 27, 2005 9:03 pm
by Akrabat
Greg wrote:
If I insert an event with the following dates I get the event in the calendar from the 29th (start date) to the end of the month, If I select 2 categories it shows up twice in each day from the 29th (start date) to the end of the month.
Start -- 29 Mar 2005 17 00
End -- 29 Mar 2005 19 00
Fixed in SVN I think.
Re: Calendar 0.6
Posted: Sun Mar 27, 2005 9:44 pm
by Greg
Looks like you squished them all Akrabat .... Thanks.
Re: Calendar 0.6
Posted: Mon Mar 28, 2005 11:33 am
by Mordran
Yes thanks
I have found two small things, which are wrong.
Re: Calendar 0.6
Posted: Mon Mar 28, 2005 12:46 pm
by Greg
Now we just need a 'Today' button on the calendar display to take the calendar back to the current day ....
Re: Calendar 0.6
Posted: Mon Mar 28, 2005 6:27 pm
by Akrabat
Mordran wrote:
- In the german translation "to" should not be "zu". instead "bis" would be right --> $calendar_language_strings['to'] = 'bis';
Fixed in SVN
Are you using the latest SVN version? All "to"s have been changed.
Re: Calendar 0.6
Posted: Mon Mar 28, 2005 6:29 pm
by Akrabat
Greg wrote:
Now we just need a 'Today' button on the calendar display to take the calendar back to the current day ....
*grin* Not sure I'm going to do this before we get smarty templating for modules. Will think about it though.
Re: Calendar 0.6
Posted: Mon Mar 28, 2005 7:26 pm
by Mordran
Akrabat wrote:
Are you using the latest SVN version? All "to"s have been changed.
oops sorry my fault

Re: Calendar 0.6
Posted: Tue Mar 29, 2005 8:56 am
by petert
Akrabat wrote:
*grin* Not sure I'm going to do this before we get smarty templating for modules. Will think about it though.
What you mean by that?
Templating already works for me:
module Wrakken:
Code: Select all
$db = $this->cms->db;
$rs = $db->Execute($query);
if ($rs) {
while (!$rs->EOF) {
if (strlen($rs->fields['naam']) > 0) {
$name = str_replace("'","''",$rs->fields['naam']);
$listOut[] = array('name'=>stripslashes($name),'id'=>$rs->fields['id'],'description'=>stripslashes($rs->fields['bijzonderheden']));
}
$rs->MoveNext();
}//while
}
$gCms->smarty->assign('list', $listOut);
and then in the contentmanager I have:
Code: Select all
{cms_module module="Wrakken"}
<table>
{section name=mysec loop=$list}
{strip}
<tr bgcolor="{cycle values="#eeeeee,#dddddd"}">
<td valign="top"><a href="/wrak/{$list[mysec].id}/{$list[mysec].name}" sticky="false" caption="$list[mysec].name" text="{$list[mysec].name}">{$list[mysec].name}</a></td>
<td>{$list[mysec].description}<p /></td>
</tr>
{/strip}
{/section}
</table>
I even use templating for the backend:
Code: Select all
echo '<div class="adminform">';
echo $this->CreateFormStart($id, 'action');
echo $this->CreateInputSubmit($id, 'action', _NEW_TRIP_PRE);
echo $this->CreateInputSubmit($id, 'action', _NEW_WRAK_PRE);
/* echo $this->CreateLink($id, "viewoldlinks", (isset($this->cms->variables["page"]))?$this->cms->variables["page"]:'',
"View popular", array('sort_order'=>'popular'));
*/
$this->smarty->assign('trips', $currentTrip);
$this->smarty->display($this->templateDir.'trips.tpl');
echo $this->CreateFormEnd();
echo '</div>';
Re: Calendar 0.6
Posted: Tue Mar 29, 2005 11:02 am
by Akrabat
I'm pretty sure that your code only works with one instance of the module on a given page. You should use the module id to prefix the smarty variable. The problem is that you don't know which module id the system has given your particular instance when you are in the content editor.
As I understand it, the idea is that only {cms_module module=xxx} is in the content and separate template editing would be used to edit the module's smarty code. At a guess, initially, it would be via files. Then the next issue is assigning different smarty templates to different instances of the module in the same content page...
I know that wishy has started addressing these issues for 0.10, so will wait til it's fleshed out properly before doing templates in Calendar.
Re: Calendar 0.6
Posted: Tue Mar 29, 2005 11:19 am
by Ted
Well, templates in the module API have a name as well as a link to what module they belong to. In theory, you COULD set which template to use in the cms_module tag like: {cms_module module='calendar' template='blah1'}, but that would sure make for a very complicated admin to add/edit/delete templates.
Maybe something more global for editing templates would be better? Thoughts?