New postings as extension?

Author Message

Eivind Marienborg

Friday 15 April 2005 5:24:23 am

I'm running an older version of eZ Publish (3.4.0), but can't upgrade right now. Still, I'd really like having the New postings function on my site.

Is it somehow available as an extension for older versions, or something like that? (Is this at all possible..?)

Ɓukasz Serwatka

Monday 18 April 2005 4:31:14 am

Hi Eivind,

You can do this using standard eZ publish functionality. You will have to set your classes ids for fetch function if you using custom and replace NODE_FORUM_DIR with your own.

This example is for:

NODE_FORUM_DIR
|
|- - - Forum 1
|- - - Forum 2

{let page_limit=20
     list_items=array()
     list_count=0
     time_filter=array( array( 'modified_subnode', '>=', $last_visit_timestamp ) )}

{set list_items=fetch( content, tree, hash( parent_node_id, NODE_FORUM_DIR,
					    depth, 2,
                                            offset, $view_parameters.offset,
                                            attribute_filter, $time_filter,
					    class_filter_type, 'include',
					    class_filter_array, array( 'forum_message' ),
                                            sort_by, array( array( 'modified_subnode', false() ) ),
                                            limit, $page_limit ) )
     list_count=fetch( content, tree_count, hash( parent_node_id, NODE_FORUM_DIR,
			 			  depth, 2,
                                                  offset, $view_parameters.offset,
						  class_filter_type, 'include',
     						  class_filter_array, array( 'forum_message' ),
						  sort_by, array( array( 'modified_subnode', false() ) ),
                                                  attribute_filter, $time_filter ) )}

{section name=Child loop=$list_items}
   {$item.name}
{/section}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Eivind Marienborg

Monday 18 April 2005 5:17:54 am

Hi Lukasz, thanks for your reply.

It doesn't work, I can't get any timestamp from the $last_visit_timestamp.

Come to think about it, I'm almost certain I've read some place that this timestamp is a new feature in 3.5, requiring both kernel and database updates. But then again, I'm not completely sure..

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 19 2025 04:19:11
Script start
Timing: Jan 19 2025 04:19:11
Module start 'layout'
Timing: Jan 19 2025 04:19:11
Module start 'content'
Timing: Jan 19 2025 04:19:12
Module end 'content'
Timing: Jan 19 2025 04:19:12
Script end

Main resources:

Total runtime1.0740 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.0068 589.1484152.6250
Module start 'layout' 0.00680.0028 741.773439.4453
Module start 'content' 0.00961.0623 781.2188549.5938
Module end 'content' 1.07190.0020 1,330.812512.1641
Script end 1.0739  1,342.9766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3389160.0002
Check MTime0.00130.1197160.0001
Mysql Total
Database connection0.00070.068910.0007
Mysqli_queries1.016594.6477570.0178
Looping result0.00070.0640550.0000
Template Total1.026995.620.5135
Template load0.00250.234520.0013
Template processing1.024495.384120.5122
Template load and register function0.00010.012810.0001
states
state_id_array0.00140.128510.0014
state_identifier_array0.00270.247820.0013
Override
Cache load0.00200.1883210.0001
Sytem overhead
Fetch class attribute can translate value0.00070.060820.0003
Fetch class attribute name0.00140.133350.0003
XML
Image XML parsing0.00100.090320.0005
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00190.1813240.0001
String conversion0.00000.001140.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.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/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs