ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Adding HTML to custom field in Photo Gallery Module!

April 13, 2008 8:40pm

Subscribe [3]
  • #1 / Apr 13, 2008 8:40pm

    qruxart

    20 posts

    This is not working.

    I’ve created a custom field in the Photo Gallery Module and want to cut and paste code into it from a photo printing website. I’ve set the formatting of the custom field to none, but it keeps converting all greater-than/less-than symbols to its tag code. Here’s a link to my problem:

    http://www.andrewreitsma.com/index.php/photography/detail/90/

    How do I get it to just display the link as just a link as opposed to a code block?

  • #2 / Apr 14, 2008 9:59am

    e-man

    1816 posts

    Check if formatting is really set to “none” and be sure you’re copying the exact amount of code. I see a closing script tag there but no opening one.

  • #3 / Apr 14, 2008 2:53pm

    qruxart

    20 posts

    Thanks for replying. I checked formatting and it is set to none for sure. Here’s the code that I was trying to paste in there:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="180" height="322" id="badge" align="middle"><embed src="http://www.imagekind.com/flash/banner_single.swf?imageNum=91eb21ab-863c-4239-9c47-9cfc41017c44&guid=3fe31e19-1a23-4ae0-8513-c325ecddbdc2&rand=false" quality="high" wmode="transparent" bgcolor="#ffffff" width="180" height="322" name="badge" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object></ script>

    and here is how I’ve placed the tag on my template:

    <!-- START ENTRY DISPLAY -->
    {exp:gallery:entries gallery="{gallery_name}" show_future_entries="yes"}
    <ul id="detail">
    <li id="image">{image_url}
    {title}
    {if caption}{caption}{/if}
    </li>
    </ul>
    {custom_field_three}
    {/exp:gallery:entries}
    <!-- END ENTRY DISPLAY -->

    It’s suppose to just show the flash button from Imagekind on my website. Very strange.

  • #4 / Apr 14, 2008 4:24pm

    e-man

    1816 posts

    My point exactly: the code you are pasting in has a closing :

    </ script>

    tag but no opening script tag. Can you tell us where you are copying and pasting this from?

  • #5 / Apr 14, 2008 6:37pm

    aquaadmin

    64 posts

    From a website called Imagekind.

    As a member I can post a link to my artwork that I can place on my own site. I assumed it was just a cut and paste thing. I guess I need to add a tag to the beginning of it?

  • #6 / Apr 14, 2008 6:46pm

    e-man

    1816 posts

    I see now, but the code you’re trying to embed (see 2 posts up) is not the same as the one I see in the picture. Have you tried copying and pasting again and checking that you have, indeed, all the code?

  • #7 / Apr 14, 2008 7:06pm

    qruxart

    20 posts

    You’re right that code is incorrect.

    I think something got cut off in the pasted code when I made that post, but here it is fully pasted:

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="180" height="322" id="badge" align="middle"><embed src="http://www.imagekind.com/flash/banner_single.swf?imageNum=14f692e0-0d43-4ef0-8937-c2042d515792&guid=a177a3d1-8754-42cf-9571-921b15dd01da&rand=false" quality="high" wmode="transparent" bgcolor="#ffffff" width="180" height="322" name="badge" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object></ script>

     

    In any case I pasted this same code into a primarily static template and it worked. And then pasted the same code into the edit pane of the image in the photo gallery module and it didn’t work. Something is strange with the way EE displays data in custom fields that contain html code. I checked the prefs and turned the formatting to off. Is there a tag I need to wrap the {custom_field_one} tag in, in order for this to work?

  • #8 / Apr 14, 2008 7:10pm

    qruxart

    20 posts

    EE forum module is stripping out some of this code I’ve concluded.

    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="180" height="322" id="badge" align="middle"><embed src="http://www.imagekind.com/flash/banner_single.swf?imageNum=14f692e0-0d43-4ef0-8937-c2042d515792&guid=a177a3d1-8754-42cf-9571-921b15dd01da&rand=false" quality="high" wmode="transparent" bgcolor="#ffffff" width="180" height="322" name="badge" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ></embed></object></ script>

    It’s doing it in this post as well, turning all the < into <

  • #9 / Apr 14, 2008 7:11pm

    e-man

    1816 posts

    Truly strange!
    What settings are you using for that particular customfield?
    It should look like the screenshot…

  • #10 / Apr 14, 2008 7:16pm

    qruxart

    20 posts

    Remember this is in the photo gallery module. And by the way EE for some reason is messing with the pasted code.

    As seen in my last post.

  • #11 / Apr 14, 2008 7:20pm

    e-man

    1816 posts

    Sorry, not very familiar with the Photo module.
    What happens when you ser auto-link url’s to no?

  • #12 / Apr 14, 2008 7:20pm

    e-man

    1816 posts

    Sorry, not very familiar with the Photo module.
    What happens when you set auto-link url’s to no?

  • #13 / Apr 14, 2008 7:27pm

    qruxart

    20 posts

    Nothing happens when I set auto-link url’s to no.

    What’s strange too is how EE rewrites code even in this forum. What I cut and paste is not what comes out even using the code tags.

    This is the code without using the code tags which seems to be the correct way the code should be.

    EDIT:

    Actually the pasted code will not render correctly in the forum. It appears to only render correctly in the preview.

    Frustratingly odd??!!

    <object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0” width=“180” height=“322” id=“badge” align=“middle”><embed src=“http://www.imagekind.com/flash/banner_single.swf?imageNum=91eb21ab-863c-4239-9c47-9cfc41017c44&guid=5b24672c-ea93-4c71-85c1-760ee16a4b77&rand=false” quality=“high” wmode=“transparent” bgcolor=”#ffffff” width=“180” height=“322” name=“badge” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=“http://www.macromedia.com/go/getflashplayer” ></embed></object></ script>

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases