Publish/Delete of articles on date

Author Message

John Smith

Monday 21 March 2005 7:45:58 am

I need the possibility to set an article to be automatically published on a given date, and to be automatically unpublished/delete on a given later date. Is this something that is possible to set in the admin interface of ez version 3.5.1. If it's not, is there any other way?

Thanks in advance.

Cheers

Balazs Halasy

Tuesday 22 March 2005 1:16:20 am

Hi,

Yes, this is possible. You will have to set up a workflow with an event (I do not remember the name of the event, but you will see it, I'm sure) + set up a trigger to initiate it before publish...

Allman

John Smith

Tuesday 22 March 2005 1:30:18 am

hi halasy,

Thanks for your kind reply. I know publish on date is possible by the wait until date event triggered before the content publish. Thats working. Kindly let me know how to do unpublish part. I cannot find unpublish event for this part.

cheers

Balazs Halasy

Tuesday 22 March 2005 4:42:43 am

Hi again,

Due to the nature of eZ publish, it is not possible to unpublish a published object. However, it is possible to hide (and thus "unpublish") objects. There is currently no workflow event that does this, but you can easily create one yourself if you are familiar with PHP & basic eZ internal coding.

Allman

Lex 007

Thursday 24 March 2005 2:01:06 am

Hi,

This page could be usefull for you :

http://www.ez.no/ez_publish/documentation/development/extensions/workflow_events/unpublish

Combining this "unpublish" workflow event with the "wait until date" event should do the job.

Lex

John Smith

Thursday 24 March 2005 2:12:54 am

Thanks for your kind reply.

I tried it but it is not working.

You wrote "Combining this "unpublish" workflow event with the "wait until date" event should do the job."

What it means?

cheers

Lex 007

Thursday 24 March 2005 2:32:39 am

I haven't tried it so there is no garantee that it will work "as is" ;-)

- modify the article class with a date attribute (the value of this date should be the date it is published)

- follow the explainations from the link to create a "unpublish" workflow event

- create a new workflow called "Unpublish Workflow" with a "wait until date" workflow event and after that a "unpublish" workflow

- assign this workflow to the trigger "before publish"

- use the cronjob to run the workflow periodically

Hope it helps

Christiane Kloss

Thursday 24 March 2005 3:00:23 am

Hi,

unpublish is not a workflow anymore...

http://ez.no/community/forum/developer/unpublish_by_date/re_unpublish_by_date__2

Greetings
Christiane

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 30 2025 21:37:14
Script start
Timing: Jan 30 2025 21:37:14
Module start 'layout'
Timing: Jan 30 2025 21:37:14
Module start 'content'
Timing: Jan 30 2025 21:37:15
Module end 'content'
Timing: Jan 30 2025 21:37:15
Script end

Main resources:

Total runtime1.1163 sec
Peak memory usage8,192.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.1328151.2109
Module start 'layout' 0.00470.0040 739.3438220.6875
Module start 'content' 0.00871.1066 960.03134,547.7969
Module end 'content' 1.11540.0009 5,507.828115.8438
Script end 1.1162  5,523.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2909160.0002
Check MTime0.00110.1010160.0001
Mysql Total
Database connection0.00070.066710.0007
Mysqli_queries1.011590.6160760.0133
Looping result0.00080.0687740.0000
Template Total1.060695.020.5303
Template load0.00180.165420.0009
Template processing1.058794.843820.5294
Template load and register function0.00160.142610.0016
states
state_id_array0.00160.143910.0016
state_identifier_array0.00290.255820.0014
Override
Cache load0.00160.1400490.0000
Sytem overhead
Fetch class attribute can translate value0.00170.156040.0004
Fetch class attribute name0.00200.1757110.0002
XML
Image XML parsing0.00360.322440.0009
class_abstraction
Instantiating content class attribute0.00000.0024130.0000
General
dbfile0.00430.3827280.0002
String conversion0.00000.000840.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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs