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.

CE Image parsing dilemma

April 26, 2012 5:53am

Subscribe [2]
  • #1 / Apr 26, 2012 5:53am

    Wonk

    21 posts

    I have started using CE Image and it’s a wonderful plugin.  I can get it to work fine and have used it to place watermarks.  However now I have to insert it into a place that is already referencing a channel variable and I can’t get it to all parse correctly (I’m a php neophyte), just get a broken link.
    This happens to be inside an html5 video tag.  I should add that using the ce image works fine in another place, and the video works fine without the ce image manipulation inserted.
    This is simply to get a play icon onto the poster image.  I tried it with all double quotes, double on the outside, single on the inside, and now this.  Nada.  Any help with this would be appreciated.

    <video width="640" height="360" preload="auto" poster='{exp:ce_img:pair src="/images/uploads/site/playbutton75.png" parse="inward" width="75" height="75" crop="no"}
       {exp:ce_img:single src="{image}" watermark="{made}|0,0|80|center,bottom|0,-50"}
       {/exp:ce_img:pair}'>
    
         <source src="{video_mp4}" type="video/mp4" >
        <source src="{video_ogv}" type="video/ogg" >
        <source src="{video_webm}" type="video/webm" >
    
        <object width="640" height="360" type="application/x-shockwave-flash" data="/js/flashmediaelement.swf">   
         
           
        <a href="{image}ZB8Qh4LDuKtz63xQbGOpPPpx0MzU2wU0typography_img_src_end width=640 height=360 alt=Flash does not seem to be working on your system.      title=No video playback capabilities, please use a modern browser such as Chrome or Safari ">{image}ZB8Qh4LDuKtz63xQbGOpPPpx0MzU2wU0typography_img_src_end width=640 height=360 alt=Flash does not seem to be working on your system.      title=No video playback capabilities, please use a modern browser such as Chrome or Safari </a>
       </object>  
    </video>

     

  • #2 / Apr 26, 2012 11:44am

    aelvan

    33 posts

    How about something like this:

    {exp:ce_img:single src="{image}" watermark="{exp:ce_img:single src='/images/uploads/site/playbutton75.png' width="75" height="75" crop="no" url_only='yes'}|0,0|80|center,bottom|0,-50" parse='inward'}

    Just ran a quick test and it seems to work for me.

    Notice the url_only=‘yes’ in the inner tag, and parse=“inward” in the outer.

  • #3 / Apr 28, 2012 5:39am

    Wonk

    21 posts

    Thanks aelvan,
    I am still trying to make it work right but I think it’s more of an issue with how the variables work.  If I go with your solution directly I get my large image blown up to fit inside 75px.  I just have to take a few minutes to get my head around it I guess.

    By the way, how does the url_only tag help?  I read the desc but don’t quite grok it.

  • #4 / Apr 28, 2012 6:48am

    aelvan

    33 posts

    The url_only on the ce image tag makes it return only the url to the manipulated image, instead of the actual <img> tag. Which is what the watermark parameter needs.

    Do you have the images (base image, playbutton, and the manipulated image) available somewhere, so I can see what happends? Didn’t quite understand the stuff about “blown up to fit inside 75px”. Is the {image} image, smaller than 75px?

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

ExpressionEngine News!

#eecms, #events, #releases