Forums / Developer / Multicalendar question

Multicalendar question

Author Message

Vicente Olivan

Friday 14 December 2007 6:39:06 am

How can I show all events in a single table?

Thanks

André R.

Saturday 15 December 2007 5:16:44 am

Could you be a bit more specific ?

Are you using the multi calendar in ezwebin, added relations to the calendars you want it to fetch events from and now you want to display all (new and old) events on one page ???

Have you tried customizing the template used?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Vicente Olivan

Saturday 15 December 2007 6:17:20 am

I related events calendar to multicalendar, by default, displays each calendar on a table.
I´m trying show all events calendar in a single table, and can display events by category (tags), node, start date and end date.
My problem is how to develop drop-down boxes to do this.
Any suggestions to get started?
Thanks a lot

Vicente Olivan

Monday 21 January 2008 2:04:26 am

I´m trying customize multicalendar template, but not shows items

       {foreach $node.data_map.calendars.content.relation_list as $relation}

            {def $related_node = fetch( 'content', 'node', hash( 'node_id', $relation.node_id ) )
                 $related_node_children = fetch( 'content', 'list', hash( 'parent_node_id', $related_node.node_id,
                                                                           'limit', '5',
                                                                           'class_filter_type', 'include',
                                                                           'class_filter_array', array( 'event' ),
                                                                           'sort_by', array( 'attribute', true(), 'event/from_time' ) ) )}

How can I change foreach control structure for elements to be displayed in a single table?

Thanks a lot

André R.

Tuesday 22 January 2008 12:23:00 am

Skip the first fetch and append the node_id's to a array, and move the second fetch after the foreach and fetch with the array with node id's as 'parent_node_id'.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Vicente Olivan

Tuesday 22 January 2008 4:03:26 am

Hi André

<b>Original code</b>

{foreach $node.data_map.calendars.content.relation_list as $relation}
 {def $related_node = fetch( 'content', 'node', hash( 'node_id', $relation.node_id ) )
        $related_node_children = fetch( 'content', 'list', hash( 'parent_node_id', $related_node.node_id,
                                                                           'limit', '5',
                                                                           'class_filter_type', 'include',
                                                                          'class_filter_array', array( 'event' ),
                                                                           'sort_by', array( 'attribute', true(), 'event/from_time' ) ) )}
            <h2><a href="{$related_node.url_alias|ezurl(no)}">{$related_node.name}</a></h2>
            <table class="list" border="0" cellspacing="0" cellpadding="0">
            <tr>
            ...
            </tr>
            {foreach $related_node_children as $child sequence array( 'bglight', 'bgdark' ) as $style}
            <tr class="{$style}">
            ...
            </tr>
            {/foreach}
            </table>
            {undef}
       {/foreach}

<b>Customized test code</b>

      {def $show_calendars_events=fetch( 'content', 'list',
        hash( 'parent_node_id', array( '174', '175', '176' ),
              'class_filter_type',  'include',
              'class_filter_array', array( 'folder', 'event', ),
		'sort_by', array( 'attribute', true(), 'event/from_time' ) ) )}
 

            <table class="list" border="0" cellspacing="0" cellpadding="0">
               ....
            {foreach $show_calendars_events as $child sequence array( 'bglight', 'bgdark' ) as $style}
               ....
            {/foreach}
            </table>

	{undef $show_calendars_events}

It´s works, but when somebody related others calenars not show (it´s normal)
Can you help me?

Thank you

Maximilien LELEU

Friday 28 November 2008 1:52:51 am

Hi,

Just like you, I was looking for a solution to display the events of the different calendars I created in one single calendar using "multicalendar" but I don't find any solution.

Did you manage to resolve your problem and could you give me the code you used please..?

Thanks a lot

Vicente Olivan

Friday 28 November 2008 4:50:45 am

Hi Max,

		{def $show_events_calendars=fetch( 'content', 'list', hash( 'parent_node_id', array( 'yournode1', 'yournode2', 'yournode3' ),
                           'limit', '10',
              		'class_filter_type',  'include',
             		 	'class_filter_array', array( 'folder', 'event' ),
				'sort_by', array( 'attribute', true(), 'event/from_time' )
				 ) )}
 
            		<table class="list" border="0" cellspacing="0" cellpadding="0" summary="multicalendar">
            		<tr>
                <th>{'Event'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
                <th>{'Start date'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
                <th>{'Category'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
                <th>{'Place'|i18n( 'design/ezwebin/full/multicalendar' )}</th>
            		</tr>
            		{foreach $show_events_calendars as $child sequence array( 'bglight', 'bgdark' ) as $style}
            		<tr class="{$style}">
                <td><a href="{$child.url_alias|ezurl(no)}">{$child.name|wash()}</a></td>
                <td>{attribute_view_gui attribute=$child.data_map.from_time}</td>
                <td>{attribute_view_gui attribute=$child.data_map.category}</td>
                <td>{attribute_view_gui attribute=$child.data_map.place}</td>
            		</tr>
            		{/foreach}
            		</table>

		{undef $show_events_calendars}

Grettings

eZ debug

Timing: Jan 18 2025 15:09:31
Script start
Timing: Jan 18 2025 15:09:31
Module start 'content'
Timing: Jan 18 2025 15:09:32
Module end 'content'
Timing: Jan 18 2025 15:09:32
Script end

Main resources:

Total runtime1.3445 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 588.8203180.8438
Module start 'content' 0.00741.2174 769.6641656.2969
Module end 'content' 1.22490.1195 1,425.9609345.0859
Script end 1.3444  1,771.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2930210.0002
Check MTime0.00150.1110210.0001
Mysql Total
Database connection0.00120.088810.0012
Mysqli_queries1.259993.71102110.0060
Looping result0.00210.15342090.0000
Template Total1.305797.120.6528
Template load0.00190.144520.0010
Template processing1.303796.969620.6519
Template load and register function0.00010.006310.0001
states
state_id_array0.00100.073510.0010
state_identifier_array0.00110.078820.0005
Override
Cache load0.00170.1299470.0000
Sytem overhead
Fetch class attribute can translate value0.00130.099140.0003
Fetch class attribute name0.00140.1019100.0001
XML
Image XML parsing0.00120.091240.0003
class_abstraction
Instantiating content class attribute0.00000.0023150.0000
General
dbfile0.00290.2178340.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 35
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs