Can't Get Html Codes working

Author Message

Courtland Hui

Wednesday 04 May 2005 6:40:46 pm

I can't get:
<embed src="The Music URL" loop="true" autostart="true"controls="smallconsole">

to work...
It always says: Unsupported tag embed(removed)

What can i add to make the code work?

kracker (the)

Wednesday 04 May 2005 7:10:27 pm

Courtland,

The simplest way to do what you wish is to create a custom tag which encapsulates (adds) your desired code inside of an eZ publish (xmltext) field.

There are several references which show you just how to create and use different kinds of custom tags:

http://www.ez.no/ez_publish/documentation/customization/components/datatypes/ezxmltext/custom_tags
http://ezpub.co.uk/faqs/design/creating_custom_tags_in_ez_publish

http://www.ez.no/ez_publish/documentation/reference/xml_tags
http://www.ez.no/ez_publish/documentation/customization/components/datatypes/ezxmltext/tags
http://ez.no/content/advancedsearch?SearchText=Custom+Tags&SubTreeArray=488&SearchButton=Search

It may seem like a bit of work but it's really very simple once you get used to it.

keep hacking at it ;)
//kracker

Eminem : Get My Gun

It's <i>kracker</i> with a 'k' not a 'c', lower case not capital. I'm not a noun ... (using the color of my skin as a weapon ... against myself)

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

kracker (the)

Wednesday 04 May 2005 7:40:07 pm

So while h'm giving it away now ...

Your custom tag template might look like this:

<embed src="{$src}" loop="{$loop}" autostart="{$autostart}" controls="{$controls}">

While the text you used to 'call' the custom tag from inside a (xmltext) field might look like this:

 <custom name='embed_midi' src='http://example.com/media/war_games.midi' loop="true" autostart="true" controls="smallconsole">
No content needed here as it would not be displayed in this specific implementation / situation ;)
</custom>

If you do the reading you'll know just where to put this code. This should be a good to go solution for you.

Nothing like using ez.no to do your development for ya ;) but then hey! isn't that what is so great about a community ... now when do I get mine :?

cheers,
//kracker

ani difranco : knuckle down

red hot chili peppers : give it away

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Courtland Hui

Wednesday 04 May 2005 8:14:39 pm

ok, i added embed_midi.tpl as a file (With the midi code in it) in the design/standard/templates/content/datatype/view/ezxmltags folder.
Then in the editing box (to edit the site) i put the code: <custom name='embed_midi' src='Music Here' loop="true" autostart="true" controls="smallconsole">
</custom>
It then said when i send for publishing, it says:

Required data is either missing or is invalid:

* Description: Custom tag 'embed_midi' is not available, use one of the following: 'factbox' 'quote' 'strike' 'sub' 'sup';

PLEASE HELP ME!

kracker (the)

Wednesday 04 May 2005 8:36:29 pm

Hey.

There is no need to beg, in caps no less.

Moving on, so the next step is to tell eZ publish about your new custom tag via the settings (ini files).

I think you didn't really read the instructions I linked to you. Because the three instructions addressed your missing dependency.

> 3. Add custom tag to content.ini.php
> file so it is available to the online editor, if you are using it.

[CustomTagSettings]
AvailableCustomTags[]=embed_midi

The only alteration to the above instruction I would suggest is to use the <i>settings/override/content.ini.append.php </i> (override) settings file instead of the <i>settings/content.ini</i> file (you may need to create it, the format will be the same as the <i>settings/content.ini</i> file).

Also be sure that you have cleared all of your eZ publish cache (not just the template cache)

./bin/shell/clearcache.sh --clear-all

In hind site, It might be simpler for you to place your custom tag into your primary sitedesign instead of the standard. Though sometimes you have to cut your knuckles learning up on eZ publish before you re-implement your solution cleanly.

I only mention this because when you do upgrade eZ publish you will have to track, document and backport these customizations into your future upgraded eZ publish installation. Where as if you were to simply keep your custom tags in your primary sitedesign you would not need to watch these dependencies so closely when you go to upgrade eZ publish.

