How to include Youtube thumbnail on video page?

I'd like to add the thumbnail to youtube videos onto the video page. I'd like this so when I share to facebook, the thumbnail is what shows on facebook, not my site logo.

 I've tried <img src=__imgUrl__>, but that doesn't work. I got that piece of code from modules/boonex/videos/templates/base/thumb.html

Now that I look close, when you add a Youtube video, it actually downloads the thumbnail, wouldn't it be better to link to youtube's thumbnail, rather than download it to our server?

 

Quote · 2 Sep 2012

I'm trying to use something like posted here:http://www.boonex.com/forums/?action=goto&search=1#topic/Template-parsing-question.htm

 

I've added the code below templates\base\scripts\BxBaseSearchResultSharedMedia.php

            'pic' => BX_DOL_URL_ROOT . '/flash/modules/video/files/' . $sHash . '_small.jpg',

 

I've also added this code to modules/boonex/videos/templates/base/view_unit.html:

<meta property="og:image" content="__pic__" />, or even <img src="__pic__"/> should work as far as Facebook is concerned.

But it's not generating the image, it's a broken image with the url http://www.mydomain.com/__pic__.

I think I"m getting closer, but not quite there.

Quote · 2 Sep 2012

Anyone?

Quote · 3 Sep 2012

You missed a part of that topic where there are instructions to modify templates\base\scripts\BxBaseSearchResultSharedMedia.php at line 305 so your __img__ tag will work. It's not a default template tag, so it has to be added to the processing in code.

:http://www.boonex.com/forums/?action=goto&search=1#topic/Template-parsing-question.htm

https://www.deanbassett.com
Quote · 3 Sep 2012

Never mind. Missed the part where you said you did that. Which also you seemed to have changed and i am not sure if that is even correct.

Guess that template is processed in a different file. I'll have to hunt it down.

https://www.deanbassett.com
Quote · 3 Sep 2012

Pretty much what I'm doing goes hand in hand with the other topic, it's just another module. I've seen other people complain that there is no image when someone shares a video to facebook, this would fix that problem.

I just plan on inserting the <meta property="og:image" content=""__pic__" /> in the module templates and all will be fine, I've got it working with the photo mod.

Quote · 4 Sep 2012

Yeah i think OG will work but a universal YouTube thumbnail image for your site video only, for the rest of dolphin video you got to insert it somewhere in the processing area it may need a bit of a code at least.

"Your future is created by what you do today, not tomorrow." @ www.dexpertz.net
Quote · 4 Sep 2012

 Photo and video is what people share the most. As for the rest of the site, I could just use my site logo for og, or maybe even use this method for other modules.

Yeah i think OG will work but a universal YouTube thumbnail image for your site video only, for the rest of dolphin video you got to insert it somewhere in the processing area it may need a bit of a code at least.

 

Quote · 4 Sep 2012

I had added a patch to the photo mod that would bring up the original photo when clicking on the image, you can find the thread here: http://www.boonex.com/forums/topic/View-original-image-when-you-click-on-the-image-.htm

 

I added the below code to BxPhotosPageView.php:

'picBB' => BX_DOL_URL_ROOT . 'm/photos/get_image/original/' . $this->aFileInfo['Hash'] . '.jpg',

 

So, I would think adding the below code to BxVideosPageView.php would make this all work:

            'pic' => BX_DOL_URL_ROOT . '/flash/modules/video/files/' . $sHash . '_small.jpg',

 

In BxPhotosPageView.php the code is added to the getBlockCode_ViewFile function. I've tried adding the above code to the getBlockCode_ViewFile on BxVideosPageView.php function, but it gives me a white screen. I think If I can get past this, this will all work, and allow our videos to show a thumbnail when shared to Facebook.

 

Anyone have any ideas.

Quote · 6 Sep 2012

I almost have it, I have the following code inBxVideosTemplate:

                        'pic' => BX_DOL_URL_ROOT . 'flash/modules/video/files/' . $sHash . '_small.jpg' . $this->aFileInfo['Hash'] . '.jpg',

 

It's displaying the image url as http://www.mydomain.com/flash/modules/video/files/_small.jpg

 

It's not reading the . $sHash . , but it is reading the rest of it. Can anyone help me with this? I'd really like to be able to post videos to facebook with the thumbnail being displayed.

Quote · 10 Sep 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.