Count Replies and Post in forum

Author Message

Ole Brudvik

Thursday 21 April 2005 1:44:35 am

Hi

Can anyone tell me how to count the posts and replies in a forum? Is the code for this EZ forum available somewhere because im trying to make the same?

Thanks,
OCB

Frederik Holljen

Monday 25 April 2005 11:46:30 pm

Hi,

I don't know exactly what the forum code in ez.no looks like, but I'm pretty sure it uses list_count to get the number of replies
http://ez.no/ez_publish/documentation/reference/data_fetching/content/list_count.

If you have a tree with nodes take a look at tree and tree_count instead.

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 10:01:58
Script start
Timing: Jan 19 2025 10:01:58
Module start 'layout'
Timing: Jan 19 2025 10:01:58
Module start 'content'
Timing: Jan 19 2025 10:01:58
Module end 'content'
Timing: Jan 19 2025 10:01:58
Script end

Main resources:

Total runtime0.0202 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.0061 589.1563152.6250
Module start 'layout' 0.00610.0043 741.781339.4609
Module start 'content' 0.01040.0073 781.242289.3203
Module end 'content' 0.01760.0025 870.562530.3047
Script end 0.0202  900.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003215.7478140.0002
Check MTime0.00136.3527140.0001
Mysql Total
Database connection0.00073.495710.0007
Mysqli_queries0.003618.048730.0012
Looping result0.00000.089710.0000
Template Total0.00209.810.0020
Template load0.00125.892310.0012
Template processing0.00083.847510.0008
Override
Cache load0.00094.610210.0009
General
dbfile0.002110.337280.0003
String conversion0.00000.048440.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