forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: ashelby on March 02, 2007, 05:54:47 pm

Title: YouTube vid support
Post by: ashelby on March 02, 2007, 05:54:47 pm
Vuud, I downloaded the new package as you suggested and the only problem I had so far was YouTube Thumbnails not showing up and I got the CF - Error across the top, see attached.

I eventually narrowed it down to the cpmfetch_config.php file in this part of the file:

Code: [Select]
'cfSQLUserDataLink' => ' ',
'cfSQLUserTableName' => 'cpg_users',
[b]'filesystem_path_to_cpg' => '/',[/b]
'domain_name' => 'www.video-tutorials.com',
'cpg_album_url' => 'http://video-tutorials.com/vids/albums/',
'cpg_url' => 'http://video-tutorials.com/vids/'
I changed the "filesystem_path_to_cpg" to:

Code: [Select]
'cfSQLUserDataLink' => ' ',
'cfSQLUserTableName' => 'cpg_users',
'filesystem_path_to_cpg' => 'vids/',
'domain_name' => 'www.video-tutorials.com',
'cpg_album_url' => 'http://video-tutorials.com/vids/albums/',
'cpg_url' => 'http://video-tutorials.com/vids/'

When looking at the HTML source from the home page, I saw this:

Code: [Select]
CF-Error <!-- GITU: Could not find any image to display: Extension (strtolower): .jpg  File://albums/userpics/10002/thumb_youtube_vJGtfE9FH6s.jpg-->
CF-Error <!-- GITU: Could not find any image to display: Extension (strtolower): .jpg  File://albums/userpics/10002/thumb_youtube_yO4Y6TwKBpQ.jpg-->
CF-Error <!-- GITU: Could not find any image to display: Extension (strtolower): .jpg  File://albums/userpics/10002/thumb_youtube_vJGtfE9FH6s.jpg-->
CF-Error <!-- GITU: Could not find any image to display: Extension (strtolower): .jpg  File://albums/userpics/10002/thumb_youtube_yO4Y6TwKBpQ.jpg-->
<table  >

<tr>

<td><a href="http://video-tutorials.com/vids/displayimage.php?pos=-16"  ><img  src="http://video-tutorials.com/vids//images/thumb_swf.jpg" alt="Layers.swf" title="Layers.swf"  /></a><br /></td>
<td><a href="http://video-tutorials.com/vids/displayimage.php?pos=-17"  ><img  src="http://video-tutorials.com/vids//images/thumb_swf.jpg" alt="Addfont.swf" title="Addfont.swf"  /></a><br /></td>
<td><a href="http://video-tutorials.com/vids/displayimage.php?pos=-14"  ><img  src="" alt="youtube_vJGtfE9FH6s.jpg" title="youtube_vJGtfE9FH6s.jpg"  /></a><br /></td>
<td><a href="http://video-tutorials.com/vids/displayimage.php?pos=-15"  ><img  src="" alt="youtube_yO4Y6TwKBpQ.jpg" title="youtube_yO4Y6TwKBpQ.jpg"  /></a><br /></td>

You can see after the vids, there is a double //.  I am guessing this is due to the "filesystem_path_to_cpg" only containing a "/", this worked with the swf thumbnails, but not for the youtube thumbs.

I know youtube is not an official media type of CPG, but if anyone else is having same issue, this was how I fixed it.

I tried running the install a few more times and just couldn't get it right through the install, only manually changing it worked for me, so that is how I am leaving it so I can move on.  I may have been a complete moron, but I don't thinks so.  ??? 

