1. Search videos on Youtube

Search videos on Youtube

  |   9
Search videos on Youtube
Search videos on Youtube

Installation
Open file: /engine/inc/addnews.php, and /engine/inc/editnews.php
Find:
    <tr>
<td height="29" style="padding-left:5px;">{$lang['addnews_cat']}</td>
<td><select data-placeholder="{$lang['addnews_cat_sel']}" name="category[]" id="category" onchange="onCategoryChange(this)" $category_multiple style="width:350px;">
{$categories_list}
</select>
</td>
</tr>


add below:

<script type="text/javascript">
$(document).ready(function(){
$("#SearchYoutube").click(function(){
ShowLoading('');
var youtube_video = $("#youtube_video").val();
var keyword= encodeURIComponent(youtube_video);
var yt_url='http://gdata.youtube.com/feeds/api/videos?q='+keyword+'&format=5&max-results=1&v=2&alt=jsonc';
$.ajax({
type: "GET",
url: yt_url,
dataType:"jsonp",
success: function(response){
HideLoading('');
if(response.data.items){
$.each(response.data.items, function(i,data){
var video_id=data.id;
var video_title=data.title;
var video_viewCount=data.viewCount;
var video_frame="<iframe width='560' height='315' src='http://www.youtube.com/embed/"+video_id+"' frameborder='0' type='text/html'></iframe>";
var final="<br/><div id='title'>"+video_title+"</div><br/><div>"+video_frame+"</div><br/><input type='text' class='edit bk' style='width:350px;' value='[center][media=http://youtu.be/"+video_id+"][/center]' />";
$("#result").html(final);
});
}else{
$("#result").html("<div id='no'>No Video</div>");
HideLoading('');
}
}
});
});
});
</script>
<tr>
<td width="140" height="29" style="padding-left:5px;">Search on Youtube:</td>
<td><input class="edit bk" type="text" id="youtube_video" value="" style="width:350px;" > <input class="btn btn-danger btn-mini" type="button" id="SearchYoutube" value="Find videos"> <a onclick="$('#result').toggle('blind',{},700); return false;" class="btn btn-mini">Hide</a>
</td>
</tr>
<tr>
<td></td>
<td><div id="result"></div></td>
</tr>

Open file: addnews.tpl
Add to the top:
<script type="text/javascript">
$(document).ready(function(){
$("#SearchYoutube").click(function(){
ShowLoading('');
var youtube_video = $("#youtube_video").val();
var keyword= encodeURIComponent(youtube_video);
var yt_url='http://gdata.youtube.com/feeds/api/videos?q='+keyword+'&format=5&max-results=1&v=2&alt=jsonc';
$.ajax({
type: "GET",
url: yt_url,
dataType:"jsonp",
success: function(response){
HideLoading('');
if(response.data.items){
$.each(response.data.items, function(i,data){
var video_id=data.id;
var video_title=data.title;
var video_viewCount=data.viewCount;
var video_frame="<iframe width='560' height='315' src='http://www.youtube.com/embed/"+video_id+"' frameborder='0' type='text/html'></iframe>";
var final="<br/><div id='title'>"+video_title+"</div><br/><div>"+video_frame+"</div><br/><input type='text' class='edit bk' style='width:350px;' value='[center][media=http://youtu.be/"+video_id+"][/center]' />";
$("#result").html(final);
});
}else{
$("#result").html("<div id='no'>No Video</div>");
HideLoading('');
}
}
});
});
});
</script>

And anywhere in the file fullstory.tpl add:

<tr>
<td class="label">Search on Youtube:</td>
<td><input type="text" id="youtube_video" value="" maxlength="150" class="f_input" /> <input class="fbutton" type="button" id="SearchYoutube" value="Find videos"> <a onclick="$('#result').toggle('blind',{},700); return false;" class="fbutton">Hide</a></td>
</tr>
<tr>
<td></td>
<td><div id="result"></div></td>
</tr>

Demo:max-warez.net
Tested and working 9.6
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+6

Comments 9

wizardbg
wizardbg
Members
Commented By wizardbg on December 26, 2013 (8:00 pm)
working nice but only finds one video for a keyword...good for news sites
N/A 17Forum topics : 2Forum replies : 6Forum likes : 0
yorismith
yorismith
Moderators
Commented By yorismith on December 27, 2013 (12:31 am)
each search will give you exact match and possible match, so if you want to add multiple videos then you should search multiple times
32 288Forum topics : 2Forum replies : 699Forum likes : 117

- Nothing comes free...
- A generous heart, kind speech, and compassion are the things which renew humanity
wizardbg
wizardbg
Members
Commented By wizardbg on December 27, 2013 (10:38 am)
thanks i may try it again later when i need it, could something similar be done for mp3 or sound cloud for mp3 and dj sites :?
N/A 17Forum topics : 2Forum replies : 6Forum likes : 0
yorismith
yorismith
Moderators
Commented By yorismith on December 27, 2013 (7:33 pm)
This is specifically for "Youtube" video and will not work on any other websites only http://www.youtube.com
32 288Forum topics : 2Forum replies : 699Forum likes : 117

- Nothing comes free...
- A generous heart, kind speech, and compassion are the things which renew humanity
itkorai
itkorai
Members
Commented By itkorai on February 2, 2015 (7:51 am)
so what about 10.4 ? any update ??
N/A 22Forum topics : 15Forum replies : 32Forum likes : 0

its me itkorai
DLEStarter
DLEStarter
DLE TEAM
Commented By DLEStarter on February 2, 2015 (3:28 pm)
Quote: itkorai
so what about 10.4 ? any update ??

The module will only modify addnews and editnews so it will work with all versions which have jquery including all 9.x and all 10.x
29 225Forum topics : 9Forum replies : 558Forum likes : 116
onchannel
onchannel
V.I.P.
Commented By onchannel on September 6, 2015 (3:43 pm)
not working on my 10.3 :((
N/A 84Forum topics : 8Forum replies : 14Forum likes : 0

full movies
MongKol
MongKol
Moderators
Commented By MongKol on September 8, 2015 (12:13 pm)
Quote: onchannel
not working on my 10.3 :((

try this:
http://dle.net.tr/dle-modul/14-youtube-search.html
N/A 17Forum topics : 0Forum replies : 47Forum likes : 3
onchannel
onchannel
V.I.P.
Commented By onchannel on September 12, 2015 (9:15 am)
Quote: MongKol
Quote: onchannel
not working on my 10.3 :((

try this:
http://dle.net.tr/dle-modul/14-youtube-search.html

thank you for the link but not working either. the installation went smooth but i don`t the see the button to search the video under the title in the addnews page nor in the edit news page. :(

N/A 84Forum topics : 8Forum replies : 14Forum likes : 0

full movies
Information!Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.
DLEStarter Notice!Please note...Every hack and every module will get additional queries from your database and some hacks and some modules may result your server overload, so install only what you "need", remove any hacks and modules from your script when you don't need them, all hacks and modules appears in this website are not guaranteed by DLEStarter Team for your script security and compatibility, please read instruction carefully and use hacks and modules at your own risk...Thank you.