Page map
-galerie -fmulticurl() -infobox avec vignette, texte et lien wikipedia + -bouton shotcode flickr -bugfixes
This commit is contained in:
49
js/short-flickr.js
Normal file
49
js/short-flickr.js
Normal file
@@ -0,0 +1,49 @@
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.flickr', {
|
||||
init : function(ed, url) {
|
||||
ed.addButton('flickr', {
|
||||
title : 'Add Flickr Shortcode',
|
||||
image : url+'/flickr.png',
|
||||
onclick : function() {
|
||||
/*
|
||||
[flickr url="https://www.flickr.com/photos/funnymac/27868468454/"]
|
||||
|
||||
[flickr pid="27868468454" caption="Volpe di Paradisio"]
|
||||
|
||||
[flickr pid="27868468454" version="Small"]
|
||||
*/
|
||||
var pid = prompt("Image Id", "");
|
||||
if (pid == null || pid == ''){
|
||||
var url = prompt("URL image", "");
|
||||
}
|
||||
var version = prompt("Taille", "");
|
||||
var caption = prompt("Titre", "");
|
||||
|
||||
/**/
|
||||
if (pid != null && pid != ''){
|
||||
//if (album != null && album != '')
|
||||
ed.execCommand('mceInsertContent', false, '[flickr pid="'+pid+'" version="'+version+'" caption="'+caption+'"]');
|
||||
}
|
||||
else if (url != null && url != ''){
|
||||
//if (album != null && album != '')
|
||||
ed.execCommand('mceInsertContent', false, '[flickr url="'+url+'" version="'+version+'" caption="'+caption+'"]');
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
createControl : function(n, cm) {
|
||||
return null;
|
||||
},
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : "Flickr Shortcode",
|
||||
author : 'Bruno',
|
||||
authorurl : 'https://clicclac.info',
|
||||
infourl : 'https://clicclac.info/wordpress/',
|
||||
version : "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
tinymce.PluginManager.add('flickr', tinymce.plugins.flickr);
|
||||
})();
|
||||
@@ -3,7 +3,7 @@
|
||||
init : function(ed, url) {
|
||||
ed.addButton('zenphoto', {
|
||||
title : 'Add Zenphoto Shortcode',
|
||||
image : url+'/recentpostsbutton.png',
|
||||
image : url+'/zenphoto.png',
|
||||
onclick : function() {
|
||||
var album = prompt("Album", "");
|
||||
var image = prompt("Image", "");
|
||||
|
||||
Reference in New Issue
Block a user