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

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 02:59:54
Script start
Timing: Jan 18 2025 02:59:54
Module start 'layout'
Timing: Jan 18 2025 02:59:54
Module start 'content'
Timing: Jan 18 2025 02:59:54
Module end 'content'
Timing: Jan 18 2025 02:59:54
Script end

Main resources:

Total runtime0.0160 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.9453152.6094
Module start 'layout' 0.00480.0028 741.554739.4141
Module start 'content' 0.00760.0062 780.968893.3359
Module end 'content' 0.01370.0022 874.304734.3047
Script end 0.0160  908.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002314.6240140.0002
Check MTime0.00116.6325140.0001
Mysql Total
Database connection0.00074.662610.0007
Mysqli_queries0.002817.350930.0009
Looping result0.00000.074510.0000
Template Total0.001610.210.0016
Template load0.00095.349510.0009
Template processing0.00084.862210.0008
Override
Cache load0.00063.705910.0006
General
dbfile0.00137.997480.0002
String conversion0.00000.038740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs