Geo
This commit is contained in:
40
js/short-zenphoto.js
Normal file
40
js/short-zenphoto.js
Normal file
@@ -0,0 +1,40 @@
|
||||
(function() {
|
||||
tinymce.create('tinymce.plugins.zenphoto', {
|
||||
init : function(ed, url) {
|
||||
ed.addButton('zenphoto', {
|
||||
title : 'Add Zenphoto Shortcode',
|
||||
image : url+'/recentpostsbutton.png',
|
||||
onclick : function() {
|
||||
var album = prompt("Album", "");
|
||||
var image = prompt("Image", "");
|
||||
|
||||
if (image != null && image != ''){
|
||||
if (album != null && album != '')
|
||||
ed.execCommand('mceInsertContent', false, '[zenphoto album="'+album+'" image="'+image+'"]');
|
||||
/*else
|
||||
ed.execCommand('mceInsertContent', false, '[zenphoto'+text+'[/recent-posts]');*/
|
||||
}
|
||||
else{
|
||||
if (album != null && album != '')
|
||||
ed.execCommand('mceInsertContent', false, '[zenphoto album="'+album+'"]');
|
||||
/*else
|
||||
ed.execCommand('mceInsertContent', false, '[zenphoto]');*/
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
createControl : function(n, cm) {
|
||||
return null;
|
||||
},
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : "Zenphoto Shortcode",
|
||||
author : 'Bruno',
|
||||
authorurl : 'https://clicclac.info',
|
||||
infourl : 'https://clicclac.info/wordpress/',
|
||||
version : "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
tinymce.PluginManager.add('zenphoto', tinymce.plugins.zenphoto);
|
||||
})();
|
||||
Reference in New Issue
Block a user