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

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 20 2025 14:29:41
Script start
Timing: Jan 20 2025 14:29:41
Module start 'layout'
Timing: Jan 20 2025 14:29:41
Module start 'content'
Timing: Jan 20 2025 14:29:42
Module end 'content'
Timing: Jan 20 2025 14:29:42
Script end

Main resources:

Total runtime1.1952 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.0391152.6094
Module start 'layout' 0.00480.0038 741.648439.4141
Module start 'content' 0.00861.1846 781.0625651.6172
Module end 'content' 1.19310.0021 1,432.679720.1875
Script end 1.1952  1,452.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2759160.0002
Check MTime0.00120.1019160.0001
Mysql Total
Database connection0.00060.048610.0006
Mysqli_queries1.112393.0610680.0164
Looping result0.00070.0597660.0000
Template Total1.150796.320.5753
Template load0.00190.158220.0009
Template processing1.148896.113020.5744
Template load and register function0.00010.010710.0001
states
state_id_array0.00140.114010.0014
state_identifier_array0.00260.221320.0013
Override
Cache load0.00190.1595780.0000
Sytem overhead
Fetch class attribute can translate value0.00070.060630.0002
Fetch class attribute name0.00100.086290.0001
XML
Image XML parsing0.00330.274830.0011
class_abstraction
Instantiating content class attribute0.00000.0022120.0000
General
dbfile0.00410.3459310.0001
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 55
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs