Version Description
- New feature: Embedded/Nested shortcodes is now supported.
- New feature: Full fledged native WordPress editor for adding shortcode content with media buttons.
- Bug fix: "duplicate percentage" in content on plugin reactivate.
- Updated admin UI with fixed errors.
- Updated "insert shortcode" interface is revised and some issues are fixed.
- Updated with translatable texts in admin page.
- Minor code revision and changes.
Download this release
Release Info
Developer | vaakash |
Plugin | Shortcoder |
Version | 3.4 |
Comparing to | |
See all releases |
Code changes from version 3.3 to 3.4
- images/donate.png +0 -0
- images/index.html +0 -0
- js/index.html +0 -0
- js/nicedit/Thumbs.db +0 -0
- js/nicedit/nicEdit.js +0 -93
- js/nicedit/nicEditorIcons.gif +0 -0
- js/tinymce/editor_plugin.js +7 -26
- js/tinymce/index.html +0 -0
- languages/index.html +0 -0
- languages/readme.html +0 -42
- languages/sc-de_DE.mo +0 -0
- languages/sc-de_DE.po +0 -157
- languages/sc-es_ES.mo +0 -0
- languages/sc-es_ES.po +0 -157
- languages/shortcoder.mo +0 -0
- languages/shortcoder.po +79 -0
- readme.txt +26 -17
- sc-admin-css.css +60 -83
- sc-admin-js.js +2 -18
- sc-editor.php → sc-insert.php +37 -52
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- shortcoder.php +141 -93
images/donate.png
CHANGED
Binary file
|
images/index.html
ADDED
File without changes
|
js/index.html
ADDED
File without changes
|
js/nicedit/Thumbs.db
DELETED
Binary file
|
js/nicedit/nicEdit.js
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
/* NicEdit - Micro Inline WYSIWYG
|
2 |
-
* Copyright 2007-2008 Brian Kirchoff
|
3 |
-
*
|
4 |
-
* NicEdit is distributed under the terms of the MIT license
|
5 |
-
* For more information visit http://nicedit.com/
|
6 |
-
* Do not remove this copyright message
|
7 |
-
*/
|
8 |
-
var bkExtend=function(){var A=arguments;if(A.length==1){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};function bkClass(){}bkClass.prototype.construct=function(){};bkClass.extend=function(C){var A=function(){if(arguments[0]!==bkClass){return this.construct.apply(this,arguments)}};var B=new this(bkClass);bkExtend(B,C);A.prototype=B;A.extend=this.extend;return A};var bkElement=bkClass.extend({construct:function(B,A){if(typeof (B)=="string"){B=(A||document).createElement(B)}B=$BK(B);return B},appendTo:function(A){A.appendChild(this);return this},appendBefore:function(A){A.parentNode.insertBefore(this,A);return this},addEvent:function(B,A){bkLib.addEvent(this,B,A);return this},setContent:function(A){this.innerHTML=A;return this},pos:function(){var C=curtop=0;var B=obj=this;if(obj.offsetParent){do{C+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var A=(!window.opera)?parseInt(this.getStyle("border-width")||this.style.border)||0:0;return[C+A,curtop+A+this.offsetHeight]},noSelect:function(){bkLib.noSelect(this);return this},parentTag:function(A){var B=this;do{if(B&&B.nodeName&&B.nodeName.toUpperCase()==A){return B}B=B.parentNode}while(B);return false},hasClass:function(A){return this.className.match(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)"))},addClass:function(A){if(!this.hasClass(A)){this.className+=" nicEdit-"+A}return this},removeClass:function(A){if(this.hasClass(A)){this.className=this.className.replace(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)")," ")}return this},setStyle:function(A){var B=this.style;for(var C in A){switch(C){case"float":B.cssFloat=B.styleFloat=A[C];break;case"opacity":B.opacity=A[C];B.filter="alpha(opacity="+Math.round(A[C]*100)+")";break;case"className":this.className=A[C];break;default:B[C]=A[C]}}return this},getStyle:function(A,C){var B=(!C)?document.defaultView:C;if(this.nodeType==1){return(B&&B.getComputedStyle)?B.getComputedStyle(this,null).getPropertyValue(A):this.currentStyle[bkLib.camelize(A)]}},remove:function(){this.parentNode.removeChild(this);return this},setAttributes:function(A){for(var B in A){this[B]=A[B]}return this}});var bkLib={isMSIE:(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(C,B,A){(C.addEventListener)?C.addEventListener(B,A,false):C.attachEvent("on"+B,A)},toArray:function(C){var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A},noSelect:function(B){if(B.setAttribute&&B.nodeName.toLowerCase()!="input"&&B.nodeName.toLowerCase()!="textarea"){B.setAttribute("unselectable","on")}for(var A=0;A<B.childNodes.length;A++){bkLib.noSelect(B.childNodes[A])}},camelize:function(A){return A.replace(/\-(.)/g,function(B,C){return C.toUpperCase()})},inArray:function(A,B){return(bkLib.search(A,B)!=null)},search:function(A,C){for(var B=0;B<A.length;B++){if(A[B]==C){return B}}return null},cancelEvent:function(A){A=A||window.event;if(A.preventDefault&&A.stopPropagation){A.preventDefault();A.stopPropagation()}return false},domLoad:[],domLoaded:function(){if(arguments.callee.done){return }arguments.callee.done=true;for(i=0;i<bkLib.domLoad.length;i++){bkLib.domLoad[i]()}},onDomLoaded:function(A){this.domLoad.push(A);if(document.addEventListener){document.addEventListener("DOMContentLoaded",bkLib.domLoaded,null)}else{if(bkLib.isMSIE){document.write("<style>.nicEdit-main p { margin: 0; }</style><script id=__ie_onload defer "+((location.protocol=="https:")?"src='javascript:void(0)'":"src=//0")+"><\/script>");$BK("__ie_onload").onreadystatechange=function(){if(this.readyState=="complete"){bkLib.domLoaded()}}}}window.onload=bkLib.domLoaded}};function $BK(A){if(typeof (A)=="string"){A=document.getElementById(A)}return(A&&!A.appendTo)?bkExtend(A,bkElement.prototype):A}var bkEvent={addEvent:function(A,B){if(B){this.eventList=this.eventList||{};this.eventList[A]=this.eventList[A]||[];this.eventList[A].push(B)}return this},fireEvent:function(){var A=bkLib.toArray(arguments),C=A.shift();if(this.eventList&&this.eventList[C]){for(var B=0;B<this.eventList[C].length;B++){this.eventList[C][B].apply(this,A)}}}};function __(A){return A}Function.prototype.closure=function(){var A=this,B=bkLib.toArray(arguments),C=B.shift();return function(){if(typeof (bkLib)!="undefined"){return A.apply(C,B.concat(bkLib.toArray(arguments)))}}};Function.prototype.closureListener=function(){var A=this,C=bkLib.toArray(arguments),B=C.shift();return function(E){E=E||window.event;if(E.target){var D=E.target}else{var D=E.srcElement}return A.apply(B,[E,D].concat(C))}};
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
var nicEditorConfig = bkClass.extend({
|
13 |
-
buttons : {
|
14 |
-
'bold' : {name : __('Click to Bold'), command : 'Bold', tags : ['B','STRONG'], css : {'font-weight' : 'bold'}, key : 'b'},
|
15 |
-
'italic' : {name : __('Click to Italic'), command : 'Italic', tags : ['EM','I'], css : {'font-style' : 'italic'}, key : 'i'},
|
16 |
-
'underline' : {name : __('Click to Underline'), command : 'Underline', tags : ['U'], css : {'text-decoration' : 'underline'}, key : 'u'},
|
17 |
-
'left' : {name : __('Left Align'), command : 'justifyleft', noActive : true},
|
18 |
-
'center' : {name : __('Center Align'), command : 'justifycenter', noActive : true},
|
19 |
-
'right' : {name : __('Right Align'), command : 'justifyright', noActive : true},
|
20 |
-
'justify' : {name : __('Justify Align'), command : 'justifyfull', noActive : true},
|
21 |
-
'ol' : {name : __('Insert Ordered List'), command : 'insertorderedlist', tags : ['OL']},
|
22 |
-
'ul' : {name : __('Insert Unordered List'), command : 'insertunorderedlist', tags : ['UL']},
|
23 |
-
'subscript' : {name : __('Click to Subscript'), command : 'subscript', tags : ['SUB']},
|
24 |
-
'superscript' : {name : __('Click to Superscript'), command : 'superscript', tags : ['SUP']},
|
25 |
-
'strikethrough' : {name : __('Click to Strike Through'), command : 'strikeThrough', css : {'text-decoration' : 'line-through'}},
|
26 |
-
'removeformat' : {name : __('Remove Formatting'), command : 'removeformat', noActive : true},
|
27 |
-
'indent' : {name : __('Indent Text'), command : 'indent', noActive : true},
|
28 |
-
'outdent' : {name : __('Remove Indent'), command : 'outdent', noActive : true},
|
29 |
-
'hr' : {name : __('Horizontal Rule'), command : 'insertHorizontalRule', noActive : true}
|
30 |
-
},
|
31 |
-
iconsPath : '../nicEditorIcons.gif',
|
32 |
-
buttonList : ['save','bold','italic','underline','left','center','right','justify','ol','ul','fontSize','fontFamily','fontFormat','indent','outdent','image','upload','link','unlink','forecolor','bgcolor'],
|
33 |
-
iconList : {"bgcolor":1,"forecolor":2,"bold":3,"center":4,"hr":5,"indent":6,"italic":7,"justify":8,"left":9,"ol":10,"outdent":11,"removeformat":12,"right":13,"save":14,"strikethrough":15,"subscript":16,"superscript":17,"ul":18,"underline":19,"image":20,"link":21,"unlink":22,"close":23,"arrow":24}
|
34 |
-
|
35 |
-
});
|
36 |
-
;
|
37 |
-
var nicEditors={nicPlugins:[],editors:[],registerPlugin:function(B,A){this.nicPlugins.push({p:B,o:A})},allTextAreas:function(C){var A=document.getElementsByTagName("textarea");for(var B=0;B<A.length;B++){nicEditors.editors.push(new nicEditor(C).panelInstance(A[B]))}return nicEditors.editors},findEditor:function(C){var B=nicEditors.editors;for(var A=0;A<B.length;A++){if(B[A].instanceById(C)){return B[A].instanceById(C)}}}};var nicEditor=bkClass.extend({construct:function(C){this.options=new nicEditorConfig();bkExtend(this.options,C);this.nicInstances=new Array();this.loadedPlugins=new Array();var A=nicEditors.nicPlugins;for(var B=0;B<A.length;B++){this.loadedPlugins.push(new A[B].p(this,A[B].o))}nicEditors.editors.push(this);bkLib.addEvent(document.body,"mousedown",this.selectCheck.closureListener(this))},panelInstance:function(B,C){B=this.checkReplace($BK(B));var A=new bkElement("DIV").setStyle({width:(parseInt(B.getStyle("width"))||B.clientWidth)+"px"}).appendBefore(B);this.setPanel(A);return this.addInstance(B,C)},checkReplace:function(B){var A=nicEditors.findEditor(B);if(A){A.removeInstance(B);A.removePanel()}return B},addInstance:function(B,C){B=this.checkReplace($BK(B));if(B.contentEditable||!!window.opera){var A=new nicEditorInstance(B,C,this)}else{var A=new nicEditorIFrameInstance(B,C,this)}this.nicInstances.push(A);return this},removeInstance:function(C){C=$BK(C);var B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){B[A].remove();this.nicInstances.splice(A,1)}}},removePanel:function(A){if(this.nicPanel){this.nicPanel.remove();this.nicPanel=null}},instanceById:function(C){C=$BK(C);var B=this.nicInstances;for(var A=0;A<B.length;A++){if(B[A].e==C){return B[A]}}},setPanel:function(A){this.nicPanel=new nicEditorPanel($BK(A),this.options,this);this.fireEvent("panel",this.nicPanel);return this},nicCommand:function(B,A){if(this.selectedInstance){this.selectedInstance.nicCommand(B,A)}},getIcon:function(D,A){var C=this.options.iconList[D];var B=(A.iconFiles)?A.iconFiles[D]:"";return{backgroundImage:"url('"+((C)?this.options.iconsPath:B)+"')",backgroundPosition:((C)?((C-1)*-18):0)+"px 0px"}},selectCheck:function(C,A){var B=false;do{if(A.className&&A.className.indexOf("nicEdit")!=-1){return false}}while(A=A.parentNode);this.fireEvent("blur",this.selectedInstance,A);this.lastSelectedInstance=this.selectedInstance;this.selectedInstance=null;return false}});nicEditor=nicEditor.extend(bkEvent);
|
38 |
-
var nicEditorInstance=bkClass.extend({isSelected:false,construct:function(G,D,C){this.ne=C;this.elm=this.e=G;this.options=D||{};newX=parseInt(G.getStyle("width"))||G.clientWidth;newY=parseInt(G.getStyle("height"))||G.clientHeight;this.initialHeight=newY-8;var H=(G.nodeName.toLowerCase()=="textarea");if(H||this.options.hasPanel){var B=(bkLib.isMSIE&&!((typeof document.body.style.maxHeight!="undefined")&&document.compatMode=="CSS1Compat"));var E={width:newX+"px",border:"1px solid #ccc",borderTop:0,overflowY:"auto",overflowX:"hidden"};E[(B)?"height":"maxHeight"]=(this.ne.options.maxHeight)?this.ne.options.maxHeight+"px":null;this.editorContain=new bkElement("DIV").setStyle(E).appendBefore(G);var A=new bkElement("DIV").setStyle({width:(newX-8)+"px",margin:"4px",minHeight:newY+"px"}).addClass("main").appendTo(this.editorContain);G.setStyle({display:"none"});A.innerHTML=G.innerHTML;if(H){A.setContent(G.value);this.copyElm=G;var F=G.parentTag("FORM");if(F){bkLib.addEvent(F,"submit",this.saveContent.closure(this))}}A.setStyle((B)?{height:newY+"px"}:{overflow:"hidden"});this.elm=A}this.ne.addEvent("blur",this.blur.closure(this));this.init();this.blur()},init:function(){this.elm.setAttribute("contentEditable","true");if(this.getContent()==""){this.setContent("<br />")}this.instanceDoc=document.defaultView;this.elm.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keypress",this.keyDown.closureListener(this)).addEvent("focus",this.selected.closure(this)).addEvent("blur",this.blur.closure(this)).addEvent("keyup",this.selected.closure(this));this.ne.fireEvent("add",this)},remove:function(){this.saveContent();if(this.copyElm||this.options.hasPanel){this.editorContain.remove();this.e.setStyle({display:"block"});this.ne.removePanel()}this.disable();this.ne.fireEvent("remove",this)},disable:function(){this.elm.setAttribute("contentEditable","false")},getSel:function(){return(window.getSelection)?window.getSelection():document.selection},getRng:function(){var A=this.getSel();if(!A){return null}return(A.rangeCount>0)?A.getRangeAt(0):A.createRange()},selRng:function(A,B){if(window.getSelection){B.removeAllRanges();B.addRange(A)}else{A.select()}},selElm:function(){var C=this.getRng();if(C.startContainer){var D=C.startContainer;if(C.cloneContents().childNodes.length==1){for(var B=0;B<D.childNodes.length;B++){var A=D.childNodes[B].ownerDocument.createRange();A.selectNode(D.childNodes[B]);if(C.compareBoundaryPoints(Range.START_TO_START,A)!=1&&C.compareBoundaryPoints(Range.END_TO_END,A)!=-1){return $BK(D.childNodes[B])}}}return $BK(D)}else{return $BK((this.getSel().type=="Control")?C.item(0):C.parentElement())}},saveRng:function(){this.savedRange=this.getRng();this.savedSel=this.getSel()},restoreRng:function(){if(this.savedRange){this.selRng(this.savedRange,this.savedSel)}},keyDown:function(B,A){if(B.ctrlKey){this.ne.fireEvent("key",this,B)}},selected:function(C,A){if(!A){A=this.selElm()}if(!C.ctrlKey){var B=this.ne.selectedInstance;if(B!=this){if(B){this.ne.fireEvent("blur",B,A)}this.ne.selectedInstance=this;this.ne.fireEvent("focus",B,A)}this.ne.fireEvent("selected",B,A);this.isFocused=true;this.elm.addClass("selected")}return false},blur:function(){this.isFocused=false;this.elm.removeClass("selected")},saveContent:function(){if(this.copyElm||this.options.hasPanel){this.ne.fireEvent("save",this);(this.copyElm)?this.copyElm.value=this.getContent():this.e.innerHTML=this.getContent()}},getElm:function(){return this.elm},getContent:function(){this.content=this.getElm().innerHTML;this.ne.fireEvent("get",this);return this.content},setContent:function(A){this.content=A;this.ne.fireEvent("set",this);this.elm.innerHTML=this.content},nicCommand:function(B,A){document.execCommand(B,false,A)}});
|
39 |
-
var nicEditorIFrameInstance=nicEditorInstance.extend({savedStyles:[],init:function(){var B=this.elm.innerHTML.replace(/^\s+|\s+$/g,"");this.elm.innerHTML="";(!B)?B="<br />":B;this.initialContent=B;this.elmFrame=new bkElement("iframe").setAttributes({src:"javascript:;",frameBorder:0,allowTransparency:"true",scrolling:"no"}).setStyle({height:"100px",width:"100%"}).addClass("frame").appendTo(this.elm);if(this.copyElm){this.elmFrame.setStyle({width:(this.elm.offsetWidth-4)+"px"})}var A=["font-size","font-family","font-weight","color"];for(itm in A){this.savedStyles[bkLib.camelize(itm)]=this.elm.getStyle(itm)}setTimeout(this.initFrame.closure(this),50)},disable:function(){this.elm.innerHTML=this.getContent()},initFrame:function(){var B=$BK(this.elmFrame.contentWindow.document);B.designMode="on";B.open();var A=this.ne.options.externalCSS;B.write("<html><head>"+((A)?'<link href="'+A+'" rel="stylesheet" type="text/css" />':"")+'</head><body id="nicEditContent" style="margin: 0 !important; background-color: transparent !important;">'+this.initialContent+"</body></html>");B.close();this.frameDoc=B;this.frameWin=$BK(this.elmFrame.contentWindow);this.frameContent=$BK(this.frameWin.document.body).setStyle(this.savedStyles);this.instanceDoc=this.frameWin.document.defaultView;this.heightUpdate();this.frameDoc.addEvent("mousedown",this.selected.closureListener(this)).addEvent("keyup",this.heightUpdate.closureListener(this)).addEvent("keydown",this.keyDown.closureListener(this)).addEvent("keyup",this.selected.closure(this));this.ne.fireEvent("add",this)},getElm:function(){return this.frameContent},setContent:function(A){this.content=A;this.ne.fireEvent("set",this);this.frameContent.innerHTML=this.content;this.heightUpdate()},getSel:function(){return(this.frameWin)?this.frameWin.getSelection():this.frameDoc.selection},heightUpdate:function(){this.elmFrame.style.height=Math.max(this.frameContent.offsetHeight,this.initialHeight)+"px"},nicCommand:function(B,A){this.frameDoc.execCommand(B,false,A);setTimeout(this.heightUpdate.closure(this),100)}});
|
40 |
-
var nicEditorPanel=bkClass.extend({construct:function(E,B,A){this.elm=E;this.options=B;this.ne=A;this.panelButtons=new Array();this.buttonList=bkExtend([],this.ne.options.buttonList);this.panelContain=new bkElement("DIV").setStyle({overflow:"hidden",width:"100%",border:"1px solid #cccccc",backgroundColor:"#efefef"}).addClass("panelContain");this.panelElm=new bkElement("DIV").setStyle({margin:"2px",marginTop:"0px",zoom:1,overflow:"hidden"}).addClass("panel").appendTo(this.panelContain);this.panelContain.appendTo(E);var C=this.ne.options;var D=C.buttons;for(button in D){this.addButton(button,C,true)}this.reorder();E.noSelect()},addButton:function(buttonName,options,noOrder){var button=options.buttons[buttonName];var type=(button.type)?eval("(typeof("+button.type+') == "undefined") ? null : '+button.type+";"):nicEditorButton;var hasButton=bkLib.inArray(this.buttonList,buttonName);if(type&&(hasButton||this.ne.options.fullPanel)){this.panelButtons.push(new type(this.panelElm,buttonName,options,this.ne));if(!hasButton){this.buttonList.push(buttonName)}}},findButton:function(B){for(var A=0;A<this.panelButtons.length;A++){if(this.panelButtons[A].name==B){return this.panelButtons[A]}}},reorder:function(){var C=this.buttonList;for(var B=0;B<C.length;B++){var A=this.findButton(C[B]);if(A){this.panelElm.appendChild(A.margin)}}},remove:function(){this.elm.remove()}});
|
41 |
-
var nicEditorButton=bkClass.extend({construct:function(D,A,C,B){this.options=C.buttons[A];this.name=A;this.ne=B;this.elm=D;this.margin=new bkElement("DIV").setStyle({"float":"left",marginTop:"2px"}).appendTo(D);this.contain=new bkElement("DIV").setStyle({width:"20px",height:"20px"}).addClass("buttonContain").appendTo(this.margin);this.border=new bkElement("DIV").setStyle({backgroundColor:"#efefef",border:"1px solid #efefef"}).appendTo(this.contain);this.button=new bkElement("DIV").setStyle({width:"18px",height:"18px",overflow:"hidden",zoom:1,cursor:"pointer"}).addClass("button").setStyle(this.ne.getIcon(A,C)).appendTo(this.border);this.button.addEvent("mouseover",this.hoverOn.closure(this)).addEvent("mouseout",this.hoverOff.closure(this)).addEvent("mousedown",this.mouseClick.closure(this)).noSelect();if(!window.opera){this.button.onmousedown=this.button.onclick=bkLib.cancelEvent}B.addEvent("selected",this.enable.closure(this)).addEvent("blur",this.disable.closure(this)).addEvent("key",this.key.closure(this));this.disable();this.init()},init:function(){},hide:function(){this.contain.setStyle({display:"none"})},updateState:function(){if(this.isDisabled){this.setBg()}else{if(this.isHover){this.setBg("hover")}else{if(this.isActive){this.setBg("active")}else{this.setBg()}}}},setBg:function(A){switch(A){case"hover":var B={border:"1px solid #666",backgroundColor:"#ddd"};break;case"active":var B={border:"1px solid #666",backgroundColor:"#ccc"};break;default:var B={border:"1px solid #efefef",backgroundColor:"#efefef"}}this.border.setStyle(B).addClass("button-"+A)},checkNodes:function(A){var B=A;do{if(this.options.tags&&bkLib.inArray(this.options.tags,B.nodeName)){this.activate();return true}}while(B=B.parentNode&&B.className!="nicEdit");B=$BK(A);while(B.nodeType==3){B=$BK(B.parentNode)}if(this.options.css){for(itm in this.options.css){if(B.getStyle(itm,this.ne.selectedInstance.instanceDoc)==this.options.css[itm]){this.activate();return true}}}this.deactivate();return false},activate:function(){if(!this.isDisabled){this.isActive=true;this.updateState();this.ne.fireEvent("buttonActivate",this)}},deactivate:function(){this.isActive=false;this.updateState();if(!this.isDisabled){this.ne.fireEvent("buttonDeactivate",this)}},enable:function(A,B){this.isDisabled=false;this.contain.setStyle({opacity:1}).addClass("buttonEnabled");this.updateState();this.checkNodes(B)},disable:function(A,B){this.isDisabled=true;this.contain.setStyle({opacity:0.6}).removeClass("buttonEnabled");this.updateState()},toggleActive:function(){(this.isActive)?this.deactivate():this.activate()},hoverOn:function(){if(!this.isDisabled){this.isHover=true;this.updateState();this.ne.fireEvent("buttonOver",this)}},hoverOff:function(){this.isHover=false;this.updateState();this.ne.fireEvent("buttonOut",this)},mouseClick:function(){if(this.options.command){this.ne.nicCommand(this.options.command,this.options.commandArgs);if(!this.options.noActive){this.toggleActive()}}this.ne.fireEvent("buttonClick",this)},key:function(A,B){if(this.options.key&&B.ctrlKey&&String.fromCharCode(B.keyCode||B.charCode).toLowerCase()==this.options.key){this.mouseClick();if(B.preventDefault){B.preventDefault()}}}});
|
42 |
-
var nicPlugin=bkClass.extend({construct:function(B,A){this.options=A;this.ne=B;this.ne.addEvent("panel",this.loadPanel.closure(this));this.init()},loadPanel:function(C){var B=this.options.buttons;for(var A in B){C.addButton(A,this.options)}C.reorder()},init:function(){}});
|
43 |
-
|
44 |
-
|
45 |
-
var nicPaneOptions = { };
|
46 |
-
|
47 |
-
var nicEditorPane=bkClass.extend({construct:function(D,C,B,A){this.ne=C;this.elm=D;this.pos=D.pos();this.contain=new bkElement("div").setStyle({zIndex:"99999",overflow:"hidden",position:"absolute",left:this.pos[0]+"px",top:this.pos[1]+"px"});this.pane=new bkElement("div").setStyle({fontSize:"12px",border:"1px solid #ccc",overflow:"hidden",padding:"4px",textAlign:"left",backgroundColor:"#ffffc9"}).addClass("pane").setStyle(B).appendTo(this.contain);if(A&&!A.options.noClose){this.close=new bkElement("div").setStyle({"float":"right",height:"16px",width:"16px",cursor:"pointer"}).setStyle(this.ne.getIcon("close",nicPaneOptions)).addEvent("mousedown",A.removePane.closure(this)).appendTo(this.pane)}this.contain.noSelect().appendTo(document.body);this.position();this.init()},init:function(){},position:function(){if(this.ne.nicPanel){var B=this.ne.nicPanel.elm;var A=B.pos();var C=A[0]+parseInt(B.getStyle("width"))-(parseInt(this.pane.getStyle("width"))+8);if(C<this.pos[0]){this.contain.setStyle({left:C+"px"})}}},toggle:function(){this.isVisible=!this.isVisible;this.contain.setStyle({display:((this.isVisible)?"block":"none")})},remove:function(){if(this.contain){this.contain.remove();this.contain=null}},append:function(A){A.appendTo(this.pane)},setContent:function(A){this.pane.setContent(A)}});
|
48 |
-
|
49 |
-
var nicEditorAdvancedButton=nicEditorButton.extend({init:function(){this.ne.addEvent("selected",this.removePane.closure(this)).addEvent("blur",this.removePane.closure(this))},mouseClick:function(){if(!this.isDisabled){if(this.pane&&this.pane.pane){this.removePane()}else{this.pane=new nicEditorPane(this.contain,this.ne,{width:(this.width||"270px"),backgroundColor:"#fff"},this);this.addPane();this.ne.selectedInstance.saveRng()}}},addForm:function(C,G){this.form=new bkElement("form").addEvent("submit",this.submit.closureListener(this));this.pane.append(this.form);this.inputs={};for(itm in C){var D=C[itm];var F="";if(G){F=G.getAttribute(itm)}if(!F){F=D.value||""}var A=C[itm].type;if(A=="title"){new bkElement("div").setContent(D.txt).setStyle({fontSize:"14px",fontWeight:"bold",padding:"0px",margin:"2px 0"}).appendTo(this.form)}else{var B=new bkElement("div").setStyle({overflow:"hidden",clear:"both"}).appendTo(this.form);if(D.txt){new bkElement("label").setAttributes({"for":itm}).setContent(D.txt).setStyle({margin:"2px 4px",fontSize:"13px",width:"50px",lineHeight:"20px",textAlign:"right","float":"left"}).appendTo(B)}switch(A){case"text":this.inputs[itm]=new bkElement("input").setAttributes({id:itm,value:F,type:"text"}).setStyle({margin:"2px 0",fontSize:"13px","float":"left",height:"20px",border:"1px solid #ccc",overflow:"hidden"}).setStyle(D.style).appendTo(B);break;case"select":this.inputs[itm]=new bkElement("select").setAttributes({id:itm}).setStyle({border:"1px solid #ccc","float":"left",margin:"2px 0"}).appendTo(B);for(opt in D.options){var E=new bkElement("option").setAttributes({value:opt,selected:(opt==F)?"selected":""}).setContent(D.options[opt]).appendTo(this.inputs[itm])}break;case"content":this.inputs[itm]=new bkElement("textarea").setAttributes({id:itm}).setStyle({border:"1px solid #ccc","float":"left"}).setStyle(D.style).appendTo(B);this.inputs[itm].value=F}}}new bkElement("input").setAttributes({type:"submit"}).setStyle({backgroundColor:"#efefef",border:"1px solid #ccc",margin:"3px 0","float":"left",clear:"both"}).appendTo(this.form);this.form.onsubmit=bkLib.cancelEvent},submit:function(){},findElm:function(B,A,E){var D=this.ne.selectedInstance.getElm().getElementsByTagName(B);for(var C=0;C<D.length;C++){if(D[C].getAttribute(A)==E){return $BK(D[C])}}},removePane:function(){if(this.pane){this.pane.remove();this.pane=null;this.ne.selectedInstance.restoreRng()}}});
|
50 |
-
|
51 |
-
|
52 |
-
var nicSelectOptions = {
|
53 |
-
buttons : {
|
54 |
-
'fontSize' : {name : __('Select Font Size'), type : 'nicEditorFontSizeSelect', command : 'fontsize'},
|
55 |
-
'fontFamily' : {name : __('Select Font Family'), type : 'nicEditorFontFamilySelect', command : 'fontname'},
|
56 |
-
'fontFormat' : {name : __('Select Font Format'), type : 'nicEditorFontFormatSelect', command : 'formatBlock'}
|
57 |
-
}
|
58 |
-
};
|
59 |
-
|
60 |
-
var nicEditorSelect=bkClass.extend({construct:function(D,A,C,B){this.options=C.buttons[A];this.elm=D;this.ne=B;this.name=A;this.selOptions=new Array();this.margin=new bkElement("div").setStyle({"float":"left",margin:"2px 1px 0 1px"}).appendTo(this.elm);this.contain=new bkElement("div").setStyle({width:"90px",height:"20px",cursor:"pointer",overflow:"hidden"}).addClass("selectContain").addEvent("click",this.toggle.closure(this)).appendTo(this.margin);this.items=new bkElement("div").setStyle({overflow:"hidden",zoom:1,border:"1px solid #ccc",paddingLeft:"3px",backgroundColor:"#fff"}).appendTo(this.contain);this.control=new bkElement("div").setStyle({overflow:"hidden","float":"right",height:"18px",width:"16px"}).addClass("selectControl").setStyle(this.ne.getIcon("arrow",C)).appendTo(this.items);this.txt=new bkElement("div").setStyle({overflow:"hidden","float":"left",width:"66px",height:"14px",marginTop:"1px",fontFamily:"sans-serif",textAlign:"center",fontSize:"12px"}).addClass("selectTxt").appendTo(this.items);if(!window.opera){this.contain.onmousedown=this.control.onmousedown=this.txt.onmousedown=bkLib.cancelEvent}this.margin.noSelect();this.ne.addEvent("selected",this.enable.closure(this)).addEvent("blur",this.disable.closure(this));this.disable();this.init()},disable:function(){this.isDisabled=true;this.close();this.contain.setStyle({opacity:0.6})},enable:function(A){this.isDisabled=false;this.close();this.contain.setStyle({opacity:1})},setDisplay:function(A){this.txt.setContent(A)},toggle:function(){if(!this.isDisabled){(this.pane)?this.close():this.open()}},open:function(){this.pane=new nicEditorPane(this.items,this.ne,{width:"88px",padding:"0px",borderTop:0,borderLeft:"1px solid #ccc",borderRight:"1px solid #ccc",borderBottom:"0px",backgroundColor:"#fff"});for(var C=0;C<this.selOptions.length;C++){var B=this.selOptions[C];var A=new bkElement("div").setStyle({overflow:"hidden",borderBottom:"1px solid #ccc",width:"88px",textAlign:"left",overflow:"hidden",cursor:"pointer"});var D=new bkElement("div").setStyle({padding:"0px 4px"}).setContent(B[1]).appendTo(A).noSelect();D.addEvent("click",this.update.closure(this,B[0])).addEvent("mouseover",this.over.closure(this,D)).addEvent("mouseout",this.out.closure(this,D)).setAttributes("id",B[0]);this.pane.append(A);if(!window.opera){D.onmousedown=bkLib.cancelEvent}}},close:function(){if(this.pane){this.pane=this.pane.remove()}},over:function(A){A.setStyle({backgroundColor:"#ccc"})},out:function(A){A.setStyle({backgroundColor:"#fff"})},add:function(B,A){this.selOptions.push(new Array(B,A))},update:function(A){this.ne.nicCommand(this.options.command,A);this.close()}});var nicEditorFontSizeSelect=nicEditorSelect.extend({sel:{1:"1 (8pt)",2:"2 (10pt)",3:"3 (12pt)",4:"4 (14pt)",5:"5 (18pt)",6:"6 (24pt)"},init:function(){this.setDisplay("Font Size...");for(itm in this.sel){this.add(itm,'<font size="'+itm+'">'+this.sel[itm]+"</font>")}}});var nicEditorFontFamilySelect=nicEditorSelect.extend({sel:{arial:"Arial","comic sans ms":"Comic Sans","courier new":"Courier New",georgia:"Georgia",helvetica:"Helvetica",impact:"Impact","times new roman":"Times","trebuchet ms":"Trebuchet",verdana:"Verdana"},init:function(){this.setDisplay("Font Family...");for(itm in this.sel){this.add(itm,'<font face="'+itm+'">'+this.sel[itm]+"</font>")}}});var nicEditorFontFormatSelect=nicEditorSelect.extend({sel:{p:"Paragraph",pre:"Pre",h6:"Heading 6",h5:"Heading 5",h4:"Heading 4",h3:"Heading 3",h2:"Heading 2",h1:"Heading 1"},init:function(){this.setDisplay("Font Format...");for(itm in this.sel){var A=itm.toUpperCase();this.add("<"+A+">","<"+itm+' style="padding: 0px; margin: 0px;">'+this.sel[itm]+"</"+A+">")}}});nicEditors.registerPlugin(nicPlugin,nicSelectOptions);
|
61 |
-
|
62 |
-
|
63 |
-
var nicLinkOptions = {
|
64 |
-
buttons : {
|
65 |
-
'link' : {name : 'Add Link', type : 'nicLinkButton', tags : ['A']},
|
66 |
-
'unlink' : {name : 'Remove Link', command : 'unlink', noActive : true}
|
67 |
-
}
|
68 |
-
};
|
69 |
-
|
70 |
-
var nicLinkButton=nicEditorAdvancedButton.extend({addPane:function(){this.ln=this.ne.selectedInstance.selElm().parentTag("A");this.addForm({"":{type:"title",txt:"Add/Edit Link"},href:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},title:{type:"text",txt:"Title"},target:{type:"select",txt:"Open In",options:{"":"Current Window",_blank:"New Window"},style:{width:"100px"}}},this.ln)},submit:function(C){var A=this.inputs.href.value;if(A=="http://"||A==""){alert("You must enter a URL to Create a Link");return false}this.removePane();if(!this.ln){var B="javascript:nicTemp();";this.ne.nicCommand("createlink",B);this.ln=this.findElm("A","href",B)}if(this.ln){this.ln.setAttributes({href:this.inputs.href.value,title:this.inputs.title.value,target:this.inputs.target.options[this.inputs.target.selectedIndex].value})}}});nicEditors.registerPlugin(nicPlugin,nicLinkOptions);
|
71 |
-
|
72 |
-
|
73 |
-
var nicColorOptions = {
|
74 |
-
buttons : {
|
75 |
-
'forecolor' : {name : __('Change Text Color'), type : 'nicEditorColorButton', noClose : true},
|
76 |
-
'bgcolor' : {name : __('Change Background Color'), type : 'nicEditorBgColorButton', noClose : true}
|
77 |
-
}
|
78 |
-
};
|
79 |
-
|
80 |
-
var nicEditorColorButton=nicEditorAdvancedButton.extend({addPane:function(){var D={0:"00",1:"33",2:"66",3:"99",4:"CC",5:"FF"};var H=new bkElement("DIV").setStyle({width:"270px"});for(var A in D){for(var F in D){for(var E in D){var I="#"+D[A]+D[E]+D[F];var C=new bkElement("DIV").setStyle({cursor:"pointer",height:"15px","float":"left"}).appendTo(H);var G=new bkElement("DIV").setStyle({border:"2px solid "+I}).appendTo(C);var B=new bkElement("DIV").setStyle({backgroundColor:I,overflow:"hidden",width:"11px",height:"11px"}).addEvent("click",this.colorSelect.closure(this,I)).addEvent("mouseover",this.on.closure(this,G)).addEvent("mouseout",this.off.closure(this,G,I)).appendTo(G);if(!window.opera){C.onmousedown=B.onmousedown=bkLib.cancelEvent}}}}this.pane.append(H.noSelect())},colorSelect:function(A){this.ne.nicCommand("foreColor",A);this.removePane()},on:function(A){A.setStyle({border:"2px solid #000"})},off:function(A,B){A.setStyle({border:"2px solid "+B})}});var nicEditorBgColorButton=nicEditorColorButton.extend({colorSelect:function(A){this.ne.nicCommand("hiliteColor",A);this.removePane()}});nicEditors.registerPlugin(nicPlugin,nicColorOptions);
|
81 |
-
|
82 |
-
|
83 |
-
var nicImageOptions = {
|
84 |
-
buttons : {
|
85 |
-
'image' : {name : 'Add Image', type : 'nicImageButton', tags : ['IMG']}
|
86 |
-
}
|
87 |
-
|
88 |
-
};
|
89 |
-
|
90 |
-
var nicImageButton=nicEditorAdvancedButton.extend({addPane:function(){this.im=this.ne.selectedInstance.selElm().parentTag("IMG");this.addForm({"":{type:"title",txt:"Add/Edit Image"},src:{type:"text",txt:"URL",value:"http://",style:{width:"150px"}},alt:{type:"text",txt:"Alt Text",style:{width:"100px"}},align:{type:"select",txt:"Align",options:{none:"Default",left:"Left",right:"Right"}}},this.im)},submit:function(B){var C=this.inputs.src.value;if(C==""||C=="http://"){alert("You must enter a Image URL to insert");return false}this.removePane();if(!this.im){var A="javascript:nicImTemp();";this.ne.nicCommand("insertImage",A);this.im=this.findElm("IMG","src",A)}if(this.im){this.im.setAttributes({src:this.inputs.src.value,alt:this.inputs.alt.value,align:this.inputs.align.value})}}});nicEditors.registerPlugin(nicPlugin,nicImageOptions);
|
91 |
-
|
92 |
-
var nicXHTML=bkClass.extend({stripAttributes:["_moz_dirty","_moz_resizing","_extended"],noShort:["style","title","script","textarea","a"],cssReplace:{"font-weight:bold;":"strong","font-style:italic;":"em"},sizes:{1:"xx-small",2:"x-small",3:"small",4:"medium",5:"large",6:"x-large"},construct:function(A){this.ne=A;if(this.ne.options.xhtml){A.addEvent("get",this.cleanup.closure(this))}},cleanup:function(A){var B=A.getElm();var C=this.toXHTML(B);A.content=C},toXHTML:function(C,A,L){var G="";var O="";var P="";var I=C.nodeType;var Q=C.nodeName.toLowerCase();var N=C.hasChildNodes&&C.hasChildNodes();var B=new Array();switch(I){case 1:var H=C.attributes;switch(Q){case"b":Q="strong";break;case"i":Q="em";break;case"font":Q="span";break}if(A){for(var F=0;F<H.length;F++){var K=H[F];var M=K.nodeName.toLowerCase();var D=K.nodeValue;if(!K.specified||!D||bkLib.inArray(this.stripAttributes,M)||typeof (D)=="function"){continue}switch(M){case"style":var J=D.replace(/ /g,"");for(itm in this.cssReplace){if(J.indexOf(itm)!=-1){B.push(this.cssReplace[itm]);J=J.replace(itm,"")}}P+=J;D="";break;case"class":D=D.replace("Apple-style-span","");break;case"size":P+="font-size:"+this.sizes[D]+";";D="";break}if(D){O+=" "+M+'="'+D+'"'}}if(P){O+=' style="'+P+'"'}for(var F=0;F<B.length;F++){G+="<"+B[F]+">"}if(O==""&&Q=="span"){A=false}if(A){G+="<"+Q;if(Q!="br"){G+=O}}}if(!N&&!bkLib.inArray(this.noShort,M)){if(A){G+=" />"}}else{if(A){G+=">"}for(var F=0;F<C.childNodes.length;F++){var E=this.toXHTML(C.childNodes[F],true,true);if(E){G+=E}}}if(A&&N){G+="</"+Q+">"}for(var F=0;F<B.length;F++){G+="</"+B[F]+">"}break;case 3:G+=C.nodeValue;break}return G}});nicEditors.registerPlugin(nicXHTML);
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/nicedit/nicEditorIcons.gif
DELETED
Binary file
|
js/tinymce/editor_plugin.js
CHANGED
@@ -1,16 +1,13 @@
|
|
1 |
/*
|
2 |
-
* Shortcoder
|
3 |
* http://www.aakashweb.com
|
4 |
-
* v1.
|
5 |
* Added since WP Socializer v2.0
|
6 |
*/
|
7 |
-
function sc_show_editor(){
|
8 |
-
var url = document.getElementById('sc_editorUrl').innerHTML;
|
9 |
-
tb_show('Insert a Shortcode', url + '?random=' + Math.random() + '&TB_iframe=1');
|
10 |
-
}
|
11 |
|
12 |
// For adding button in the visual editing toolbox
|
13 |
(function() {
|
|
|
14 |
tinymce.create('tinymce.plugins.SCButton', {
|
15 |
|
16 |
init : function(ed, url) {
|
@@ -18,7 +15,7 @@ function sc_show_editor(){
|
|
18 |
title : 'Insert shortcodes created using Shortcoder',
|
19 |
image : url + '/icon.png',
|
20 |
onclick : function() {
|
21 |
-
|
22 |
}
|
23 |
});
|
24 |
},
|
@@ -29,28 +26,12 @@ function sc_show_editor(){
|
|
29 |
author : 'Aakash Chakravarthy',
|
30 |
authorurl : 'http://www.aakashweb.com/',
|
31 |
infourl : 'http://www.aakashweb.com/',
|
32 |
-
version : '1.
|
33 |
};
|
34 |
}
|
35 |
|
36 |
});
|
37 |
|
38 |
tinymce.PluginManager.add('scbutton', tinymce.plugins.SCButton);
|
39 |
-
|
40 |
-
|
41 |
-
// For adding button in the code editing toolbox
|
42 |
-
|
43 |
-
if(document.getElementById("ed_toolbar")){
|
44 |
-
qt_toolbar = document.getElementById("ed_toolbar");
|
45 |
-
edButtons[edButtons.length] = new edButton("ed_scbutton", "WP Socializer", "", "","");
|
46 |
-
var qt_button = qt_toolbar.lastChild;
|
47 |
-
while (qt_button.nodeType != 1){
|
48 |
-
qt_button = qt_button.previousSibling;
|
49 |
-
}
|
50 |
-
qt_button = qt_button.cloneNode(true);
|
51 |
-
qt_button.value = 'Shortcoder';
|
52 |
-
qt_button.title = 'Insert shortcodes created using Shortcoder';
|
53 |
-
qt_button.onclick = function(){ sc_show_editor(); };
|
54 |
-
qt_button.id = "ed_scbutton";
|
55 |
-
qt_toolbar.appendChild(qt_button);
|
56 |
-
}
|
1 |
/*
|
2 |
+
* Shortcoder TinyMCE plugin for inserting Shortcodes
|
3 |
* http://www.aakashweb.com
|
4 |
+
* v1.2
|
5 |
* Added since WP Socializer v2.0
|
6 |
*/
|
|
|
|
|
|
|
|
|
7 |
|
8 |
// For adding button in the visual editing toolbox
|
9 |
(function() {
|
10 |
+
|
11 |
tinymce.create('tinymce.plugins.SCButton', {
|
12 |
|
13 |
init : function(ed, url) {
|
15 |
title : 'Insert shortcodes created using Shortcoder',
|
16 |
image : url + '/icon.png',
|
17 |
onclick : function() {
|
18 |
+
if( typeof sc_show_insert !== 'undefined' ) sc_show_insert();
|
19 |
}
|
20 |
});
|
21 |
},
|
26 |
author : 'Aakash Chakravarthy',
|
27 |
authorurl : 'http://www.aakashweb.com/',
|
28 |
infourl : 'http://www.aakashweb.com/',
|
29 |
+
version : '1.2'
|
30 |
};
|
31 |
}
|
32 |
|
33 |
});
|
34 |
|
35 |
tinymce.PluginManager.add('scbutton', tinymce.plugins.SCButton);
|
36 |
+
|
37 |
+
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/tinymce/index.html
ADDED
File without changes
|
languages/index.html
ADDED
File without changes
|
languages/readme.html
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
2 |
-
<html>
|
3 |
-
<head>
|
4 |
-
<title>Shortcoder - Plugin - Language Translation</title>
|
5 |
-
<style>
|
6 |
-
body{
|
7 |
-
font: 13px/2em Arial, Helvetica, sans-serif;
|
8 |
-
background: #DDF1FF;
|
9 |
-
}
|
10 |
-
#wrap{
|
11 |
-
margin: 0px auto;
|
12 |
-
padding: 10px;
|
13 |
-
width: 750px;
|
14 |
-
background: #FFFFFF;
|
15 |
-
border: 1px solid #0099FF;
|
16 |
-
}
|
17 |
-
h1, h2{
|
18 |
-
font-weight: normal;
|
19 |
-
border-bottom: 1px solid #E0E0E0;
|
20 |
-
}
|
21 |
-
.grey{
|
22 |
-
color: #999999;
|
23 |
-
}
|
24 |
-
</style>
|
25 |
-
</head>
|
26 |
-
<body>
|
27 |
-
<div id="wrap">
|
28 |
-
<h1>Shortcoder - Plugin - Language Translation</h1>
|
29 |
-
<h3>Credits</h3>
|
30 |
-
<p>All Translations in this folder were made - By <a href="http://www.aakashweb.com/" rel="follow">Aakash Chakravarthy</a> </p>
|
31 |
-
<p>PO and MO files were made with Poedit software. Translations were done with Google Translate and Microsoft Translate. </p>
|
32 |
-
<h2>Contact Author </h2>
|
33 |
-
<ul>
|
34 |
-
<li>Website: <a href="http://www.aakashweb.com/" rel="follow">Aakash Web</a></li>
|
35 |
-
<li>Support: <a href="http://www.aakashweb.com/forum/">Forum</a> </li>
|
36 |
-
<li>Email: aakash.19493 AT gmail DOT com</li>
|
37 |
-
<li>Twitter: <a href="http://twitter.com/vaakash">vaakash</a></li>
|
38 |
-
</ul>
|
39 |
-
<p>More Translations needed. Please submit a Translation in <a href="http://www.aakashweb.com/wordpress-plugins/shortcoder/" rel="follow">this page</a>. </p>
|
40 |
-
</div>
|
41 |
-
</body>
|
42 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/sc-de_DE.mo
DELETED
Binary file
|
languages/sc-de_DE.po
DELETED
@@ -1,157 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Shortcoder\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-07-30 11:56+0530\n"
|
6 |
-
"PO-Revision-Date: 2010-07-30 11:57+0530\n"
|
7 |
-
"Last-Translator: Aakash Chakravarthy <aakash.19493@gmail.com>\n"
|
8 |
-
"Language-Team: Aakash Chakravarthy <aakash.19493@gmail.com>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-SearchPath-0: ..\n"
|
15 |
-
|
16 |
-
#: ../adm-sidebar.php:10
|
17 |
-
msgid "Donate and support this plugin's future"
|
18 |
-
msgstr "Spenden und Unterstützung dieses Plugin die Zukunft"
|
19 |
-
|
20 |
-
#: ../adm-sidebar.php:14
|
21 |
-
msgid "Plugin Support"
|
22 |
-
msgstr "Plugin-Unterstützung"
|
23 |
-
|
24 |
-
#: ../adm-sidebar.php:18
|
25 |
-
msgid "Plugin Documentation"
|
26 |
-
msgstr "Plugin-Dokumentation"
|
27 |
-
|
28 |
-
#: ../adm-sidebar.php:22
|
29 |
-
msgid "Bugs Report"
|
30 |
-
msgstr "Fehler melden"
|
31 |
-
|
32 |
-
#: ../adm-sidebar.php:26
|
33 |
-
msgid "FAQ's"
|
34 |
-
msgstr "FAQ's"
|
35 |
-
|
36 |
-
#: ../adm-sidebar.php:30
|
37 |
-
msgid "Request a feature"
|
38 |
-
msgstr "Fordern Sie eine Funktion"
|
39 |
-
|
40 |
-
#: ../adm-sidebar.php:34
|
41 |
-
msgid "Author Website"
|
42 |
-
msgstr "Autor Website"
|
43 |
-
|
44 |
-
#: ../adm-sidebar.php:38
|
45 |
-
msgid "Support this plugin"
|
46 |
-
msgstr "Unterstützen Sie dieses Plugin"
|
47 |
-
|
48 |
-
#: ../adm-sidebar.php:42
|
49 |
-
msgid "Follow the author"
|
50 |
-
msgstr "Folgen Sie den Autor"
|
51 |
-
|
52 |
-
#: ../adm-sidebar.php:46
|
53 |
-
msgid "Subscribe to Updates"
|
54 |
-
msgstr "Abonnieren Sie Updates"
|
55 |
-
|
56 |
-
#: ../adm-sidebar.php:50
|
57 |
-
msgid "Promote this plugin"
|
58 |
-
msgstr "Förderung dieses Plugin"
|
59 |
-
|
60 |
-
#: ../adm-sidebar.php:55
|
61 |
-
msgid "More plugins"
|
62 |
-
msgstr "Weitere Plugins"
|
63 |
-
|
64 |
-
#: ../shortcoder.php:257
|
65 |
-
msgid "Updated successfully."
|
66 |
-
msgstr "Erfolgreich aktualisiert."
|
67 |
-
|
68 |
-
#: ../shortcoder.php:259
|
69 |
-
msgid "Unable to update !"
|
70 |
-
msgstr "Kann Update!"
|
71 |
-
|
72 |
-
#: ../shortcoder.php:290
|
73 |
-
msgid "Select a shortcode"
|
74 |
-
msgstr "Wählen Sie eine Shortcode"
|
75 |
-
|
76 |
-
#: ../shortcoder.php:294
|
77 |
-
msgid "Shortcode Name"
|
78 |
-
msgstr "Shortcode Name"
|
79 |
-
|
80 |
-
#: ../shortcoder.php:301
|
81 |
-
msgid "Select the Shortcode Attribute to be edited"
|
82 |
-
msgstr "Wählen Sie das Shortcode Attribute bearbeitet werden"
|
83 |
-
|
84 |
-
#: ../shortcoder.php:306
|
85 |
-
msgid "Properties"
|
86 |
-
msgstr "Eigenschaften"
|
87 |
-
|
88 |
-
#: ../shortcoder.php:310
|
89 |
-
msgid "Name"
|
90 |
-
msgstr "Name"
|
91 |
-
|
92 |
-
#: ../shortcoder.php:312
|
93 |
-
#, php-format
|
94 |
-
msgid "Edit the attribute name. This is used as [sc name=\"<b>%s</b>\"]"
|
95 |
-
msgstr "Bearbeiten Sie das Attribut name. Dies wird als [sc name=\"<b>%s</b>\"] verwendet"
|
96 |
-
|
97 |
-
#: ../shortcoder.php:315
|
98 |
-
msgid "Content:"
|
99 |
-
msgstr "Inhalt:"
|
100 |
-
|
101 |
-
#: ../shortcoder.php:323
|
102 |
-
#, php-format
|
103 |
-
msgid "Enter any Javascript / HTML / Flash embed code or Plain text. This is the output got when the shortcode [sc name=\"%s\"] is used in your post."
|
104 |
-
msgstr "Geben Sie Javascript / HTML / Flash-Code oder Plain Text einzubetten. Dies ist der Ausgang bekam, wenn die shortcode [sc name=\"%s\"] wird in Ihrem Beitrag verwenden."
|
105 |
-
|
106 |
-
#: ../shortcoder.php:329
|
107 |
-
msgid "Optional Settings"
|
108 |
-
msgstr "Optionale Einstellungen"
|
109 |
-
|
110 |
-
#: ../shortcoder.php:333
|
111 |
-
msgid "Disable this shortcode"
|
112 |
-
msgstr "Deaktivieren Sie diese Kurzwahlnummer"
|
113 |
-
|
114 |
-
#: ../shortcoder.php:336
|
115 |
-
msgid "Checking this checkbox will not display anything when this shortcode attribute is used."
|
116 |
-
msgstr "Überprüfen Sie diese Checkbox, wird nichts angezeigt wird, wenn dieser Shortcode Attribut verwendet wird."
|
117 |
-
|
118 |
-
#: ../shortcoder.php:341
|
119 |
-
msgid "Do not execute this shortcode in :"
|
120 |
-
msgstr "Führ dies nicht Shortcode in:"
|
121 |
-
|
122 |
-
#: ../shortcoder.php:343
|
123 |
-
msgid "Home page"
|
124 |
-
msgstr "Startseite"
|
125 |
-
|
126 |
-
#: ../shortcoder.php:345
|
127 |
-
msgid "Post pages"
|
128 |
-
msgstr "Post-Seiten"
|
129 |
-
|
130 |
-
#: ../shortcoder.php:347
|
131 |
-
msgid "Page"
|
132 |
-
msgstr "Seite"
|
133 |
-
|
134 |
-
#: ../shortcoder.php:349
|
135 |
-
msgid "Archive or Tag pages"
|
136 |
-
msgstr "Archive oder Tag-Seiten"
|
137 |
-
|
138 |
-
#: ../shortcoder.php:351
|
139 |
-
msgid "Search results page"
|
140 |
-
msgstr "Suchergebnisse Seite"
|
141 |
-
|
142 |
-
#: ../shortcoder.php:357
|
143 |
-
msgid "Do not show this shortcode to :"
|
144 |
-
msgstr "Don't show this Shortcode zu:"
|
145 |
-
|
146 |
-
#: ../shortcoder.php:359
|
147 |
-
msgid "Administrator"
|
148 |
-
msgstr "Administrator"
|
149 |
-
|
150 |
-
#: ../shortcoder.php:367
|
151 |
-
msgid "Update"
|
152 |
-
msgstr "Aktualisierung"
|
153 |
-
|
154 |
-
#: ../shortcoder.php:373
|
155 |
-
msgid "Preview"
|
156 |
-
msgstr "Vorschau"
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/sc-es_ES.mo
DELETED
Binary file
|
languages/sc-es_ES.po
DELETED
@@ -1,157 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Shortcoder\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-07-30 12:06+0530\n"
|
6 |
-
"PO-Revision-Date: 2010-07-30 12:18+0530\n"
|
7 |
-
"Last-Translator: Aakash Chakravarthy <aakash.19493@gmail.com>\n"
|
8 |
-
"Language-Team: Aakash Chakravarthy <aakash.19493@gmail.com>\n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
|
13 |
-
"X-Poedit-Basepath: .\n"
|
14 |
-
"X-Poedit-SearchPath-0: ..\n"
|
15 |
-
|
16 |
-
#: ../adm-sidebar.php:10
|
17 |
-
msgid "Donate and support this plugin's future"
|
18 |
-
msgstr "Dona y apoyar este plugin futuro"
|
19 |
-
|
20 |
-
#: ../adm-sidebar.php:14
|
21 |
-
msgid "Plugin Support"
|
22 |
-
msgstr "Plugin de Apoyo"
|
23 |
-
|
24 |
-
#: ../adm-sidebar.php:18
|
25 |
-
msgid "Plugin Documentation"
|
26 |
-
msgstr "Plugin de Documentación"
|
27 |
-
|
28 |
-
#: ../adm-sidebar.php:22
|
29 |
-
msgid "Bugs Report"
|
30 |
-
msgstr "Avisa de un error"
|
31 |
-
|
32 |
-
#: ../adm-sidebar.php:26
|
33 |
-
msgid "FAQ's"
|
34 |
-
msgstr "Preguntas frecuentes"
|
35 |
-
|
36 |
-
#: ../adm-sidebar.php:30
|
37 |
-
msgid "Request a feature"
|
38 |
-
msgstr "Solicitar una característica"
|
39 |
-
|
40 |
-
#: ../adm-sidebar.php:34
|
41 |
-
msgid "Author Website"
|
42 |
-
msgstr "Autor Web"
|
43 |
-
|
44 |
-
#: ../adm-sidebar.php:38
|
45 |
-
msgid "Support this plugin"
|
46 |
-
msgstr "Apoya a este plugin"
|
47 |
-
|
48 |
-
#: ../adm-sidebar.php:42
|
49 |
-
msgid "Follow the author"
|
50 |
-
msgstr "Siga el autor"
|
51 |
-
|
52 |
-
#: ../adm-sidebar.php:46
|
53 |
-
msgid "Subscribe to Updates"
|
54 |
-
msgstr "Suscribirse a las actualizaciones"
|
55 |
-
|
56 |
-
#: ../adm-sidebar.php:50
|
57 |
-
msgid "Promote this plugin"
|
58 |
-
msgstr "Promover este plugin"
|
59 |
-
|
60 |
-
#: ../adm-sidebar.php:55
|
61 |
-
msgid "More plugins"
|
62 |
-
msgstr "Más plugins"
|
63 |
-
|
64 |
-
#: ../shortcoder.php:257
|
65 |
-
msgid "Updated successfully."
|
66 |
-
msgstr "Actualizado con éxito."
|
67 |
-
|
68 |
-
#: ../shortcoder.php:259
|
69 |
-
msgid "Unable to update !"
|
70 |
-
msgstr "No se puede actualizar!"
|
71 |
-
|
72 |
-
#: ../shortcoder.php:290
|
73 |
-
msgid "Select a shortcode"
|
74 |
-
msgstr "Seleccione un Shortcode"
|
75 |
-
|
76 |
-
#: ../shortcoder.php:294
|
77 |
-
msgid "Shortcode Name"
|
78 |
-
msgstr "Shortcode nombre"
|
79 |
-
|
80 |
-
#: ../shortcoder.php:301
|
81 |
-
msgid "Select the Shortcode Attribute to be edited"
|
82 |
-
msgstr "Seleccione el Shortcode Attribute a editar"
|
83 |
-
|
84 |
-
#: ../shortcoder.php:306
|
85 |
-
msgid "Properties"
|
86 |
-
msgstr "Propiedades"
|
87 |
-
|
88 |
-
#: ../shortcoder.php:310
|
89 |
-
msgid "Name"
|
90 |
-
msgstr "Nombre"
|
91 |
-
|
92 |
-
#: ../shortcoder.php:312
|
93 |
-
#, php-format
|
94 |
-
msgid "Edit the attribute name. This is used as [sc name=\"<b>%s</b>\"]"
|
95 |
-
msgstr "Edite el nombre del atributo. Esto se utiliza como [sc name=\"<b>%s</b>\"]"
|
96 |
-
|
97 |
-
#: ../shortcoder.php:315
|
98 |
-
msgid "Content:"
|
99 |
-
msgstr "Contenido:"
|
100 |
-
|
101 |
-
#: ../shortcoder.php:323
|
102 |
-
#, php-format
|
103 |
-
msgid "Enter any Javascript / HTML / Flash embed code or Plain text. This is the output got when the shortcode [sc name=\"%s\"] is used in your post."
|
104 |
-
msgstr "Enter any Javascript / HTML / Flash embed code or Plain text. This is the output got when the shortcode [sc name=\"%s\"] is used in your post."
|
105 |
-
|
106 |
-
#: ../shortcoder.php:329
|
107 |
-
msgid "Optional Settings"
|
108 |
-
msgstr "Configuración opcional"
|
109 |
-
|
110 |
-
#: ../shortcoder.php:333
|
111 |
-
msgid "Disable this shortcode"
|
112 |
-
msgstr "Desactive esta deficiencia"
|
113 |
-
|
114 |
-
#: ../shortcoder.php:336
|
115 |
-
msgid "Checking this checkbox will not display anything when this shortcode attribute is used."
|
116 |
-
msgstr "Al marcar esta casilla no se mostrará nada cuando este atributo se utiliza código corto."
|
117 |
-
|
118 |
-
#: ../shortcoder.php:341
|
119 |
-
msgid "Do not execute this shortcode in :"
|
120 |
-
msgstr "No ejecutar esta deficiencia en:"
|
121 |
-
|
122 |
-
#: ../shortcoder.php:343
|
123 |
-
msgid "Home page"
|
124 |
-
msgstr "Portada del sitio"
|
125 |
-
|
126 |
-
#: ../shortcoder.php:345
|
127 |
-
msgid "Post pages"
|
128 |
-
msgstr "Las páginas de entrada"
|
129 |
-
|
130 |
-
#: ../shortcoder.php:347
|
131 |
-
msgid "Page"
|
132 |
-
msgstr "Página"
|
133 |
-
|
134 |
-
#: ../shortcoder.php:349
|
135 |
-
msgid "Archive or Tag pages"
|
136 |
-
msgstr "Archivo de etiquetas o páginas"
|
137 |
-
|
138 |
-
#: ../shortcoder.php:351
|
139 |
-
msgid "Search results page"
|
140 |
-
msgstr "Resultados de la búsqueda la página"
|
141 |
-
|
142 |
-
#: ../shortcoder.php:357
|
143 |
-
msgid "Do not show this shortcode to :"
|
144 |
-
msgstr "No mostrar esta deficiencia a:"
|
145 |
-
|
146 |
-
#: ../shortcoder.php:359
|
147 |
-
msgid "Administrator"
|
148 |
-
msgstr "Administrador"
|
149 |
-
|
150 |
-
#: ../shortcoder.php:367
|
151 |
-
msgid "Update"
|
152 |
-
msgstr "Actualización"
|
153 |
-
|
154 |
-
#: ../shortcoder.php:373
|
155 |
-
msgid "Preview"
|
156 |
-
msgstr "Prevista"
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/shortcoder.mo
ADDED
Binary file
|
languages/shortcoder.po
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Shortcoder\n"
|
4 |
+
"POT-Creation-Date: 2014-05-11 03:38+0530\n"
|
5 |
+
"PO-Revision-Date: 2014-05-11 03:39+0530\n"
|
6 |
+
"Last-Translator: Aakash Chakravarthy <aakash.19493@gmail.com>\n"
|
7 |
+
"Language-Team: Aakash Chakravarthy <aakash.19493@gmail.com>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.7\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Poedit-SearchPath-0: ..\n"
|
16 |
+
|
17 |
+
#: ../sc-insert.php:15
|
18 |
+
msgid "You do not have permission to edit posts."
|
19 |
+
msgstr ""
|
20 |
+
|
21 |
+
#: ../shortcoder.php:173
|
22 |
+
msgid "Create a Shortcode"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: ../shortcoder.php:174
|
26 |
+
msgid "Create Shortcode"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: ../shortcoder.php:197 ../temp/shortcoder.php:191
|
30 |
+
msgid "Shortcode updated successfully !"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: ../shortcoder.php:199 ../temp/shortcoder.php:193
|
34 |
+
msgid "Unable to create shortcode !"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: ../shortcoder.php:213
|
38 |
+
msgid "Edit this Shortcode - "
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: ../shortcoder.php:214
|
42 |
+
msgid "Update Shortcode"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: ../shortcoder.php:220 ../temp/shortcoder.php:214
|
46 |
+
msgid "Shortcode deleted successfully !"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: ../shortcoder.php:240
|
50 |
+
msgid "Back"
|
51 |
+
msgstr ""
|
52 |
+
|
53 |
+
#: ../shortcoder.php:245
|
54 |
+
msgid "Title:"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: ../shortcoder.php:251
|
58 |
+
msgid "Content:"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: ../shortcoder.php:262
|
62 |
+
msgid "Temporarily disable this shortcode"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../shortcoder.php:263
|
66 |
+
msgid "Disable this Shortcode to admins"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../shortcoder.php:275
|
70 |
+
msgid "Created Shortcodes"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: ../shortcoder.php:275
|
74 |
+
msgid "Click to edit"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../shortcoder.php:355 ../temp/shortcoder.php:313
|
78 |
+
msgid "Make Donations"
|
79 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== Shortcoder ===
|
2 |
-
Contributors:
|
3 |
Author URI: http://www.aakashweb.com/
|
4 |
Plugin URI: http://www.aakashweb.com/wordpress-plugins/shortcoder/
|
5 |
Tags: shortcode, ads, adsense, advertising, bookmark, bookmarking, bookmarks, custom, embed, feed, feeds, rss, flash, html, image, images, javascript, jquery, link, links, media, page, pages, youtube, plugin, post, posts, share, social, social bookmarking, form, template, video, yahoo
|
6 |
-
Donate link: http://bit.ly/
|
7 |
License: GPLv2 or later
|
8 |
-
Requires at least:
|
9 |
-
Tested up to: 3.
|
10 |
-
Stable tag: 3.
|
11 |
|
12 |
Create custom "Shortcodes" with HTML, Javascript snippets stored in it and use that shortcode within posts and pages. Check the demo video.
|
13 |
|
@@ -15,18 +15,18 @@ Create custom "Shortcodes" with HTML, Javascript snippets stored in it and use t
|
|
15 |
|
16 |
Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place.
|
17 |
|
18 |
-
[Check out the **LIVE DEMO** of the plugin](http://www.aakashweb.com/demos/
|
19 |
|
20 |
= Features =
|
21 |
|
22 |
-
* Create **"custom shortcodes"** easily and use them within WordPress
|
23 |
* Use any name for the created shortcode (ex: `[sc:youtube]`)
|
24 |
* Use any kind of **HTML** as Shortcode content.
|
25 |
* Parameters can also added to HTML (ex: `<strong>%%mytext%%</strong> [sc:testing mytext="hello"]` )
|
26 |
-
* Visual editor
|
27 |
-
* tinyMCE button
|
28 |
* Globally disable the shortcode when not needed.
|
29 |
-
* Can disable the shortcode, showing it to
|
30 |
|
31 |
[youtube="http://www.youtube.com/watch?v=GrlRADfvjII"]
|
32 |
|
@@ -41,7 +41,7 @@ Shortcoder is a plugin which allows to create a custom shortcode and store HTML,
|
|
41 |
* You can also add parameters (like `%%id%%`) inside the snippets, and vary it like `[sc:youtube id="GrlRADfvjII"]`
|
42 |
* This plugin will be hugely useful to all !!!
|
43 |
|
44 |
-
DONATE: If you like this plugin, you can show your [support by donating some amount](http://bit.ly/
|
45 |
|
46 |
= Resources =
|
47 |
|
@@ -64,7 +64,7 @@ You can also insert some parameters within the post. Check this page to [learn m
|
|
64 |
|
65 |
== Frequently Asked Questions ==
|
66 |
|
67 |
-
Please visit the [Plugin homepage](http://www.aakashweb.com/
|
68 |
|
69 |
= I've created a shortcode, how to use it ? =
|
70 |
|
@@ -75,19 +75,28 @@ For example, consider you made a shortcode "advertisement". Then you should use
|
|
75 |
Just check the "Temporarily disable this shortcode" in the shortcode admin page to disable it.
|
76 |
Note: When you disable a shortcode, the shortcode will not be executed in the page.
|
77 |
|
78 |
-
|
79 |
|
80 |
== Screenshots ==
|
81 |
|
82 |
-
1. Shortcoder admin page with a Shortcode created (
|
83 |
-
2. Using the shortcode
|
84 |
-
3. Output of the Shortcode (The shortcode gets replaced with the
|
85 |
-
4.
|
86 |
|
87 |
[More Screenshots](http://www.aakashweb.com/wordpress-plugins/shortcoder/)
|
88 |
|
89 |
== Changelog ==
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
= 3.3 =
|
92 |
* Fixed bug in loops using `foreach`.
|
93 |
* Fixed several PHP notices.
|
1 |
=== Shortcoder ===
|
2 |
+
Contributors: vaakash
|
3 |
Author URI: http://www.aakashweb.com/
|
4 |
Plugin URI: http://www.aakashweb.com/wordpress-plugins/shortcoder/
|
5 |
Tags: shortcode, ads, adsense, advertising, bookmark, bookmarking, bookmarks, custom, embed, feed, feeds, rss, flash, html, image, images, javascript, jquery, link, links, media, page, pages, youtube, plugin, post, posts, share, social, social bookmarking, form, template, video, yahoo
|
6 |
+
Donate link: http://bit.ly/scDonate
|
7 |
License: GPLv2 or later
|
8 |
+
Requires at least: 3.3
|
9 |
+
Tested up to: 3.9.1
|
10 |
+
Stable tag: 3.4
|
11 |
|
12 |
Create custom "Shortcodes" with HTML, Javascript snippets stored in it and use that shortcode within posts and pages. Check the demo video.
|
13 |
|
15 |
|
16 |
Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place.
|
17 |
|
18 |
+
[Check out the **LIVE DEMO** of the plugin](http://www.aakashweb.com/demos/super-rss-reader/)
|
19 |
|
20 |
= Features =
|
21 |
|
22 |
+
* Create **"custom shortcodes"** easily and use them within WordPress posts
|
23 |
* Use any name for the created shortcode (ex: `[sc:youtube]`)
|
24 |
* Use any kind of **HTML** as Shortcode content.
|
25 |
* Parameters can also added to HTML (ex: `<strong>%%mytext%%</strong> [sc:testing mytext="hello"]` )
|
26 |
+
* Visual editor for adding shortcode contents.
|
27 |
+
* Global tinyMCE button available in the editing toolbar for inserting created shortcodes.
|
28 |
* Globally disable the shortcode when not needed.
|
29 |
+
* Can disable the shortcode, showing it to admins.
|
30 |
|
31 |
[youtube="http://www.youtube.com/watch?v=GrlRADfvjII"]
|
32 |
|
41 |
* You can also add parameters (like `%%id%%`) inside the snippets, and vary it like `[sc:youtube id="GrlRADfvjII"]`
|
42 |
* This plugin will be hugely useful to all !!!
|
43 |
|
44 |
+
DONATE: If you like this plugin, you can show your [support by donating some amount](http://bit.ly/scDonate).
|
45 |
|
46 |
= Resources =
|
47 |
|
64 |
|
65 |
== Frequently Asked Questions ==
|
66 |
|
67 |
+
Please visit the [Plugin homepage](http://www.aakashweb.com/wordpress-plugins/shortcoder/) for lots of FAQ's. Selected are given here.
|
68 |
|
69 |
= I've created a shortcode, how to use it ? =
|
70 |
|
75 |
Just check the "Temporarily disable this shortcode" in the shortcode admin page to disable it.
|
76 |
Note: When you disable a shortcode, the shortcode will not be executed in the page.
|
77 |
|
78 |
+
[More FAQs](http://www.aakashweb.com/docs/shortcoder-doc/)
|
79 |
|
80 |
== Screenshots ==
|
81 |
|
82 |
+
1. Shortcoder admin page with a Shortcode created (donateForm) with some "customParameters".
|
83 |
+
2. Using the shortcode in a post.
|
84 |
+
3. Output of the Shortcode (The shortcode gets replaced with the donate form and the parameters are replaced).
|
85 |
+
4. Insert shotcodes easily into editor using the TinyMCE post editor button.
|
86 |
|
87 |
[More Screenshots](http://www.aakashweb.com/wordpress-plugins/shortcoder/)
|
88 |
|
89 |
== Changelog ==
|
90 |
|
91 |
+
= 3.4 =
|
92 |
+
* New feature: Embedded/Nested shortcodes is now supported.
|
93 |
+
* New feature: Full fledged native WordPress editor for adding shortcode content with media buttons.
|
94 |
+
* Bug fix: "duplicate percentage" in content on plugin reactivate.
|
95 |
+
* Updated admin UI with fixed errors.
|
96 |
+
* Updated "insert shortcode" interface is revised and some issues are fixed.
|
97 |
+
* Updated with translatable texts in admin page.
|
98 |
+
* Minor code revision and changes.
|
99 |
+
|
100 |
= 3.3 =
|
101 |
* Fixed bug in loops using `foreach`.
|
102 |
* Fixed several PHP notices.
|
sc-admin-css.css
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
/*
|
2 |
* Admin Page CSS for Shortcoder plugin
|
3 |
* Author : Aakash Chakravarthy
|
4 |
-
* Version : 3.
|
5 |
*/
|
6 |
.wrap{
|
7 |
-
margin:
|
8 |
-
width:
|
9 |
padding: 0px;
|
10 |
}
|
11 |
.wrap #content{
|
@@ -13,17 +13,13 @@
|
|
13 |
padding: 15px;
|
14 |
border: 1px solid #dfdfdf;
|
15 |
margin: 10px 0px 0px;
|
16 |
-
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
17 |
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
18 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
19 |
-
-moz-border-radius: 10px;
|
20 |
-
border-radius: 10px;
|
21 |
}
|
22 |
.wrap h3{
|
23 |
margin: 0px -15px 15px;
|
24 |
padding: 0px 15px 10px;
|
25 |
border-bottom: 1px solid #dfdfdf;
|
26 |
-
background:
|
27 |
}
|
28 |
.wrap h3 small{
|
29 |
color: #666666;
|
@@ -35,27 +31,63 @@
|
|
35 |
padding: 0px 15px 20px;
|
36 |
border-bottom: 1px solid #dfdfdf;
|
37 |
}
|
38 |
-
#sc_name{
|
39 |
-
padding: 5px;
|
40 |
-
width: 100%;
|
41 |
-
margin: 0px 0px 10px;
|
42 |
-
font-size: 14px;
|
43 |
-
font-weight: bold;
|
44 |
-
}
|
45 |
#sc_content{
|
46 |
width: 100%;
|
47 |
font: 11.5px/2em "Courier New", Courier, monospace;
|
48 |
resize: vertical;
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
#sc_list li{
|
51 |
-
background: #
|
52 |
float: left;
|
53 |
cursor: pointer;
|
54 |
color: #454545;
|
55 |
-
margin:
|
56 |
-
padding:
|
57 |
-
border: 1px solid #
|
58 |
-
|
59 |
}
|
60 |
#sc_list li:hover{
|
61 |
border-color: #0099CC;
|
@@ -63,86 +95,39 @@
|
|
63 |
#sc_list li:active{
|
64 |
background: #f2f2f2;
|
65 |
}
|
66 |
-
#sc_settings{
|
67 |
-
margin-bottom: 10px;
|
68 |
-
display: block;
|
69 |
-
margin-top: 10px;
|
70 |
-
}
|
71 |
#sc_submit{
|
72 |
-
float: right;
|
73 |
-
background: whiteSmoke url(images/grey-bg.png) repeat-x;
|
74 |
font-size: 15px;
|
75 |
font-weight: bold;
|
76 |
-
padding:
|
77 |
-
|
78 |
-
border-color: #0C0;
|
79 |
-
}
|
80 |
-
#sc_submit:hover{
|
81 |
-
border-color: #009900;
|
82 |
}
|
83 |
.sc_btdisabled{
|
84 |
opacity: 0.5;
|
85 |
}
|
86 |
-
|
87 |
-
font-size: 10px;
|
88 |
-
color: #666666;
|
89 |
-
border: 1px solid #dfdfdf;
|
90 |
-
display: none;
|
91 |
-
background: #FCFCFC;
|
92 |
-
float: right;
|
93 |
-
margin-top: -57px;
|
94 |
-
padding: 0px 5px;
|
95 |
-
}
|
96 |
#sc_delete{
|
97 |
background: #F7F7F7 url(images/trash-can.png) no-repeat;
|
98 |
height: 48px;
|
99 |
width: 48px;
|
100 |
-
border: 1px solid #
|
101 |
position: fixed;
|
102 |
-
right:
|
103 |
-
bottom:
|
104 |
-
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
105 |
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
106 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
107 |
-
-moz-border-radius: 10px;
|
108 |
border-radius: 10px;
|
109 |
-
margin-right: 35px;
|
110 |
-
margin-bottom: 55px;
|
111 |
-
opacity: 0.2;
|
112 |
-
}
|
113 |
-
#sc_editor{
|
114 |
-
clear: both !important;
|
115 |
}
|
116 |
.sc_trashHover{
|
117 |
opacity: 1 !important;
|
118 |
-
-moz-box-shadow: 0px 0px 5px 1px #ff0000 !important;
|
119 |
box-shadow: 0px 0px 5px 1px #ff0000 !important;
|
120 |
}
|
121 |
.sc_back{
|
122 |
-
margin: -
|
123 |
float: right;
|
124 |
-
font-weight: bold;
|
125 |
-
cursor: pointer;
|
126 |
}
|
127 |
.sc_back:hover{
|
128 |
color: #666666;
|
129 |
}
|
130 |
-
|
131 |
-
float:right;
|
132 |
-
margin: 0px;
|
133 |
-
}
|
134 |
-
.sc_switch_editor li{
|
135 |
-
float:left;
|
136 |
-
background: #CC3300;
|
137 |
-
-webkit-border-radius: 2px;
|
138 |
-
-moz-border-radius: 2px;
|
139 |
-
border-radius: 2px;
|
140 |
-
margin-right: 3px;
|
141 |
-
background: #F5F5F5 url(images/grey-bg.png) repeat-x;
|
142 |
-
border: 1px solid #dfdfdf;
|
143 |
-
padding: 3px 8px;
|
144 |
-
cursor: pointer;
|
145 |
-
}
|
146 |
.sc_editor_active{
|
147 |
border-color: #666666!important;
|
148 |
}
|
@@ -194,13 +179,9 @@
|
|
194 |
text-decoration: none;
|
195 |
}
|
196 |
.sc_edit_note{
|
197 |
-
opacity: 0.2;
|
198 |
margin: 10px 0 20px 0;
|
199 |
font-size: 10px;
|
200 |
}
|
201 |
-
.sc_edit_note:hover{
|
202 |
-
opacity: 1;
|
203 |
-
}
|
204 |
.smallText{
|
205 |
font-size: 11px;
|
206 |
color: #333333;
|
@@ -209,10 +190,6 @@
|
|
209 |
.grey{
|
210 |
color: #999;
|
211 |
}
|
212 |
-
.nicEdit-main {
|
213 |
-
font-family: Georgia, "Times New Roman", Times, serif;
|
214 |
-
font-size: 14px;
|
215 |
-
}
|
216 |
|
217 |
* html .clearfix{
|
218 |
height: 1%;
|
1 |
/*
|
2 |
* Admin Page CSS for Shortcoder plugin
|
3 |
* Author : Aakash Chakravarthy
|
4 |
+
* Version : 3.2
|
5 |
*/
|
6 |
.wrap{
|
7 |
+
margin: 15px auto 15px;
|
8 |
+
width: 700px;
|
9 |
padding: 0px;
|
10 |
}
|
11 |
.wrap #content{
|
13 |
padding: 15px;
|
14 |
border: 1px solid #dfdfdf;
|
15 |
margin: 10px 0px 0px;
|
|
|
|
|
16 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
|
17 |
}
|
18 |
.wrap h3{
|
19 |
margin: 0px -15px 15px;
|
20 |
padding: 0px 15px 10px;
|
21 |
border-bottom: 1px solid #dfdfdf;
|
22 |
+
background: linear-gradient(to bottom, #FFF, #F3F3F3);
|
23 |
}
|
24 |
.wrap h3 small{
|
25 |
color: #666666;
|
31 |
padding: 0px 15px 20px;
|
32 |
border-bottom: 1px solid #dfdfdf;
|
33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
#sc_content{
|
35 |
width: 100%;
|
36 |
font: 11.5px/2em "Courier New", Courier, monospace;
|
37 |
resize: vertical;
|
38 |
}
|
39 |
+
.sc_section{
|
40 |
+
margin: 0 0 20px 0;
|
41 |
+
}
|
42 |
+
.sc_section:last-of-type{
|
43 |
+
margin: 0;
|
44 |
+
}
|
45 |
+
.sc_name_wrap{
|
46 |
+
position: relative;
|
47 |
+
display: block;
|
48 |
+
}
|
49 |
+
.sc_name_wrap input{
|
50 |
+
padding: 10px;
|
51 |
+
font-size: 14px;
|
52 |
+
font-weight: bold;
|
53 |
+
margin:0;
|
54 |
+
}
|
55 |
+
#sc_code{
|
56 |
+
font-size: 12px;
|
57 |
+
color: #666;
|
58 |
+
display: none;
|
59 |
+
background: #FCFCFC;
|
60 |
+
padding: 3px 10px;
|
61 |
+
position: absolute;
|
62 |
+
right: 1px;
|
63 |
+
bottom: 1px;
|
64 |
+
top:1px;
|
65 |
+
border-left: 1px solid #ccc;
|
66 |
+
line-height: 2.5;
|
67 |
+
}
|
68 |
+
.sc_fld_title{
|
69 |
+
margin: 0 0 10px 0;
|
70 |
+
display: block;
|
71 |
+
}
|
72 |
+
.sc_settings label{
|
73 |
+
margin: 0 0 10px 0;
|
74 |
+
display: block;
|
75 |
+
}
|
76 |
+
.sc_settings label:last-child{
|
77 |
+
margin: 0;
|
78 |
+
}
|
79 |
+
#sc_list{
|
80 |
+
margin: 25px 0 17px 0;
|
81 |
+
}
|
82 |
#sc_list li{
|
83 |
+
background: linear-gradient(to bottom, #FFF, #F3F3F3);
|
84 |
float: left;
|
85 |
cursor: pointer;
|
86 |
color: #454545;
|
87 |
+
margin: 0 8px;
|
88 |
+
padding: 5px 15px;
|
89 |
+
border: 1px solid #DFDFDF;
|
90 |
+
font-size: 15px;
|
91 |
}
|
92 |
#sc_list li:hover{
|
93 |
border-color: #0099CC;
|
95 |
#sc_list li:active{
|
96 |
background: #f2f2f2;
|
97 |
}
|
|
|
|
|
|
|
|
|
|
|
98 |
#sc_submit{
|
|
|
|
|
99 |
font-size: 15px;
|
100 |
font-weight: bold;
|
101 |
+
padding: 10px 15px;
|
102 |
+
height: auto!important;
|
|
|
|
|
|
|
|
|
103 |
}
|
104 |
.sc_btdisabled{
|
105 |
opacity: 0.5;
|
106 |
}
|
107 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
#sc_delete{
|
109 |
background: #F7F7F7 url(images/trash-can.png) no-repeat;
|
110 |
height: 48px;
|
111 |
width: 48px;
|
112 |
+
border: 1px solid #F00;
|
113 |
position: fixed;
|
114 |
+
right: 50px;
|
115 |
+
bottom: 50px;
|
|
|
|
|
116 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
117 |
border-radius: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
}
|
119 |
.sc_trashHover{
|
120 |
opacity: 1 !important;
|
|
|
121 |
box-shadow: 0px 0px 5px 1px #ff0000 !important;
|
122 |
}
|
123 |
.sc_back{
|
124 |
+
margin: -6px 0px 0px !important;
|
125 |
float: right;
|
|
|
|
|
126 |
}
|
127 |
.sc_back:hover{
|
128 |
color: #666666;
|
129 |
}
|
130 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
.sc_editor_active{
|
132 |
border-color: #666666!important;
|
133 |
}
|
179 |
text-decoration: none;
|
180 |
}
|
181 |
.sc_edit_note{
|
|
|
182 |
margin: 10px 0 20px 0;
|
183 |
font-size: 10px;
|
184 |
}
|
|
|
|
|
|
|
185 |
.smallText{
|
186 |
font-size: 11px;
|
187 |
color: #333333;
|
190 |
.grey{
|
191 |
color: #999;
|
192 |
}
|
|
|
|
|
|
|
|
|
193 |
|
194 |
* html .clearfix{
|
195 |
height: 1%;
|
sc-admin-js.js
CHANGED
@@ -31,23 +31,7 @@ $j(document).ready(function(){
|
|
31 |
|
32 |
sc_triggerElements($j('#sc_name').val());
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
$j('.sc_editor_html').click(function(){
|
37 |
-
sccontent.removeInstance('sc_content');
|
38 |
-
$j('.sc_switch_editor li').removeClass('sc_editor_active');
|
39 |
-
$j(this).addClass('sc_editor_active');
|
40 |
-
});
|
41 |
-
|
42 |
-
$j('.sc_editor_visual').click(function(){
|
43 |
-
sccontent = new nicEditor({
|
44 |
-
buttonList : ['bold','italic','underline','left','center','right','justify','ol','ul','subscript','superscript','strikethrough', 'fontFormat','removeformat','indent','outdent','hr','image','forecolor','bgcolor','link' ,'unlink'],
|
45 |
-
iconsPath : $j('.sc_hidden_text').text()
|
46 |
-
}).panelInstance('sc_content');
|
47 |
-
$j('.sc_switch_editor li').removeClass('sc_editor_active');
|
48 |
-
$j(this).addClass('sc_editor_active');
|
49 |
-
});
|
50 |
-
|
51 |
// Video
|
52 |
$j('.sc_open_video').click(function(e){
|
53 |
e.preventDefault();
|
@@ -90,7 +74,7 @@ function sc_triggerElements(val){
|
|
90 |
}
|
91 |
|
92 |
$j('#sc_code').show();
|
93 |
-
$j('#sc_code').html('Your shortcode is <b>[sc:' + code + ']</b>');
|
94 |
$j('#sc_submit').removeClass('sc_btdisabled').removeAttr('disabled');
|
95 |
}else{
|
96 |
$j('#sc_code').hide();
|
31 |
|
32 |
sc_triggerElements($j('#sc_name').val());
|
33 |
|
34 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
// Video
|
36 |
$j('.sc_open_video').click(function(e){
|
37 |
e.preventDefault();
|
74 |
}
|
75 |
|
76 |
$j('#sc_code').show();
|
77 |
+
$j('#sc_code').html('Your shortcode is <b contenteditable="true" disabled="disabled">[sc:' + code + ']</b>');
|
78 |
$j('#sc_submit').removeClass('sc_btdisabled').removeAttr('disabled');
|
79 |
}else{
|
80 |
$j('#sc_code').hide();
|
sc-editor.php → sc-insert.php
RENAMED
@@ -1,14 +1,15 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Shortcoder include for inserting and editing shortcodes in post and pages
|
4 |
-
* v1.
|
5 |
**/
|
6 |
|
7 |
-
if ( ! isset( $_GET['
|
8 |
define( 'IFRAME_REQUEST' , true );
|
9 |
|
10 |
-
|
11 |
-
|
|
|
12 |
|
13 |
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
|
14 |
wp_die(__('You do not have permission to edit posts.'));
|
@@ -16,90 +17,72 @@ if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
|
|
16 |
// Load all created shortodes
|
17 |
$sc_options = get_option('shortcoder_data');
|
18 |
|
19 |
-
if(empty($sc_options))
|
20 |
-
die();
|
|
|
21 |
?>
|
22 |
|
23 |
<html>
|
24 |
<head>
|
25 |
<title>Shortcodes created</title>
|
26 |
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1
|
27 |
<style type="text/css">
|
28 |
body{
|
29 |
font: 13px Arial, Helvetica, sans-serif;
|
30 |
padding: 10px;
|
|
|
31 |
}
|
32 |
h2{
|
33 |
font-size: 23px;
|
34 |
font-weight: normal;
|
35 |
}
|
36 |
h4{
|
37 |
-
margin:
|
38 |
}
|
39 |
hr{
|
40 |
border-width: 0px;
|
41 |
-
margin:
|
42 |
-
border-bottom: 1px solid #
|
43 |
}
|
44 |
.sc_wrap{
|
45 |
-
border: 1px solid #
|
46 |
-
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
47 |
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
48 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
49 |
-
-moz-border-radius: 10px;
|
50 |
-
border-radius: 10px;
|
51 |
}
|
52 |
.sc_shortcode{
|
53 |
-
border-bottom: 1px solid #
|
54 |
padding: 0px;
|
55 |
-
|
56 |
-
border-radius: 10px;
|
57 |
}
|
58 |
.sc_shortcode_name{
|
59 |
cursor: pointer;
|
60 |
padding: 10px;
|
61 |
}
|
|
|
|
|
|
|
62 |
.sc_params{
|
63 |
-
border: 1px solid #
|
64 |
background: #F9F9F9;
|
65 |
-
margin:
|
66 |
-
padding:
|
67 |
display: none;
|
68 |
-
-moz-border-radius: 5px;
|
69 |
-
border-radius: 5px;
|
70 |
}
|
71 |
.sc_insert{
|
72 |
-
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
-webkit-box-shadow:1px 1px 2px rgba(0, 0, 0, 0.5);
|
77 |
-
box-shadow:1px 1px 2px rgba(0, 0, 0, 0.5);
|
78 |
-
background: -moz-linear-gradient(19% 65% 90deg,#0087B4, #0099CC, #0099CC 51%);
|
79 |
-
background: -webkit-gradient(linear, 0% 45%, 0% 60%, from(#0099CC), to(#0087B4));
|
80 |
-
color:#FFFFFF;
|
81 |
-
padding:2px 15px;
|
82 |
-
text-shadow:0 1px 1px rgba(0, 0, 0, 0.5);
|
83 |
-
border: 1px solid #267ed4;
|
84 |
font-weight: bold;
|
85 |
}
|
86 |
|
87 |
.sc_insert:hover{
|
88 |
-
|
89 |
-
background: -webkit-gradient(linear, 0% 45%, 0% 60%, from(#0099CC), to(#0082AD));
|
90 |
-
color: #f1f1f1;
|
91 |
}
|
92 |
input[type=text], textarea{
|
93 |
padding: 5px;
|
94 |
-
border: 1px solid #
|
95 |
-
box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
|
96 |
-
-moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
|
97 |
-
-webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
|
98 |
-
-moz-border-radius: 5px;
|
99 |
-
border-radius: 5px;
|
100 |
width: 120px;
|
101 |
margin: 0px 25px 10px 0px;
|
102 |
-
cursor: pointer;
|
103 |
}
|
104 |
.sc_toggle{
|
105 |
background: url(images/toggle-arrow.png) no-repeat;
|
@@ -152,7 +135,11 @@ $(document).ready(function(){
|
|
152 |
name = scname;
|
153 |
}
|
154 |
sc = '[sc:' + name + ' ' + params + ']';
|
155 |
-
|
|
|
|
|
|
|
|
|
156 |
});
|
157 |
|
158 |
$('.sc_share_bar img').mouseenter(function(){
|
@@ -193,7 +180,7 @@ function wsc(s){
|
|
193 |
</head>
|
194 |
<body>
|
195 |
<?php sc_admin_buttons('fbrec'); ?>
|
196 |
-
<h2><img src="images/shortcoder.png" align="absmiddle" alt="Shortcoder" width="35px"/>
|
197 |
|
198 |
<div class="sc_wrap">
|
199 |
<?php
|
@@ -226,14 +213,12 @@ foreach($sc_options as $key=>$value){
|
|
226 |
</div>
|
227 |
|
228 |
<p class="sc_share_bar" align="center">
|
229 |
-
<img class="sc_donate" src="images/donate.png" data-width="300" data-height="220" data-url="<?php echo SC_URL . 'js/share.php?i=1'; ?>"/>
|
230 |
-
|
231 |
-
<img class="sc_share" src="images/share.png" data-width="350" data-height="85" data-url="<?php echo SC_URL . 'js/share.php?i=2'; ?>"/>
|
232 |
</p>
|
233 |
|
234 |
<p align="center"><a class="sc_credits" href="http://www.aakashweb.com/" target="_blank">a Aakash Web plugin</a></p>
|
235 |
|
236 |
-
|
237 |
-
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=vaakash"></script>
|
238 |
</body>
|
239 |
</html>
|
1 |
<?php
|
2 |
/**
|
3 |
* Shortcoder include for inserting and editing shortcodes in post and pages
|
4 |
+
* v1.2
|
5 |
**/
|
6 |
|
7 |
+
if ( ! isset( $_GET['TB_iframe'] ) )
|
8 |
define( 'IFRAME_REQUEST' , true );
|
9 |
|
10 |
+
|
11 |
+
// Load WordPress
|
12 |
+
require_once('../../../wp-load.php');
|
13 |
|
14 |
if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )
|
15 |
wp_die(__('You do not have permission to edit posts.'));
|
17 |
// Load all created shortodes
|
18 |
$sc_options = get_option('shortcoder_data');
|
19 |
|
20 |
+
if( empty($sc_options) )
|
21 |
+
die( "Sorry !! No Shortcodes to Insert<br/><a href='" . SC_ADMIN . "' target='_blank'>Create Shortcodes</a>" );
|
22 |
+
|
23 |
?>
|
24 |
|
25 |
<html>
|
26 |
<head>
|
27 |
<title>Shortcodes created</title>
|
28 |
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
|
29 |
<style type="text/css">
|
30 |
body{
|
31 |
font: 13px Arial, Helvetica, sans-serif;
|
32 |
padding: 10px;
|
33 |
+
background: #f2f2f2;
|
34 |
}
|
35 |
h2{
|
36 |
font-size: 23px;
|
37 |
font-weight: normal;
|
38 |
}
|
39 |
h4{
|
40 |
+
margin: 0 0 20px 0;
|
41 |
}
|
42 |
hr{
|
43 |
border-width: 0px;
|
44 |
+
margin: 15px 0;
|
45 |
+
border-bottom: 1px solid #DFDFDF;
|
46 |
}
|
47 |
.sc_wrap{
|
48 |
+
border: 1px solid #DFDFDF;
|
|
|
|
|
49 |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
|
|
50 |
}
|
51 |
.sc_shortcode{
|
52 |
+
border-bottom: 1px solid #CCC;
|
53 |
padding: 0px;
|
54 |
+
background: #FFF;
|
|
|
55 |
}
|
56 |
.sc_shortcode_name{
|
57 |
cursor: pointer;
|
58 |
padding: 10px;
|
59 |
}
|
60 |
+
.sc_shortcode_name:hover{
|
61 |
+
background: #fbfbfb;
|
62 |
+
}
|
63 |
.sc_params{
|
64 |
+
border: 1px solid #DFDFDF;
|
65 |
background: #F9F9F9;
|
66 |
+
margin: 0 -1px -1px;
|
67 |
+
padding: 20px;
|
68 |
display: none;
|
|
|
|
|
69 |
}
|
70 |
.sc_insert{
|
71 |
+
background: linear-gradient(to bottom, #09C, #0087B4);
|
72 |
+
color: #FFF;
|
73 |
+
padding: 5px 15px;
|
74 |
+
border: 1px solid #006A8D;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
font-weight: bold;
|
76 |
}
|
77 |
|
78 |
.sc_insert:hover{
|
79 |
+
opacity: 0.8;
|
|
|
|
|
80 |
}
|
81 |
input[type=text], textarea{
|
82 |
padding: 5px;
|
83 |
+
border: 1px solid #CCC;
|
|
|
|
|
|
|
|
|
|
|
84 |
width: 120px;
|
85 |
margin: 0px 25px 10px 0px;
|
|
|
86 |
}
|
87 |
.sc_toggle{
|
88 |
background: url(images/toggle-arrow.png) no-repeat;
|
135 |
name = scname;
|
136 |
}
|
137 |
sc = '[sc:' + name + ' ' + params + ']';
|
138 |
+
|
139 |
+
if( typeof parent.send_to_editor !== undefined ){
|
140 |
+
parent.send_to_editor(sc);
|
141 |
+
}
|
142 |
+
|
143 |
});
|
144 |
|
145 |
$('.sc_share_bar img').mouseenter(function(){
|
180 |
</head>
|
181 |
<body>
|
182 |
<?php sc_admin_buttons('fbrec'); ?>
|
183 |
+
<h2><img src="images/shortcoder.png" align="absmiddle" alt="Shortcoder" width="35px"/> Insert shortcode to editor</h2>
|
184 |
|
185 |
<div class="sc_wrap">
|
186 |
<?php
|
213 |
</div>
|
214 |
|
215 |
<p class="sc_share_bar" align="center">
|
216 |
+
<img class="sc_donate" src="images/donate.png" data-width="300" data-height="220" data-url="<?php echo SC_URL . '/js/share.php?i=1'; ?>"/>
|
217 |
+
|
218 |
+
<img class="sc_share" src="images/share.png" data-width="350" data-height="85" data-url="<?php echo SC_URL . '/js/share.php?i=2'; ?>"/>
|
219 |
</p>
|
220 |
|
221 |
<p align="center"><a class="sc_credits" href="http://www.aakashweb.com/" target="_blank">a Aakash Web plugin</a></p>
|
222 |
|
|
|
|
|
223 |
</body>
|
224 |
</html>
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
shortcoder.php
CHANGED
@@ -2,27 +2,25 @@
|
|
2 |
/*
|
3 |
Plugin Name: Shortcoder
|
4 |
Plugin URI: http://www.aakashweb.com
|
5 |
-
Description: Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place. You can create a shortcode for Youtube videos, adsense ads, buttons and more.
|
6 |
Author: Aakash Chakravarthy
|
7 |
-
Version: 3.
|
8 |
Author URI: http://www.aakashweb.com/
|
9 |
-
License: GPLv2 or later
|
10 |
*/
|
11 |
|
12 |
-
|
13 |
-
$sc_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__)).'/';
|
14 |
-
}else{
|
15 |
-
$sc_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
|
16 |
-
}
|
17 |
-
|
18 |
-
define('SC_VERSION', '3.3');
|
19 |
define('SC_AUTHOR', 'Aakash Chakravarthy');
|
20 |
-
define('SC_URL',
|
|
|
|
|
|
|
|
|
21 |
|
22 |
-
$sc_donate_link = 'http://bit.ly/scdonate';
|
23 |
|
24 |
// Load languages
|
25 |
-
load_plugin_textdomain('
|
|
|
|
|
26 |
|
27 |
// Add admin menu
|
28 |
function sc_add_menu() {
|
@@ -31,6 +29,8 @@ function sc_add_menu() {
|
|
31 |
|
32 |
add_action('admin_menu','sc_add_menu');
|
33 |
|
|
|
|
|
34 |
// Load the Javascripts
|
35 |
function sc_admin_js(){
|
36 |
// Check whether the page is the Shortcoder admin page.
|
@@ -41,20 +41,43 @@ function sc_admin_js(){
|
|
41 |
'jquery-ui-draggable',
|
42 |
'jquery-ui-droppable'
|
43 |
));
|
44 |
-
wp_enqueue_script('shortcoder-admin-js', SC_URL . 'sc-admin-js.js?v=' . SC_VERSION);
|
45 |
-
wp_enqueue_script('shortcoder-nicedit-js', SC_URL . 'js/nicedit/nicEdit.js');
|
46 |
}
|
47 |
}
|
48 |
add_action('admin_print_scripts', 'sc_admin_js');
|
49 |
|
|
|
|
|
50 |
// Load the CSS
|
51 |
function sc_admin_css(){
|
52 |
if (isset($_GET['page']) && $_GET['page'] == 'shortcoder') {
|
53 |
-
wp_enqueue_style('shortcoder-admin-css', SC_URL . 'sc-admin-css.css?v=' . SC_VERSION);
|
54 |
}
|
55 |
}
|
56 |
add_action('admin_print_styles', 'sc_admin_css');
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
// Register the shortcode
|
59 |
add_shortcode('sc', 'shortcoder');
|
60 |
|
@@ -100,6 +123,8 @@ function shortcoder($atts, $content) {
|
|
100 |
// Check whether shortcoder can execute
|
101 |
if(shortcoder_all_ok($sc_name)){
|
102 |
|
|
|
|
|
103 |
// If SC has parameters, then replace it
|
104 |
if(!empty($atts)){
|
105 |
$keys = array();
|
@@ -118,46 +143,25 @@ function shortcoder($atts, $content) {
|
|
118 |
// Replace the params
|
119 |
$sc_content = $sc_options[$sc_name]['content'];
|
120 |
$sc_content_rep1 = str_replace($keys, $values, $sc_content);
|
121 |
-
$
|
122 |
-
|
123 |
}
|
124 |
else{
|
125 |
|
126 |
// If the SC has no params, then replace the %vars%
|
127 |
$sc_content = $sc_options[$sc_name]['content'];
|
128 |
-
$
|
129 |
-
|
130 |
}
|
131 |
|
|
|
|
|
132 |
}else{
|
133 |
return '';
|
134 |
}
|
135 |
}
|
136 |
|
137 |
-
|
138 |
-
function sc_onactivate(){
|
139 |
-
$sc_options = get_option('shortcoder_data');
|
140 |
-
$sc_flags = get_option('shortcoder_flags');
|
141 |
-
|
142 |
-
// Move the flag version fix to sc_flags option
|
143 |
-
if(isset($sc_options['_version_fix'])){
|
144 |
-
unset($sc_options['_version_fix']);
|
145 |
-
update_option('shortcoder_data', $sc_options);
|
146 |
-
}
|
147 |
-
|
148 |
-
// Double percentage fix and flag
|
149 |
-
if(!isset($sc_flags['double_percent']) && is_array($sc_options) ){
|
150 |
-
foreach($sc_options as $key => $val){
|
151 |
-
$temp = str_replace('%', '%%', $sc_options[$key]['content']);
|
152 |
-
$sc_options[$key]['content'] = $temp;
|
153 |
-
}
|
154 |
-
|
155 |
-
update_option('shortcoder_data', $sc_options);
|
156 |
-
$sc_flags['double_percent'] = 1;
|
157 |
-
update_option('shortcoder_flags', $sc_flags);
|
158 |
-
}
|
159 |
-
}
|
160 |
-
register_activation_hook(__FILE__, 'sc_onactivate');
|
161 |
|
162 |
// Shortcoder admin page
|
163 |
function sc_admin_page(){
|
@@ -166,8 +170,8 @@ function sc_admin_page(){
|
|
166 |
$sc_options = get_option('shortcoder_data');
|
167 |
$sc_flags = get_option('shortcoder_flags');
|
168 |
|
169 |
-
$title = "Create a Shortcode";
|
170 |
-
$button = "Create Shortcode";
|
171 |
$edit = 0;
|
172 |
$sc_content = '';
|
173 |
$sc_disable = 0;
|
@@ -178,10 +182,13 @@ function sc_admin_page(){
|
|
178 |
$sc_options = get_option('shortcoder_data');
|
179 |
$sc_name = stripslashes($_POST['sc_name']);
|
180 |
|
|
|
|
|
|
|
181 |
$sc_options[$sc_name] = array(
|
182 |
'content' => stripslashes($_POST['sc_content']),
|
183 |
-
'disabled' =>
|
184 |
-
'hide_admin' =>
|
185 |
);
|
186 |
|
187 |
// Updating the DB
|
@@ -190,9 +197,9 @@ function sc_admin_page(){
|
|
190 |
|
191 |
// Insert Message
|
192 |
if($sc_updated == 'true'){
|
193 |
-
echo '<div class="message updated fade"><p>' . __('Shortcode updated successfully !', '
|
194 |
}else{
|
195 |
-
echo '<div class="message error fade"><p>' . __('Unable to create shortcode !', '
|
196 |
}
|
197 |
}
|
198 |
|
@@ -202,18 +209,18 @@ function sc_admin_page(){
|
|
202 |
$sc_name_edit = stripslashes($_POST['sc_name_edit']);
|
203 |
|
204 |
if($_POST["sc_form_action"] == "edit"){
|
205 |
-
$sc_content =
|
206 |
$sc_disable = $sc_options[$sc_name_edit]['disabled'];
|
207 |
$sc_hide_admin = $sc_options[$sc_name_edit]['hide_admin'];
|
208 |
|
209 |
-
$title =
|
210 |
-
$button =
|
211 |
$edit = 1;
|
212 |
}else{
|
213 |
unset($sc_options[$sc_name_edit]);
|
214 |
unset($sc_name_edit);
|
215 |
update_option("shortcoder_data", $sc_options);
|
216 |
-
echo '<div class="message updated fade"><p>' . __('Shortcode deleted successfully !', '
|
217 |
}
|
218 |
}
|
219 |
|
@@ -224,39 +231,51 @@ function sc_admin_page(){
|
|
224 |
|
225 |
<div class="wrap">
|
226 |
<?php sc_admin_buttons('fbrec'); ?>
|
227 |
-
<h2><img width="32" height="32" src="<?php echo SC_URL;
|
228 |
|
229 |
<ul class="sc_share_wrap">
|
230 |
-
<li class="sc_donate" data-width="300" data-height="220" data-url="<?php echo SC_URL . 'js/share.php?i=1'; ?>"><a href="#"></a></li>
|
231 |
-
<li class="sc_share" data-width="350" data-height="85" data-url="<?php echo SC_URL . 'js/share.php?i=2'; ?>"><a href="#"></a></li>
|
232 |
</ul>
|
233 |
|
234 |
<div id="content">
|
235 |
-
|
236 |
-
<?php if($edit == 1) echo '<span class="sc_back"><< Back</span>'; ?>
|
237 |
|
238 |
<form method="post" id="sc_form">
|
239 |
-
|
240 |
-
<div
|
241 |
-
|
242 |
-
|
|
|
243 |
|
244 |
-
|
245 |
-
<
|
246 |
-
|
|
|
247 |
</div>
|
248 |
|
249 |
-
|
250 |
-
<
|
251 |
-
|
252 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
</div>
|
254 |
|
255 |
<?php wp_nonce_field('shortcoder_create_form'); ?>
|
256 |
<input name="sc_form_main" type="hidden" value="1" />
|
257 |
</form>
|
258 |
|
259 |
-
<h3
|
260 |
<form method="post" id="sc_edit_form">
|
261 |
<ul id="sc_list" class="clearfix">
|
262 |
<?php
|
@@ -276,34 +295,59 @@ function sc_admin_page(){
|
|
276 |
</form>
|
277 |
|
278 |
<div id="sc_delete" title="Drag & drop shortcodes to delete"></div>
|
|
|
279 |
</div><!-- Content -->
|
280 |
|
281 |
-
<
|
282 |
-
<
|
283 |
-
<a href="
|
284 |
-
<a href="
|
285 |
-
<
|
|
|
|
|
|
|
286 |
|
287 |
</div><!-- Wrap -->
|
288 |
|
289 |
<?php
|
290 |
}
|
291 |
|
|
|
|
|
|
|
292 |
function sc_admin_footer(){
|
293 |
-
|
294 |
-
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
add_action('admin_footer', 'sc_admin_footer');
|
298 |
|
|
|
|
|
|
|
299 |
function sc_admin_buttons($type){
|
300 |
switch($type){
|
301 |
case 'fbrec':
|
302 |
-
echo '<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Faakashweb&send=false&layout=button_count&width=
|
303 |
break;
|
304 |
}
|
305 |
}
|
306 |
|
|
|
|
|
|
|
307 |
// Action Links
|
308 |
function sc_plugin_actions($links, $file){
|
309 |
static $this_plugin;
|
@@ -311,35 +355,39 @@ function sc_plugin_actions($links, $file){
|
|
311 |
|
312 |
if(!$this_plugin) $this_plugin = plugin_basename(__FILE__);
|
313 |
if( $file == $this_plugin ){
|
314 |
-
$settings_link = "<a href='$sc_donate_link' title='If you like this plugin, then just make a small Donation to continue this plugin development.' target='_blank'>" . __('Make Donations', '
|
315 |
$links = array_merge(array($settings_link), $links);
|
316 |
}
|
317 |
return $links;
|
318 |
}
|
319 |
add_filter('plugin_action_links', 'sc_plugin_actions', 10, 2);
|
320 |
|
|
|
|
|
|
|
321 |
// Shortcoder tinyMCE buttons
|
322 |
function sc_addbuttons() {
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
|
|
|
|
|
|
330 |
}
|
331 |
|
332 |
function sc_register_button($buttons) {
|
333 |
-
array_push($buttons, "
|
334 |
return $buttons;
|
335 |
}
|
336 |
|
337 |
function sc_add_tinymce_plugin($plugin_array) {
|
338 |
-
$plugin_array['scbutton'] = SC_URL . 'js/tinymce/editor_plugin.js';
|
339 |
return $plugin_array;
|
340 |
}
|
341 |
-
|
342 |
-
// init process for button control
|
343 |
-
add_action('init', 'sc_addbuttons');
|
344 |
|
345 |
?>
|
2 |
/*
|
3 |
Plugin Name: Shortcoder
|
4 |
Plugin URI: http://www.aakashweb.com
|
5 |
+
Description: Shortcoder is a plugin which allows to create a custom shortcode and store HTML, Javascript and other snippets in it. So if that shortcode is used in any post or pages, then the code stored in the shortcode get exceuted in that place. You can create a shortcode for Youtube videos, adsense ads, buttons and more.
|
6 |
Author: Aakash Chakravarthy
|
7 |
+
Version: 3.4
|
8 |
Author URI: http://www.aakashweb.com/
|
|
|
9 |
*/
|
10 |
|
11 |
+
define('SC_VERSION', '3.4');
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
define('SC_AUTHOR', 'Aakash Chakravarthy');
|
13 |
+
define('SC_URL', plugins_url('',__FILE__) );
|
14 |
+
define('SC_ADMIN', admin_url( 'options-general.php?page=shortcoder' ) );
|
15 |
+
|
16 |
+
$sc_donate_link = 'http://bit.ly/scDonate';
|
17 |
+
|
18 |
|
|
|
19 |
|
20 |
// Load languages
|
21 |
+
load_plugin_textdomain('shortcoder', false, basename(dirname(__FILE__)) . '/languages/');
|
22 |
+
|
23 |
+
|
24 |
|
25 |
// Add admin menu
|
26 |
function sc_add_menu() {
|
29 |
|
30 |
add_action('admin_menu','sc_add_menu');
|
31 |
|
32 |
+
|
33 |
+
|
34 |
// Load the Javascripts
|
35 |
function sc_admin_js(){
|
36 |
// Check whether the page is the Shortcoder admin page.
|
41 |
'jquery-ui-draggable',
|
42 |
'jquery-ui-droppable'
|
43 |
));
|
44 |
+
wp_enqueue_script('shortcoder-admin-js', SC_URL . '/sc-admin-js.js?v=' . SC_VERSION);
|
|
|
45 |
}
|
46 |
}
|
47 |
add_action('admin_print_scripts', 'sc_admin_js');
|
48 |
|
49 |
+
|
50 |
+
|
51 |
// Load the CSS
|
52 |
function sc_admin_css(){
|
53 |
if (isset($_GET['page']) && $_GET['page'] == 'shortcoder') {
|
54 |
+
wp_enqueue_style('shortcoder-admin-css', SC_URL . '/sc-admin-css.css?v=' . SC_VERSION);
|
55 |
}
|
56 |
}
|
57 |
add_action('admin_print_styles', 'sc_admin_css');
|
58 |
|
59 |
+
|
60 |
+
|
61 |
+
// Plugin on activate fixes
|
62 |
+
function sc_onactivate(){
|
63 |
+
$sc_options = get_option('shortcoder_data');
|
64 |
+
$sc_flags = get_option('shortcoder_flags');
|
65 |
+
|
66 |
+
// Move the flag version fix to sc_flags option
|
67 |
+
if(isset($sc_options['_version_fix'])){
|
68 |
+
unset($sc_options['_version_fix']);
|
69 |
+
update_option('shortcoder_data', $sc_options);
|
70 |
+
}
|
71 |
+
|
72 |
+
$sc_flags['version'] = SC_VERSION;
|
73 |
+
update_option('shortcoder_flags', $sc_flags);
|
74 |
+
|
75 |
+
}
|
76 |
+
register_activation_hook(__FILE__, 'sc_onactivate');
|
77 |
+
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
// Register the shortcode
|
82 |
add_shortcode('sc', 'shortcoder');
|
83 |
|
123 |
// Check whether shortcoder can execute
|
124 |
if(shortcoder_all_ok($sc_name)){
|
125 |
|
126 |
+
$sc_content_final = '';
|
127 |
+
|
128 |
// If SC has parameters, then replace it
|
129 |
if(!empty($atts)){
|
130 |
$keys = array();
|
143 |
// Replace the params
|
144 |
$sc_content = $sc_options[$sc_name]['content'];
|
145 |
$sc_content_rep1 = str_replace($keys, $values, $sc_content);
|
146 |
+
$sc_content_final = preg_replace('/%%[^%\s]+%%/', '', $sc_content_rep1);
|
147 |
+
|
148 |
}
|
149 |
else{
|
150 |
|
151 |
// If the SC has no params, then replace the %vars%
|
152 |
$sc_content = $sc_options[$sc_name]['content'];
|
153 |
+
$sc_content_final = preg_replace('/%%[^%\s]+%%/', '', $sc_content);
|
154 |
+
|
155 |
}
|
156 |
|
157 |
+
return "<!-- Start Shortcoder content -->" . do_shortcode( $sc_content_final ) . "<!-- End Shortcoder content -->";
|
158 |
+
|
159 |
}else{
|
160 |
return '';
|
161 |
}
|
162 |
}
|
163 |
|
164 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
|
166 |
// Shortcoder admin page
|
167 |
function sc_admin_page(){
|
170 |
$sc_options = get_option('shortcoder_data');
|
171 |
$sc_flags = get_option('shortcoder_flags');
|
172 |
|
173 |
+
$title = __( "Create a Shortcode", 'shortcoder' );
|
174 |
+
$button = __( "Create Shortcode", 'shortcoder' );
|
175 |
$edit = 0;
|
176 |
$sc_content = '';
|
177 |
$sc_disable = 0;
|
182 |
$sc_options = get_option('shortcoder_data');
|
183 |
$sc_name = stripslashes($_POST['sc_name']);
|
184 |
|
185 |
+
$sc_post_disabled = isset( $_POST['sc_disable'] ) ? intval( $_POST['sc_disable'] ) : 0;
|
186 |
+
$sc_post_hideadmin = isset( $_POST['sc_hide_admin'] ) ? intval( $_POST['sc_hide_admin'] ) : 0;
|
187 |
+
|
188 |
$sc_options[$sc_name] = array(
|
189 |
'content' => stripslashes($_POST['sc_content']),
|
190 |
+
'disabled' => $sc_post_disabled,
|
191 |
+
'hide_admin' => $sc_post_hideadmin
|
192 |
);
|
193 |
|
194 |
// Updating the DB
|
197 |
|
198 |
// Insert Message
|
199 |
if($sc_updated == 'true'){
|
200 |
+
echo '<div class="message updated fade"><p>' . __('Shortcode updated successfully !', 'shortcoder') . '</p></div>';
|
201 |
}else{
|
202 |
+
echo '<div class="message error fade"><p>' . __('Unable to create shortcode !', 'shortcoder') . '</p></div>';
|
203 |
}
|
204 |
}
|
205 |
|
209 |
$sc_name_edit = stripslashes($_POST['sc_name_edit']);
|
210 |
|
211 |
if($_POST["sc_form_action"] == "edit"){
|
212 |
+
$sc_content = stripslashes($sc_options[$sc_name_edit]['content']);
|
213 |
$sc_disable = $sc_options[$sc_name_edit]['disabled'];
|
214 |
$sc_hide_admin = $sc_options[$sc_name_edit]['hide_admin'];
|
215 |
|
216 |
+
$title = __( 'Edit this Shortcode - ', 'shortcoder' ) . '<small>' . $sc_name_edit . '</small>';
|
217 |
+
$button = __( 'Update Shortcode', 'shortcoder' );
|
218 |
$edit = 1;
|
219 |
}else{
|
220 |
unset($sc_options[$sc_name_edit]);
|
221 |
unset($sc_name_edit);
|
222 |
update_option("shortcoder_data", $sc_options);
|
223 |
+
echo '<div class="message updated fade"><p>' . __('Shortcode deleted successfully !', 'shortcoder') . '</p></div>';
|
224 |
}
|
225 |
}
|
226 |
|
231 |
|
232 |
<div class="wrap">
|
233 |
<?php sc_admin_buttons('fbrec'); ?>
|
234 |
+
<h2><img width="32" height="32" src="<?php echo SC_URL; ?>/images/shortcoder.png" align="absmiddle"/> Shortcoder<sup class="smallText"> v<?php echo SC_VERSION; ?></sup></h2>
|
235 |
|
236 |
<ul class="sc_share_wrap">
|
237 |
+
<li class="sc_donate" data-width="300" data-height="220" data-url="<?php echo SC_URL . '/js/share.php?i=1'; ?>"><a href="#"></a></li>
|
238 |
+
<li class="sc_share" data-width="350" data-height="85" data-url="<?php echo SC_URL . '/js/share.php?i=2'; ?>"><a href="#"></a></li>
|
239 |
</ul>
|
240 |
|
241 |
<div id="content">
|
242 |
+
|
243 |
+
<h3><?php echo $title; ?> <?php if($edit == 1) echo '<span class="button sc_back"><< ' . __( "Back", 'shortcoder' ) . '</span>'; ?> </h3>
|
244 |
|
245 |
<form method="post" id="sc_form">
|
246 |
+
|
247 |
+
<div class="sc_section">
|
248 |
+
<label for="sc_name" class="sc_fld_title"><?php _e( "Title:", 'shortcoder' ); ?>:</label>
|
249 |
+
<span class="sc_name_wrap"><input type="text" name="sc_name" id="sc_name" value="<?php echo isset($sc_name_edit) ? $sc_name_edit : ''; ?>" placeholder="Enter a shortcode name" class="widefat" required="required"/><div id="sc_code"></div></span>
|
250 |
+
</div>
|
251 |
|
252 |
+
|
253 |
+
<div class="sc_section">
|
254 |
+
<label for="sc_content" class="sc_fld_title"><?php _e( "Content:", 'shortcoder' ); ?>:</label>
|
255 |
+
<?php wp_editor( $sc_content, 'sc_content', array( 'wpautop'=> false, 'textarea_rows'=> 8 )); ?>
|
256 |
</div>
|
257 |
|
258 |
+
|
259 |
+
<div class="sc_section"><p><b>Note:</b> Use <strong style="color:#006600">%%someParameter%%</strong> to insert custom parameters. <a href="http://www.aakashweb.com/docs/shortcoder-doc/" target="_blank">Learn More</a></p></div>
|
260 |
+
|
261 |
+
<div class="sc_section">
|
262 |
+
|
263 |
+
<table width="100%"><tr>
|
264 |
+
|
265 |
+
<td width="50%" class="sc_settings"><label><input name="sc_disable" type="checkbox" value="1" <?php echo $sc_disable == "1" ? 'checked="checked"' : ""; ?>/> <?php _e( "Temporarily disable this shortcode", 'shortcoder' ); ?></label>
|
266 |
+
<label><input name="sc_hide_admin" type="checkbox" value="1" <?php echo $sc_hide_admin == "1" ? 'checked="checked"' : ""; ?>/> <?php _e( "Disable this Shortcode to admins", 'shortcoder' ); ?></label></td>
|
267 |
+
|
268 |
+
<td><p align="right"><input type="submit" name="sc_submit" id="sc_submit" class="button-primary" value="<?php echo $button; ?>" /></p></td>
|
269 |
+
|
270 |
+
</tr></table>
|
271 |
+
|
272 |
</div>
|
273 |
|
274 |
<?php wp_nonce_field('shortcoder_create_form'); ?>
|
275 |
<input name="sc_form_main" type="hidden" value="1" />
|
276 |
</form>
|
277 |
|
278 |
+
<h3><?php _e( "Created Shortcodes", 'shortcoder' ); ?> <small>(<?php _e( "Click to edit", 'shortcoder' ); ?>)</small></h3>
|
279 |
<form method="post" id="sc_edit_form">
|
280 |
<ul id="sc_list" class="clearfix">
|
281 |
<?php
|
295 |
</form>
|
296 |
|
297 |
<div id="sc_delete" title="Drag & drop shortcodes to delete"></div>
|
298 |
+
|
299 |
</div><!-- Content -->
|
300 |
|
301 |
+
<br/>
|
302 |
+
<p align="center">
|
303 |
+
<a href="http://www.aakashweb.com/forum/" target="_blank">Report bugs</a> | <a href="http://www.aakashweb.com/forum/" target="_blank">Support Forum</a> | <a href="http://www.aakashweb.com/wordpress-plugins/shortcoder/" target="_blank">Help</a> | <a href="http://bit.ly/scdonate" target="_blank">Donate</a><br/><br/>
|
304 |
+
<a href="#" class="sc_open_video">(Demo video)</a><br /><br />
|
305 |
+
<a href="https://twitter.com/vaakash" target="_blank">Follow @vaakash</a><br/><br/>
|
306 |
+
<a href="http://www.aakashweb.com/" target="_blank" class="sc_credits">a plugin from Aakash Web</a>
|
307 |
+
</p>
|
308 |
+
|
309 |
|
310 |
</div><!-- Wrap -->
|
311 |
|
312 |
<?php
|
313 |
}
|
314 |
|
315 |
+
|
316 |
+
|
317 |
+
// Helper for SC TinyMCE button
|
318 |
function sc_admin_footer(){
|
319 |
+
|
320 |
+
if (isset($_GET['page']) && $_GET['page'] == 'shortcoder')
|
321 |
+
return;
|
322 |
+
|
323 |
+
echo "
|
324 |
+
<script>
|
325 |
+
window.onload = function(){
|
326 |
+
if( typeof QTags === 'function' )
|
327 |
+
QTags.addButton( 'QT_sc_insert', 'Shortcoder', sc_show_insert );
|
328 |
+
}
|
329 |
+
function sc_show_insert(){
|
330 |
+
tb_show('Insert a Shortcode', '" . SC_URL . "/sc-insert.php?TB_iframe=true');
|
331 |
+
}
|
332 |
+
</script>
|
333 |
+
";
|
334 |
}
|
335 |
add_action('admin_footer', 'sc_admin_footer');
|
336 |
|
337 |
+
|
338 |
+
|
339 |
+
|
340 |
function sc_admin_buttons($type){
|
341 |
switch($type){
|
342 |
case 'fbrec':
|
343 |
+
echo '<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Faakashweb&send=false&layout=button_count&width=130&show_faces=false&action=recommend&colorscheme=light&font=arial&height=21&appId=106994469342299" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width: 130px; height:21px;float: right;margin-top: 15px;" allowtransparency="true"></iframe>';
|
344 |
break;
|
345 |
}
|
346 |
}
|
347 |
|
348 |
+
|
349 |
+
|
350 |
+
|
351 |
// Action Links
|
352 |
function sc_plugin_actions($links, $file){
|
353 |
static $this_plugin;
|
355 |
|
356 |
if(!$this_plugin) $this_plugin = plugin_basename(__FILE__);
|
357 |
if( $file == $this_plugin ){
|
358 |
+
$settings_link = "<a href='$sc_donate_link' title='If you like this plugin, then just make a small Donation to continue this plugin development.' target='_blank'>" . __('Make Donations', 'shortcoder') . '</a> ';
|
359 |
$links = array_merge(array($settings_link), $links);
|
360 |
}
|
361 |
return $links;
|
362 |
}
|
363 |
add_filter('plugin_action_links', 'sc_plugin_actions', 10, 2);
|
364 |
|
365 |
+
|
366 |
+
|
367 |
+
|
368 |
// Shortcoder tinyMCE buttons
|
369 |
function sc_addbuttons() {
|
370 |
+
if ( !current_user_can('edit_posts') && !current_user_can('edit_pages') )
|
371 |
+
return;
|
372 |
+
|
373 |
+
if (isset($_GET['page']) && $_GET['page'] == 'shortcoder')
|
374 |
+
return;
|
375 |
+
|
376 |
+
if ( get_user_option('rich_editing') == 'true') {
|
377 |
+
add_filter("mce_external_plugins", "sc_add_tinymce_plugin");
|
378 |
+
add_filter('mce_buttons', 'sc_register_button');
|
379 |
+
}
|
380 |
}
|
381 |
|
382 |
function sc_register_button($buttons) {
|
383 |
+
array_push($buttons, "separator", "scbutton");
|
384 |
return $buttons;
|
385 |
}
|
386 |
|
387 |
function sc_add_tinymce_plugin($plugin_array) {
|
388 |
+
$plugin_array['scbutton'] = SC_URL . '/js/tinymce/editor_plugin.js';
|
389 |
return $plugin_array;
|
390 |
}
|
391 |
+
add_action('init', 'sc_addbuttons'); // init process for button control
|
|
|
|
|
392 |
|
393 |
?>
|