×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Youtube Video Link

Youtube Video Link 9 years 9 months ago #30047

  • Tim Miller
  • Tim Miller's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
Hi Guys,

Wondering what I can do to prevent the youtube video from embedding the video. I'd rather have a thumbnail...any thoughts?
www.lisafreeney.com/anacron/index.php/vi...n-2015-through-music

Thanks

Youtube Video Link 9 years 9 months ago #30048

  • Tim Miller
  • Tim Miller's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
If I need to purchase any other version to get this to not look so bad, please let me know...
thx

Youtube Video Link 9 years 9 months ago #30052

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Why is embeding the video bad? If you want to prevent this from happening in the comments, you'll have to hack the code. There is no switch for this. (or maybe if you turn bbcode support off, but this would mean that no bbcode is going to function)

Regards,
Daniel

Youtube Video Link 9 years 9 months ago #30062

  • Tim Miller
  • Tim Miller's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
Daniel,

The reason I want to disable this is because it takes up a lot of space. It is cool, but I am just looking for a way to have the link, and not the embedded video.

Also, when it does embed, the aspect ratio is wrong...mostly too wide, cropping.

I would be interested in the hack as disabling bbcode didn't really solve the problem.

Youtube Video Link 9 years 9 months ago #30080

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
components\com_comment\helpers\bbcode.php line 97 till 125
	if (isset($params['host']))
		{
			// Convert youtube links to embedded player
			parse_str($params['query'], $query);
			$path = explode('/', $params['path']);
 
			if (strstr($params['host'], '.youtube.') && !empty($path[1]) && $path[1] == 'watch' && !empty($query['v']))
			{
				$video = $query['v'];
			}
			elseif ($params['host'] == 'youtu.be' && !empty($path[1])) {
				$video = $path[1];
			}
 
			if (isset($video))
			{
				$uri = Juri::getInstance();
				$scheme = 'http';
 
				if ($uri->getScheme() == 'https')
				{
					$scheme = 'https';
				}
 
				return '<object width="425" height="344"><param name="movie" value="' . $scheme . '://www.youtube.com/v/'
						. urlencode($video) . '?version=3&feature=player_embedded&fs=1&cc_load_policy=1"></param><param name="allowFullScreen" value="true"></param><embed src="' . $scheme . '://www.youtube.com/v/'
						. urlencode($video) . '?version=3&feature=player_embedded&fs=1&cc_load_policy=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>';
			}
		}
]

remove them. And how about getting a subscription?

Regards,
Daniel

Youtube Video Link 9 years 9 months ago #30085

  • Tim Miller
  • Tim Miller's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 2
Daniel,

Thanks so much. I believe I will get a subscription. Thanks!
  • Page:
  • 1
Time to create page: 0.116 seconds