Forums / General / Content Archiving

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.

eZ debug

Timing: Jan 31 2025 06:14:47
Script start
Timing: Jan 31 2025 06:14:47
Module start 'content'
Timing: Jan 31 2025 06:14:47
Module end 'content'
Timing: Jan 31 2025 06:14:47
Script end

Main resources:

Total runtime0.2003 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.8047180.8516
Module start 'content' 0.00730.0044 768.656397.8047
Module end 'content' 0.01170.1885 866.4609526.4844
Script end 0.2002  1,392.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00351.7286200.0002
Check MTime0.00140.6903200.0001
Mysql Total
Database connection0.00080.412310.0008
Mysqli_queries0.148874.27331410.0011
Looping result0.00120.60201390.0000
Template Total0.188294.010.1882
Template load0.00070.352910.0007
Template processing0.187593.600810.1875
Override
Cache load0.00050.239710.0005
Sytem overhead
Fetch class attribute can translate value0.00060.324010.0006
XML
Image XML parsing0.00030.125810.0003
General
dbfile0.00934.6641200.0005
String conversion0.00000.004630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

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

Time used to render debug report: 0.0003 secs