how to submit vars like $current_user in urls (iframe)

Author Message

San F

Thursday 17 April 2008 5:22:01 am

example:
<iframe src="bug_report.php?userid=$current_user" frameborder="0" width="100%" height="1100"></iframe>

how to make ezpub parsing those vars?

thx in advance

Mark Marsiglio

Thursday 17 April 2008 5:36:18 am

Assuming that $current_user is defined in the template you are using, and the iframe is not being entered in literal text in an XML block or a literal block in your code, then you should just have to put it in brackets.

<iframe src="bug_report.php?userid={$current_user}" frameborder="0" width="100%" height="1100"></iframe>

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

André R.

Thursday 17 April 2008 5:36:46 am

$current_user is normally a object, so what you are looking for is probably $current_user.contentobject_id

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

San F

Thursday 17 April 2008 5:48:37 am

mh, don't know if i'm using a template, i'm new to ezpub
just entered the code above in the webinterface (where u can manage articles/contents and so on)

code:

<iframe src="bug_report.php?userid={$current_user.contentobject_id}" frameborder="0" width="100%" height="1100"></iframe>

$current_user.contentobject_id

{$current_user.contentobject_id}

last 2 lines only for testing
but output is not parsed
just shows the vars like they are shown above

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 31 2025 04:30:35
Script start
Timing: Jan 31 2025 04:30:36
Module start 'layout'
Timing: Jan 31 2025 04:30:36
Module start 'content'
Timing: Jan 31 2025 04:30:36
Module end 'content'
Timing: Jan 31 2025 04:30:36
Script end

Main resources:

Total runtime0.0171 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.3750151.2422
Module start 'layout' 0.00550.0028 739.617236.6953
Module start 'content' 0.00830.0073 776.312594.2969
Module end 'content' 0.01560.0014 870.609433.9922
Script end 0.0171  904.6016 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002514.5492140.0002
Check MTime0.00116.3142140.0001
Mysql Total
Database connection0.00148.184810.0014
Mysqli_queries0.002414.241130.0008
Looping result0.00000.117110.0000
Template Total0.00116.310.0011
Template load0.00095.150310.0009
Template processing0.00021.092810.0002
Override
Cache load0.00063.706310.0006
General
dbfile0.002715.990480.0003
String conversion0.00000.054440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs