Forums / Developer / Referrer node_id

Referrer node_id

Author Message

K259

Thursday 15 January 2004 2:50:00 pm

Does anyone know how I can get the referrer $node_id?

Best regards.

Willie Seabrook

Thursday 15 January 2004 3:12:24 pm

Do you mean for example if a user is viewing content/view/full/123 and clicks a link to content/view/full/456 you want to be able get the node value 123 inside the template that displays 456?

If so, there is no such feature in ezPublish that I know of.

What you could do though is enable get parameters in your templates so that you can reference a get parameter in a template.

IE:

In the template that displays 123 you would add display the link like so:

/content/view/full/456?referrer_node_id={$node_id}

then in the template that displays 456:

{$Parameters:get.referrer_node_id}

You can enable this by editing kernel/content/view.php
and adding a couple of lines to add the request parameters as a template variable.

I can dig out the code if this is what you would like. Be warned however, doing this means you need to turn of the cache for that template, slowing down its display.

Regards,
Willie

K259

Thursday 15 January 2004 4:06:21 pm

Hi!

Tnx for your suggestion.

I don't wanna slow down the site (already have "problems" with the speed), so I think I have to solve this in another way..

Hope to find a solution during the night ;)

Willie Seabrook

Thursday 15 January 2004 5:08:30 pm

It shouldn't impact *much* on speed, you can turn cache off in a template with:

{set-block scope=root variable=cache_ttl}0{/set-block}

I think you can also turn it off for only certain parts of a template too. (Check forums)

Secondly, to increase speed within on ez you should use mmCache or Zend cache (depending on how much money you have). Zend is great cause it allows you to use the Zend debugger modules etc because they are not compatible with mmCache. http://www.ez.no/developer/ez_publish_3/documentation/configuration/optimization
for more info.

Also, ezPublish is very database intensive (many queries per page) so using slave database servers, and/or putting your database on a seperate machine is a very wise idea.

I can't imagine any other way to do what your trying to do that doesn't involve setting up new db tables and adding code to the kernel. Let me know what solution you end up using.... I'd be very interested.

Edited:

Also see http://www.ez.no/developer/ez_publish_3/forum/setup_design/3_3_0_2_cache_block_doesn_t_really_block

Regards,
Willie

K259

Friday 16 January 2004 1:00:25 am

Yup, I'll check it out later, and give you feedback on "the solution" ;)

Btw..we earlier used PHP Acc., but changed yesterday to Turck MMCache, since the development of PHP Acc. is almost "dead".

The problem is not regarding using an accelerator for php or not(of course this increases the speed), and you can't run eZ publish without an accelerator..that's also crazy :p , but eZ publish uses about 200-300 queries for -non-cached pages, and that's innsain much.. That's why the system is slow. (Our database is btw. now 750mb.)

Another problem is that the php files(which also includes other php files etc. etc.) consists of too many lines. Everything programmed with php over a 1000 lines pr. file is "not good", hehe (just a friend of mine complained about this in eZ, but i don't know..I'm not a php-guru)..and finally..mysql..hmm..

Mysql: in v. 5.0 of mysql, triggers and procedures are a new functionallity. If you've checked out MS SQL SERVER, you'll see all the possibillites which is implemented, and all the possibillites you can do in this databasesystem too increase the speed and get better performance. A lot of procedures can be done in the database, without any programming code, så Mysql is a little weak if you compare the two...but hope and think it will get better ;)

Well, back to work.

eZ debug

Timing: Jan 19 2025 01:05:01
Script start
Timing: Jan 19 2025 01:05:01
Module start 'content'
Timing: Jan 19 2025 01:05:02
Module end 'content'
Timing: Jan 19 2025 01:05:02
Script end

Main resources:

Total runtime1.3116 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00020.0099 588.8359180.8438
Module start 'content' 0.01001.1497 769.6797502.8984
Module end 'content' 1.15980.1518 1,272.5781338.1094
Script end 1.3116  1,610.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.3510210.0002
Check MTime0.00170.1313210.0001
Mysql Total
Database connection0.00110.083710.0011
Mysqli_queries1.229593.73832000.0061
Looping result0.00210.16211980.0000
Template Total1.278797.520.6393
Template load0.00200.151120.0010
Template processing1.276797.333120.6383
Template load and register function0.00020.016310.0002
states
state_id_array0.00090.068810.0009
state_identifier_array0.00120.091720.0006
Override
Cache load0.00170.1320430.0000
Sytem overhead
Fetch class attribute can translate value0.00200.149430.0007
Fetch class attribute name0.00110.084250.0002
XML
Image XML parsing0.00050.039630.0002
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00420.3178210.0002
String conversion0.00000.000530.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs