Share » Forums » Developer » New extension for integrating...

New extension for integrating external audio content

New extension for integrating external audio content

Tuesday 07 April 2009 8:31:22 am - 5 replies

Author Message

Łukasz Serwatka

Wednesday 08 April 2009 12:26:22 am

Hi,

Here is a old tutorial, it should give you an idea:
http://ez.no/ezpublish/documentation/development/extensions/datatypes

However do not use the code from tutorial as it is old. Generate code for new datatype in the eZ Publish Administration Interface Setup->RAD. This should give you a base code for new datatype valid with latest eZ Publish version.

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

Olivier Guilyardi

Wednesday 08 April 2009 4:01:59 am

Thank you for this answer.

However, I think I already understood how to create a new DataType by reading Thomas Koch's tutorial, as mentioned in my previous post.

The problem is that in his tutorial, the DataType are mainly use to allow adding an input field to a given class, and especially to an Article.

If I simply needed to add one audio item per article that would fit the job.

But as I explained before I need to allow adding several audio items into a given article <b>and</b> to make these items appear at arbitrary places inside the body of the article, just like images.

How to achieve this?

Łukasz Serwatka

Wednesday 08 April 2009 4:39:21 am

Hi again,

You can create a new content class dedicated to the audio content. Allow users to create content objects as instance from new class. Then in the edit mode you can add them as related content and using <embed> tag (similar to images) embed them in the body (xml block attribute) of article or whatever class you need it. You will need to make also embed template for displaying such embed content properly.

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

Olivier Guilyardi

Wednesday 08 April 2009 4:58:24 am

Okay, I'm now experimenting with embedding.

A few more questions before I start coding:

1 - Can my extension automatically register a class in addition to the data type, so that the admin doesn't need to create a new class by him/herself? If yes, how?

2 - How can I bundle the embed template in my extension and indicate that the content objects should be displayed using it?

3 - My audio player will certainly be based on soundmanager2 (http://www.schillmania.com/projects/soundmanager2/) and thus require js+swf dependencies to load in html head. How do I handle this?

4 - Is there something like registering a new 'Media type', knowing that my audio items won't need a file to be uploaded?

Olivier Guilyardi

Friday 17 April 2009 7:35:23 am

Hi,

small update: I'm finished.

The eZTelemeta 0.1 extension allows to integrate sound items from a Telemeta (http://telemeta.org) remote installation, together with metadata retrieved using the OAI-PMH xml dialect through HTTP. It has been tested with eZPublish 0.4.1 and Telemeta r437.

SVN repository:
http://telemeta.org/browser/trunk/tools/eztelemeta

Although it is a currently a bit specific to Telemeta and audio items, a fair amount of the code is generic and one should easily be able to adapt it for :

- integrating metadata coming from some sort of OAI-PMH data provider
- audio integration (embedding) using the included SoundManager2-based player

eZTelemeta is licensed under CeCILL, which is compatible with the GPL.

Bye

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu