How register and use Session Variable?

Author Message

hassan zerkoune

Thursday 20 November 2003 1:46:51 am

Hello,
I know how make Session variable in php, but how to register a variable in the session and get it after in ez?

Thanks for the futur answer.

hassan zerkoune

Thursday 20 November 2003 9:35:58 am

Is it possible?

If that is not possible, i use "<input type hidden" but thats not a good and secure solution. Is eZ have any secure solution?

hassan zerkoune

Friday 21 November 2003 9:53:45 am

Is there anybody here?

Selmah Maxim

Saturday 22 November 2003 10:13:18 am

What for u need this ?

Do u wanna do it with php .. or template code ?

with php code :

$_SESSION['test'] = "Hello"; // register

echo $_SESSION['test'] ; // call

duff beer

Sunday 23 November 2003 5:54:09 am

So i am a friend of hassan.
We know how use session variable in php but is it possible to make the same in ez?
If not, is it possible to use php in ez (without modifification of the kernel)?

Thank you for your answer.

Duff

Marco Zinn

Sunday 23 November 2003 12:52:38 pm

It would be good, if you tell us, what you want to do. What kind of information do you want to register?
I saw some "hack" to put php into ezPublish templates, but you must disable caching, which is not advisable at all.
If you need to pass information from one template to the other, this is possible, too (i saw this here, too).
Additionally, it's possible to "register" some kind of preference (see http://ez.no/developer/ez_publish_3/documentation/incoming/user_preferences)
Hope this helps.

Marco
http://www.hyperroad-design.com

duff beer

Monday 24 November 2003 12:13:26 am

I have some variables wich can be modifie by the user during his visit (language,part of the site, id of a document, ...).

thanks for your help i am going to understand the preference for user.

hassan zerkoune

Monday 24 November 2003 9:05:38 am

Is it possible tu set a user preference whithout call a url in a browser, and with an ez code?

Because i have now a problem with a document system.
I am in a document when i go to a chapter i must know my document. I don't know how to go up by iterating to take my document node root , so i want to use a user preference variable to store this node id.

Thanks for the futur answer

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 19 2025 06:26:49
Script start
Timing: Jan 19 2025 06:26:49
Module start 'layout'
Timing: Jan 19 2025 06:26:49
Module start 'content'
Timing: Jan 19 2025 06:26:49
Module end 'content'
Timing: Jan 19 2025 06:26:49
Script end

Main resources:

Total runtime0.7230 sec
Peak memory usage4,096.0000 KB
Database Queries76

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 589.2578152.6250
Module start 'layout' 0.00810.0040 741.882839.4453
Module start 'content' 0.01210.7094 781.3281663.2422
Module end 'content' 0.72150.0015 1,444.570316.1563
Script end 0.7230  1,460.7266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4732160.0002
Check MTime0.00140.1984160.0001
Mysql Total
Database connection0.00140.192210.0014
Mysqli_queries0.650589.9663760.0086
Looping result0.00080.1140740.0000
Template Total0.683994.620.3419
Template load0.00190.268420.0010
Template processing0.681994.313020.3410
Template load and register function0.00020.030810.0002
states
state_id_array0.00100.138710.0010
state_identifier_array0.00220.300020.0011
Override
Cache load0.00170.2355420.0000
Sytem overhead
Fetch class attribute can translate value0.00090.126840.0002
Fetch class attribute name0.00150.2133100.0002
XML
Image XML parsing0.00380.531440.0010
class_abstraction
Instantiating content class attribute0.00000.0035130.0000
General
dbfile0.00350.4832220.0002
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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs