Content Archiving

Author Message

dee jay

Tuesday 14 November 2006 4:25:21 pm

I'm considering Ez Systems for a CMS. One of the requirements is for automated content archiving, preferably with the following features:

1. Automated archiving of "news" content. Ability to set archive date a specified period after the publish date. A default value of one month would be good.

2. Ability to search archived "news" content items, using regular search capability.

3. Ability to view archived "news" items by month/year or by news category. Would be good if news items could be grouped under their category heading when viewing by month/year.

Is there a component or add-on that could do this?

Thanks in advance.

Claudia Kosny

Wednesday 15 November 2006 1:39:45 am

Hi dee jay

All of this should be possible without major problems.

There is no standard archiving function in EZ (as far as I know) but it is easy to implement.
You could have a look at Lukasz' contribution http://ez.no/community/contribs/cronjobs which archived content based on a content attribute. Just adapt it so that it checks the published date of each article (which EZ stores by default) and archives a month after this date.

Create a folder 'archive' which will contain all archived articles. Use the cronjob to move the articles into this folder when required.

In the search functionality you can specify the subtree that is supposed to be searched, so just specify the archive subtree there when required.

To view the items by different criteria create a dummy node which will be responsable for fetching the articles. Create a specific template for this node and relay the view criteria to this template (using get, post or unordered view parameters). The template then verifies the provided criteria, computes the corresponding timestamps (if necessary) and then fetches all nodes in the article folder that match these criteria.
The grouping by news category is a bit trickier, I would order the retrieved articles by the content of the their category attribute and add a new new heading each time the content is different from the one before.
How to fetch get or post parameters (read the comments there as well): http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/data_and_information_extraction/ezhttp
How to use view parameters:
http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics/modules_and_views
How to fetch the required nodes:
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/list

If you have any questions, just ask.

Greetings from Luxembourg

Claudia

Xavier Dutoit

Wednesday 15 November 2006 8:49:15 am

For the new category, I' suggest to use the http://ez.no/community/contribs/datatypes/enhanced_objectrelation

This would allow an easy selection of the categories.

You might need this
http://ez.no/community/contribs/template_plugins/objectrelationfilter

to do some magic in the selection of the archived+one category.

Otherwise, you could just let the article in their category and add a boolean archived and filter on that (you can create the archive cronjob starting with the exemple Claudia gave you).

X+

http://www.sydesy.com

dee jay

Wednesday 15 November 2006 7:59:25 pm

Thanks Claudia and Xavier ...

I'll research your suggestions.

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

Main resources:

Total runtime0.0246 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.0089 589.0313152.6094
Module start 'layout' 0.00890.0042 741.640639.4141
Module start 'content' 0.01310.0090 781.054793.2734
Module end 'content' 0.02210.0025 874.328134.3047
Script end 0.0246  908.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003413.6097140.0002
Check MTime0.00124.8046140.0001
Mysql Total
Database connection0.002711.159110.0027
Mysqli_queries0.003815.335730.0013
Looping result0.00000.086110.0000
Template Total0.00208.110.0020
Template load0.00104.260810.0010
Template processing0.00093.854510.0009
Override
Cache load0.00083.092110.0008
General
dbfile0.00041.430080.0000
String conversion0.00000.043540.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