Publishing Checked Resources

Author Message

Mahesh Arvind

Tuesday 30 December 2003 9:54:02 pm

Hi,
I am having some Resources(articles, images, videos) in a folder. I want to publish only the resources that are checked by the admin. I have modified the resource class and added a checkbox field (Publish) into it. Now, when this checkbox is checked the resource is published.

The resources are submitted by the End Users. Now, when the end users submits the resources, the Publish checkbox appears in the submission form. So, when they check the publish option the resource gets published.

I only want the admin to be given the option to check the publish checkbox. How can this be implemented. Does anyone have any ideas?

Thanks.
Mahesh

Thanks & Regards
Mahesh

Paul Borgermans

Monday 05 January 2004 12:33:35 pm

Mahesh

You will need to adapt the edit templates for these specific classes. You can check who is editing, determine the group/role assigned and then display or not display the checkbox.

A good exercise in learning the template language

Alternatively, use the workflow system, it is made for that situations

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Mahesh Arvind

Tuesday 06 January 2004 6:29:51 am

Thanks Paul for the reply. I will check that one.

Thanks & Regards
Mahesh

Balazs Halasy

Tuesday 06 January 2004 6:45:14 am

If you need to have some sort of an approval mechanism then I suggest that you take a look at the approwal workflow. This is already built into eZ publish and ready for use. An example of how it can be set up is explained in the "Building an eZ publish site" tutorial:

http://www.ez.no/developer/ez_publish_3/documentation/building_an_ez_publish_site/the_guestbook/implementing_an_approval_mechanism

Dariusz Wlodarczyk

Tuesday 06 January 2004 1:55:51 pm

I see the bug in aproval mechanism is cleared. Is time to try define it ;)

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 03:17:36
Script start
Timing: Jan 19 2025 03:17:36
Module start 'layout'
Timing: Jan 19 2025 03:17:36
Module start 'content'
Timing: Jan 19 2025 03:17:37
Module end 'content'
Timing: Jan 19 2025 03:17:37
Script end

Main resources:

Total runtime0.9357 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.1563152.6250
Module start 'layout' 0.00500.0027 741.781339.4453
Module start 'content' 0.00760.9263 781.2266646.5625
Module end 'content' 0.93390.0017 1,427.789112.1641
Script end 0.9356  1,439.9531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3934160.0002
Check MTime0.00140.1460160.0001
Mysql Total
Database connection0.00060.065410.0006
Mysqli_queries0.858991.7976670.0128
Looping result0.00070.0787650.0000
Template Total0.895995.720.4479
Template load0.00290.308520.0014
Template processing0.893095.436620.4465
Template load and register function0.00020.018610.0002
states
state_id_array0.00210.225110.0021
state_identifier_array0.00110.119720.0006
Override
Cache load0.00230.2490270.0001
Sytem overhead
Fetch class attribute can translate value0.00120.126640.0003
Fetch class attribute name0.00120.128890.0001
XML
Image XML parsing0.01351.438140.0034
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.01241.3233350.0004
String conversion0.00000.001140.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/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
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs