Forums / Developer / Work with POST/GET

Work with POST/GET

Author Message

Thomas Brandl

Wednesday 10 September 2003 5:15:19 am

Hi all (I'm flooding the forums today...),

need a piece of info for a very simple task:
I want the user to choose/filter objects based on a select-box.
So I need to access POST/GET variables in order to use them in a let-fetch-statement, like pseudo code:
{let obj=fetch(content,list,hash(node_id,$POST.formfield_name,...))}

How can I do this in the most simple manner? Do I need a module for that? Does anyone have a *really* simple example of such a module, using some common API-functions to demonstrate, how to work with modules?

Thanks a lot!
Tom

Paul Forsyth

Wednesday 10 September 2003 6:10:04 am

Look at the contribution for ezenv. I dont have the url at hand but it should be easy to find. This will allow you to use post/get variables in templates.

Paul

Thomas Brandl

Wednesday 10 September 2003 8:30:07 am

Thanks Paul, that will do, I guess!

For those interested:
http://ez.no/developer/ez_publish_3/contributions/ezenv

Paul Borgermans

Wednesday 10 September 2003 8:36:53 am

This is only a temporary work-around I wrote out of frustration, you need to turn of view caching!

Its on ez's todo list for a more general mechanism: the main problem is that such variables should be included in the standard view caching

You can implement the caching yourself with cache-blocks which include the post/get variable value in the cache block key.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Thomas Brandl

Monday 15 September 2003 9:21:31 am

So what you did is turn off view-caching and apply cache-blocks everywhere, where they were neccessary??

Don't you loose lots of performance that way?
t

Paul Borgermans

Monday 15 September 2003 9:28:15 am

Yes, it puts a heavy burden on CPU and end-user patience.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Thomas Brandl

Tuesday 16 September 2003 4:29:32 am

Damn, I was hoping to come around this easily! My machine is a PII 233MHz - can't afford to turn off caching!

Any ideas on how to accomplish that - well then not the easy way?

@eZ: I definitely think that such basic communication between forms and the system should be possible without much hassle. Are there any plans to support sht. like this in the near future? Or any reasons, why you do not want to implement it?

(I feel really bad when pushing eZ, since they already have a load of work to do, and I actually should just sit still and be thankful ...)

Btw: Thanks for the attribute_filter info, Paul, should have found this myself ;)

eZ debug

Timing: Jan 18 2025 18:22:57
Script start
Timing: Jan 18 2025 18:22:57
Module start 'content'
Timing: Jan 18 2025 18:22:58
Module end 'content'
Timing: Jan 18 2025 18:22:58
Script end

Main resources:

Total runtime1.0054 sec
Peak memory usage4,096.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.6094180.8438
Module start 'content' 0.00640.8598 768.4531617.1094
Module end 'content' 0.86620.1391 1,385.5625337.0703
Script end 1.0053  1,722.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.4283210.0002
Check MTime0.00160.1549210.0001
Mysql Total
Database connection0.00070.074210.0007
Mysqli_queries0.919891.48612080.0044
Looping result0.00240.23602060.0000
Template Total0.967796.320.4839
Template load0.00190.186120.0009
Template processing0.965896.068120.4829
Template load and register function0.00020.021710.0002
states
state_id_array0.00120.121210.0012
state_identifier_array0.00090.090720.0005
Override
Cache load0.00160.1625380.0000
Sytem overhead
Fetch class attribute can translate value0.00140.138740.0003
Fetch class attribute name0.00170.172680.0002
XML
Image XML parsing0.00130.133840.0003
class_abstraction
Instantiating content class attribute0.00000.001890.0000
General
dbfile0.00530.5290280.0002
String conversion0.00000.000630.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs