agenda

Author Message

Rinze Cats

Monday 03 May 2004 6:52:12 am

hi, I am trying to implement the agenda V1.0 http://www.ez.no/community/contributions/applications/agenda_v1_0

I am having some trouble getting is to work. it is illustrated by the follwing fetch

{let children=fetch( 'content', 'list_count', hash(
			'parent_node_id', 47,
	 		'attribute_filter', array('agenda/date_from', '<=', $selectedday ) ) )}

I want to fetch all instances of the agenda class that have the date_from attribute smaller than the selected date. This date is build using:

selectedday=cond( and(ne($view_parameters.month, ''), ne($view_parameters.day, ''), ne($view_parameters.year, '')), makedate($view_parameters.month, $view_parameters.day, $view_parameters.year), currentdate() )

the page is called using: content/view/full/47/month/5/year/2004/day/3

when i print the data_int from the date_from attribute field of my agenda items, the timestamp looks identical to selectedday, but the fetch count is always 0.

Can anybody tell me what is going on. The standard code from agenda V1.0 gives me the same problem, the count is always 0 and therefore the calender never show any links!.

thanx for any pointers you can give me!

Rinze Cats

Tuesday 04 May 2004 6:16:48 am

this is driving me crazy! Please help!
what can be the reason that this code isn't working?

{let my_ts=makedate( $month, $number, $year )
		events=fetch( 'content', 'list_count', hash(
			'parent_node_id', 47,
	 		'attribute_filter', array('agendaitem/date_from', '<=', $my_ts 
) ) ) }

agendaitem is then identifier of my class and date_from is a datefield. $events is always zero!

kind regards, rinze

Stefano Guandalini

Sunday 06 June 2004 8:18:57 am

I'm using this piece of code that is actually working:

{let    temp_ts=makedate( $view_parameters.month, $view_parameters.day, $view_parameters.year )
        events=fetch( 'content', 'list', hash( 'parent_node_id', 247,
                                'attribute_filter',
                                array( 'and',
                                        array( 'event/date_from', '<=', $temp_ts ),
                                        array( 'event/date_to', '>=', $temp_ts )
) ) ) }

Maybe try to put $view_parameters. in front oh month, day and year.

Bye.

guandalf

Stefano Guandalini
http://www.nizan.net

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 15:53:44
Script start
Timing: Jan 18 2025 15:53:44
Module start 'layout'
Timing: Jan 18 2025 15:53:44
Module start 'content'
Timing: Jan 18 2025 15:53:45
Module end 'content'
Timing: Jan 18 2025 15:53:45
Script end

Main resources:

Total runtime0.7010 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.2109152.6094
Module start 'layout' 0.00460.0036 741.820339.3828
Module start 'content' 0.00820.6914 781.2031538.4375
Module end 'content' 0.69950.0014 1,319.640612.2188
Script end 0.7010  1,331.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4840160.0002
Check MTime0.00130.1917160.0001
Mysql Total
Database connection0.00050.072010.0005
Mysqli_queries0.644291.8887570.0113
Looping result0.00070.1003550.0000
Template Total0.667695.220.3338
Template load0.00210.295720.0010
Template processing0.665694.939920.3328
Template load and register function0.00030.038710.0003
states
state_id_array0.00130.184210.0013
state_identifier_array0.00080.118120.0004
Override
Cache load0.00180.2522250.0001
Sytem overhead
Fetch class attribute can translate value0.00090.126720.0004
Fetch class attribute name0.00140.201940.0004
XML
Image XML parsing0.00240.347020.0012
class_abstraction
Instantiating content class attribute0.00000.001440.0000
General
dbfile0.00610.8669160.0004
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs