Forums / General / Display Article only for a limited period of time?

Display Article only for a limited period of time?

Author Message

Jan Bengia

Tuesday 02 August 2005 3:16:47 pm

Hi,
maybe I'm just to stupid to find this function: How do I set a publish period of time for a certain content object? I mean something like "this article is on the public site only visible between 03/04/2005 and 03/07/2005 ...? Is this possible?

thanks!
Jan

Arran Price

Wednesday 03 August 2005 4:36:05 pm

Hi Jan,
You cant do this by default. To the best of my understanding,You will need to, either
(for where you want all items having different valid dates) add some new attributes to the item, being start and end dates and then modify the template fetch to exclude items that dont match your criteria, or
(where all items in the folder or whatever have the same dates) modify the template doing the fetch so that it only displays between certain dates.

Hope thats of help

Arran

Jan Bengia

Thursday 04 August 2005 2:25:49 am

Hi,
thanks for the hints - I will try this "workaround". I think this is a real lack of the system ...

vg

Luc Chase

Thursday 04 August 2005 3:48:05 am

Jan,
cronjobs should be in place,
your content class must have a datefield named 'unpublish_date' and the content.ini must have two particular values set.

Both the RootNodeList[] and ClassList[] arrays in content.ini must be defined for it to work. So, you may need to add some settings to your <siteAccess_admin>/content.ini[.append][.php] as follows...

[UnpublishSettings]
RootNodeList[]=2
ClassList[]
ClassList[]=2

Here Articles (class ID 2) are set as a potential unpublish content class, starting at the root of the site ( node 2).
Have a look at the code in cronjobs/unpublish.php (that code refers to 'articleNodeArray' but it works not only on Articles but also for other content classes as long as they have an 'unpublish_date' field of type Date).
NB. that script removes the content rather than just a hide, so look in the Trash to recover it.
If you have not setup cronjobs, just run the command

php -C runcronjobs.php -s siteaccess
from the root of your EZP installation.

Where siteaccess above is the siteacces which contains the content.ini file with the unpublish setup.

Have a look at
http://ez.no/products/ez_publish_cms/documentation/development/extensions/workflow_events/unpublish

For the start/publish date you need to create a workflow that is triggered by a wait for date event.

The Web Application Service Provider

eZ debug

Timing: Jan 19 2025 00:29:34
Script start
Timing: Jan 19 2025 00:29:34
Module start 'content'
Timing: Jan 19 2025 00:29:35
Module end 'content'
Timing: Jan 19 2025 00:29:35
Script end

Main resources:

Total runtime0.6786 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.8359180.8203
Module start 'content' 0.00580.5756 768.6563553.3438
Module end 'content' 0.58150.0971 1,322.0000334.1016
Script end 0.6785  1,656.1016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.5706210.0002
Check MTime0.00150.2247210.0001
Mysql Total
Database connection0.00090.132910.0009
Mysqli_queries0.615090.62671990.0031
Looping result0.00180.26311970.0000
Template Total0.649395.720.3246
Template load0.00200.300620.0010
Template processing0.647295.378020.3236
Template load and register function0.00020.033610.0002
states
state_id_array0.00140.212510.0014
state_identifier_array0.00320.478620.0016
Override
Cache load0.00180.2722370.0000
Sytem overhead
Fetch class attribute can translate value0.00130.194640.0003
Fetch class attribute name0.00100.153540.0003
XML
Image XML parsing0.00070.100740.0002
class_abstraction
Instantiating content class attribute0.00000.001540.0000
General
dbfile0.00280.4104210.0001
String conversion0.00000.001030.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs