Forums / Developer / How register and use Session Variable?

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

eZ debug

Timing: Jan 19 2025 03:15:08
Script start
Timing: Jan 19 2025 03:15:08
Module start 'content'
Timing: Jan 19 2025 03:15:09
Module end 'content'
Timing: Jan 19 2025 03:15:09
Script end

Main resources:

Total runtime1.1876 sec
Peak memory usage4,096.0000 KB
Database Queries213

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.9766180.8281
Module start 'content' 0.00551.0624 769.8047668.3203
Module end 'content' 1.06790.1197 1,438.1250340.4609
Script end 1.1876  1,778.5859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3320210.0002
Check MTime0.00140.1181210.0001
Mysql Total
Database connection0.00080.065810.0008
Mysqli_queries1.102892.85322130.0052
Looping result0.00200.16952110.0000
Template Total1.164098.020.5820
Template load0.00190.161520.0010
Template processing1.162197.850720.5811
Template load and register function0.00030.022510.0003
states
state_id_array0.00110.093410.0011
state_identifier_array0.00060.049920.0003
Override
Cache load0.00170.1404420.0000
Sytem overhead
Fetch class attribute can translate value0.00120.103650.0002
Fetch class attribute name0.00140.1198100.0001
XML
Image XML parsing0.00290.242050.0006
class_abstraction
Instantiating content class attribute0.00000.0018130.0000
General
dbfile0.00790.6669330.0002
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs