Redirect after removing Image

Author Message

Christoph S.

Tuesday 30 November 2010 7:44:00 am

Hi,

I've got a custom User edit page and I was looking for something like "RedirectURIAfterPublish" for removing an Image. So far, I found out, that there is no "out of the Box" solution. Now I want to try to adjust the ezp-core with something like "RedirectURIAfterRemovingImage" but I just don't now where to start.

Does anyone have a hint for me, where in the kernel the functionality for removing the users image ist stored?

Thanks in advance

Chris

Magnus Hellman

Wednesday 01 December 2010 2:30:09 am

"

Does anyone have a hint for me, where in the kernel the functionality for removing the users image ist stored?

"

Have a look at kernel/classes/datatype/ezimage/ezimagetype.php and the method customObjectAttributeHTTPAction().

Note: It's used for all images, not only user images and it doesn't store anything.

Also you may want to take a look inside kernel/content/edit.php for the redirects.

Although I would recommend another way of extending the core functionallity, simply becuase it'll cause less headache when you upgrade.

Without knowing anything details about your custom user edit page I don't really know what's suitable. Perhaps a module or a custom action?

Christoph S.

Thursday 09 December 2010 7:35:12 am

"
"

Does anyone have a hint for me, where in the kernel the functionality for removing the users image ist stored?

"

Have a look at kernel/classes/datatype/ezimage/ezimagetype.php and the method customObjectAttributeHTTPAction().

Note: It's used for all images, not only user images and it doesn't store anything.

Also you may want to take a look inside kernel/content/edit.php for the redirects.

Although I would recommend another way of extending the core functionallity, simply becuase it'll cause less headache when you upgrade.

Without knowing anything details about your custom user edit page I don't really know what's suitable. Perhaps a module or a custom action?

"

Thanks for the hints!

My problem was, that I wanted to display the standard user/edit pages in the third level, like Main Menu -> Sub Menu -> 3rd Level -> My profile. All went fine, except when the button "remove image" was clicked. Then ezp switches from user/edit to content/edit and my Submenus disappeared. I solved that with a little frontend hack and without touching the core functionallity.

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 18 2025 04:58:54
Script start
Timing: Jan 18 2025 04:58:54
Module start 'layout'
Timing: Jan 18 2025 04:58:54
Module start 'content'
Timing: Jan 18 2025 04:58:55
Module end 'content'
Timing: Jan 18 2025 04:58:55
Script end

Main resources:

Total runtime0.7916 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.9141152.6250
Module start 'layout' 0.00740.0032 740.539139.4531
Module start 'content' 0.01050.7796 779.9922511.4063
Module end 'content' 0.79010.0014 1,291.398412.1641
Script end 0.7915  1,303.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4544160.0002
Check MTime0.00140.1731160.0001
Mysql Total
Database connection0.00110.135710.0011
Mysqli_queries0.727291.8660570.0128
Looping result0.00060.0721550.0000
Template Total0.742493.820.3712
Template load0.00280.358220.0014
Template processing0.739693.433320.3698
Template load and register function0.00020.019110.0002
states
state_id_array0.00150.184710.0015
state_identifier_array0.00140.182720.0007
Override
Cache load0.00240.3063280.0001
Sytem overhead
Fetch class attribute can translate value0.00110.143920.0006
Fetch class attribute name0.00090.113940.0002
XML
Image XML parsing0.00240.307320.0012
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00350.4484160.0002
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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs