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..
|