Dinamically creating a folder, asigning roles...

Author Message

Jorge estévez

Tuesday 05 October 2004 9:47:59 pm

Hi!

I have to implement a large site mainly focusing on news (just like a newspaper), I want users to subscribe to the site, but in the process of subscribing i would like to:

1. Create a folder for the user subscribing (e.g. My folder)

2. Let the user have access to this folder (create other folders inside of it, etc)

3. Allow the user to navigate the site and be able to select articles and MOVE them (a copy of course) to his personal folder (or directories inside), I tink this could be something like an article-wish-list or similar...

Of course each user will have his own folder to "save" articles all around the site.

Can someone point out ideas on how to do such a task? Something to start investigating...

Thanks... so much!

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Silke Fox

Wednesday 06 October 2004 5:43:01 am

Hi,

you will need a workflow for this. The workflow should be assigned to trigger "content publish after" and perform the following stuff:
- create personal folder for the newly subscribed user
- remember the node id of this folder
- assign role "personal folder" with subtree limitation on that folder to the user
Not sure, but maybe eZPolicyLimitationValue::createNew() will do the trick.
The basic role (e.g. "personal folder") must be created by hand first (content create *?).

Concerning 3.:
The copy function (/content/copy/<objectid>) will do it, though I'm not sure how to set the correct destination (i.e. the user's folder) here.

Hope that helps a bit.
silke

PS: This topic should be placed in the developer forum.

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 31 2025 01:31:02
Script start
Timing: Jan 31 2025 01:31:02
Module start 'layout'
Timing: Jan 31 2025 01:31:02
Module start 'content'
Timing: Jan 31 2025 01:31:03
Module end 'content'
Timing: Jan 31 2025 01:31:03
Script end

Main resources:

Total runtime0.7008 sec
Peak memory usage8,192.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.2578151.2266
Module start 'layout' 0.00490.0039 739.4844220.7188
Module start 'content' 0.00880.6913 960.20314,293.7266
Module end 'content' 0.70010.0007 5,253.92977.8125
Script end 0.7008  5,261.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.5453160.0002
Check MTime0.00140.1970160.0001
Mysql Total
Database connection0.00070.102310.0007
Mysqli_queries0.619688.4184540.0115
Looping result0.00050.0745520.0000
Template Total0.649892.720.3249
Template load0.00230.332520.0012
Template processing0.647492.385020.3237
Template load and register function0.00150.215010.0015
states
state_id_array0.00180.250710.0018
state_identifier_array0.00070.104820.0004
Override
Cache load0.00200.2802240.0001
Sytem overhead
Fetch class attribute can translate value0.00200.280820.0010
Fetch class attribute name0.00190.270220.0009
XML
Image XML parsing0.00030.037920.0001
class_abstraction
Instantiating content class attribute0.00000.001020.0000
General
dbfile0.00110.1610100.0001
String conversion0.00000.001240.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs