[Solved] Intergration of Calendar and FEU

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
sjmann
Forum Members
Forum Members
Posts: 13
Joined: Mon Apr 21, 2008 10:21 pm
Location: London, UK

[Solved] Intergration of Calendar and FEU

Post 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}
Last edited by sjmann on Mon May 26, 2008 1:03 am, edited 1 time in total.
vilkis

Re: Intergration of Calendar and FEU

Post 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}>
................

User avatar
sjmann
Forum Members
Forum Members
Posts: 13
Joined: Mon Apr 21, 2008 10:21 pm
Location: London, UK

Re: Intergration of Calendar and FEU

Post 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}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Intergration of Calendar and FEU

Post by Dr.CSS »

[solved] ?...
Post Reply

Return to “Modules/Add-Ons”