Page 1 of 1

[Solved] Intergration of Calendar and FEU

Posted: Sat May 24, 2008 3:04 pm
by sjmann
I was wondering whether it is possible to integrate the Calendar and FrontEndUser modules to display only the events which pertain to the user they are intended for. I require the calendar to take a custom value (name) and compare it to a value in ccuser (Name).

I know that this isn't actual code, but hopefully it gets my Machiavellian plan across.

I think the main problem is that it seems not to recognise the $ccuser() function. Any ideas?

i.e.

Code: Select all

<td {if isset($day.class) }class="{$day.class}"{/if}>
{if isset($day.events.0) [color=red]&& $ccuser->property('Name') == event.fields.name}[/color]<a href="{$day.url}">{$key}</a>
{if $summaries == true}
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
{/if}
{else}{$key}{/if}
</td>
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}

Re: Intergration of Calendar and FEU

Posted: Sun May 25, 2008 10:24 am
by vilkis
Did you set property 'Name' for FEU user?
It it is a case then place the following code at the top of your code

Code: Select all

{if $ccuser->loggedin()}{/if}
i.e.

Code: Select all

{if $ccuser->loggedin()}{/if}
<td {if isset($day.class) }class="{$day.class}"{/if}>
................


Re: Intergration of Calendar and FEU

Posted: Sun May 25, 2008 1:14 pm
by sjmann
Cheers for the help vilkis. I've played around a bit using the code you gave me, and come out with this, which works quite well, by editing the calendar template.

Code: Select all

{foreach from=$day.events item=event}
{if $event.fields.name == $ccuser->property('name')}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/if}

Re: Intergration of Calendar and FEU

Posted: Sun May 25, 2008 7:39 pm
by Dr.CSS
[solved] ?...