Jump to content

Shaun333

New Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Shaun333

  1. Btw, the strange thing is that the files do exist and when I visit the URL directly the correct thumbnail is displayed. But it comes up as "Image corrupt or truncated:" when I mouseover on the index page. It has me stumped. Could it be cycling too fast and missing the information it requires? If so, is it possible to setup my source so that it doesn't cycle to the next image until it has loaded the current one? That's all I can think of :/
  2. Thanks for your replies. I will look into optimizing them. Also, are you able to assist on where I should include your code snippet within the source code I provided? Cheers, Shaun
  3. Sorry, I am not linking my website as it is pornographic related. I just changed the URL to that. I have checked all the thumb URLs by visiting them to see if the images appear correctly - which they do. Regards, Shaun
  4. Hi All, I am having an issue with my image rotating PHP function code which I have attached below. 1% of the time it can rotate through 3 of the 10 pics before stopping. 99% of the time it doesn't work at all. The issue that is popping up in the Developer console of Firefox is "[12:25:28.802] Image corrupt or truncated: http://www.mywebsite.com/wp-content/uploads/script-thumbs/79/7979_5.jpg @ http://www.mywebsite.com/wp-content/uploads/script-thumbs/79/7979_5.jpg". It is not specific to Firefox. Any assistance would be appreciated. function script_thumb($prefix,$title){ $saved_thmb = get_post_meta( get_the_ID(),'saved_thmb',true); $subPath = tubeace_sub_dir_path(get_the_ID()); $upload_dir = wp_upload_dir(); $thumb_url = $upload_dir[baseurl]."/script-thumbs/".$subPath."/"; if($saved_thmb==1){ $thumb = $thumb_url."/".get_the_ID()."_1.jpg"; } elseif($saved_thmb>1) { $def_thmb = get_post_meta( get_the_ID(),'def_thmb',true); $thumb = $thumb_url."/".get_the_ID()."_".$def_thmb.".jpg"; $rotate_thumbs = "onmouseover=\"thumbStart('$prefix-".get_the_ID()."', $saved_thmb, '$thumb_url');\" onmouseout=\"thumbStop('$prefix-".get_the_ID()."', '$thumb_url', '$def_thmb');\""; } else { return; } $thumb = "<img class=\"img-responsive\" src=\"$thumb\" $rotate_thumbs id=\"$prefix-".get_the_ID()."\" alt=\"".esc_attr($title)."\">"; return $thumb; } Cheers, Shaun
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.