Do you find your Video Thumbnail Size is too small? If so, follow this guide to increase the sizes of you video uploads’ thumbnails!
Open \application\modules\Video\controllers\IndexController.php file. Find these lines (start at line #970):
// handles thumbnails public function handleThumbnail($type, $code = null){ switch ($type) { //youtube case "1": //http://img.youtube.com/vi/Y75eFjjgAEc/default.jpg return "http://img.youtube.com/vi/$code/default.jpg"; //vimeo case "2": //thumbnail_medium $data = simplexml_load_file("http://vimeo.com/api/v2/video/".$code.".xml"); $thumbnail = $data->video->thumbnail_medium; return $thumbnail; } }
Replace them with these lines:
// handles thumbnails public function handleThumbnail($type, $code = null){ switch ($type) { //youtube case "1": //http://img.youtube.com/vi/Y75eFjjgAEc/default.jpg //return "http://img.youtube.com/vi/$code/default.jpg"; return "http://img.youtube.com/vi/$code/0.jpg"; //vimeo case "2": //thumbnail_medium $data = simplexml_load_file("http://vimeo.com/api/v2/video/".$code.".xml"); $thumbnail = $data->video->thumbnail_medium; return $thumbnail; } }
Now you will get 480x360px thumbnail from Youtube instead of 120x90px. After this, you need to change the size of image which is saved on your system. Find line #241 in the same file. It should look like this:
$image->open($tmp_file) ->resize(256, 192) ->write($thumb_file) ->destroy();
Replace the 256, 192 with width and height you need for your thumbnail.
There is one more step. In the same file, find line #819:
$image->open($tmp_file) ->resize(256, 192) ->write($thumb_file) ->destroy();
It’s the same code as previous and you should put the same values as before for width and height.
Looking for quality SocialEngine Hosting? Look no further than Arvixe Web Hosting!
It ‘s really useful for my socialengine site. Thanks for your tutorial
hello you can make changes to Social Engine 4.8.8? and if possible when you installed on wall
you can edit the files before uplaoding them as long as you put the file back together before uplaoding so everything works right for you
hello friend, thanks for the help, but you know I could not do it, that members of my website can add HTML coding your comment boxes, help please
you would need to remove the permission from your Admin Panel > Member Levels and delete any HTML Tags you allow then save changes
Hello friend, when I add the url of youtube I get this error We could not find a video there – please check the URL and try again.
YouTube have updated their API System and we would need SocialEngine to update their system to allow full workings of Youtube once again, this should be out in the next update.
hello friend nothing happens. the same error keeps coming
As i have said we need to wait for socialengine to update the api system to now match the api’s used by youtube. This will most lilkly come in the next update.