Is there such a script that whenever it sees the url below,
it will rewrite into
In my template, I have the following codes to display and play the video:
The link in blue is what the user will enter as the source of the video. My question no is if there is any script that will take the link in blue and modify to to resamble the tag in red. I see that the difference between the link in blue and red are the addition of "img,vi,2.jpg" in the red link.<script>
var image = "<?php echo $custom_34; ?>"
if (image != "")
document.write(" <a href=\"http://youtube.com/v/PRv_czxZKUw&autoplay=1\" rel=\"iframe\" rev=\"width::425::height::355::scrolling::no::frameborder::1\" title=\"+title.substr(0,60)\"><img src=\"http://img.youtube.com/vi/PRv_czxZKUw/2.jpg"></a>")
document.write("<a href=\"/members/user_login.php\"><img src=\"template/Yellow/images/no_video.png\" class=\"borderimage\" onMouseover=\"borderit(this,'green')\" onMouseout=\"borderit(this,'white')\"></a>")
Or if there is a script that take the video link that the user enter and strip out the video reference code PRv_czxZKUw. If this is possible, I can setup my template to inclue "http://img.youtube.com/vi/XXXXXXX/2.jpg as fixed with XXXXXX=PRv_czxZKUw part being the variable that the script will insert.