• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] YouTube Image Related

Started by Imran Murtaza,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Imran MurtazaTopic starter

ImranMurtaza
  •  

Hersh

Depends on where you want to change it. Do you want to do it during import, in the db or just for the video players?

For imports, you have to make changes to /mods/youtube.php and /mods/youtube-1by1.php.
Search for "ytimg" in both scripts and make the changes.

For video player thumbnails, search for "ytimg" in /lib/class.providers.php

If you already have a bunch of videos imported and you want to change those as well, the update the rows in vibe_videos.thumb.

Good luck
  •  

Imran MurtazaTopic starter

Hersh I have changed but it not showing on the site page but only changed in moderator area not in site area.
ImranMurtaza
  •  

Hersh

That is because you already imported the videos. It is in the database, which is why I said this:
QuoteIf you already have a bunch of videos imported and you want to change those as well, the update the rows in vibe_videos.thumb.

You will have to change it in the database.
  •  

Imran MurtazaTopic starter

Hersh I told that new imported video thumbnails are also not working on site page but working in just moderator area. and after import the url is from i.ytimg.com
ImranMurtaza
  •  

Marius P.

there's one function in lib/class.youtube.php


function youtube_import($video=array(), $cat = null, $owner = null) {
global $db;
if(is_null($owner)) {$owner = get_option('importuser','1');}
if(isset($video["videoid"]) && isset($video["title"]) ) {
$video["path"] = 'http://www.youtube.com/watch?v='.$video["videoid"];
//This change
$video["thumbnail"] = 'http://ytimg.googleusercontent.com/vi/'.$video["videoid"].'/mqdefault.jpg';
//End change
$db->query("INSERT INTO ".DB_PREFIX."videos (`pub`,`source`, `user_id`, `date`, `thumb`, `title`, `duration`, `tags` , `views` , `liked` , `category`, `description`, `nsfw`) VALUES
('".intval(get_option('videos-initial'))."','".$video["path"]."', '".$owner."', now() , '".$video["thumbnail"]."', '".toDb($video["title"]) ."', '".intval($video["duration"])."', '".toDb(_post('tags'))."', '0', '0','".toDb($cat)."','".toDb($video["description"])."','0')");   
//var_dump($video);
} else {
echo '<p><span class="redText">Missing video id or title </span></p>';
}
}



See


//This change
$video["thumbnail"] = 'http://ytimg.googleusercontent.com/vi/'.$video["videoid"].'/mqdefault.jpg';
//End change
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Imran MurtazaTopic starter

ImranMurtaza
  •  

3dclassic

Quote from: Hersh on
Depends on where you want to change it. Do you want to do it during import, in the db or just for the video players?

For imports, you have to make changes to /mods/youtube.php and /mods/youtube-1by1.php.
Search for "ytimg" in both scripts and make the changes.

For video player thumbnails, search for "ytimg" in /lib/class.providers.php

If you already have a bunch of videos imported and you want to change those as well, the update the rows in vibe_videos.thumb.

Good luck

where from find vibe_videos.thumb?
  •  

PHPVibe A.

Quote from: 3dclassic on
where from find vibe_videos.thumb?

That's a database structure, vibe_videos (table) thumb (fields)

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 32566

The problem of video viewing PHPVibe 5.0

Started by Nayn


Replies: 25
Views: 59475

embed video does not work on v5

Started by neospider69


Replies: 6
Views: 42240

when slecting to unpublish music mp3 - next page says unpublished video ?

Started by spirog


Replies: 2
Views: 1466

insite ads issue when selecting above/below video player location

Started by georgepanaitescu


Replies: 3
Views: 16631

Video that I've uploaded needs to have that value in admin to upload

Started by spirog


Replies: 4
Views: 1317

Like a video - unlinke a video - relike a video does not work

Started by spirog


Replies: 7
Views: 1582