Forums / Developer / Dynamic Content Stucture menu (AJAX) prototype

Dynamic Content Stucture menu (AJAX) prototype

Author Message

Brian Gambill

Thursday 13 October 2005 8:44:01 am

Great feature! Very fast! Good community effort.

I have a small (hopefully) problem. I installed the 0.2 version and it worked as advertised. I then laid in the 0.4 svn tarball and now nothing shows up. I believe I have cleared the cache. I am running 3.5.0 on bsd server. When I view the page source javascript I see nothing assigned to the variable wwwdir. Could that be it? Perhaps I am missing an ini setting?

Since I can't see it yet, can you tell me if the javascript to click on the icon and do stuff like hide/ edit/ etc are still available with this menu? It is so much faster, I wouldn't care if it was missing in that menu, but I am just curious.

Bertrand Dunogier

Thursday 13 October 2005 9:40:37 am

As explained in the updated readme, the link used to toggle the dynamic menu from the first version is gone. If the extension is enabled, the menu is used.

I just had to clear my templates cache and the menu was there, it should work the same way for you, Brian. Have fun ;)

Brian Gambill

Thursday 13 October 2005 12:58:58 pm

I understood that their was no longer a on/off selection. From my page source it seems like things are mostly working. The javascript is included, when it gets to the unordered list of the context menu, there is nothing there.

 <ul id="content_tree_menu">
            	

            </ul>

I figured out why, in my case, this doesn't work. At a minimum, the IF statements in prototype_menu.tpl are only valid for eZ 3.6 and beyond. I am using 3.5. This is at least worth noting when you update the contributions section.

Great feature. I at least get some AJAX type exmple code to look at. Thanks!

Kristian Hole

Thursday 13 October 2005 11:54:40 pm

Brian: In the v4 there are used templatesyntax which is from 3.6, so it will not work in 3.5. It is not that hard fix, but currently it only works with 3.6.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Kristian Hole

Friday 14 October 2005 12:00:26 am

I have now updated the files in the contribution section to the latest version v0.4. Download and enjoy :-)

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bo Vejgaard

Friday 14 October 2005 1:44:52 am

Regarding my IE problem with charsets, I've found out that any speciel danish character (æøå) is replaced with a questionmark (?) and 3-4 of the trailing characters are removed, this introduces errors where the speciel charater is at the end of a word, since it chops of some of the following </span> tag in the menu. If i click on a menu with a speciel character, it will be displayed rigth when i am on the page.

I Hope this makes sence, and someone can help me. This is a major issue, since all the editors of the site use IE (opposed to my recommendation).

EDIT: It seems like all the elements that are loaded when the page is requested are correct, but the menuitems, that are shown when you open a new level of the menu are incorrect.

Kristian Hole

Friday 14 October 2005 2:45:29 am

@Bo: Ahh.. I know why this is happening. The character set is not properly set. I will take a look at it this weekend.

EDIT:
Are you using UTF8 by the way?

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bo Vejgaard

Friday 14 October 2005 5:01:41 am

@Kristian

I have tried both utf-8 and 8859-latin-1, and I can't get any of them to work.

Kristian Hole

Friday 14 October 2005 5:23:38 am

@Bo:

I did a small fix in the SVN version now. Can you try to check it out and test it?

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bo Vejgaard

Friday 14 October 2005 5:37:08 am

@Kristian:

Still only works on FireFox.

Bertrand Dunogier

Monday 17 October 2005 1:00:09 am

Two comments on the menu :)

1. It looks like the tooltip that gives the node ID on hover on a menu item has not been reintegrated.

2. Is it a mistake that the open/close image tags are not closed ?

<img id='n60_toggle' src="/design/admin/images/content_tree-open.gif"</img>

Kristian Hole

Monday 17 October 2005 2:30:11 am

@Bo: It seems to be working with norwegian øæå and latin-1 charset. I'm not sure what is causing this.

@Bertrand:
1) We know the tooltips are missing, they will be added at some time.
2) I closed the tags in SVN.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bertrand Dunogier

Monday 17 October 2005 2:44:02 am

1. Cool
2. Thanks

;)

Bo Vejgaard

