[ Video Sharing CMS v4 ] Redtube thumbnails not showing but videos still working

Started by DonGito,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DonGitoTopic starter

Hello,

i checked that some Redtube thumbnails not showing (seems that they are deleted?) but the videos are still working fine.
Is there any new update going on on Redtube? Or do you have any clue how to fix this?

Maybe a "quick fix" like showing an dummy image would do the trick.
  •  

Marius P.

Hi,


this beats me a bit, haven't had to no time to check Redtube.
But I promise I will check it when upgrading the plugin for 4.0 and add an image downloader to it.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

DonGitoTopic starter

Hello Mario,

an image downloader would be the best option. :)

Thank you!
  •  

Marius P.

You can just use copy() http://php.net/manual/en/function.copy.php if you want a quick solution ;)

or
$id = uniqid();
[code]$localthumb = ABSPATH.'/'.get_option('mediafolder').'/thumbs/'.$id.".jpg";   
curl_get_file($thumb, $localthumb);
$thumb = get_option('mediafolder').'/thumbs/'.$id.".jpg";

function curl_get_file($remote_file, $local_file)
    {
        $ch = curl_init($remote_file);
        curl_setopt($ch, CURLOPT_USERAGENT, 'googlebot');
        curl_setopt($ch, CURLOPT_REFERER, 'google.com');
        $fp = fopen($local_file, 'w');
        curl_setopt($ch, CURLOPT_FILE, $fp);
        curl_exec ($ch);
        curl_close ($ch);
        fclose($fp);
    }
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

pantsuhentai

Quote from: @Mario on
You can just use copy() http://php.net/manual/en/function.copy.php if you want a quick solution ;)

or
$id = uniqid();
[code]$localthumb = ABSPATH.'/'.get_option('mediafolder').'/thumbs/'.$id.".jpg";   
curl_get_file($thumb, $localthumb);
$thumb = get_option('mediafolder').'/thumbs/'.$id.".jpg";

function curl_get_file($remote_file, $local_file)
    {
        $ch = curl_init($remote_file);
        curl_setopt($ch, CURLOPT_USERAGENT, 'googlebot');
        curl_setopt($ch, CURLOPT_REFERER, 'google.com');
        $fp = fopen($local_file, 'w');
        curl_setopt($ch, CURLOPT_FILE, $fp);
        curl_exec ($ch);
        curl_close ($ch);
        fclose($fp);
    }

where he put that code?
  •  

juanda

Hi,

I have the same issue, some thumbnails are missing but videos are working
  •  

PHPVibe A.

I'll check it on update for 4.0 (but if Redtube removes thumbs, the only viable option is to download them on import).

juanda

Hi Alexander

Thanks for the answer,I just was trying to modify the code of pantsuhentai to fix it or to download it again (as the video works perfectly) but I dont know in wich file I have to do it, or if I have to do it separately phpvibe. It seems that redtube changed the thumb file for any reason.

I know that this is not problem of PhpVibe, but if you think that there is another way to fix this issue as the site is looking really ugly with those thumbs missing, also this can happen to more users of Phpvibe with Redtube in the future.....

thanks in advance
  •  

PHPVibe A.

I'm not familiar at all with this plugin, please give me some time.
All I know are Mario's notes on what needs to be upgraded in it.

juanda

Hi alexander

I think that I found the Issue, it has to be with the path of the thumb file in redtube, all the thumbs that point to this path http://img.lc.cdn.redtubefiles.com/... are missing the  thumb, but if I replace the same thumb but with this path http://img.l3.cdn.redtubefiles.com/.... , (changing lc for l3) the thumb works perfectly,
so I think the solution will be make a search&replace in mysql database changing the path for thumbs from http://img.lc.cdn.redtubefiles.com/... to http://img.l3.cdn.redtubefiles.com/...., but I am not 100% sure that it work with all images.

  •  

PHPVibe A.


juanda

Fixed!!!! I replaced the urls through mysql and now the thumbs are correctly showed!!

thanks
  •  

PHPVibe A.


Similar topics (7)