solved How do I restrict/sort Calendar Events from different profile Calendar?

Xephius
Xephius
@xephius
7 years ago
93 posts
I have created two profiles, each in a unique Quota, and each has an Event Calendar. When I create a Calendar Widget, I don't have any way to sort what events are viewable to the user. Currently all events from all Event Calendars are displayed in a Event Calendar Widget. How can I control what events are displayed in the Event Calendar Widget?

Example-
Profile-A/Quota-A/Calendar-A
Profile-B/Quota-B/Calendar-B

Desired Calendar Variations
Users in X Quota can see A & B Events
Users in Y Quota can see only A Events
Users in Z Quota can see only B Events
updated by @xephius: 06/16/17 08:47:42AM
michael
@michael
7 years ago
7,714 posts
The {jrEvent_calendar} template function takes search="" as a parameter.

Try
{jrEvent_calendar search="profile_quota_id = 1"}
and change the id to the quota you're interested in.
Xephius
Xephius
@xephius
7 years ago
93 posts
Thanks Michael,

I believe I understand how to use the function call you outlined above if I were to use the 'Item List' Widget, but when I select the 'Event Calendar' Widget, I don't see any fields to add the code (Only Widget Title and Calendar Size). Am I looking in the wrong place?

Clear skies,
John
updated by @xephius: 03/11/17 04:13:03PM
michael
@michael
7 years ago
7,714 posts
yes.

Use the Template Code widget. :)
Xephius
Xephius
@xephius
7 years ago
93 posts
Found it!

Now I understand. I created a new Template Code Widget, but got an unexpected result. How would I ask it to display a 'small' calendar like the 'Calendar Widget' creates? Attached is a screen grab of the results using the code above.

Clear skies,
John
michael
@michael
7 years ago
7,714 posts
Docs: "Event Calendar : For Developers"
https://www.jamroom.net/the-jamroom-network/documentation/modules/276/event-calendar#for-developers
Quote:
For a small calendar there is a template included with the calendar module
{jrEvent_calendar month="3" year="2016" template="small_calendar.tpl" tpl_dir="jrEvent"}
so in your case, try
{jrEvent_calendar search="profile_quota_id = 1"  template="small_calendar.tpl" tpl_dir="jrEvent"}
Xephius
Xephius
@xephius
7 years ago
93 posts
Ah, thanks for the docs link. They are not working under the 'help' Tab in the Module dashboard. It says something about needing a correct email. Image attached....

After looking over the docs, I did some digging and found some other templates that looked more like what I wanted. Also, I couldn't get the correct events to pull up until I modified the first search perimeter to be profile_id instead of profile_qouta_id. Here is what I currently have working... I think its correct, but I would appreciate your feedback. :)

{jrEvent_calendar search="profile_id = 1"  template="widget_calendar_small.tpl" tpl_dir="jrEvent"}
michael
@michael
7 years ago
7,714 posts
profile_id will only be one specific profile, not any profile in a specific quota. if thats what you're after sure.

The email message is saying you've not put your jamroom.net email account into the support module, so it cant look up jamroom.net to see what level of support you have to return the links to the locations you have access to, like the docs, the forums, vip support etc.