Need objects to be published hidden from module

Author Message

Felix Laate

Thursday 16 March 2006 4:31:42 am

Hi all,

here's another question for you all.. just so that you wont fall asleep..

I have a module that recieves SMS-messages and handles them depending on the code words given at the start of the message.

If they begin with a certain word, the text of the message should be published as a certain object in a designated folder.

BUT, I need the objects to be published hidden (i.e. they need to be approved before "final publishment").

I thaught I could do it by setting the is_hidden attribute by the node-assignment. But it doesn't work.

Here's the code:

$nodeAssignment =& eZNodeAssignment::create( array(
'contentobject_id' => $contentObject->attribute( 'id' ),
'contentobject_version' => $contentObject->attribute( 'current_version' ), 
'parent_node' => $parentNodeID,
'sort_field' => 2,
'sort_order' => 0,
'is_main' => 1,
'is_hidden' => 1
));

Any help is helpful!

Felix

Publlic Relations Manager
Greater Stavanger
www.greaterstavanger.com

Nabil Alimi

Friday 17 March 2006 5:08:46 am

If your content needs to be approved before being published, you can achieve this by using the workflow system. http://ez.no/doc/ez_publish/technical_manual/3_6/concepts_and_basics/workflows

But you can also add a "validated" field (checkbox) to your content class. Then by using attribute filtering, you may retrieve only validated objects.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

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 20 2025 23:46:02
Script start
Timing: Jan 20 2025 23:46:02
Module start 'layout'
Timing: Jan 20 2025 23:46:02
Module start 'content'
Timing: Jan 20 2025 23:46:02
Module end 'content'
Timing: Jan 20 2025 23:46:02
Script end

Main resources:

Total runtime0.0176 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 589.6953152.0547
Module start 'layout' 0.00730.0030 741.750036.6250
Module start 'content' 0.01030.0054 778.375090.6250
Module end 'content' 0.01570.0018 869.000033.9922
Script end 0.0175  902.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002514.0483140.0002
Check MTime0.00105.9109140.0001
Mysql Total
Database connection0.00095.342110.0009
Mysqli_queries0.003720.915030.0012
Looping result0.00000.171110.0000
Template Total0.00148.110.0014
Template load0.00105.585110.0010
Template processing0.00042.499310.0004
Override
Cache load0.00074.105310.0007
General
dbfile0.00021.326480.0000
String conversion0.00000.052940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0006 secs