• Resolved xxhunterxx

    (@xxhunterxx)


    hello
    my site crash when using ie ( 7 8 ) in firefox work great …
    it crash only when i add js code ..
    after searching and editing i have found that this code crash the site
    <?php $key="videoembed"; echo get_post_meta($post->ID, $key, true); ?>
    crash only when i add js code ..

    i use this code to embed video from megavideo ..

    how can i fix that ?

    tnx a lot

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter xxhunterxx

    (@xxhunterxx)

    any !?

    Hi,

    After adding JS code..your blog is working in other browser like Firefox?

    Thanks,

    Shane G.

    Thread Starter xxhunterxx

    (@xxhunterxx)

    yes ..
    opera.. google chrome ..
    only ie crash …
    i hate ie .. but the prob is that all my visitors use ie (6’7’8) .. i cant force them to use other browsers..

    The code you provide is just grabbing data from an extra field called “videoembed”. I assume you have this field available in at least one post to embed video?

    Dunno, just guessing, but maybe your video player can’t handle empty file locations? Or…

    A link to your site would be handy.

    If you use the embed code and replace the video url by the value from the extra field I see no clear reason why your site would crash.


    <object width="640" height="344"><param name="movie" value="https://www.megavideo.com/v/1a8763d06fec71ba32b7ac45887fd0ec2"></param><param name="allowFullScreen" value="true"></param><embed src="https://www.megavideo.com/v/1a8763d06fec71ba32b7ac45887fd0ec2" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="344"></embed></object>

    Resulting in something like:


    <object width="640" height="344"><param name="movie" value="<?php $key='videoembed'; echo get_post_meta($post->ID, $key, true); ?>"></param><param name="allowFullScreen" value="true"></param><embed src="<?php $key='videoembed'; echo get_post_meta($post->ID, $key, true); ?>" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="344"></embed></object>

    I’ve put videoembed between different (single) quotes, to prevent the value to become value="<?php $key=" – after which it breaks.

    Thread Starter xxhunterxx

    (@xxhunterxx)

    its not empty file location ..
    all the posts use the code( all the psots have 1 video embeded )
    and i use the embed code

    i can use js only when i add the embed code to the post it self not the speciael key ..
    ex :
    embed code
    text bla bla bla

    no crashing …

    text bla bla bla

    special key = videoembed –> embed code ..

    crash

    sorry for my bad english

    I think the following should do the trick, checking for data before embedding.


    <?php if ( get_post_meta($post->ID, "videoembed", true) ) : ?>
    <object width="640" height="344"><param name="movie" value="<?php echo get_post_meta($post->ID, 'videoembed', true); ?>"></param><param name="allowFullScreen" value="true"></param><embed src="<?php echo get_post_meta($post->ID, 'videoembed', true); ?>" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="344"></embed></object>
    <?php endif; ?>

    I dont’t see what you mean by js. Could you provide me with a link to your site?

    Thread Starter xxhunterxx

    (@xxhunterxx)

    evry js code ( javascript ) like google ads ..
    i dont think that the code u have posted can help ..
    cause i copy all the embed code to the special field ( videoembed )
    or maybe it does what do i need to copy to the special field ?

    It might very well be the cause: the embed code contains a lot of quotes. Missing one that should have been escaped, will ruin your output.
    I’d go for the code as provided and changing the content of the videoembed field to the url of the movie. See what happens if yuo try that.

    Do you happen to have google gears as an addon in your browser? if so try turning that off.

    Thread Starter xxhunterxx

    (@xxhunterxx)

    edde sory the site is down ( thats what happen when u buy reseller from kids )

    and MrCanuck89 .. no google gears no addons .. nothing
    the site crash for evry 1 .. i have noticed that to late .. i have more then 400 posts with embeded videos ..

    Testing is a little hard when your site isn’t up and running. ??

    Thread Starter xxhunterxx

    (@xxhunterxx)

    ill test right now (: the site is back

    Thread Starter xxhunterxx

    (@xxhunterxx)

    doenst crash when adding only the url to special field ..
    but no video embeded ..

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘ie crash my site’ is closed to new replies.