This website can use cookies to improve the user experience

This website can use cookies to improve the user experience and to provide certain services and functions to users. Cookies contain small amounts of information (such as login information and user preferences) and will be stored on your device.

Enable All Cookies Privacy Policy

YouTube Parameters


Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


1 Re: YouTube Parameters
avatar
OP 145
From: -
Excellent - worked a treat. Love the new forum btw Smiling Face
1 Re: YouTube Parameters
avatar
Editor
0
From: -
You could do this with a regex in the PHP part of the following templates:

news_story (news frontpage)
$insert['newsstory_story'] = preg_replace( "/http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)/i", "   http://www.youtube.com/v/">   http://www.youtube.com/v/">    http://www.youtube.com/v/\\1?rel=1&color1=0x2b405b&color2=0x6b8ab6&border=1&fs=1", $insert['newsstory_story'] );


news_story_extended (news details page)
$insert['newsstory_story'] = preg_replace( "/http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)/i", "   http://www.youtube.com/v/">   http://www.youtube.com/v/">    http://www.youtube.com/v/\\1?rel=1&color1=0x2b405b&color2=0x6b8ab6&border=1&fs=1", $insert['newsstory_story'] );

$insert['newsstory_extendedstory'] = preg_replace( "/http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)/i", "  http://www.youtube.com/v/">  http://www.youtube.com/v/">  http://www.youtube.com/v/\\1?rel=1&color1=0x2b405b&color2=0x6b8ab6&border=1&fs=1", $insert['newsstory_extendedstory'] );


articles_pages (articles page)
$insert['articlepage_text'] = preg_replace( "/http:\/\/www\.youtube\.com\/v\/([a-zA-Z0-9-_]+)/i", "   http://www.youtube.com/v/">   http://www.youtube.com/v/">    http://www.youtube.com/v/\\1?rel=1&color1=0x2b405b&color2=0x6b8ab6&border=1&fs=1", $insert['articlepage_text']);


Change that ?rel=1&color1=0x2b405b&color2=0x6b8ab6&border=1&fs=1 part to whatever you like

Notice

This topic is archived. New comments cannot be posted and votes cannot be cast.