Is there a "publish-to-date" function?

Author Message

Fredrik Melsom Klausen

Wednesday 08 September 2004 2:45:54 pm

I need the possibility to set an article to be automatically published/visible on a given date, and to be automatically unpublished/invisible on a given later date. Is this something that is possible to set in the admin interface? I have looked around quite a bit without finding a solution. If it's not, is there any other way? Help would be greatly appreciated :-)
Fredrik

Ole Morten Halvorsen

Thursday 09 September 2004 1:18:11 am

Fredrik,

Future publishing is a standard feature in eZ publish. You need to add a datetime attribute to your class(es), create a new workflow with a Wait until date event and add this workflow to a trigger. Make sure you run the runcronjobs.php as a cronjob aswell.

Currently we dont have an unpublish feature, but we are working on it for 3.5. Have a look at the spec here: http://www.ez.no/community/specs/hide_unpublish

Ole M.

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

Marco Zinn

Sunday 21 November 2004 12:57:01 pm

On order to add to the community knowledge:
This worked fine for me (for timed publishing). Using a 3.4.4. installation, i created a copy of the article class, added a "datetime" attribute for this.
Then i create a new workflow with the "wait until date" event, selected my new class and that new attribute. After saving the class, i assigned this new workflow to the "before publish" trigger.
That did the job! Remember, that you need to set up a cronjob for the workflow to "advance".
See http://ez.no/ez_publish/documentation/installation/the_cronjob_script for cronjob information.

Marco
http://www.hyperroad-design.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 19 2025 06:16:54
Script start
Timing: Jan 19 2025 06:16:54
Module start 'layout'
Timing: Jan 19 2025 06:16:54
Module start 'content'
Timing: Jan 19 2025 06:16:55
Module end 'content'
Timing: Jan 19 2025 06:16:55
Script end

Main resources:

Total runtime1.5062 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.1563152.6250
Module start 'layout' 0.00650.0030 741.781339.4609
Module start 'content' 0.00951.4951 781.2422567.4688
Module end 'content' 1.50460.0015 1,348.710912.1563
Script end 1.5061  1,360.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2204160.0002
Check MTime0.00130.0883160.0001
Mysql Total
Database connection0.00120.078710.0012
Mysqli_queries1.451796.3835590.0246
Looping result0.00080.0504570.0000
Template Total1.455196.620.7275
Template load0.00200.133320.0010
Template processing1.453096.473320.7265
Template load and register function0.00020.016110.0002
states
state_id_array0.00270.179910.0027
state_identifier_array0.00540.355220.0027
Override
Cache load0.00160.1087170.0001
Sytem overhead
Fetch class attribute can translate value0.00100.069230.0003
Fetch class attribute name0.00150.100640.0004
XML
Image XML parsing0.00120.078130.0004
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00140.0911160.0001
String conversion0.00000.000640.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
3content/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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs