Add a Play Button t...
 
Notifications
Clear all

Add a Play Button to Facebook and Other Social Media Sites via PlayTube  

Page 1 / 2
  RSS

Disquy
(@disquy)
Member Admin
Joined: 3 years ago
Posts: 88
October 27, 2018 12:01 am  

Sorry if this sounded like click bait, but the whole premise behind this modification for PlayTube is to be one with the click bait. My modification allows you to share videos to Facebook and other social media services with the thumbnail showing a play button embedded automatically on the thumbnail. It doesn't attach the play button to any other thumbnails except the meta tags. This is to avoid conflicts with the current play button on thumbnails on the website itself. This only attaches to thumbnails of videos you share.

I wish it was possible to use the Facebook Instant Articles player and if I had 10,000 views a month to be able to develop an implementation, I would. Until one of us gets that many viewers on Facebook, this is going to be the closest we can get.

So now when you share your videos, or someone else does, it will look like people can actually watch the video by pressing play. They already clicked it, chances are they will shrug, and continue on, because we gottem!

Unsure of the policies for Facebook on this, but I am currently using it and I have seen Twitch do the same thing, so I think we are in the clear.

Image of Play Button Meta Modification

As you can see, now when you or a user shares a video, the script will apply a play button. If you combine this with my PlayTube Facebook Auto Poster, you will be spitting out these videos in no time. Keep in mind, the auto poster script requires a business license for verification with Facebook. However this script does not.

I have included all the files you need, and there will need to be one core modification made to the PlayTube core. Also the button can be replaced with your own image and you could even use it to watermark your thumbnails. ( Don't do this if you don't own the rights )

Required Edit
In index.php find

if ($pt->page == 'watch') {
$og_meta = PT_LoadPage('watch/og-meta', array(
'TITLE' => $pt->title,
'DESC' => mb_substr($pt->description, 0, 400, "UTF-8"),
'THUMB' => str_replace('mqdefault', '0', $get_video->thumbnail),
'URL' => PT_Link('watch/' . PT_Slug($get_video->title, $get_video->video_id))
));
}

 

Replace with

if ($pt->page == 'watch') {
$og_meta = PT_LoadPage('watch/og-meta', array(
'TITLE' => $pt->title,
'DESC' => mb_substr($pt->description, 0, 400, "UTF-8"),
'THUMB' => str_replace('mqdefault', '0', $site_url . '/' . 'watermark.php?thumbnail=' . $get_video->thumbnail),
'URL' => PT_Link('watch/' . PT_Slug($get_video->title, $get_video->video_id))
));
}

 

Note: Always backup your db and any files to be modified just to be safe. These types of modifications are not a simple plug and play kind of install. I am not responsible for any loss of data nor does this script come with any guarantee. This script is provided as is.

This topic was modified 2 years ago 16 times by Disquy

Quote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
October 27, 2018 8:45 am  

How do I do this, I do not understand?


ReplyQuote
Disquy
(@disquy)
Member Admin
Joined: 3 years ago
Posts: 88
October 27, 2018 5:29 pm  

Upload the contents of the "upload" folder in playtube-share-video-with-play-button.zip to the root of your PlayTube installation. Then make the core code modification.

From there go to a video, and click the share button. Share to Facebook or other social media and you will see it will have a play button over the thumbnail.


ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
October 27, 2018 5:41 pm  

I  download ,It is an empty file . thank


ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
October 27, 2018 5:46 pm  

Can you review attachments?

sorry i do not know english, i use google translate

This post was modified 2 years ago by vntube

ReplyQuote
ctarrosado
(@ctarrosado)
New Member
Joined: 2 years ago
Posts: 1
October 27, 2018 6:24 pm  

Nice work. Better than have nothing. 


ReplyQuote
Disquy
(@disquy)
Member Admin
Joined: 3 years ago
Posts: 88
October 27, 2018 9:42 pm  
Posted by: vntube

Can you review attachments?

sorry i do not know english, i use google translate

Whoops. Sorry about that. I was up till 6AM working on some of the modifications, must have forgot to add the files. 😛

I have added the files to the attachment in the first post. You can also download them here

 

Posted by: ctarrosado

Nice work. Better than have nothing. 

Thanks, it may not work without the files though 😉 LOL sorry about that.

This post was modified 2 years ago by Disquy

ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
October 28, 2018 2:17 am  

Thanks very much !


ReplyQuote
Disquy
(@disquy)
Member Admin
Joined: 3 years ago
Posts: 88
October 28, 2018 2:43 am  
Posted by: vntube

Thanks very much !

You're welcome. 🙂


ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
October 29, 2018 9:13 am  

I have an error loading 

thumbnail

on facebook, but on g + is ok


ReplyQuote
Disquy
(@disquy)
Member Admin
Joined: 3 years ago
Posts: 88
October 30, 2018 4:11 am  
Posted by: vntube

I have an error loading 

thumbnail

on facebook, but on g + is ok

What version of PlayTube do you run?


ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
October 31, 2018 11:48 am  

I'm  latest version 1.4.5.1


ReplyQuote
Disquy
(@disquy)
Member Admin
Joined: 3 years ago
Posts: 88
November 2, 2018 12:17 am  
Posted by: vntube

I'm  latest version 1.4.5.1

I looked over your source, it uses the same link as twitter, and it works. This tells me there is something wrong with your metadata. Did Facebook images work before this modification? I would compare code to original PlayTube 1.4.5.1 and make sure changes were made correctly.


ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
November 2, 2018 12:52 am  

Thanks, it works but not as stable as your site


ReplyQuote
vntube
(@vntube)
Trusted Member
Joined: 2 years ago
Posts: 66
November 2, 2018 12:57 am  
Posted by: Disquy
Posted by: vntube

I'm  latest version 1.4.5.1

I looked over your source, it uses the same link as twitter, and it works. This tells me there is something wrong with your metadata. Did Facebook images work before this modification? I would compare code to original PlayTube 1.4.5.1 and make sure changes were made correctly.

I'm thinking is this due to my hosting? Every time I share it on fb it loads slowly, if I do about 5 times in succession it works fine


ReplyQuote
Page 1 / 2
Share: