(function() {
tinymce.create('tinymce.plugins.ebkfb', {
init : function(ed, url) {
/*
ed.addCommand('mceExample', function() {
ed.windowManager.open({
file : url + '/form.html',
width : 400 + ed.getLang('example.delta_width', 0),
height : 320 + ed.getLang('example.delta_height', 0),
inline : 1
}, {
plugin_url : url, // Plugin absolute URL
some_custom_arg : 'custom arg' // Custom argument
});
});
*/
ed.addButton('ebkfb', {
title : 'Facebook Video Ekle',
image : url+'/fb.png',
onclick : function() {
/*
var devam = true;
var videolar = "";
while( devam == true ) {
var vid = prompt("EBK-FB", "Facebook video linklerini girin. Daha fazla eklemek istemiyorsanız ESC'ye basın.");
if( vid == false || vid == null ) {
devam = false;
} else {
videolar += "##" + vid;
}
}
*/
jQuery("h2:eq(0)").after("<div id='ebkfbForm' style='margin-bottom: 15px;display: none;padding: 10px;border: 1px solid #ccc;background: #eee'><form id='ebkFoo' action='' method='post'>MP4 linklerini girin: <br /><br /><input type='text' name='videolar' style='width: 300px' /><br /><input type='text' name='videolar' style='width: 300px' /><br /><input type='text' name='videolar' style='width: 300px' /><br /><input type='text' name='videolar' style='width: 300px' /><br /><input type='text' name='videolar' style='width: 300px' /><br /><div id='ebkBosluk'></div><a href='javascript:;' id='ebkKutu'>+ Yeni Alan Ekle</a><br /><br /><input type='submit' value='Ekle' /></form></div>");
jQuery('#ebkFoo > input[type=text]').val('');
jQuery('#ebkfbForm').slideDown('slow');
jQuery('#ebkFoo > input:eq(0)').focus();
jQuery('#ebkKutu').click(function() {
jQuery('#ebkFoo > #ebkBosluk').append("<br /><input type='text' name='videolar' style='width: 300px' />");
});
jQuery('#ebkFoo').submit( function(event) {
event.preventDefault();
var videolar = new Array();
jQuery('#ebkFoo > input[type=text], #ebkBosluk > input[type=text]').each(function() {
var embed = '<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="590" height="350" id="pilav" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="https://www.4shared.com/flash/player.swf?file='+ ( jQuery(this).val() ) +'"><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="https://www.4shared.com/flash/player.swf?file='+ ( jQuery(this).val() ) +'" quality="high" bgcolor="#ffffff" width="590" height="350" name="mymovie" align="middle" allowFullScreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object></p>';
if( ( jQuery(this).val() ) != '' ) {
videolar.push( embed );
}
});
var videoCikti = videolar.join('<!--nextpage-->');
console.log(videoCikti);
jQuery('#ebkFoo > input[type=text]').val('');
jQuery('#ebkFoo > input:eq(0)').focus();
ed.execCommand('mceInsertContent', false, videoCikti);
jQuery('#ebkfbForm').slideUp('slow');
jQuery('#ebkfbForm').remove();
});
/*
if( videolar != '' ) {
ed.windowManager.open({
file : url + '/form.html',
width : 400 + ed.getLang('example.delta_width', 0),
height : 30 + ed.getLang('example.delta_height', 0),
inline : 1
}, {
plugin_url : url, // Plugin absolute URL
some_custom_arg : 'custom arg' // Custom argument
});
jQuery.ajax({
type : 'post',
url : url + '/ajax.php',
data : 'videolar=' + videolar,
success : function(a) {
ed.execCommand('mceInsertContent', false, a);
jQuery('.clearlooks2, #mceModalBlocker').remove();
}
});
}
*/
}
// cmd : 'mceExample'
});
},
createControl : function(n, cm) {
return null;
},
getInfo : function() {
return {
longname : "EBK-FB",
author : 'Ekrem Büyükkaya',
authorurl : 'http://ekrembk.com/',
infourl : 'http://ekrembk.com/',
version : "1.0"
};
}
});
tinymce.PluginManager.add('ebkfb', tinymce.plugins.ebkfb);
})(); Mozilla Firefox'da console.log hatası.. lütfen yardım..
1
●528
- 11-01-2011, 23:46:26Arkadşlar merhaba aşağıdaki .js de 62. satır (console.log(videoCikti);) ff de hata veriyor google crome'de sorun yok bunu nasıl düzeltirim lütfen yardımlarınızı bekliyorum şimdiden teşekkürler.