Forums / Setup & design / Forum reply order

Forum reply order

Author Message

Noicokuna Niemoge

Monday 23 February 2009 6:32:42 am

Hello;

I'd like to change forum reply order, to display recent post at the very beginning.

In forum_topic.tpl, I changed this line:

    reply_list=fetch('content','list', hash( parent_node_id, $node.node_id,
                                              limit, $reply_limit,
                                              offset, $reply_offset,
                                              sort_by, array( array( published, true() ) ) ) )

To this:

 reply_list=fetch('content','list', hash( parent_node_id, $node.node_id,
                                              limit, $reply_limit,
                                              offset, $reply_offset,
                                              sort_by, $object.main_node.sort_array ) )

Yet it doesn't give any effect when I change sort order in parent node... any advice?

Shiki soku ze ku...

Jean-Yves Zinsou

Thursday 26 February 2009 4:03:13 am

Why don't you try:

reply_list=fetch('content','list', hash( parent_node_id, $node.node_id,


                                             limit, $reply_limit,


                                             offset, $reply_offset,


                                             sort_by, array( array( published, false() ) ) ) )

???

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

André R.

Thursday 26 February 2009 8:05:39 am

reply_list=fetch('content','list', hash( parent_node_id, $node.node_id,
                                             limit, $reply_limit,
                                             offset, $reply_offset,
                                             sort_by, $node.sort_array ) )

should work (the one you have as well if $object is defined), as long as node is current node, if it is not then you need to look into viewcache.ini to see how changes on forum can effect view cache on these pages. if not possible then use cache_ttl to make cache timeout in a timely manner so chnages show up, or consider to move this fetch to pagelayout (you can override it) using cache-block instead.

Jean-Yves: I guess he want it dynamically.

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

Noicokuna Niemoge

Monday 02 March 2009 1:33:23 am

Thanks for reply, I'll try these suggestions :)

Shiki soku ze ku...