We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Correct YouTube Links when Posted
Topic Started: Apr 7 2013, 11:57 PM (6,884 Views)
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code Name: Correct YouTube Links when Posted

What the code does: Corrects YouTube unlisted and annotated videos with the correct link when posted.

How to use the code: Install as instructed, no editing is required.

How to install the code:

Admin CP Posted Image Themes Posted Image Board Template Posted Image Below the Board
Code:
 
<script type="text/javascript">
//<![CDATA[
$('td.c_post iframe, #topic_review td iframe').each(function() {
$(this).attr('src', $(this).attr('src').replace('/watch?feature=player_embedded&v=', '/embed/').replace(/\/watch\?annotation_id=annotation_(.+?)&feature=iv&src_vid=/gi, '/embed/'));
});
//]]>
</script>
Edited by Cory, Sep 23 2016, 05:59 AM.
Offline Profile Quote Post Goto Top
 
Chambers35
Member Avatar
Member
[ * ]
Very useful ^_^ Thanks.
Offline Profile Quote Post Goto Top
 
TheWWEManiac
Member
[ *  * ]
Very cool.
Offline Profile Quote Post Goto Top
 
pacisangelo
Member Avatar
Member
[ *  * ]
Very nice code :) Very useful :) Thanks
Offline Profile Quote Post Goto Top
 
SamFanForever
Member
[ * ]
Thanks Cory! This works perfect for single vids. Would it be possible to make it so the code allows you to insert playlists links from youtube and dailymotion so they work as well or is there another way to do this using zb?
Offline Profile Quote Post Goto Top
 
DaPizzaMan
Member Avatar
#TeamSupport

Unfortunately correcting this code won't apply to people who are still using the one up right now, but could you update the YouTube one to use HTML5 over Flash?
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code has been updated.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply