Forums / Developer / xajax developers...

xajax developers...

Author Message

Marcel GD

Friday 27 June 2008 4:29:58 pm

Hi !
I've been posting with some other alias but no answer were received in a while, so I decided to change it for this time.
There is a lot of developers in the [eZjaxx] Ajax Admin extension discussion:
- André R.
- Marco Zinn
- Kristof Coomans
etc.
I'm sure one of them can help me, but I'll be grateful to anyone because I'm locked on this... I really need it.

I need a line of code to fetch an URL using xajax 0.5, already installed in my eZ Publish 3.10.x.
For example, I have this:

<a ... href ={'www.mysite.com/esl/content/view/full/200' | ezurl} ... >text</a>

And I need to transform this link in some way to use xajax.
Is that possible ? How ?
Any clues will be appreciated.

thanks in advance...
Marcel

Łukasz Serwatka

Saturday 28 June 2008 1:29:08 pm

What exactly do you need? The XHTML from that view or content in different format e.g JSON or XML?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marcel GD

Tuesday 01 July 2008 1:42:54 pm

Hi Łukasz !
Thank U very much for your response.

I'm a developer and I know ajax from other platforms, but I have not experience on eZ.
So what I need is some way to get:
1- some object with the content of one specific node (JSON & XML are fine).
2- the HTML of that view, so I can insert the values of the content node into that HTML, using JavaScript code.

I already have installed xajax 0.5, and xajax-classattributes in my eZ Publish.

Thank you for your time Łukasz...
Marcel GD

Łukasz Serwatka

Tuesday 01 July 2008 11:00:01 pm

Hi,

I haven't tried specifically xajax, but typically while working with YUI for example, I would create a new module/view where one of the params is a node_id something like

www.example.com/handlerequest/23

Then sending async get call you can get what you want from that URL as on PHP level you can fetch node_id = 23 then generate either XHTML output or whatever you need. You can pass of course more params, like www.example.com/handlerequest/23/JSON, where last part can be use for decision what output return.

To learn more about creating extensions and modules from article or old doc:
http://ez.no/developer/articles/an_introduction_to_developing_ez_publish_extensions
http://ez.no/ezpublish/documentation/development/extensions/building_an_ez_publish_module

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

André R.

Wednesday 02 July 2008 12:43:23 am

If you have Online Editor 5.0 installed, you can reuse it's ajax views.

try:
<system_url>/ezoe/load/<object_id>
<system_url>/ezoe/load/eznode_<node_id>

You can also specify witch datamap attribute to load as second parameter, like:
<system_url>/ezoe/load/<object_id>/image

If you instead want to load all the children of a node you can use expand:
<system_url>/ezoe/expand/<node_id>/<offset>/<limit>
(offset and limit are optional)

The code for the views, load (json):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/load.php

Expand (json):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/expand.php

Search (json):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/search.php

Embed View (xhtml using the templates normally used):
http://svn.ez.no/svn/extensions/eztinymce/trunk/ezoe/modules/ezoe/embed_view.php

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

André R.

Saturday 25 October 2008 12:40:34 am

Since this thread is referred to by others, here are some updates:

Some of the ajax concepts from oe5 have been split out and generalized into a extension called ezcore, right now the extension doesn't do much on it's own, more like a developer toolbox for simplifying ajax concepts in eZ Publish.

http://projects.ez.no/ezcore

Among the concepts:

* css/js packer( php class eZPacker ):
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ezcss.txt
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ezscript.txt

* objects/nodes to json/xml/hash/text( php class eZAjaxContent ):
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/node_encode.txt
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/json_encode.txt
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/xml_encode.txt

* ezcore/call (php class eZCoreServerCall):
A xajax like interface for calling your own php/template code as registered by a couple of setting lines, but without any js library dependency.
http://svn.projects.ez.no/ezcore/trunk/ezcore/doc/ajax.txt

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

eZ debug

Timing: Jan 20 2025 10:55:38
Script start
Timing: Jan 20 2025 10:55:38
Module start 'content'
Timing: Jan 20 2025 10:55:39
Module end 'content'
Timing: Jan 20 2025 10:55:39
Script end

Main resources:

Total runtime1.0385 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0087 588.8359180.8438
Module start 'content' 0.00870.9040 769.6797656.6797
Module end 'content' 0.91270.1258 1,426.3594341.0703
Script end 1.0385  1,767.4297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4238210.0002
Check MTime0.00140.1354210.0001
Mysql Total
Database connection0.00100.094610.0010
Mysqli_queries0.925489.10512050.0045
Looping result0.00220.20732030.0000
Template Total1.007197.020.5036
Template load0.00200.188020.0010
Template processing1.005196.784020.5026
Template load and register function0.00040.040610.0004
states
state_id_array0.00130.127110.0013
state_identifier_array0.00080.074920.0004
Override
Cache load0.00180.1711780.0000
Sytem overhead
Fetch class attribute can translate value0.00140.136540.0004
Fetch class attribute name0.00100.099390.0001
XML
Image XML parsing0.00630.610340.0016
class_abstraction
Instantiating content class attribute0.00000.0026120.0000
General
dbfile0.01671.6123420.0004
String conversion0.00000.001030.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
18content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
22content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 55
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs