Check if a new object was created since last visit...

Author Message

Pierre Rigal

Monday 13 June 2005 10:09:56 am

Hello all...
I want to improve the Ez forum template and add a system of little gifs which can inform if :

- a forum has new topics or replies since last visit
- a topic has new replies since last visit

So I need to know what can I do with the template langage to check if a new object is created under an other one since the last visit of a user...

Anyone got an idea ?

Pierre Rigal

Tuesday 14 June 2005 9:51:27 am

please... help me.

I know my english is not so good but I'm sure you can understantd me...

Xavier Dutoit

Wednesday 15 June 2005 12:28:32 am

Salut Pierre,

The latest ez released yesterday contains a new feature to get the date when the user last loged in (Paul B. contrib if my memory serves me right). Don't remember if it's a new function or a new attribute on the curerent_user.

Once you got that, you can use that date to fetch forums post more recent and bingo, you know if it has been published.

Don't hesitate to publish the template once you've been able to do it ;)

X+

http://www.sydesy.com

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 18:16:34
Script start
Timing: Jan 18 2025 18:16:34
Module start 'layout'
Timing: Jan 18 2025 18:16:34
Module start 'content'
Timing: Jan 18 2025 18:16:35
Module end 'content'
Timing: Jan 18 2025 18:16:35
Script end

Main resources:

Total runtime0.9388 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.0095 588.1406152.6406
Module start 'layout' 0.00950.0045 740.781339.4766
Module start 'content' 0.01400.9231 780.2578529.6484
Module end 'content' 0.93700.0018 1,309.90638.1250
Script end 0.9388  1,318.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.4140160.0002
Check MTime0.00150.1583160.0001
Mysql Total
Database connection0.00100.108110.0010
Mysqli_queries0.886294.3976570.0155
Looping result0.00060.0650550.0000
Template Total0.894395.320.4471
Template load0.00210.228820.0011
Template processing0.892195.025520.4461
Template load and register function0.00020.025210.0002
states
state_id_array0.00150.156310.0015
state_identifier_array0.00160.171120.0008
Override
Cache load0.00180.1926190.0001
Sytem overhead
Fetch class attribute can translate value0.00200.208020.0010
Fetch class attribute name0.00160.166940.0004
XML
Image XML parsing0.00080.084020.0004
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00100.1094160.0001
String conversion0.00000.001240.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs