PowerContent: add redirection parameters

Author Message

Seb Gaillard

Monday 18 May 2009 9:38:48 am

Hi,

I use powercontent for adding 2 different types of content ('testimony','tip').
When a user contribute, i would like to display a message like "We have received your testimony/tip. It will be available soon".

I have do this at the end of modules/powercontent/action.php
before:

   $Result['rerun_uri'] = $module->redirectionURI( 'content', 'edit', array( $ObjectID, $EditVersion, $EditLanguage ) );
   $module->setExitStatus( eZModule::STATUS_RERUN );

after:

   $Result['rerun_uri'] = $module->redirectionURI( 'content', 'edit', array( $ObjectID, $EditVersion, $EditLanguage ), null, array('type' => 'testimony') );
   $module->setExitStatus( eZModule::STATUS_RERUN );

It does'nt work....
when I set the debug redirection, and display some "echo" in lib/ezutils/classes/ezmodule.php, I see that the function redirectionURI is called 2 times.
the first times, it display this kind of url:
/content/edit/44310/1/fre-FR//(type)/testimony

and the second time
/content/edit/44310/1/fre-FR/

Someone has an idea for doing this ???
Thank's,

Seb

Kristof Coomans

Monday 18 May 2009 11:49:00 pm

Hi Seb

Please use the forum of the powercontent project for this: http://projects.ez.no/powercontent/forum/general. Thanks!

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Seb Gaillard

Tuesday 19 May 2009 12:05:31 am

Hi Kristof,

ok, i go there now!
It's there: http://projects.ez.no/powercontent/forum/general/powercontent_how_to_add_user_parametrers

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

Main resources:

Total runtime0.0260 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 588.2500151.2266
Module start 'layout' 0.00630.0048 739.4766220.7188
Module start 'content' 0.01110.0132 960.1953997.9609
Module end 'content' 0.02430.0017 1,958.156333.9922
Script end 0.0260  1,992.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002810.7626140.0002
Check MTime0.00114.2830140.0001
Mysql Total
Database connection0.00114.370110.0011
Mysqli_queries0.002810.927530.0009
Looping result0.00000.088010.0000
Template Total0.00124.510.0012
Template load0.00093.477610.0009
Template processing0.00030.987810.0003
Override
Cache load0.00062.475110.0006
General
dbfile0.00104.010980.0001
String conversion0.00000.056840.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.0001 secs