Forums / Developer / OASIS extension and default import class

OASIS extension and default import class

Author Message

J-A Eberhard

Monday 04 December 2006 11:51:40 pm

The OASIS (ezodf) have a setting to specify the default class for import in odf.ini

[ODFImport]
# Default class for import
DefaultImportClass=article

I want to use the OASIS import for different type of objects, articles, products, ....
How could I have:
- The possibility for the user to choose the type of object he want his Open Office document to be
- The ability of eZ publish to override this settings according to the node / subtree of the import?

Thanks

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Daniele P.

Wednesday 06 December 2006 6:07:31 am

Hi,
Look at odf.ini. You could define different classes.
The match is done looking at document sections name. In OpenOffice use Insert -> Section and create a template for yor class. AFAIK there is no such option in Mircosoft Word so all Word documents are imported using the default class.

Felipe Jaramillo

Monday 16 July 2007 10:51:44 pm

Hello all,

I have been looking at something similar to what is mentioned in this post.

After looking at modules/ezdf/ezooimport.php file it seems that the odf -> eZ class matching is done by trying to match the document's seaction names to attribute names in the available declared classes.

Therefore, if I understand correctly, <i>classes need to have a unique attribute/identifier combinations</i>, to avoid being mistakenly mapped to another class.

I guess it would be useful to have a different way of identifying classes, like prepending the class to the filename (eg. article_nameofarticle.odf and publication_nameofpublication.ofg) even if both classes contain the same attributes and have the same identifiers.

Another need for better matching would be to have pre-filled content objects which contain datatypes not currently supported by the extension.

Could anyone confirm this?

Regards,

Felipe

Felipe Jaramillo
eZ Certified Extension Developer
http://www.aplyca.com | Bogotá, Colombia

eZ debug

Timing: Jan 18 2025 05:07:43
Script start
Timing: Jan 18 2025 05:07:43
Module start 'content'
Timing: Jan 18 2025 05:07:44
Module end 'content'
Timing: Jan 18 2025 05:07:44
Script end

Main resources:

Total runtime1.4028 sec
Peak memory usage4,096.0000 KB
Database Queries196

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 587.8438180.8125
Module start 'content' 0.00721.2627 768.6563573.2500
Module end 'content' 1.26990.1329 1,341.9063332.7422
Script end 1.4028  1,674.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.3203210.0002
Check MTime0.00150.1070210.0001
Mysql Total
Database connection0.00110.080410.0011
Mysqli_queries1.331994.94041960.0068
Looping result0.00180.12961940.0000
Template Total1.372597.820.6862
Template load0.00230.164220.0012
Template processing1.370197.669020.6851
Template load and register function0.00010.007210.0001
states
state_id_array0.00150.104210.0015
state_identifier_array0.00120.086020.0006
Override
Cache load0.00190.1351250.0001
Sytem overhead
Fetch class attribute can translate value0.00140.102440.0004
Fetch class attribute name0.00110.080240.0003
XML
Image XML parsing0.00090.066840.0002
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00350.2466260.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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
2content/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: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs