how to pull the current date events
how to pull the current date events
So I have a calendar that I am trying to pull today's event. I can pull both yesterdays and tomorrows by changing the parameters of:
{cms_module module="Calendar" display="upcominglist" limit="1" category="Drink Specials" detail="1" first_day_of_week="0"}
but does anyone know for display a parameter to show the current day events both upcominglist and just list either shows the next day event. I am trying to pull the current event
{cms_module module="Calendar" display="upcominglist" limit="1" category="Drink Specials" detail="1" first_day_of_week="0"}
but does anyone know for display a parameter to show the current day events both upcominglist and just list either shows the next day event. I am trying to pull the current event
Re: how to pull the current date events
Come really no one has answered my post, I am really thinking about moving to Drupal
Re: how to pull the current date events
I thought long and hard for a well-placed sarcastic remark to your threat of leaving us and inflicting Drupal with your demands, but came up with nothing.
'Calendar' hasn't been supported for a while. CGCalendar is the current best choice for calendaring in CMSMS. However, this doesn't have this feature as well. Luckily CMSMS makes use of Smarty and PHP, and it should be semi-easy to write an upcoming list template that loops through the upcoming list and filters out ones that don't match today's date.
'Calendar' hasn't been supported for a while. CGCalendar is the current best choice for calendaring in CMSMS. However, this doesn't have this feature as well. Luckily CMSMS makes use of Smarty and PHP, and it should be semi-easy to write an upcoming list template that loops through the upcoming list and filters out ones that don't match today's date.
Re: how to pull the current date events
Well you can always create another upcominglist template and use $smarty.now.
Hope you get the idea.
Edit: oh we are talking about Calendar, but basically should be same thing, just check if events date equals todays date.
CMSMS uses Smarty so first stop to learn, read find a solution when you are stuck is Smarty documentation http://www.smarty.net/docsv2/en/
Code: Select all
.... the template ...then comes foreach fro events
{foreach from=$events key=key item=event}
{if $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' == $event.event_date_start|date_format:'%Y-%m-%d %H:%M:%S'}
...the rest of template in the foreach ...
{/if}
{/foreach}
... and the rest of template...
Edit: oh we are talking about Calendar, but basically should be same thing, just check if events date equals todays date.
CMSMS uses Smarty so first stop to learn, read find a solution when you are stuck is Smarty documentation http://www.smarty.net/docsv2/en/
Re: how to pull the current date events
Thanks for the reply, do you have another other code examples that have the full code in it, I can still use help
Re: how to pull the current date events
You might want to leave off the ' %H:%M:%S' from his example... This will cause the template to only show you calendar items that match this exact second. 

Re: how to pull the current date events
Ok so I completely removed the old Calendar module and installed the CGCalendar module. I see its similar to the old but when I load my calendar I get this error above my calendar:
Warning: Parameter table_id is not known by module CGCalendar dropped in /home/content/j/e/t/jetshouse/html/lib/misc.functions.php on line 1590
Do you know how to fix this?
Warning: Parameter table_id is not known by module CGCalendar dropped in /home/content/j/e/t/jetshouse/html/lib/misc.functions.php on line 1590
Do you know how to fix this?
Re: how to pull the current date events
They are not compatible. You could probably use the same or similar technique on the old calendar module.
Re: how to pull the current date events
so what does that mean, the most recent version of CMSMS (1.10.1) does not support the most recent CGCalendar module?
Re: how to pull the current date events
I meant that Calendar and CGCalendar aren't compatible.. Did you save an XML of the Calendar and try to load it in CGCalendar? Did it work? (aside from the error)
Re: how to pull the current date events
Are you passing a table_id parameter? The error message usually means that your specifiying a parameter that doesn't exist.
Re: how to pull the current date events
where do i put this table id, in the server side file or in the CMSMS editor with the {cms_module module="CGCalendar" table_id="big" display="calendar" category="Events" first_day_of_week="0"} code
Re: how to pull the current date events
I see.. look at the help for the module.. I don't believe there's a table_id option for CGCalendar.
Re: how to pull the current date events
So your saying I need to add this on the files on the server?