Anyway, it works now, again. (http://www.video-tutorials.com) :)
Title: Re: YouTube vid support
Post by: vuud on March 02, 2007, 11:07:46 pm

Hmmm, how does youtube stuff work in CPG... I have no idea to be honest...  Does it link to u-tube or something?
Title: Re: YouTube vid support
Post by: Nibbler on March 02, 2007, 11:44:39 pm
With the youtube mod, the thumbnail of the video is downloaded from youtube and added to the gallery and gets treated as a custom thumbnail (of itself). When displayimage loads it detects that it is a youtube file (based on the filename) and generates the embedding code to link up to youtube instead of displaying the image. Does cpmfetch support custom thumbnails of videos?
Title: Re: YouTube vid support
Post by: vuud on March 03, 2007, 12:29:35 am
With the youtube mod, the thumbnail of the video is downloaded from youtube and added to the gallery and gets treated as a custom thumbnail (of itself). When displayimage loads it detects that it is a youtube file (based on the filename) and generates the embedding code to link up to youtube instead of displaying the image. Does cpmfetch support custom thumbnails of videos?

I does as far as the ones I knew about when I coded that part...

Here is my select for non-image types - if it hits one of these, it should display it.  I based it on the old CPG when I did this part.

Code: [Select]

           case ('.mp3'):
$defImage='thumb_mp3.jpg';
break;
case ('.mpeg'):
$defImage='thumb_mpeg.jpg';
break;
case ('.mpg'):
$defImage='thumb_mpg.jpg';
break;
case ('.avi'):
$defImage='thumb_avi.jpg';
break;
case ('.doc'):
$defImage='thumb_doc.jpg';
break;
case ('.wmv'):
$defImage='thumb_wmv.jpg';
break;
case ('.audio'):
$defImage='thumb_audio.jpg';
break;
case ('.document'):
$defImage='thumb_document.jpg';
break;
case ('.gz'):
$defImage='thumb_gz.jpg';
break;
case ('.htm'):
$defImage='thumb_htm.jpg';
break;
case ('.html'):
$defImage='thumb_html.jpg';
break;
case ('.mid'):
$defImage='thumb_mid.jpg';
break;
case ('.midi'):
$defImage='thumb_midi.jpg';
break;
case ('.mov'):
$defImage='thumb_mov.jpg';
break;
case ('.movie'):
$defImage='thumb_movie.jpg';
break;
case ('.ogg'):
$defImage='thumb_ogg.jpg';
break;
case ('.qtv'):
$defImage='thumb_qtv.jpg';
break;
case ('.ra'):
$defImage='thumb_ra.jpg';
break;
case ('.ram'):
$defImage='thumb_ram.jpg';
break;
case ('.rar'):
$defImage='thumb_rar.jpg';
break;
case ('.rm'):
$defImage='thumb_rm.jpg';
break;
case ('.rmj'):
$defImage='thumb_rmj.jpg';
break;
case ('.swf'):
$defImage='thumb_swf.jpg';
break;
case ('.txt'):
$defImage='thumb_txt.jpg';
break;
case ('.wav'):
$defImage='thumb_wav.jpg';
break;
case ('.wma'):
$defImage='thumb_wma.jpg';
break;
case ('.xls'):
$defImage='thumb_xls.jpg';
break;
case ('.zip'):
$defImage='thumb_zip.jpg';
break;


If youtube has something different I can always add it... I am in a dev cycle so I am just crazy with changes  :o

hah
Title: Re: YouTube vid support
Post by: Nibbler on March 03, 2007, 01:19:30 am
That's handling the default thumbnails for non-image files. If someone uploads somevideoname.avi will it display thumb_somevideoname.avi as the thumbnail?
Title: Re: YouTube vid support
Post by: vuud on March 03, 2007, 04:06:29 am
That's handling the default thumbnails for non-image files. If someone uploads somevideoname.avi will it display thumb_somevideoname.avi as the thumbnail?

Nope that goes after the CPG thumbnails for those types...

If someone uploads somevideoname.avi, it goes through a whole series of checks for a special thumbnail... without killing myself on this codine infused cough syrup it goes a little something like

thumb_somevideoname.jpg
thumb_somevideoname.gif

...Then something I cant quite decipher (really sick right now)...

then if goes after the cpg defaults...


Title: Re: YouTube vid support
Post by: Nibbler on March 03, 2007, 04:09:58 am
That's handling the default thumbnails for non-image files. If someone uploads somevideoname.avi will it display thumb_somevideoname.avi as the thumbnail?

I meant thumb_somevideoname.jpg

I will look into it if I get time.
Title: Re: YouTube vid support
Post by: vuud on March 04, 2007, 05:54:58 am
I meant thumb_somevideoname.jpg

I will look into it if I get time.


Hah, I am completely lost on this...  it does look for thumbs...