I would store them instead into : <i>design/example_org_user/templates/content/datatype/view/ezxmltags</i> Again, you might need to create the directory structure (above).

//kracker

Atmosphere : God Loves Ugly

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Courtland Hui

Thursday 05 May 2005 12:29:15 pm

ok, it got accepted into the system... i pressed publish and it went ok... but one more thing...
WHY DOESN"T IT PLAY?!?!!?!?!?!

Also, how do you convert reguar html like

<embed src="The Music URL" loop="true" autostart="true"controls="smallconsole">)

to:

<embed src="{$src}" loop="{$loop}" autostart="{$autostart}" controls="{$controls}">

?
I'm sorry if i'm bombarding you with questions.

kracker (the)

Thursday 05 May 2005 4:33:44 pm

Courtland,

It might be <i>more</i> helpful to give us the html rendered snippet of html code from your web browser while looking at the affected page by using the "view source" feature and looking for your embed tag. I want to see just what your browser is showing you, to deduce just why it's not playing your media file.

Oh and please don't change the source code to hide public or internal urls, that makes it really really really hard to help people who do this ...

There is a good possibility that something on the rendering is not quite right...yet :)

//kracker
Sole : Very Important Message

more details~@! always asking for more details, specifics, paragraph descriptions spanning several pages without regard for the reader, dumping so much raw information the reader doesn't get a breather, but then hey I'm a daydream believer ...

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Courtland Hui

Thursday 05 May 2005 4:42:30 pm

Ok. This is what I wrote for my short description for my Home Page:

AlphaCity is the hq of a mixed gallery, the official website for House Arrest, and plenty of other things that are to be revealed... Rest assured that there will be more.
<custom name='embed_midi' src="http://www.majin-tetley.com/Midis-2/American-Idiot.mid" loop="true" autostart="true" controls="smallconsole">
No content needed here as it would not be displayed in this specific implementation / situation ;)
</custom>

I think you would want to look at the source code ur self... its a little long...

www.weatransit.com/cland

kracker (the)

Thursday 05 May 2005 6:23:55 pm

Alright,

Hey, thanks for the great details (you can edit your message later to remove them if you wish), they really help.

It looks like your custom tag is not configured to be displayed on the user side.

What I mean to say is that it appears that eZ publish can not find the template for the custom tag or that the user siteaccess is not configured properly to know about the custom tag.

The end result being, your home page does not able to display the custom tag without knowing about it / and it's template.

1. What is the path / location of your custom tag template ?

2. What is the contents of your site's content.ini.append.php (override ini setting for setting/content.ini) ie:

settings/siteaccess/news/content.ini.append.php

for your primary 'user' siteaccess / design? Here is an example:

[CustomTagSettings]
AvailableCustomTags[]=mynewline
AvailableCustomTags[]=img
AvailableCustomTags[]=imglink
AvailableCustomTags[]=div
AvailableCustomTags[]=prediv
AvailableCustomTags[]=ptag
AvailableCustomTags[]=alink
#AvailableCustomTags[]=divstyle
AvailableCustomTags[]=forcebr
AvailableCustomTags[]=amazon_honor_system
AvailableCustomTags[]=paypal_donation
AvailableCustomTags[]=paypal_subscription

[CustomTagSettings]
IsInline[mynewline]=false
IsInline[forcebr]=true
IsInline[img]=true
IsInline[imglink]=true
IsInline[prediv]=false
IsInline[ptag]=false
IsInline[alink]=false
IsInline[div]=false
#IsInline[divstyle]=false
IsInline[amazon_honor_system]=true
IsInline[paypal_donation]=true
IsInline[paypal_subscription]=true

Be sure to clearcache after you make these changes or eZ publish may not know they have been made.

./bin/shell/clearcache.sh --clear-all

cheers,
//kracker

<b>simple plan : perfect</b>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.