Tuesday 18 October 2005 12:09:17 am

Now I'm confused, because i still get charset errors, but only in IE and only on the parts of the menu that are closed when the page is loaded.

How many places in the eZ configuration do you have to specify which charset you are using?

EDIT: I have checked that my DB is set to latin1 and the databasesetting in site.ini is set to iso-8859-1.
The defaulttemplatecharset in template.ini is set to is0-8859-1 as well. Last, the Charset is set to iso-8859-1 in i18n.ini.

Kristian Hole

Thursday 20 October 2005 1:50:24 pm

@Bo:

Seems like you have all the correct settings. I'm a bit confused since it works here with øæå.

I suggest you try to load "/dynamicmenu/expand/2" on your site, where you replace 2 with a node id where you have get the problems with øæå.

Does that work? If you have Firefox with the developer toolbar, can you also check the charset that is set under "Information" -> "View response headers"

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bo Vejgaard

Friday 21 October 2005 12:14:44 am

@Kristian:

Well the charset in the response header is iso-8859-1, and everything is working perfectly in firefox. If I open the /dynamicmenu/expand/(nodeid) the menu looks fine in Internet Explorer as well, but you can't use the shown menu. Since the problem never is in the part of the menu that is shown while the page is loaded, I can't use this approach to find the flaw.

It seems like the nested calls to load the menu is where the problem is, and this is very confusing, because as far as I understand the code, it seems like it is the same code that is called again.
What confuses me even more, is that the problem is only on Internet Explorer. So it seems like the nested load calls returns text in a different charset than the original.

If you like, I can mail a screendump where the selected node is marked, so it is clear where the errors are.

Kristian Hole

Monday 24 October 2005 2:04:30 am

@Bo:

The code is used, both for loading the menu, and for expanding an element with javascript. If you load the /dynamicmenu/expand/23. It does the exact same as if you click the + sign. If this loads correctly, the problem is in the javascript. Can you confirm this Bo? Try to load the sublevel that is not working directly with the /dynamicmenu/expand.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bo Vejgaard

Tuesday 25 October 2005 12:46:39 am

@Kristian:

The /dynamic/expand/59 is working in both IE and firefox, so then it must be the javascrupt, and that is not my strong side.

Kristian Hole

Wednesday 26 October 2005 12:24:40 am

Then we should take a look at the javascript part. A bit strange that it works for me. Are you running eZ publish on a windows or linux server? Which version of IE are you running?

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Bo Vejgaard

Wednesday 26 October 2005 12:36:53 am

@Kristian:

I'm running a debian 3.1 server, with mysql 4.0.24, apache 1.3.33 and php 4.3.10-16. The eZ version is 3.6.0.
The IE version is 6.0.2900.2180.xpsp_sp2_gdr.050301-1519

eZ debug

Timing: Jan 18 2025 15:51:16
Script start
Timing: Jan 18 2025 15:51:16
Module start 'content'
Timing: Jan 18 2025 15:51:17
Module end 'content'
Timing: Jan 18 2025 15:51:17
Script end

Main resources:

Total runtime1.3265 sec
Peak memory usage4,096.0000 KB
Database Queries268

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.5000180.8125
Module start 'content' 0.00631.1329 770.3125805.2422
Module end 'content' 1.13920.1872 1,575.5547388.7266
Script end 1.3265  1,964.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2966210.0002
Check MTime0.00150.1093210.0001
Mysql Total
Database connection0.00090.064210.0009
Mysqli_queries1.213391.46212680.0045
Looping result0.00260.19712660.0000
Template Total1.298797.920.6494
Template load0.00190.145920.0010
Template processing1.296897.755820.6484
Template load and register function0.00010.007910.0001
states
state_id_array0.00090.070310.0009
state_identifier_array0.00100.078420.0005
Override
Cache load0.00190.1402920.0000
Sytem overhead
Fetch class attribute can translate value0.00150.110450.0003
Fetch class attribute name0.00060.0458220.0000
XML
Image XML parsing0.00200.147050.0004
class_abstraction
Instantiating content class attribute0.00010.0048350.0000
General
dbfile0.00210.1594330.0001
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
20content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
26content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
15content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/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: 71
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs