ajax and ezhttptool.php

Author Message

florian bellenger

Monday 16 February 2009 9:35:41 am

Hello,

I would like to create/change a custom value of the session of the user whithout loading the page again.

I tried with ezxajax but it's not working.

So, I only used ajax.

I've created a custom php file that I manage to call with my XMLHttpRequest object.

Whithin my php file, I would like to use ezhttptool object (from "lib/ezutils/classes/ezhttptool.php") to change my session value but that's not working.

How would you do it?

Thank you for your help.

Florian.

André R.

Monday 16 February 2009 1:18:18 pm

It should work in a normal eZ Publish view or ezxajax code as long as the eZSession handler is loaded and handles the sessions, in views this is done automatically for you in index.php, and I guess the same goes for ezxajax functions.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

florian bellenger

Wednesday 04 March 2009 1:38:44 am

At the end, I tried to do it without ezxajax. I create my xmlHttpRequest object with a simple javascript function. Then, I open with it the url of a custom view I have created. Inside that view, I call a simple "change_attribute" identifier.

Florian.

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 16:24:26
Script start
Timing: Jan 18 2025 16:24:26
Module start 'layout'
Timing: Jan 18 2025 16:24:26
Module start 'content'
Timing: Jan 18 2025 16:24:27
Module end 'content'
Timing: Jan 18 2025 16:24:27
Script end

Main resources:

Total runtime0.8475 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.0064 589.0234152.6250
Module start 'layout' 0.00640.0035 741.648439.4453
Module start 'content' 0.00990.8360 781.0938531.3125
Module end 'content' 0.84590.0015 1,312.406312.3281
Script end 0.8475  1,324.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4009160.0002
Check MTime0.00140.1671160.0001
Mysql Total
Database connection0.00080.093210.0008
Mysqli_queries0.802294.6569570.0141
Looping result0.00050.0627550.0000
Template Total0.815596.220.4077
Template load0.00190.227120.0010
Template processing0.813695.996320.4068
Template load and register function0.00020.026910.0002
states
state_id_array0.00080.094910.0008
state_identifier_array0.00210.251220.0011
Override
Cache load0.00160.1880180.0001
Sytem overhead
Fetch class attribute can translate value0.00060.073820.0003
Fetch class attribute name0.00110.133540.0003
XML
Image XML parsing0.00080.099320.0004
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00120.1358170.0001
String conversion0.00000.000940.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
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs