PlayTube Video Cleanup ( Cronjob )

So your site embeds videos from Youtube, Vimeo, and other video sharing services? Do you have a problem with dead videos and no way to track them unless the video is reported? I have built a simple solution to automate this process. Currently it works for YouTube tracking, but I have plans to develop it further into using the other video hosting services that PlayTube integrates into. When a video is detected as dead, you can have it display a message if you run the script directly in your web browser, or you can set a cron job to email you or save the video link to a text file, and even DELETE the dead video, without ever raising a finger. Want to learn more? Enter your email address below to get a link to the free download with detailed instructions. By including your email, I can provide you with updates to the software along with any other development progress on other PlayTube expansions that I have created. You can unsubscribe at any time.

Continue reading “PlayTube Video Cleanup ( Cronjob )”

Playtube Youtube Video Player

Image of Playtube Youtube Player

I’ve had a couple of people ask how I have the Youtube player instead of the Playtube Player on Vigeos. Deen from PlayTube actually saved me a lot of time with research and implementation and had a quick solution for me, so I figured I would share it with y’all in case you wanted to do the same. Keep in mind my solution for Mobile Autoplay is for Mediaelementjs that PlayTube Script uses, so by you converting to the YouTube video player, my autoplay solution will no longer work.

Find in /themes/default/layout/watch/content.phtml

Below Add

 

You also need to make the changes in /themes/default/layout/watch/playlist.phtml

Below Add

This can also be applied to the other import services, just change the embed code to whichever you wanted to use along with changing the conditional statement to be that of the import service.

You May Also Like

PlayTube Progressive Web Application

PlayTube Category Columns

Image of PlayTube Category Columns
If you are like me and have a lot of categories added into the PlayTube script, then you will need to separate them. Otherwise it’s a long list

I have a bunch of categories, so I had to be a little creative in the way I wanted to show them. With some simple CSS you can do the same.

 

Add in /themes/default/css/custom.style.css

 

You’ll need to clear your cache for this to fully take effect. Some users won’t see this until they delete their cache, so to resolve this problem I like to provide a version number for the CSS file. To do this is simple.

 

Find in /themes/default/layout/container.html

 

Replace with
Find in /themes/default/layout/container.html

 

As you can see from the above code we just added ?v=1.0.0 to the end. Anytime you add or modify code in this custom stylesheet just simply add onto it. So for example if you make a change after this, then it would become ?v=1.0.1

You May Also Like

PlayTube Progressive Web Application

PlayTube Embed Watermark Link to Video

PlayTube’s core doesn’t have an option to go to the video by clicking a button like some other services provide, however with a very simple and easy core modification you can link your watermark to your video’s url instead of it going to your website’s homepage. This modification only works with direct uploaded video’s as PlayTube disables watermarking importing videos to prevent copyright infringement. I’m not looking to cause any copyright infringement either so I won’t be sharing how to do it on imported videos as you are linking to your own service at this point and not your video provider.

For those PlayTube users who upload their own videos, this will really help establish your brand. Viewers can easily click your logo and be taken to your video from which they can comment, share, or embed your video.

In /themes/default/layout/embed/content.html find

 

Replace With

You May Also Like

PlayTube Progressive Web Application

Mobile Autoplay Mediaelementjs

For those running the PlayTube script you may have noticed that autoplay on mobile does not work. It’s currently an issue with the Mediaelementjs framework that PlayTube script uses. I’ve come up with a simple solution to resolve the autoplay issue with Mediaelementjs that works with all major mobile browsers. The only issue is with Facebook Webview which appears to be a limitation of the webview. I am still trying different methods as a work around, but I am open to ideas. If you have any, feel free to comment below.

Mobile autoplay fix is for the Playtube script, but can be easily adapted to any use of Mediaelementjs.

In /themes/default/layout/container.html find

 

Below Add

 

What does this do?

Basically it simulates a click on the play button element. While there are some browsers that do not support this type of behavior, I found it works for major browsers on mobile and doesn’t affect any desktop browser I have tested. Facebook Webview is the only one affected, which is either a limitation of their built in browser or was intentionally blocked to avoid any auto clicking of like buttons or other elements that Facebook deems unnecessary.

You May Also Like

PlayTube Progressive Web Application

PlayTube Autoplay Checked by Default

Another simple modification to your PlayTube core would be setting the autoplay checkbox defaulted to checked. This way anyone that visits your website will automatically be shown the next recommended video. If they choose to opt out by unchecking the Autoplay box, then they will still get the cookie stored so autoplay is no longer enabled for that visitor. This works for both logged in and unregistered members.

Find in /sources/watch/content.php

Add this above the previous code

 

Have a request? Feel free to reach out to me.

You May Also Like

PlayTube Progressive Web Application

PlayTube Sort Search Results by Newest

By default the results in PlayTube are sorted by oldest. In order to sort the results by newest, we need to make a small core modification. This isn’t tested with the latest version of PlayTube as I am still on the 1.4.3 version, but the modification is simple, just change ASC to DESC.

Find in /sources/search/content.php

Replace with

Thats it, now your search results are setup to show the latest videos under that search query. Don’t forget to setup Site Search on Google Analytics.

You May Also Like

PlayTube Progressive Web Application

PlayTube Optimize Speed

Get your pages to load up to 80% faster! Some of you may not know, but Google Page Rank counts page speed as a factor. You’d be surprised how many do not know this. If you are one of the few then awesome, you may already know this. Are you familiar with GZip? If not I am going to walk you through on how to set it up so that you can help decrease page load times and help with your SEO. Keep in mind I run on apache so this will be how to do this for apache servers.

Make sure you have mod_deflate enabled on your server

You may also need to add this line to your php.ini

If you are on a shared host, reach out to your hosting provider to see if they can enable this for you.

Next add the following to the top of your .htaccess

Thats it, now you can check to see if you have GZIP enabled via Check GZip Compression.

Note: PlayTube developers state they have seen some issues with this, this works fine on my platform, but depending on different variables and how you run your PlayTube script, this may not work for you.

You May Also Like

PlayTube Progressive Web Application