Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4

Warning: Cannot modify header information - headers already sent by (output started at /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code:102) in /var/www/iplanru/data/www/intesco.ru/d59ed/index.php(1) : eval()'d code(2) : eval()'d code on line 4
aggregator/vimeo.php000066600000002347150775073120010537 0ustar00 'video' )); } function display() { $document = WFDocument::getInstance(); $document->addScript('vimeo', 'extensions/aggregator/vimeo/js'); } function isEnabled() { $plugin = WFEditorPlugin::getInstance(); return $plugin->checkAccess('aggregator.vimeo.enable', 1); } function getParams() { $plugin = WFEditorPlugin::getInstance(); return array( 'width' => $plugin->getParam('aggregator.vimeo.width', 400), 'height' => $plugin->getParam('aggregator.vimeo.height', 225) ); } }aggregator/youtube.xml000066600000002377150775073120011130 0ustar00 WF_AGGREGATOR_YOUTUBE_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_AGGREGATOR_YOUTUBE_DESC youtube.php youtube aggregator/vine/js/vine.js000066600000003474150775073120011565 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ WFAggregator.add('vine',{params:{type:'simple',size:600},setup:function(){$('#vine_size').change(function(){$('#width, #height').val(this.value).change();});},getTitle:function(){return this.title||this.name;},getType:function(){return'iframe';},isSupported:function(v){if(typeof v=='object'){v=v.src||v.data||'';} if(/vine\.co\/(.+)/.test(v)){return'vine';} return false;},getValues:function(src){var self=this,data={},args={},type=this.getType(),id='';$.extend(args,$.String.query(src));$('input, select','#vine_options').each(function(){var k=$(this).attr('id'),v=$(this).val();k=k.substr(k.indexOf('_')+1);if($(this).is(':checkbox')){v=$(this).is(':checked')?1:0;} args[k]=v;});var s=/vine\.co\/v\/([a-z0-9A-Z]+)\/?/.exec(src);if(s&&s.length>1){id=s[1];} src='//vine.co/v/'+id+'/embed/'+(args.type||this.params.type||'');data.src=src;$.extend(data,{'frameborder':0,'class':'vine-embed','width':args.size||this.params.size,'height':args.size||this.params.size});return data;},setValues:function(data){var self=this,src=data.src||data.data||'',id='';if(!src){return data;} var s=/vine\.co\/v\/([a-z0-9A-Z]+)\/?(embed)?\/?(simple|postcard)?/.exec(src);if(s&&s.length>1){id=s[1];data.type=s.length==4?s[3]:'';} data.src='//vine.co/v/'+id+'/embed/';data.size=data.width||data.height||this.params.size;return data;},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};$.each(data,function(k,v){if(k=='src'){return;} args['vine_'+k]=v;});$.extend(args,{'src':data.src||src,'width':this.params.size,'height':this.params.size});return args;},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});aggregator/vine/js/index.html000066600000000054150775073120012252 0ustar00aggregator/vine/tmpl/default.php000066600000002664150775073120012763 0ustar00
aggregator/vine/tmpl/index.html000066600000000054150775073120012612 0ustar00aggregator/vine/index.html000066600000000054150775073120011636 0ustar00aggregator/vine.php000066600000002341150775073120010353 0ustar00 'video' )); } function display() { $document = WFDocument::getInstance(); $document->addScript('vine', 'extensions/aggregator/vine/js'); } function isEnabled() { $plugin = WFEditorPlugin::getInstance(); return $plugin->checkAccess('aggregator.vine.enable', 1); } function getParams() { $plugin = WFEditorPlugin::getInstance(); return array( 'type' => $plugin->getParam('aggregator.vine.type', 'simple'), 'size' => $plugin->getParam('aggregator.vine.size', 600) ); } }aggregator/youtube/js/index.html000066600000000054150775073120013005 0ustar00aggregator/youtube/js/youtube.js000066600000007436150775073120013055 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ WFAggregator.add('youtube',{params:{width:425,height:350,embed:true},props:{rel:1,autohide:2,autoplay:0,controls:1,enablejsapi:0,loop:0,playlist:'',start:'',privacy:0},setup:function(){},getTitle:function(){return this.title||this.name;},getType:function(){return $('#youtube_embed:visible').is(':checked')?'flash':'iframe';},isSupported:function(v){if(typeof v=='object'){v=v.src||v.data||'';} if(/youtu(\.)?be(.+)?\/(.+)/.test(v)){return'youtube';} return false;},getValues:function(src){var self=this,data={},args={},type=this.getType(),id,query={};var u=this.parseURL(src);if(u.query){query=$.String.query(u.query);} $.extend(args,query);src=src.replace(/^http(s)?:\/\//,'//');$(':input','#youtube_options').not('#youtube_embed, #youtube_https, #youtube_privacy').each(function(){var k=$(this).attr('id'),v=$(this).val();k=k.substr(k.indexOf('_')+1);if($(this).is(':checkbox')){v=$(this).is(':checked')?1:0;} if(k=='autohide'){v=parseInt(v);} if(self.props[k]===v||v===''){return;} args[k]=v;});src=src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/,function(a,b,c,d){d=d.replace(/(watch\?v=|v\/|embed\/)/,'');if(b&&!c){c='.com';} id=d.replace(/([^\?&#]+)/,function($0,$1){return $1;});return'youtube'+c+'/'+(type=='iframe'?'embed':'v')+'/'+d;});if(id&&args.loop&&!args.playlist){args.playlist=id;} if($('#youtube_privacy').is(':checked')){src=src.replace(/youtube\./,'youtube-nocookie.');}else{src=src.replace(/youtube-nocookie\./,'youtube.');} if(type=='iframe'){$.extend(data,{allowfullscreen:true,frameborder:0});args['wmode']='opaque';}else{$.extend(true,data,{param:{allowfullscreen:true,wmode:'opaque'}});} var q=$.param(args);if(q){src=src+(/\?/.test(src)?'&':'?')+q;} data.src=src;return data;},parseURL:function(url){var o={};url=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(url);$.each(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(i,v){var s=url[i];if(s){o[v]=s;}});return o;},setValues:function(data){var self=this,id='',src=data.src||data.data||'',query={};if(!src){return data;} var u=this.parseURL(src);if(u.query){query=$.String.query(u.query);} $.extend(data,query);src=src.replace(/^http(s)?:\/\//,'//');if(src.indexOf('youtube-nocookie')!==-1){data['privacy']=true;} if(data.param){data['embed']=true;} if(query.v){id=query.v;delete query.v;}else{var s=/\/?(embed|v)?\/([\w]+)\b/.exec(u.path);if(s&&$.type(s)==="array"){id=s.pop();}} if(data.playlist){data.playlist=decodeURIComponent(data.playlist);} if(data.playlist===id){data.playlist=null;} if(query.wmode){delete query.wmode;} $.each(query,function(k,v){if(typeof self.props[k]=='undefined'){$('#youtube_options table').append('');}});src=src.replace(/youtu(\.)?be([^\/]+)?\/(.+)/,function(a,b,c,d){var args='youtube';if(b){args+='.com';} if(c){args+=c;} if($('#youtube_embed').is(':checked')){args+='/v';}else{args+='/embed';} args+='/'+id;if(u.anchor){var s=u.anchor;s=s.replace(/(\?|&)(.+)/,'');args+='#'+s;} return args;}).replace(/\/\/youtube/i,'//www.youtube');data.src=src;return data;},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};$.each(data,function(k,v){if(k=='src'){return;} args['youtube_'+k]=v;});$.extend(args,{'src':data.src||src,'width':this.params.width,'height':this.params.height});return args;},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});aggregator/youtube/tmpl/default.php000066600000006573150775073120013521 0ustar00
aggregator/youtube/tmpl/index.html000066600000000054150775073120013345 0ustar00aggregator/youtube/index.html000066600000000054150775073120012371 0ustar00aggregator/vimeo/js/index.html000066600000000054150775073120012430 0ustar00aggregator/vimeo/js/vimeo.js000066600000005556150775073120012124 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ WFAggregator.add('vimeo',{params:{width:400,height:225,embed:true},props:{color:'',autoplay:0,loop:0,portrait:1,title:1,byline:1,fullscreen:1},setup:function(){$('#vimeo_embed').toggle(this.params.embed);},getTitle:function(){return this.title||this.name;},getType:function(){return $('#vimeo_embed').is(':checked')?'flash':'iframe';},isSupported:function(v){if(typeof v=='object'){v=v.src||v.data||'';} if(/vimeo(.+)?\/(.+)/.test(v)){if(/\/external\//.test(v)){return false;} return'vimeo';} return false;},getValues:function(src){var self=this,data={},args={},type=this.getType(),id='';if(src.indexOf('=')!==-1){$.extend(args,$.String.query(src));} $('input, select','#vimeo_options').not('#vimeo_embed').each(function(){var k=$(this).attr('id'),v=$(this).val();k=k.substr(k.indexOf('_')+1);if($(this).is(':checkbox')){v=$(this).is(':checked')?1:0;} if(self.props[k]===v||v===''){return;} switch(k){case'color':if(v.charAt(0)=='#'){v=v.substr(1);} break;case'portrait':case'title':case'byline':if(type=='flash'){k='show_'+k;} break;} args[k]=v;});if(args.clip_id){id=args.clip_id;}else{var s=/vimeo.com(\/video)?\/([0-9]+)/.exec(src);if(s&&$.type(s)==="array"){id=s.pop();}} if(type=='flash'){src='http://vimeo.com/moogaloop.swf?clip_id='+id;}else{src='//player.vimeo.com/video/'+id;} var query=$.param(args);if(query){src=src+(/\?/.test(src)?'&':'?')+query;} data.src=src;if(type=='iframe'){$.extend(data,{frameborder:0});}else{$.extend(true,data,{param:{allowfullscreen:true,wmode:'opaque'}});} return data;},setValues:function(data){var self=this,src=data.src||data.data||'',id='';if(!src){return data;} var query=$.String.query(src);$.extend(data,query);src=src.replace(/&/g,'&');if(/moogaloop.swf/.test(src)){data['embed']=true;$.each(['portrait','title','byline'],function(i,s){var v=query['show_'+s];if(typeof v!='undefined'){data[s]=v;delete data['show_'+s];}});id=query['clip_id'];delete data['clip_id'];delete query['clip_id'];}else{var s=/vimeo\.com\/(video\/)?([0-9]+)/.exec(src);if(s&&$.type(s)==="array"){id=s.pop();}} $.each(query,function(k,v){if(typeof self.props[k]=='undefined'){$('#vimeo_options table').append('');}});src='//vimeo.com/'+id;if(data['color']&&data['color'].charAt(0)!='#'){data['color']='#'+data['color'];} data.src=src;return data;},getAttributes:function(src){var args={},data=this.setValues({src:src})||{};$.each(data,function(k,v){if(k=='src'){return;} args['vimeo_'+k]=v;});$.extend(args,{'src':data.src||src,'width':this.params.width,'height':this.params.height});return args;},setAttributes:function(){},onSelectFile:function(){},onInsert:function(){}});aggregator/vimeo/tmpl/default.php000066600000005222150775073120013132 0ustar00
aggregator/vimeo/tmpl/index.html000066600000000054150775073120012770 0ustar00aggregator/vimeo/index.html000066600000000054150775073120012014 0ustar00aggregator/index.html000066600000000054150775073120010675 0ustar00aggregator/build.xml000066600000012352150775073120010525 0ustar00 aggregator/vine.xml000066600000003064150775073120010367 0ustar00 WF_AGGREGATOR_VINE_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_AGGREGATOR_VINE_DESC vine.php vine aggregator/youtube.php000066600000002366150775073120011115 0ustar00 'video' )); } function display() { $document = WFDocument::getInstance(); $document->addScript('youtube', 'extensions/aggregator/youtube/js'); } function isEnabled() { $plugin = WFEditorPlugin::getInstance(); return $plugin->checkAccess('aggregator.youtube.enable', 1); } function getParams() { $plugin = WFEditorPlugin::getInstance(); return array( 'width' => $plugin->getParam('aggregator.youtube.width', 425), 'height' => $plugin->getParam('aggregator.youtube.height', 350) ); } }aggregator/vimeo.xml000066600000002357150775073120010551 0ustar00 WF_AGGREGATOR_VIMEO_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_AGGREGATOR_VIMEO_DESC vimeo.php vimeo mediaplayer/jceplayer.xml000066600000002400150775073120011547 0ustar00 WF_MEDIAPLAYER_JCEPLAYER_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_MEDIAPLAYER_JCEPLAYER_DESC jceplayer.php jceplayer mediaplayer mediaplayer/jceplayer.php000066600000002372150775073120011546 0ustar00 'jceplayer', 'title' => 'JCE MediaPlayer', 'params'=> self::getParams() ); parent::__construct($options); } function getParams() { $plugin = WFEditorPlugin::getInstance(); return array( 'extensions' => $plugin->getParam('jceplayer.extensions', 'flv,f4v,mp3,mp4'), 'dimensions' => array( 'audio' => array('width'=> 300, 'height' => 35) ), 'path' => $plugin->getParam('jceplayer.path', 'media/jce/mediaplayer/mediaplayer.swf') ); } function isEnabled() { return true; } } ?>mediaplayer/index.html000066600000000054150775073120011047 0ustar00mediaplayer/jceplayer/js/index.html000066600000000054150775073120013441 0ustar00mediaplayer/jceplayer/js/jceplayer.js000066600000010534150775073120013764 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ WFMediaPlayer.init({params:{extensions:'mp3,mp4,flv,f4v',dimensions:{'audio':{width:300,height:35}},path:'media/jce/mediaplayer/mediaplayer.swf'},props:{autoPlay:false,controlBarAutoHide:true,controlBarMode:'docked',controlBarAutoHideTimeout:'',loop:false,muted:false,playButtonOverlay:true,bufferingOverlay:true,volume:1,audioPan:0,poster:'',endOfVideoOverlay:'',backgroundColor:''},type:'flash',setup:function(){$('#mediaplayer_volume, #mediaplayer_audioPan').each(function(){var n=this;$('').insertAfter(this).slider();});$('#mediaplayer_volume').change(function(){var v=parseFloat($(this).val());v=Math.ceil(v);$('#mediaplayer_volume_slider').slider('value',v);$(this).val(v);});$('#mediaplayer_audioPan').change(function(){$('#mediaplayer_audioPan_slider').slider('value',($(this).val()*10)+20);});$('#mediaplayer_volume_slider').slider('option',{min:0,max:100,step:10,value:$('#mediaplayer_volume').val(),slide:function(event,ui){$('#mediaplayer_volume').val(ui.value);}});$('#mediaplayer_audioPan_slider').slider('option',{min:10,max:30,step:1,value:($('#mediaplayer_audioPan').val()*10)+20,slide:function(event,ui){$('#mediaplayer_audioPan').val((ui.value-20)/10);}});},isSupported:function(data){var r,file='',ext=tinymce.explode(this.getParam('extensions')).join('|'),re=new RegExp('\.('+ext+')$','i');var src=data.src||data.data||'';if(data.param){var fv=this.parseValues(data.param.flashvars||'');if(fv){file=fv.src||'';}} r=re.test(src)||re.test(file);if(!r){return new RegExp(this.getPath()).test(src);} return r;},getValues:function(s,args){var self=this,s,u,k,v,data=[];var url=tinyMCEPopup.getParam('document_base_url');if(!/http(s)?:\/\//.test(s)){s=$.String.path(url,s);} data.push('src='+$.String.encodeURI(s,true));args=args||{};$(':input','#mediaplayer_options').each(function(){k=$(this).attr('id'),v=$(this).val();if(k){k=k.substr(k.indexOf('_')+1);if($(this).is(':checkbox')){v=$(this).is(':checked');} if(typeof args[k]=='undefined'){args[k]=v;}}});var map={'autoplay':'autoPlay','controls':'controlBarAutoHide'};$.each(args,function(k,v){if(typeof k!='string'){return;} if(map[k]){k=map[k];} if(typeof self.props[k]=='undefined'){return;} switch(k){case'volume':v=parseInt(v)/100;break;case'audioPan':v=parseInt(v);break;case'backgroundColor':v=v.replace('#','0x');break;case'poster':case'endOfVideoOverlay':if(v){u=/http(s)?:\/\/[^\/]+(.*)/.exec(url);s=(u&&u.length>1)?u[2]:'';v=$.String.path(s,v);} break;default:break;} if(k=='controlBarAutoHide'){v=!v;} if(self.props[k]===v||v===''){return;} data.push(k+'='+$.String.encodeURI(v,true));});return{'src':this.getPath(),'type':'application/x-shockwave-flash','param':{'flashvars':data.join('&'),'allowfullscreen':true,'wmode':'opaque'}};},parseValues:function(s){var ed=tinyMCEPopup.editor,data={},o=$.String.query(s.replace(/\?/,'&'));$.each(o,function(k,v){switch(k){case'src':data['src']=ed.convertURL(v);break;case'volume':data['volume']=parseInt(v)*100;break;case'backgroundColor':data[k]=v.replace('0x','#');break;case'loop':case'autoPlay':case'muted':case'playButtonOverlay':case'bufferingOverlay':v=(v==='false'||v==='0')?false:!!v;data[k]=v;break;case'controlBarAutoHide':v=(v==='false'||v==='0')?false:!!v;data[k]=!v;break;case'poster':case'endOfVideoOverlay':data[k]=ed.convertURL(ed.documentBaseURI.toAbsolute(v));break;default:data[k]=v;break;}});return data;},setValues:function(data){var fv=data.flashvars||data.param.flashvars||'';var at=this.parseValues(decodeURIComponent(fv));$.each(at,function(k,v){if(k=='src'){return;} data[k]=v;});data.controlBarAutoHide=!!data.controlBarAutoHide;data.src=at.src;return data;},onSelectFile:function(file){if(file&&/\.mp3$/.test(file)){$('#mediaplayer_controlBarMode').val('floating').prop('disabled',true);}else{$('#mediaplayer_controlBarMode').val('docked').prop('disabled',false);}},onInsert:function(){var src=$('#src').val(),mp3=/\.mp3$/.test(src),dimensions=this.getParam('dimensions');if(mp3&&dimensions.audio){$('#width').val(dimensions.audio.width);$('#height').val(dimensions.audio.height);} $('#flash_wmode').val('opaque');$('#flash_allowfullscreen').attr('checked',!mp3);$('#flash_menu').attr('checked',true);}});mediaplayer/jceplayer/tmpl/default.php000066600000012531150775073120014144 0ustar00
mediaplayer/jceplayer/tmpl/index.html000066600000000054150775073120014001 0ustar00mediaplayer/jceplayer/index.html000066600000000054150775073120013025 0ustar00mediaplayer/jceplayer/css/index.html000066600000000054150775073120013615 0ustar00mediaplayer/jceplayer/css/jceplayer.css000066600000001237150775073120014314 0ustar00/*JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/ #mediaplayer_options input.browser{width:300px;}#mediaplayer_controlBarAutoHideTimeout{width:50px;}#mediaplayer_audioPan,#mediaplayer_volume{width:30px;}#mediaplayer_options span.ui-slider{width:100px;}label[for="mediaplayer_loop"],label[for="mediaplayer_autoPlay"],label[for="mediaplayer_muted"]{min-width:80px;}label[for="mediaplayer_playButtonOverlay"],label[for="mediaplayer_bufferingOverlay"]{min-width:140px;}span.ui-slider-block{display:inline-block;}index.html000066600000000054150775073120006553 0ustar00links/k2links.php000066600000005017150775073120007770 0ustar00_adapters[] = new $classname; } } } /** * Returns a reference to a editor object * * This method must be invoked as: *
  $browser =JContentEditor::getInstance();
* * @access public * @return JCE The editor object. * @since 1.5 */ function &getInstance(){ static $instance; if ( !is_object( $instance ) ){ $instance = new WFLinkBrowser_K2links(); } return $instance; } function display() { } function isEnabled() { $wf = WFEditorPlugin::getInstance(); return $wf->checkAccess($wf->getName() . '.links.k2links.enable', 1); } function getOption() { foreach( $this->_adapters as $adapter ){ $this->_option[]= $adapter->getOption(); } return $this->_option; } function getList() { $list = ''; foreach( $this->_adapters as $adapter ){ $list .= $adapter->getList(); } return $list; } function getLinks( $args ) { foreach( $this->_adapters as $adapter ){ if( $adapter->getOption() == $args->option ){ if(property_exists($args, 'task')) { $task = $args->task; } else { $task = 'category'; } if($adapter->getTask() == $task) { return $adapter->getLinks( $args ); } } } } } ?>links/index.html000066600000000054150775073120007673 0ustar00links/joomlalinks.xml000066600000007366150775073120010757 0ustar00 WF_LINKS_JOOMLALINKS_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_LINKS_JOOMLALINKS_DESC joomlalinks.php joomlalinks links/joomlalinks.php000066600000004526150775073120010741 0ustar00_adapters[] = new $classname; } } } } public function display() { // Load css $document = WFDocument::getInstance(); $document->addStyleSheet(array('joomlalinks'), 'extensions/links/joomlalinks/css'); } public function isEnabled() { $wf = WFEditorPlugin::getInstance(); return $wf->checkAccess($wf->getName() . '.links.joomlalinks.enable', 1); } public function getOption() { foreach ($this->_adapters as $adapter) { $this->_option[] = $adapter->getOption(); } return $this->_option; } public function getList() { $list = ''; foreach ($this->_adapters as $adapter) { $list .= $adapter->getList(); } return $list; } public function getLinks($args) { foreach ($this->_adapters as $adapter) { if ($adapter->getOption() == $args->option) { return $adapter->getLinks($args); } } } } ?>links/k2links.xml000066600000002554150775073120010004 0ustar00 K2 Links for JCE Link 2.2 31 January 2013 Nicholas K. Dionysopoulos nicholas@dionysopoulos.me http://www.dionysopoulos.me Copyright (C) 2009 - 2013 Nicholas K. Dionysopoulos. All Rights Reserved. GNU GPL v.3 or later K2 Links for JCE 2.0 k2links.php k2links/index.html k2links/k2.php k2links/tags.php links/joomlalinks/weblinks.php000066600000022702150775073120012553 0ustar00 $browser =JContentEditor::getInstance(); * * @access public * @return JCE The editor object. * @since 1.5 */ public static function getInstance() { static $instance; if (!is_object($instance)) { $instance = new JoomlalinksWeblinks(); } return $instance; } public function getOption() { return $this->_option; } public function getList() { $wf = WFEditorPlugin::getInstance(); if ($wf->checkAccess('links.joomlalinks.weblinks', 1)) { return '
  • ' . WFText::_('WF_LINKS_JOOMLALINKS_WEBLINKS') . '
  • '; } } public function getLinks($args) { $wf = WFEditorPlugin::getInstance(); $items = array(); if (!defined('JPATH_PLATFORM')) { require_once(JPATH_SITE . '/includes/application.php'); } require_once(JPATH_SITE . '/components/com_weblinks/helpers/route.php'); $language = ''; switch ($args->view) { // Get all WebLink categories default: case 'categories': $categories = WFLinkBrowser::getCategory('com_weblinks'); foreach ($categories as $category) { $url = ''; if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) { // language if (isset($category->language)) { $language = $category->language; } $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language); if (strpos($id, 'index.php?Itemid=') !== false) { $url = $id; $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id; } } else { $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id)); $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid; } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder weblink' ); } break; // Get all links in the category case 'category': if (defined('JPATH_PLATFORM')) { $categories = WFLinkBrowser::getCategory('com_weblinks', $args->id); if (count($categories)) { foreach ($categories as $category) { $children = WFLinkBrowser::getCategory('com_weblinks', $category->id); $url = ''; if ($children) { $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id; } else { if (method_exists('WeblinksHelperRoute', 'getCategoryRoute')) { // language if (isset($category->language)) { $language = $category->language; } $id = WeblinksHelperRoute::getCategoryRoute($category->id, $language); if (strpos($id, 'index.php?Itemid=') !== false) { $url = $id; $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id; } } else { $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id)); $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid; } } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder weblink' ); } } } $weblinks = self::_weblinks($args->id); foreach ($weblinks as $weblink) { // language if (isset($weblink->language)) { $language = $weblink->language; } $id = WeblinksHelperRoute::getWeblinkRoute($weblink->slug, $weblink->catslug, $language); if (defined('JPATH_PLATFORM')) { $id .= '&task=weblink.go'; } $items[] = array( 'id' => self::route($id), 'name' => $weblink->title . ' / ' . $weblink->alias, 'class' => 'file' ); } break; } return $items; } function _weblinks($id) { $wf = WFEditorPlugin::getInstance(); $db = JFactory::getDBO(); $user = JFactory::getUser(); $version = new JVersion(); $language = $version->isCompatible('3.0') ? ', a.language' : ''; $dbquery = $db->getQuery(true); $section = JText::_('Web Links'); $query = 'SELECT a.id AS slug, b.id AS catslug, a.title AS title, a.description AS text, a.url, a.alias'; if ($wf->getParam('links.joomlalinks.weblinks_alias', 1) == 1) { if (is_object($dbquery) && method_exists($dbquery, 'charLength')) { $query .= $language; //sqlsrv changes $case_when1 = ' CASE WHEN '; $case_when1 .= $dbquery->charLength('a.alias', '!=', '0'); $case_when1 .= ' THEN '; $a_id = $dbquery->castAsChar('a.id'); $case_when1 .= $dbquery->concatenate(array($a_id, 'a.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $a_id . ' END as slug'; $case_when2 = ' CASE WHEN '; $case_when2 .= $dbquery->charLength('b.alias', '!=', '0'); $case_when2 .= ' THEN '; $c_id = $dbquery->castAsChar('b.id'); $case_when2 .= $dbquery->concatenate(array($c_id, 'b.alias'), ':'); $case_when2 .= ' ELSE '; $case_when2 .= $c_id . ' END as catslug'; } else { $case_when1 = ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug'; $case_when2 = ' CASE WHEN CHAR_LENGTH(b.alias) THEN CONCAT_WS(\':\', b.id, b.alias) ELSE b.id END as catslug'; } $query .= ',' . $case_when1 . ',' . $case_when2; } if (method_exists('JUser', 'getAuthorisedViewLevels')) { $where = ' AND a.state = 1'; $where .= ' AND b.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'; } else { $where = ' AND a.published = 1'; $where .= ' AND b.access <= ' . (int) $user->get('aid'); } $query .= ' FROM #__weblinks AS a' . ' INNER JOIN #__categories AS b ON b.id = ' . (int) $id . ' WHERE a.catid = ' . (int) $id . $where . ' AND b.published = 1' . ' ORDER BY a.title' ; $db->setQuery($query, 0); return $db->loadObjectList(); } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ($wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkExtension::route($url); } return $url; } } ?> links/joomlalinks/index.html000066600000000054150775073120012215 0ustar00links/joomlalinks/contact.php000066600000016651150775073120012376 0ustar00 $browser =JContentEditor::getInstance(); * * @access public * @return JCE The editor object. * @since 1.5 */ public static function getInstance() { static $instance; if (!is_object($instance)) { $instance = new JoomlalinksContact(); } return $instance; } public function getOption() { return $this->_option; } public function getList() { //Reference to JConentEditor (JCE) instance $wf = WFEditorPlugin::getInstance(); if ($wf->checkAccess('links.joomlalinks.contacts', 1)) { return '
  • ' . WFText::_('WF_LINKS_JOOMLALINKS_CONTACTS') . '
  • '; } } public function getLinks($args) { $items = array(); $view = isset($args->view) ? $args->view : ''; $language = ''; if (defined('JPATH_PLATFORM')) { require_once(JPATH_SITE . '/components/com_contact/helpers/route.php'); } switch ($view) { default: if (defined('JPATH_PLATFORM')) { $categories = WFLinkBrowser::getCategory('com_contact'); } else { $categories = WFLinkBrowser::getCategory('com_contact_details'); } foreach ($categories as $category) { if (defined('JPATH_PLATFORM')) { // language if (isset($category->language)) { $language = $category->language; } $url = ContactHelperRoute::getCategoryRoute($category->id, $language); } else { $itemid = WFLinkBrowser::getItemId('com_contact', array('category' => $category->id)); $url = 'index.php?option=com_contact&view=category&catid=' . $category->slug . $itemid; } // convert to SEF $url = self::route($url); $items[] = array( 'id' => 'index.php?option=com_contact&view=category&id=' . $category->id, 'url' => $url, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder contact' ); } break; case 'category': if (defined('JPATH_PLATFORM')) { $categories = WFLinkBrowser::getCategory('com_contact', $args->id); foreach ($categories as $category) { $children = WFLinkBrowser::getCategory('com_contact', $category->id); // language if (isset($category->language)) { $language = $category->language; } if ($children) { $id = ContactHelperRoute::getCategoryRoute($category->id, $language); } else { $id = ContactHelperRoute::getCategoryRoute($category->slug, $language); } // convert to SEF $url = self::route($id); $items[] = array( 'url' => $url, 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder content' ); } } $contacts = self::_contacts($args->id); foreach ($contacts as $contact) { // language if (isset($contact->language)) { $language = $contact->language; } if (defined('JPATH_PLATFORM')) { $id = ContactHelperRoute::getContactRoute($contact->id, $args->id, $language); } else { $catid = $args->id ? '&catid=' . $args->id : ''; $itemid = WFLinkBrowser::getItemId('com_contact', array('contact' => $contact->id)); if (!$itemid && isset($args->Itemid)) { // fall back to the parent item's Itemid $itemid = '&Itemid=' . $args->Itemid; } $id = 'index.php?option=com_contact&view=contact' . $catid . '&id=' . $contact->id . '-' . $contact->alias . $itemid; } $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $contact->name . ' / ' . $contact->alias, 'class' => 'file' ); } break; } return $items; } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ($wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkExtension::route($url); } return $url; } private static function _contacts($id) { $db = JFactory::getDBO(); $user = JFactory::getUser(); $where = ''; $version = new JVersion(); $language = $version->isCompatible('3.0') ? ', language' : ''; $query = $db->getQuery(true); if (is_object($query)) { $query->select('id, name, alias' . $language)->from('#__contact_details')->where(array('catid='. (int) $id, 'published = 1', 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')')); } else { $query = 'SELECT id, name, alias' . ' FROM #__contact_details' . ' WHERE catid = ' . (int) $id . ' AND published = 1' . ' AND access <= ' . (int) $user->get('aid') . ' ORDER BY name' ; } $db->setQuery($query); return $db->loadObjectList(); } } ?>links/joomlalinks/css/index.html000066600000000054150775073120013005 0ustar00links/joomlalinks/css/joomlalinks.css000066600000001437150775073120014052 0ustar00/*JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/ div.tree ul li div.tree-row span.folder.contact{background:url(../img/icons.png) no-repeat 0 -20px;}div.tree ul li div.tree-row span.folder.content{background:url(../img/icons.png) no-repeat 0 -40px;}div.tree ul li div.tree-row span.file{background:url(../img/icons.png) no-repeat 0 -140px;}div.tree ul li div.tree-row span.folder.weblink{background:url(../img/icons.png) no-repeat 0 -60px;}div.tree ul li div.tree-row span.folder.menu{background:url(../img/icons.png) no-repeat 0 -80px;}div.tree ul li div.tree-row span.file.anchor{background:url(../img/icons.png) no-repeat 0 -160px;}links/joomlalinks/menu.php000066600000027260150775073120011705 0ustar00 $browser =JContentEditor::getInstance(); * * @access public * @return JCE The editor object. * @since 1.5 */ public static function getInstance() { static $instance; if (!is_object($instance)) { $instance = new JoomlalinksMenu(); } return $instance; } public function getOption() { return $this->_option; } public function getList() { $wf = WFEditorPlugin::getInstance(); if ($wf->checkAccess('links.joomlalinks.menu', 1)) { return '
  • ' . WFText::_('WF_LINKS_JOOMLALINKS_MENU') . '
  • '; } } public function getLinks($args) { $items = array(); $view = isset($args->view) ? $args->view : ''; switch ($view) { // create top-level (non-linkable) menu types default: $types = self::_types(); foreach ($types as $type) { $items[] = array( 'id' => 'index.php?option=com_menu&view=menu&type=' . $type->id, 'name' => $type->title, 'class' => 'folder menu nolink' ); } break; // get menus and sub-menus case 'menu': $type = isset($args->type) ? $args->type : 0; $id = $type ? 0 : $args->id; $menus = self::_menu($id, $type); foreach ($menus as $menu) { $class = array(); if (defined('JPATH_PLATFORM')) { $params = new JRegistry($menu->params); } else { $params = new JParameter($menu->params); } switch ($menu->type) { case 'separator': if (!$menu->link) { $class[] = 'nolink'; } $link = ''; break; case 'alias': // If this is an alias use the item id stored in the parameters to make the link. $link = 'index.php?Itemid=' . $params->get('aliasoptions'); break; default: // resolve link $link = self::_resolveLink($menu); break; } $children = (int) self::_children($menu->id); $title = isset($menu->name) ? $menu->name : $menu->title; if ($children) { $class = array_merge($class, array('folder', 'menu')); } else { $class[] = 'file'; } if ($params->get('secure')) { $link = self::toSSL($link); } // language if (isset($menu->language)) { $link .= $this->getLangauge($menu->language); } $items[] = array( 'id' => $children ? 'index.php?option=com_menu&view=menu&id=' . $menu->id : $link, 'url' => self::route($link), 'name' => $title . ' / ' . $menu->alias, 'class' => implode(' ', $class) ); } break; // get menu items case 'submenu': $menus = self::_menu($args->id); foreach ($menus as $menu) { if ($menu->type == 'menulink') { //$menu = AdvlinkMenu::_alias($menu->id); } $title = isset($menu->name) ? $menu->name : $menu->title; // get params if (defined('JPATH_PLATFORM')) { $params = new JRegistry($menu->params); } else { $params = new JParameter($menu->params); } // resolve link $link = self::_resolveLink($menu); // language if (isset($menu->language)) { $link .= $this->getLangauge($menu->language); } if ($params->get('secure')) { $link = self::toSSL($link); } $items[] = array( 'id' => self::route($link), 'name' => $title . ' / ' . $menu->alias, 'class' => $children ? 'folder menu' : 'file' ); } break; } return $items; } /** * Convert link to SSL * @param type $link * @return string */ private static function toSSL($link) { if (strcasecmp(substr($link, 0, 4), 'http') && (strpos($link, 'index.php?') !== false)) { $uri = JURI::getInstance(); // Get prefix $prefix = $uri->toString(array('host', 'port')); // trim slashes $link = trim($link, '/'); // Build the URL. $link = 'https://' . $prefix . '/' . $link; } return $link; } private static function _resolveLink($menu, $secure) { $wf = WFEditorPlugin::getInstance(); // get link from menu object $link = $menu->link; // internal link if ($link && strpos($link, 'index.php') === 0) { if ($wf->getParam('links.joomlalinks.menu_resolve_alias', 1) == 1) { // no Itemid if (strpos($link, 'Itemid=') === false) { $link .= '&Itemid=' . $menu->id; } // short link } else { $link = 'index.php?Itemid=' . $menu->id; } } return $link; } private function _types() { $db = JFactory::getDBO(); $query = $db->getQuery(true); if (is_object($query)) { $query->select('*')->from('#__menu_types')->order('title'); } else { $query = 'SELECT * FROM #__menu_types ORDER By title'; } $db->setQuery($query, 0); return $db->loadObjectList(); } private function _alias($id) { $db = JFactory::getDBO(); $user = JFactory::getUser(); $query = $db->getQuery(true); if (is_object($query)) { $query->select('params')->from('#__menu')->where('id = ' . (int) $id); } else { $query = 'SELECT params FROM #__menu WHERE id = ' . (int) $id; } $db->setQuery($query, 0); $params = new JRegistry($db->loadResult()); $query->clear(); if (is_object($query)) { $query->select('id, name, link, alias')->from('#__menu')->where(array('published = 1', 'id = ' . (int) $params->get('menu_item'), 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')'))->order('name'); } else { $query = 'SELECT id, name, link, alias' . ' FROM #__menu' . ' WHERE published = 1' . ' AND id = ' . (int) $params->get('menu_item') . ' AND access <= ' . (int) $user->get('aid') . ' ORDER BY name'; } $db->setQuery($query, 0); return $db->loadObject(); } private function _children($id) { $db = JFactory::getDBO(); $user = JFactory::getUser(); $query = $db->getQuery(true); if (is_object($query)) { $query->select('COUNT(id)')->from('#__menu')->where(array('published = 1', 'client_id = 0', 'access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')')); if ($id) { $query->where('parent_id = ' . (int) $id); } } else { if ($id) { $where = ' AND parent = ' . (int) $id; } $query = 'SELECT COUNT(id)' . ' FROM #__menu' . ' WHERE published = 1' . ' AND access <= ' . (int) $user->get('aid') . $where; } $db->setQuery($query, 0); return $db->loadResult(); } private function _menu($parent = 0, $type = 0) { $db = JFactory::getDBO(); $user = JFactory::getUser(); $query = $db->getQuery(true); if (is_object($query)) { $query->select('m.*')->from('#__menu AS m'); if ($type) { $query->innerJoin('#__menu_types AS s ON s.id = ' . (int) $type); $query->where('m.menutype = s.menutype'); } if ($parent == 0) { $parent = 1; } $query->where(array('m.published = 1', 'm.access IN (' . implode(',', $user->getAuthorisedViewLevels()) . ')', 'm.parent_id = ' . (int) $parent)); $query->order('m.lft ASC'); } else { $where = ''; $join = ''; if ($type) { $join = ' INNER JOIN #__menu_types AS s ON s.id = ' . intval($type); $where = ' AND m.menutype = s.menutype'; } $query = 'SELECT m.* FROM #__menu AS m' . $join . ' WHERE m.published = 1' . ' AND m.access <= ' . (int) $user->get('aid') . ' AND m.parent = ' . (int) $parent . $where . ' ORDER BY m.lft ASC' ; } $db->setQuery($query, 0); return $db->loadObjectList(); } private function getLangauge($language) { $db = JFactory::getDBO(); $query = $db->getQuery(true); $link = ''; if (is_object($query)) { $query->select('a.sef AS sef'); $query->select('a.lang_code AS lang_code'); $query->from('#__languages AS a'); $db->setQuery($query); $langs = $db->loadObjectList(); foreach ($langs as $lang) { if ($language == $lang->lang_code) { $language = $lang->sef; $link .= '&lang=' . $language; } } } return $link; } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ($wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkExtension::route($url); } return $url; } } ?> links/joomlalinks/img/icons.png000066600000012330150775073120012615 0ustar00PNG  IHDR iCCPICC Profile(TOA-b""6l1)4 FA$z$l 7`z1d!ԍ:55wO:zi c l,2qd#>("ⶬ^a;5'F" iZ+*Zqޤ 'QX\qQL8q-jʃ_ym1) ɝv KDHjrG ` *u{븕޲@˪g3\g0laS,+@5?eϚ漯ն~4<ع_}R Adobe Fireworks CS5 11.0.0.484 Macintosh Ifn=IDATh{p\}?ܻ+I~,ٵȎ)$Ly4LBGԙv $L@3a6褍)L3ngq1㗂L?aڕ֫ݽ{.+ݕCf읽|s֚3䇊4 'k7lX)qf7?iFp7gvbʞ능糯\##ax+lVa>1ovw38<\lxWļyalV =t]y%{f0q`"ÇJ0%8U t-X+r.<\<+ҵ`ppBn8)v:-]]@M 3gd|r@MM0Mt03d4;xOvvRWWwd$cC2~ =֤ۖ-#$йhH'\k{^϶RFֲ8{{c VcXLo l: 9G|؏> H/3?|rJZ[G(ʑ#Gx|׮kKlݼDi_ߔm 9eM%J1::>v՚N ! `MSJ$ ~S\x#ok׮]`D"׽7hrZ$_֚H$Ž}R3{G:DWW1;nD? Dc1gb?}'wx7j)9:f$n"oTLZ_[_u$!qV%z0'OSԘfQ##&R+i R 9sPJP6M X4v])>bxF)R˗c66q:bC:L&!HX+R__O<'"pyk+P)%(5&ZWahRh /F)*0 -%Hsj*:-E֚z2 3cb߼;׋$,]kv9RPLOkZfO2BK&5)9 'JƆϞZ~ KS_H])cpYYxcݩ2%~qWL=Fۣp\uT)aS>1=Y69HiH~9ri>wRJˮc,iHi璆:i/SJZ!x)ޡwϟ "~y c2cWneeJK$уhϞW{Y>eʽc:Vbì%T%0L];קʱί\MTghavc#--4aҬR_ XW]?[΂FĻ'I=łK5! rE%jfb{')'%ΜL $v\ 1[[vv۶],+ _ߺuk_rkmiiYYXVqZb!G~xF`jRʨeY {{{q]kRpΝuSN4Mjժm}%㦔ZsNT~Bttt܌\.gTlѣ,_@ @2 T¸L&YlNeV\G?с|F2;nB}gΜy<9]~z,c|?ȸr9öqV0Lr+Pu*1 [aa܄ujR%Klm"EMQ8Lɣ>*(S(غiӉRGb՚;)(Ǐub\NJ!xСq)(y2@/~]j)lf*<ʄkG)jZv~bblEy_@;ĭBu)d˕Am(}}}Ez4b,֧&ty.0,G_OgVK >99üG)a"@)EdXSXűC<醰B@CC؆Hy7J&I_H|h OoWN\H5 |eBH,HƋ_`&;nXtl 6+2 D`[*([V̊ K-y_hM[O84 )"0D"pⴊj@&hCͷCd{Z%4BZS)!D=0mf9uz"/{e鳙>J wΝ烕?B&Ǿa1AƗ?zjŅ?Ļ{9ӱuܯu.7i <ٻ8R7O)L'{q|_}} WS W8ݗckrBR̼hV^{˒OoeX!DeMIfz^ҕ5pObc8YFU\M9~FĦ(mιMD+hO5e,.>OZdZ'y@J\ɧϰO+_E|/C7_0yʕ|*AEI(RB-DbOrwrRbHia򵔼)cXէHRׇ-[ ? #ml~C;T)Zko۾}g۷oooZI#ȷiH$j'T*Ύ;~ǎR;U;LXyX <8xG{6 50Eh Ø8@[[7Zv] 0ru'=U^z饾x(2PJe vcVXѶdɒ|Svضm[߬Y֭cK&97d2#ݱe֬Ym۶mst]hkh[z7soFL)f4TG[7n7W^@[[GbM.>DF|ug'LӼw3ivv.{^ԥ"ȺIτBwӝKڱUٹݻP(3~.P:v,ˡ6mBlf/vy2$ZabS0[ǗK(`Te(0&ƴ"`\!DyV8 je/vQBSIENDB`links/joomlalinks/img/index.html000066600000000054150775073120012771 0ustar00links/joomlalinks/content.php000066600000042041150775073120012405 0ustar00 $browser =JContentEditor::getInstance(); * * @access public * @return JCE The editor object. * @since 1.5 */ public static function getInstance() { static $instance; if (!is_object($instance)) { $instance = new JoomlalinksContent(); } return $instance; } public function getOption() { return $this->_option; } public function getList() { $wf = WFEditorPlugin::getInstance(); if ($wf->checkAccess('links.joomlalinks.content', 1)) { return '
  • '; } } public function getLinks($args) { $wf = WFEditorPlugin::getInstance(); require_once(JPATH_SITE . '/components/com_content/helpers/route.php'); $items = array(); $view = isset($args->view) ? $args->view : ''; $language = ''; switch ($view) { // get top-level sections / categories default: $sections = self::_getSection(); foreach ($sections as $section) { $url = ''; // Joomla! 1.5 if (method_exists('ContentHelperRoute', 'getSectionRoute')) { $id = ContentHelperRoute::getSectionRoute($section->id); $view = 'section'; } else { if (isset($category->language)) { $language = $category->language; } $id = ContentHelperRoute::getCategoryRoute($section->slug, $language); $view = 'category'; } if (strpos($id, 'index.php?Itemid=') !== false) { $url = self::_getMenuLink($id); $id = 'index.php?option=com_content&view=' . $view . '&id=' . $section->id; } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $section->title, 'class' => 'folder content' ); } // Check Static/Uncategorized permissions if (!defined('JPATH_PLATFORM') && $wf->checkAccess('static', 1)) { $items[] = array( 'id' => 'option=com_content&view=uncategorized', 'name' => WFText::_('WF_LINKS_JOOMLALINKS_UNCATEGORIZED'), 'class' => 'folder content nolink' ); } break; // get categories in section or sub-categories (Joomla! 1.6+) case 'section': $articles = array(); // Joomla! 1.5 if (method_exists('ContentHelperRoute', 'getSectionRoute')) { $categories = WFLinkBrowser::getCategory($args->id, 'com_content'); } else { $categories = WFLinkBrowser::getCategory('com_content', $args->id); // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles) $articles = self::_getArticles($args->id); } foreach ($categories as $category) { $url = ''; if (isset($category->language)) { $language = $category->language; } $id = ContentHelperRoute::getCategoryRoute($category->id, $args->id, $language); if (strpos($id, 'index.php?Itemid=') !== false) { $url = self::_getMenuLink($id); $id = 'index.php?option=com_content&view=category&id=' . $category->id; } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder content' ); } if (!empty($articles)) { // output article links foreach ($articles as $article) { // Joomla! 1.5 if (isset($article->sectionid)) { $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid); } else { if (isset($article->language)) { $language = $article->language; } $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $language); } $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $article->title . ' / ' . $article->alias, 'class' => 'file' ); $anchors = self::getAnchors($article->content); foreach ($anchors as $anchor) { $items[] = array( 'id' => $id . '#' . $anchor, 'name' => '#' . $anchor, 'class' => 'file anchor' ); } } } break; // get articles and / or sub-categories case 'category': // get any articles in this category (in Joomla! 1.6+ a category can contain sub-categories and articles) $articles = self::_getArticles($args->id); if (defined('JPATH_PLATFORM')) { // get sub-categories $categories = WFLinkBrowser::getCategory('com_content', $args->id); if (count($categories)) { foreach ($categories as $category) { // check for sub-categories $sub = WFLinkBrowser::getCategory('com_content', $category->id); // language if (isset($category->language)) { $language = $category->language; } $url = ''; $id = ContentHelperRoute::getCategoryRoute($category->id, $language); // get sub-categories if (count($sub)) { $url = $id; $id = 'index.php?option=com_content&view=section&id=' . $category->id; // no sub-categories, get articles for category } else { // no com_content, might be link like index.php?ItemId=1 if (strpos($id, 'index.php?Itemid=') !== false) { $url = $id; //$id; $id = 'index.php?option=com_content&view=category&id=' . $category->id; } } if (strpos($url, 'index.php?Itemid=') !== false) { $url = self::_getMenuLink($url); } $items[] = array( 'url' => self::route($url), 'id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder content' ); } } } // output article links foreach ($articles as $article) { // Joomla! 1.5 if (isset($article->sectionid)) { $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid); } else { // language if (isset($article->language)) { $language = $article->language; } $id = ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $language); } $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $article->title . ' / ' . $article->alias, 'class' => 'file' ); $anchors = self::getAnchors($article->content); foreach ($anchors as $anchor) { $items[] = array( 'id' => $id . '#' . $anchor, 'name' => '#' . $anchor, 'class' => 'file anchor' ); } } break; case 'uncategorized': $statics = self::_getUncategorized(); foreach ($statics as $static) { // language if (isset($static->language)) { $language = $static->language; } $id = ContentHelperRoute::getArticleRoute($static->id, 0, $language); $id = self::route($id); $items[] = array( 'id' => $id, 'name' => $static->title . ' / ' . $static->alias, 'class' => 'file' ); $anchors = self::getAnchors($statics->content); foreach ($anchors as $anchor) { $items[] = array( 'id' => $id . '#' . $anchor, 'name' => '#' . $anchor, 'class' => 'file anchor' ); } } break; } return $items; } private function _getMenuLink($url) { $wf = WFEditorPlugin::getInstance(); // resolve the url from the menu link if ($wf->getParam('links.joomlalinks.article_resolve_alias', 1) == 1) { // get itemid preg_match('#Itemid=([\d]+)#', $url, $matches); // get link from menu if (count($matches) > 1) { $menu = JTable::getInstance('menu'); $menu->load($matches[1]); if ($menu->link) { return $menu->link . '&Itemid=' . $menu->id; } } } return $url; } private function _getSection() { $db = JFactory::getDBO(); $user = JFactory::getUser(); if (method_exists('JUser', 'getAuthorisedViewLevels')) { return WFLinkBrowser::getCategory('com_content'); } else { $query = 'SELECT id, title, alias, access' . ' FROM #__sections' . ' WHERE published = 1' . ' AND access <= ' . (int) $user->get('aid') //. ' GROUP BY id' . ' ORDER BY title' ; $db->setQuery($query); return $db->loadObjectList(); } } private function _getArticles($id) { $db = JFactory::getDBO(); $user = JFactory::getUser(); $wf = WFEditorPlugin::getInstance(); $query = $db->getQuery(true); $version = new JVersion(); $language = $version->isCompatible('3.0') ? ', a.language' : ''; $case = ''; if ($wf->getParam('links.joomlalinks.article_alias', 1) == 1) { if (is_object($query)) { //sqlsrv changes $case_when1 = ' CASE WHEN '; $case_when1 .= $query->charLength('a.alias', '!=', '0'); $case_when1 .= ' THEN '; $a_id = $query->castAsChar('a.id'); $case_when1 .= $query->concatenate(array($a_id, 'a.alias'), ':'); $case_when1 .= ' ELSE '; $case_when1 .= $a_id . ' END as slug'; $case_when2 = ' CASE WHEN '; $case_when2 .= $query->charLength('b.alias', '!=', '0'); $case_when2 .= ' THEN '; $c_id = $query->castAsChar('b.id'); $case_when2 .= $query->concatenate(array($c_id, 'b.alias'), ':'); $case_when2 .= ' ELSE '; $case_when2 .= $c_id . ' END as catslug'; } else { $case_when1 = ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug'; $case_when2 = ' CASE WHEN CHAR_LENGTH(b.alias) THEN CONCAT_WS(":", b.id, b.alias) ELSE b.id END as catslug'; } $case = ',' . $case_when1 . ',' . $case_when2; } if (is_object($query)) { $groups = implode(',', $user->getAuthorisedViewLevels()); $query->select('a.id AS slug, b.id AS catslug, a.alias, a.title AS title, a.access, ' . $query->concatenate(array('a.introtext', 'a.fulltext')) . ' AS content' . $language . $case); $query->from('#__content AS a'); $query->innerJoin('#__categories AS b ON b.id = ' . (int) $id); $query->where('a.catid = ' . (int) $id); $query->where('a.access IN (' . $groups . ')'); $query->where('b.access IN (' . $groups . ')'); $query->where('a.state = 1'); $query->order('a.title'); } else { $query = 'SELECT a.id AS slug, b.id AS catslug, a.alias, a.title AS title, u.id AS sectionid, a.access, a.introtext, a.fulltext' . $case . ' FROM #__content AS a' . ' INNER JOIN #__categories AS b ON b.id = ' . (int) $id . ' INNER JOIN #__sections AS u ON u.id = a.sectionid' . ' WHERE a.catid = ' . (int) $id . ' AND a.state = 1' . ' AND a.access <= ' . (int) $user->get('aid') . ' ORDER BY a.title'; } $db->setQuery($query, 0); return $db->loadObjectList(); } private function _getUncategorized() { $db = JFactory::getDBO(); $user = JFactory::getUser(); $version = new JVersion(); $language = $version->isCompatible('3.0') ? ', language' : ''; $query = 'SELECT id, title, alias, access, introtext AS content' . $language . ' FROM #__content' . ' WHERE state = 1' . ' AND access <= ' . (int) $user->get('aid') . ' AND sectionid = 0' . ' AND catid = 0' . ' ORDER BY title'; $db->setQuery($query, 0); return $db->loadObjectList(); } private function getItemId($url) { } private static function getAnchors($content) { preg_match_all('#]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER); $anchors = array(); if (!empty($matches)) { foreach ($matches as $match) { if (strpos($match[0], 'href') === false) { $anchors[] = $match[3]; } } } return $anchors; } private static function route($url) { $wf = WFEditorPlugin::getInstance(); if ($wf->getParam('links.joomlalinks.sef_url', 0)) { $url = WFLinkExtension::route($url); } return $url; } } ?>search/js/index.html000066600000000054150775073120010434 0ustar00search/js/link.js000066600000004312150775073120007733 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ var WFLinkSearch=WFExtensions.add('LinkSearch',{options:{element:'#search-input',button:'#search-button',clear:'span.search-icon',empty:'No Results',onClick:$.noop},init:function(options){$.extend(this.options,options);var self=this,el=this.options.element,btn=this.options.button;$(btn).click(function(e){self.search();e.preventDefault();}).button({icons:{primary:'ui-icon-search'}});$(this.options.clear).addClass('ui-icon ui-icon-circle-close').click(function(e){if($(this).hasClass('clear')){$(this).removeClass('clear');$(el).val('');$('#search-result').empty().hide();}});$('#search-options-button').click(function(){$(this).toggleClass('active');var $p=$('#search-options').parent();$('#search-options').height($p.parent().height()-$p.outerHeight()).toggle();}).on('close',function(){$(this).removeClass('active');$('#search-options').hide();});},search:function(){var self=this,s=this.options,el=s.element,btn=s.button,$p=$('#search-result').parent();var query=$(el).val();if(!query||$(el).hasClass('placeholder')){return;} $(this.options.clear).addClass('loading');query=$.trim(query.replace(/[\///<>#]/g,''));$.JSON.request('doSearch',{'json':[query]},function(o){if(o){if(!o.error){$('#search-result').empty();if(o.length){$.each(o,function(i,n){var $dl=$('
    ').appendTo('#search-result');$('
    '+n.text+'
    ').appendTo($dl);if(n.anchors){$.each(n.anchors,function(i,a){$('
    ').text(a).click(function(){self.options.onClick.call(this,$.String.decode(n.link+'#'+a));}).appendTo($dl);});}});$('dl:odd','#search-result').addClass('odd');}else{$('#search-result').append('

    '+s.empty+'

    ');} $('#search-options-button').trigger('close');$('#search-result').height($p.parent().height()-$p.outerHeight()).show();}else{$.Dialog.alert(o.error);}} $(self.options.clear).removeClass('loading').addClass('clear');},self);}});search/index.html000066600000000054150775073120010020 0ustar00search/link.xml000066600000002772150775073120007513 0ustar00 WF_LINK_SEARCH_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_LINK_SEARCH_DESC link.php link link search/css/index.html000066600000000054150775073120010610 0ustar00search/css/link.css000066600000006470150775073120010272 0ustar00/*JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/ div#search-browser span#searchbox{position:relative;}div#search-browser input[type="checkbox"],div#search-browser input[type="radio"]{border:0 none;}div#search-browser button{vertical-align:middle;}div#search-browser span#searchbox input#search-input{height:20px;line-height:18px;margin:0;padding:2px;width:350px;vertical-align:middle;}#jce.ie8 div#search-browser span#searchbox input#search-input{width:346px;}div#search-browser span#searchbox span.search-icon{height:16px;position:absolute;right:4px;top:0;width:16px;visibility:hidden;}div#search-browser span#searchbox span.search-icon.clear{visibility:visible;opacity:.5;filter:alpha(opacity=50);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";cursor:pointer;}div#search-browser span#searchbox span.search-icon.loading{background:url("../../../libraries/img/load.gif") no-repeat center;visibility:visible;}div#search-browser div#search-result{width:100%;height:100%;position:absolute;display:none;background:#fff none;margin:2px 0;border:1px solid #ccc;overflow-x:hidden;overflow-y:scroll;}div#search-browser div#search-result p{color:#DDD;font-size:1.5em;font-weight:bold;margin:1px 2px;padding:10px 0;text-align:center;}div#search-browser div#search-result dl{margin:5px 0;padding:5px;}div#search-browser div#search-result dl dt{cursor:pointer;font-weight:bold;margin:10px 0 5px 0;text-decoration:underline;text-overflow:ellipsis;overflow:hidden;white-space:pre;}div#search-browser div#search-result dl dt:first-child{margin:0 0 5px 0;}div#search-browser div#search-result dl dt.link{background:url("../../../libraries/img/icons.png") no-repeat 0 -400px;line-height:20px;padding:0 0 0 22px;}div#search-browser div#search-result dl dd span.highlight{background:#b4d4ff none;}div#search-browser div#search-result dl dd.text{padding:5px;}div#search-browser div#search-result dl.odd{background-color:#F5F5F5;}div#search-browser div#search-result dl dd.anchor{background:#fff url("../../../libraries/img/icons.png") no-repeat 0 -1280px;line-height:20px;padding:0 0 0 22px;cursor:pointer;}div#search-browser #search-options{display:none;position:absolute;background:#fff none;border:1px solid #ccc;margin:2px 0;-moz-box-shadow:1px 1px 3px #ccc;-webkit-box-shadow:1px 1px 3px #ccc;box-shadow:1px 1px 3px #ccc;z-index:999;width:100%;}div#search-browser #search-options fieldset{margin:5px;padding:5px;}div#search-browser #search-options fieldset div{margin:5px 0;}div#search-browser #search-options label{min-width:40px;}div#search-browser #search-options-button{display:inline-block;cursor:pointer;margin:0 2px;height:20px;background:#ffF none;}div#search-browser #search-options-button span.icon{background:url("../../../libraries/img/icons.png") no-repeat 0 -1260px;width:20px;height:20px;display:inline-block;vertical-align:middle;}div#search-browser #search-options-button.active{height:28px;position:absolute;right:1px;z-index:1000;border:1px solid #ccc;border-bottom:0;width:24px;}div#search-browser #search-options-button.active span.icon{margin:2px;}div#search-options fieldset.search_only ul{list-style:none;padding:0;margin:0;}div#search-options fieldset.search_only ul li{display:inline-block;}search/link.php000066600000021766150775073120007506 0ustar00setRequest(array($this, 'doSearch')); $request->setRequest(array($this, 'getAreas')); $wf = WFEditorPlugin::getInstance(); $plugins = $wf->getParam('search.link.plugins'); // use tested defaults if (empty($plugins)) { $plugins = array('categories', 'contacts', 'content', 'newsfeeds', 'weblinks'); } foreach ($plugins as $plugin) { if (JPluginHelper::isEnabled('search', $plugin)) { JPluginHelper::importPlugin('search', $plugin); } } } public function getInstance() { static $instance; if (!isset($instance)) { $instance = new WFSearchExtension(); } return $instance; } public function display() { parent::display(); $document = WFDocument::getInstance(); $document->addScript(array('link'), 'extensions.search.js'); $document->addStylesheet(array('link'), 'extensions.search.css'); } public function isEnabled() { $wf = WFEditorPlugin::getInstance(); return (bool) $wf->getParam('search.link.enable', 1); } /** * Method to get the search areas */ public function getAreas() { $app = JFactory::getApplication('site'); $areas = array(); $results = array(); $event = WF_JOOMLA15 ? 'onSearchAreas' : 'onContentSearchAreas'; $searchareas = $app->triggerEvent($event); foreach ($searchareas as $area) { if (is_array($area)) { $areas = array_merge($areas, $area); } } foreach ($areas as $k => $v) { $results[$k] = JText::_($v); } return $results; } /* * Render Search fields * This method uses portions of SearchViewSearch::display from components/com_search/views/search/view.html.php * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. */ public function render() { // built select lists $orders = array(); $orders[] = JHtml::_('select.option', 'newest', JText::_('WF_SEARCH_NEWEST_FIRST')); $orders[] = JHtml::_('select.option', 'oldest', JText::_('WF_SEARCH_OLDEST_FIRST')); $orders[] = JHtml::_('select.option', 'popular', JText::_('WF_SEARCH_MOST_POPULAR')); $orders[] = JHtml::_('select.option', 'alpha', JText::_('WF_SEARCH_ALPHABETICAL')); $orders[] = JHtml::_('select.option', 'category', JText::_('WF_CATEGORY')); $lists = array(); $lists['ordering'] = JHtml::_('select.genericlist', $orders, 'ordering', 'class="inputbox"', 'value', 'text'); $searchphrases = array(); $searchphrases[] = JHtml::_('select.option', 'all', JText::_('WF_SEARCH_ALL_WORDS')); $searchphrases[] = JHtml::_('select.option', 'any', JText::_('WF_SEARCH_ANY_WORDS')); $searchphrases[] = JHtml::_('select.option', 'exact', JText::_('WF_SEARCH_EXACT_PHRASE')); $lists['searchphrase'] = JHtml::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', 'all'); $view = $this->getView('search'); $view->assign('searchareas', self::getAreas()); $view->assign('lists', $lists); $view->display(); } /** * Process search * @param type $query Search query * @return array Rerach Results * * This method uses portions of SearchController::search from components/com_search/controller.php * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. */ public function doSearch($query) { $wf = WFEditorPlugin::getInstance(); $filter = JFilterInput::getInstance(); if (!class_exists('JSite')) { // Load JSite class JLoader::register('JSite', JPATH_SITE . '/includes/application.php'); } $app = JApplication::getInstance('site'); $router = $app->getRouter('site'); // get SearchHelper require_once(JPATH_ADMINISTRATOR . '/components/com_search/helpers/search.php'); // get router mode $sef = (int) $wf->getParam('search.link.sef_url', 0); // set router off so a raw url is returned by the Search plugin if ($router) { $router->setMode(0); } // slashes cause errors, <> get stripped anyway later on. # causes problems. $searchword = trim(str_replace(array('#', '>', '<', '\\'), '', $filter->clean($query))); $ordering = JRequest::getWord('ordering', null, 'post'); $searchphrase = JRequest::getWord('searchphrase', 'all', 'post'); $areas = JRequest::getVar('areas', null, 'post', 'array'); // if searchword enclosed in double quotes, strip quotes and do exact match if (substr($searchword, 0, 1) == '"' && substr($searchword, -1) == '"') { $searchword = substr($searchword, 1, -1); $searchphrase = 'exact'; } // clean areas if (!empty($areas)) { foreach ($areas as $area) { $areas[] = $filter->clean($area, 'cmd'); } } $event = WF_JOOMLA15 ? 'onSearch' : 'onContentSearch'; // trigger search on loaded plugins $searches = $app->triggerEvent($event, array( $searchword, $searchphrase, $ordering, $areas )); $results = array(); $rows = array(); foreach ($searches as $search) { $rows = array_merge((array) $rows, (array) $search); } for ($i = 0, $count = count($rows); $i < $count; $i++) { $row = &$rows[$i]; $result = new StdClass(); if ($searchphrase == 'exact') { $searchwords = array($searchword); $needle = $searchword; } else { $searchworda = preg_replace('#\xE3\x80\x80#s', ' ', $searchword); $searchwords = preg_split("/\s+/u", $searchworda); $needle = $searchwords[0]; } // get anchors $anchors = self::getAnchors($row->text); if (!empty($anchors)) { $row->anchors = $anchors; } if (method_exists('SearchHelper', 'getActions')) { $row->text = SearchHelper::prepareSearchContent($row->text, $needle); } else { $row->text = SearchHelper::prepareSearchContent($row->text, 200, $needle); } $searchwords = array_unique($searchwords); $searchRegex = '#('; $x = 0; foreach ($searchwords as $k => $hlword) { $searchRegex .= ($x == 0 ? '' : '|'); $searchRegex .= preg_quote($hlword, '#'); $x++; } $searchRegex .= ')#iu'; $row->text = preg_replace($searchRegex, '\0', $row->text); // remove base url if (strpos($row->href, JURI::base(true)) !== false) { $row->href = substr_replace($row->href, '', 0, strlen(JURI::base(true)) + 1); } // convert to SEF if ($router && $sef) { $router->setMode(1); $url = str_replace('&', '&', $row->href); $uri = $router->build($url); $url = $uri->toString(); $row->href = str_replace('/administrator/', '/', $url); } $result->title = $row->title; $result->text = $row->text; $result->link = $row->href; $results[] = $result; } return $results; } private static function getAnchors($content) { preg_match_all('#]+)(name|id)="([a-z]+[\w\-\:\.]*)"([^>]*)>#i', $content, $matches, PREG_SET_ORDER); $anchors = array(); if (!empty($matches)) { foreach ($matches as $match) { if (strpos($match[0], 'href') === false) { $anchors[] = $match[3]; } } } return $anchors; } }filesystem/joomla.php000066600000051015150775073120010737 0ustar00setProperties(array( 'local' => true, 'upload' => array( 'stream' => false, //'chunking' => $chunking, 'unique_filenames' => true ) )); } /** * Get the base directory. * @return string base dir */ function getBaseDir() { return WFUtility::makePath(JPATH_SITE, $this->getRootDir()); } /** * Get the full base url * @return string base url */ function getBaseURL() { return WFUtility::makePath(JURI::root(true), $this->getRootDir()); } /** * Return the full user directory path. Create if required * * @param string The base path * @access public * @return Full path to folder */ function getRootDir() { static $root; if (!isset($root)) { $root = parent::getRootDir(); $wf = WFEditorPlugin::getInstance(); // Restricted Joomla! folders $restricted = explode(',', $wf->getParam('editor.filesystem.joomla.restrict_dir', 'administrator,cache,components,includes,language,libraries,logs,media,modules,plugins,templates,xmlrpc')); $allowroot = $wf->getParam('editor.filesystem.joomla.allow_root', 0); // Revert to default if empty if (empty($root) && !$allowroot) { $root = 'images'; } // Force default if directory is a joomla directory $parts = explode('/', $root); if (in_array(strtolower($parts[0]), $restricted) && !$allowroot) { $root = 'images'; } if (!empty($root)) { // Create the folder $full = WFUtility::makePath(JPATH_SITE, $root); if (!JFolder::exists($full)) { $this->folderCreate($full); } // Fallback $root = JFolder::exists($full) ? $root : 'images'; } } return $root; } function toAbsolute($path) { return WFUtility::makePath($this->getBaseDir(), $path); } function toRelative($path, $isabsolute = true) { // path is relative to Joomla! root, eg: images/folder if ($isabsolute === false) { return rtrim($path, $this->getRootDir()); } // path is absolute return rtrim($path, $this->getBaseDir()); } /** * Determine whether FTP mode is enabled * @return boolean */ function isFtp() { // Initialize variables jimport('joomla.client.helper'); $FTPOptions = JClientHelper::getCredentials('ftp'); return $FTPOptions['enabled'] == 1; } /** * Count the number of folders in a given folder * @return integer Total number of folders * @param string $path Absolute path to folder */ public function countFolders($path) { jimport('joomla.filesystem.folder'); $total = 0; if (strpos($path, $this->getBaseDir()) === false) { $path = WFUtility::makePath($this->getBaseDir(), $path); } if (JFolder::exists($path)) { $folders = JFolder::folders($path); return count($folders); } return 0; } /** * Count the number of files in a folder * @return integer File total * @param string $path Absolute path to folder */ public function countFiles($path) { jimport('joomla.filesystem.file'); if (strpos($path, $this->getBaseDir()) === false) { $path = WFUtility::makePath($this->getBaseDir(), $path); } if (JFolder::exists($path)) { $files = JFolder::files($path, '.', false, false, array('index.html', 'thumbs.db')); return count($files); } return 0; } function getFolders($relative, $filter = '') { $path = WFUtility::makePath($this->getBaseDir(), $relative); $path = WFUtility::fixPath($path); if (!JFolder::exists($path)) { $relative = '/'; $path = $this->getBaseDir(); } $list = JFolder::folders($path, $filter); $folders = array(); if (!empty($list)) { // Sort alphabetically natcasesort($list); foreach ($list as $item) { $item = WFUtility::isUTF8($item) ? $item : utf8_encode($item); $data = array( 'id' => WFUtility::makePath($relative, $item, '/'), 'name' => $item, 'writable' => is_writable(WFUtility::makePath($path, $item)) || $this->isFtp(), 'type' => 'folders' ); $properties = self::getFolderDetails($data['id']); $folders[] = array_merge($data, array('properties' => $properties)); } } return $folders; } function getFiles($relative, $filter = '') { $path = WFUtility::makePath($this->getBaseDir(), $relative); $path = WFUtility::fixPath($path); if (!JFolder::exists($path)) { $relative = '/'; $path = $this->getBaseDir(); } $list = JFolder::files($path, $filter); $files = array(); $x = 1; if (!empty($list)) { // Sort alphabetically natcasesort($list); foreach ($list as $item) { $item = WFUtility::isUTF8($item) ? $item : utf8_encode($item); // create relative file $id = WFUtility::makePath($relative, $item, '/'); // create url $url = WFUtility::makePath($this->getRootDir(), $id, '/'); // remove leading slash $url = ltrim($url, '/'); $data = array( 'id' => $id, 'url' => $url, 'name' => $item, 'writable' => is_writable(WFUtility::makePath($path, $item)) || $this->isFtp(), 'type' => 'files' ); $properties = self::getFileDetails($data['id'], $x); $files[] = array_merge($data, array('properties' => $properties)); $x++; } } return $files; } /** * Get a folders properties * * @return array Array of properties * @param string $dir Folder relative path * @param string $types File Types */ function getFolderDetails($dir) { clearstatcache(); $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($dir)); $date = @filemtime($path); return array('modified' => $date); } /** * Get the source directory of a file path */ function getSourceDir($path) { // return nothing if absolute $path if (preg_match('#^(file|http(s)?):\/\/#', $path)) { return ''; } // remove leading / trailing slash //$path = trim($path, '/'); // directory path relative to base dir if (is_dir(WFUtility::makePath($this->getBaseDir(), $path))) { return $path; } // file url relative to site root if (is_file(WFUtility::makePath(JPATH_SITE, $path))) { return substr(dirname($path), strlen($this->getRootDir())); } return ''; } function isMatch($needle, $haystack) { return $needle == $haystack; } /** * Return constituent parts of a file path eg: base directory, file name * @param $path Relative or absolute path */ public function pathinfo($path) { return pathinfo($path); } /** * Get a files properties * * @return array Array of properties * @param string $file File relative path */ public function getFileDetails($file, $count = 1) { clearstatcache(); $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($file)); $url = WFUtility::makePath($this->getBaseUrl(), rawurldecode($file)); $date = @filemtime($path); $size = @filesize($path); $data = array( 'size' => $size, 'modified' => $date ); if (preg_match('#\.(jpg|jpeg|bmp|gif|tiff|png)#i', $file) && $count <= 100) { $props = @getimagesize($path); /* if (preg_match('#\.(jpg|jpeg|tiff)#i', $file)) { $data = exif_read_data($path, 'IDF0', true, false); if ($data !== false) { $idf = isset($data['IDF0']) ? $data['IDF0'] : array(); $exif = isset($data['EXIF']) ? $data['EXIF'] : array(); $data = array_merge($idf, $exif); } } */ $width = $props[0]; $height = $props[1]; $image = array( 'width' => $width, 'height' => $height, 'preview' => WFUtility::cleanPath($url, '/') ); return array_merge_recursive($data, $image); } return $data; } /** * Delete the relative file(s). * @param $files the relative path to the file name or comma seperated list of multiple paths. * @return string $error on failure. */ public function delete($src) { $path = WFUtility::makePath($this->getBaseDir(), $src); // get error class $result = new WFFileSystemResult(); $path = WFUtility::makePath($this->getBaseDir(), $src); if (is_file($path)) { $result->type = 'files'; $result->state = JFile::delete($path); } else if (is_dir($path)) { $result->type = 'folders'; if ($this->countFiles($path) > 0 || $this->countFolders($path) > 0) { $result->message = JText::sprintf('WF_MANAGER_FOLDER_NOT_EMPTY', basename($path)); } else { $result->state = JFolder::delete($path); } } return $result; } /** * Rename a file. * @param string $src The relative path of the source file * @param string $dest The name of the new file * @return string $error */ public function rename($src, $dest) { $src = WFUtility::makePath($this->getBaseDir(), rawurldecode($src)); $dir = dirname($src); $result = new WFFileSystemResult(); if (is_file($src)) { $ext = JFile::getExt($src); $file = $dest . '.' . $ext; $path = WFUtility::makePath($dir, $file); if (is_file($path)) { return $result; } $result->type = 'files'; $result->state = JFile::move($src, $path); $result->path = $path; } else if (is_dir($src)) { $path = WFUtility::makePath($dir, $dest); if (is_dir($path)) { return $result; } $result->type = 'folders'; $result->state = JFolder::move($src, $path); $result->path = $path; } return $result; } /** * Copy a file. * @param string $files The relative file or comma seperated list of files * @param string $dest The relative path of the destination dir * @return string $error on failure */ public function copy($file, $destination) { $result = new WFFileSystemResult(); $src = WFUtility::makePath($this->getBaseDir(), $file); $dest = WFUtility::makePath($this->getBaseDir(), WFUtility::makePath($destination, basename($file))); // src is a file if (is_file($src)) { $result->type = 'files'; $result->state = JFile::copy($src, $dest); } else if (is_dir($src)) { // Folders cannot be copied into themselves as this creates an infinite copy / paste loop if ($file === $destination) { $result->state = false; $result->message = WFText::_('WF_MANAGER_COPY_INTO_ERROR'); } $result->type = 'folders'; $result->state = JFolder::copy($src, $dest); $result->path = $dest; } return $result; } /** * Copy a file. * @param string $files The relative file or comma seperated list of files * @param string $dest The relative path of the destination dir * @return string $error on failure */ public function move($file, $destination) { $result = new WFFileSystemResult(); $src = WFUtility::makePath($this->getBaseDir(), $file); $dest = WFUtility::makePath($this->getBaseDir(), WFUtility::makePath($destination, basename($file))); if ($src != $dest) { // src is a file if (is_file($src)) { $result->type = 'files'; $result->state = JFile::move($src, $dest); } else if (is_dir($src)) { $result->type = 'folders'; $result->state = JFolder::move($src, $dest); $result->path = $dest; } } return $result; } /** * New folder base function. A wrapper for the JFolder::create function * @param string $folder The folder to create * @return boolean true on success */ public function folderCreate($folder) { if (@JFolder::create($folder)) { $buffer = ''; JFile::write($folder . '/index.html', $buffer); } else { return false; } return true; } /** * New folder * @param string $dir The base dir * @param string $new_dir The folder to be created * @return string $error on failure */ public function createFolder($dir, $new) { $dir = WFUtility::makePath(rawurldecode($dir), $new); $path = WFUtility::makePath($this->getBaseDir(), $dir); $result = new WFFileSystemResult(); $result->state = $this->folderCreate($path); return $result; } public function getDimensions($file) { $path = WFUtility::makePath($this->getBaseDir(), utf8_decode(rawurldecode($file))); $data = array( 'width' => '', 'height' => '' ); if (file_exists($path)) { $dim = @getimagesize($path); $data = array( 'width' => $dim[0], 'height' => $dim[1] ); } return $data; } public function upload($method = 'multipart', $src, $dir, $name, $chunks = 1, $chunk = 0) { jimport('joomla.filesystem.file'); $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($dir)); $dest = WFUtility::makePath($path, $name); // check for safe mode $safe_mode = false; if (function_exists('ini_get')) { $safe_mode = ini_get('safe_mode'); } else { $safe_mode = true; } $result = new WFFileSystemResult(); // get overwrite state $conflict = $this->get('upload_conflict', 'overwrite'); // get suffix $suffix = WFFileBrowser::getFileSuffix(); switch ($method) { case 'multipart' : if ($conflict == 'unique') { // get extension $extension = JFile::getExt($name); // get name without extension $name = JFile::stripExt($name); while (JFile::exists($dest)) { $name .= $suffix; $dest = WFUtility::makePath($path, $name . '.' . $extension); } } if (JFile::upload($src, $dest)) { $result->state = true; $result->path = $dest; } break; case 'multipart-chunking' : if ($safe_mode || !is_writable(dirname($dest))) { $result->message = WFText::_('WF_MANAGER_UPLOAD_NOSUPPORT'); $result->code = 103; } else { if ($chunk == 0 && $overwrite) { // get extension $extension = JFile::getExt($name); // get name without extension $name = JFile::stripExt($name); // make unique file name while (JFile::exists($dest)) { $name .= $suffix; $dest = WFUtility::makePath($path, $name . '.' . $extension); } } $out = fopen($dest, $chunk == 0 ? "wb" : "ab"); if ($out) { // Read binary input stream and append it to temp file $in = fopen($src, "rb"); if ($in) { while ($buff = fread($in, 4096)) { fwrite($out, $buff); } fclose($in); fclose($out); @unlink($src); $result->state = true; if ($chunk == $chunks - 1) { if (is_file($dest)) { $result->path = $dest; } } } else { $result->code = 102; $result->message = 'UPLOAD_INPUT_STREAM_ERROR'; } } else { $result->code = 102; $result->message = 'UPLOAD_OUTPUT_STREAM_ERROR'; } } break; case 'stream' : if ($safe_mode || !is_writable(dirname($dest))) { $result->message = WFText::_('WF_MANAGER_UPLOAD_NOSUPPORT'); } else { // Open destination file $out = fopen($dest, $chunk == 0 ? "wb" : "ab"); if ($out) { // Read binary input stream and append it to temp file $in = fopen("php://input", "rb"); if ($in) { while ($buff = fread($in, 4096)) { fwrite($out, $buff); } if (fclose($out) && is_file($dest)) { $result->state = true; $result->path = $dest; } } } } break; } return $result; } public function exists($path) { $path = JPath::clean(WFUtility::makePath($this->getBaseDir(), rawurldecode($path))); return is_dir($path) || is_file($path); } public function read($file) { $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($file)); return JFile::read($path); } public function write($file, $content) { $path = WFUtility::makePath($this->getBaseDir(), rawurldecode($file)); return JFile::write($path, $content); } public function is_file($path) { $path = WFUtility::makePath($this->getBaseDir(), $path); return is_file($path); } public function is_dir($path) { $path = WFUtility::makePath($this->getBaseDir(), $path); return is_dir($path); } } filesystem/index.html000066600000000054150775073120010737 0ustar00filesystem/joomla.xml000066600000002470150775073120010751 0ustar00 WF_FILESYSTEM_JOOMLA_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_FILESYSTEM_JOOMLA_DESC joomla.php popups/index.html000066600000000054150775073120010101 0ustar00popups/window/js/index.html000066600000000054150775073120012024 0ustar00popups/window/js/window.js000066600000006537150775073120011710 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ var JCEWindowPopup={setDimensions:function(w,h){$.Plugin.setDimensions(w,h,'window_popup_');}};WFPopups.addPopup('window',{setup:function(){},check:function(n){var ed=tinyMCEPopup.editor;var oc=ed.dom.getAttrib(n,'onclick')||ed.dom.getAttrib(n,'data-mce-onclick');return oc&&/window\.open/.test(oc);},remove:function(n){if(this.check(n)){n.removeAttribute('onclick');n.removeAttribute('data-mce-onclick');}},getAttributes:function(n){var ed=tinyMCEPopup.editor,data={};var click=ed.dom.getAttrib(n,'onclick')||ed.dom.getAttrib(n,'data-mce-onclick');var data=click.replace(/window\.open\((.*?)\);(return false;)?/,function(a,b){return b;});var parts=data.split(",'");var src=parts[0];var query=$.String.query(src);var title=(parts[1]||'').replace("'","");var features=(parts[2]||'').replace(/'$/,"");var data={};if(query.img){data.src=query.img;} $('#window_popup_title').val(title);features=$.String.query(features.replace(/,/g,'&'));$.each(features,function(k,v){switch(k){case'width':case'height':$('#window_popup_'+k+', #popup_'+k).val(v);break;case'scrollbars':case'resizable':case'location':case'menubar':case'status':case'toolbar':$('#window_popup_'+k).attr('checked',v=='yes');break;case'top':case'left':v=(parseInt(v)==0)?k:v;if(/screen\.avail(Width|Height)/.test(v)){if(/[0-9]+/.test(v)){v='center';}else{v=(k=='top')?'bottom':'right';}} if($('option[value="'+v+'"]','#window_popup_position_'+k).length==0){$('#window_popup_position_'+k).append('');} $('#window_popup_position_'+k).val(v);break;}});},setAttributes:function(n,args){var ed=tinyMCEPopup.editor,args=args||{};this.remove(n);var src=ed.dom.getAttrib(n,'href');var title=$('#window_popup_title').val()||args.title||'';var width=args.width||$('#window_popup_width').val();var height=args.height||$('#window_popup_height').val();var href=src;var query='this.href';if(/\.(jpg|jpeg|png|gif|bmp|tiff)$/i.test(src)){var params={img:src,title:title.replace(' ','_','gi')};if(width){params.width=width;} if(height){params.height=height;} href='index.php?option=com_jce&view=popup&tmpl=component';query="this.href+'&"+decodeURIComponent($.param(params))+"'";} var top=$('#window_popup_position_top').val();switch(top){case'top':top=0;break;case'center':top=height?"'+(screen.availHeight/2-"+(height/2)+")+'":0;break;case'bottom':top=height?"'+(screen.availHeight-"+height+")+'":0;break;} var left=$('#window_popup_position_left').val();switch($('#window_popup_position_left').val()){case'left':left=0;break;case'center':left=width?"'+(screen.availWidth/2-"+(width/2)+")+'":0;break;case'right':left=height?"'+(screen.availWidth-"+width+")+'":0;break;} var features={'scrollbars':'yes','resizable':'yes','location':'yes','menubar':'yes','status':'yes','toolbar':'yes'};$.each(features,function(k,def){var v=$('#window_popup_'+k).is(':checked')?'yes':'no';if(v==def){return;} features[k]=v;});$.extend(features,{'left':left,'top':top});if(width){features.width=width;} if(height){features.height=height;} ed.dom.setAttrib(n,'href',href);ed.dom.setAttrib(n,'data-mce-onclick',"window.open("+query+",'"+encodeURIComponent(title)+"','"+decodeURIComponent($.param(features)).replace(/&/g,',')+"');return false;");}});popups/window/tmpl/default.php000066600000011336150775073120012531 0ustar00
    x
    popups/window/tmpl/index.html000066600000000054150775073120012364 0ustar00popups/window/index.html000066600000000054150775073120011410 0ustar00popups/window/css/index.html000066600000000054150775073120012200 0ustar00popups/window/css/window.css000066600000000702150775073120012224 0ustar00/*JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/ #popup_extension_window input[type="text"]{width:250px;}#popup_extension_window select{width:auto;}#popup_extension_window #window_popup_width,#popup_extension_window #window_popup_height{width:50px;}#window_popup_features{display:none;}popups/window.xml000066600000002022150775073120010132 0ustar00 WF_POPUPS_WINDOW_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_POPUPS_WINDOW_DESC window.php window link,imgmanager_ext popups/jcemediabox.php000066600000005426150775073120011077 0ustar00addScript('jcemediabox', 'extensions/popups/jcemediabox/js'); $document->addStyleSheet('jcemediabox', 'extensions/popups/jcemediabox/css'); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); $path = JPATH_PLUGINS . '/system/jcemediabox/addons'; $files = JFolder::files($path, '.js'); foreach ($files as $file) { if (strpos('-src.js', $file) === false) { $scripts[] = 'plugins/system/jcemediabox/addons/' . JFile::stripExt($file); } } $document->addScript($scripts, 'joomla'); } } public function getParams() { $wf = WFEditorPlugin::getInstance(); return array( 'width' => 600, 'album' => '#jcemediabox_popup_group', 'multiple' => '#jcemediabox_popup_title,#jcemediabox_popup_caption', 'attribute' => $wf->getParam('popups.jcemediabox.attribute', 'data-mediabox'), 'popup_group' => $wf->getParam('popups.jcemediabox.popup_group', ''), 'popup_icon' => $wf->getParam('popups.jcemediabox.popup_icon', 1), 'popup_icon_position' => $wf->getParam('popups.jcemediabox.popup_icon_position', ''), 'popup_autopopup' => $wf->getParam('popups.jcemediabox.popup_autopopup', ''), 'popup_hide' => $wf->getParam('popups.jcemediabox.popup_hide', 0), 'popup_mediatype' => $wf->getParam('popups.jcemediabox.popup_mediatype', '') ); } public function isEnabled() { $wf = WFEditorPlugin::getInstance(); if (JPluginHelper::isEnabled('system', 'jcemediabox') && $wf->getParam('popups.jcemediabox.enable', 1) == 1) { return true; } return false; } public function checkVersion() { return true; } } ?>popups/jcemediabox/js/index.html000066600000000054150775073120012767 0ustar00popups/jcemediabox/js/jcemediabox.js000066600000017071150775073120013611 0ustar00/* JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */ JCEMediaBox={Popup:{addons:{},setAddons:function(n,o){if(typeof this.addons[n]=='undefined'){this.addons[n]={};} $.extend(this.addons[n],o);},getAddons:function(n){if(n){return this.addons[n];} return this.addons;},getAddon:function(v,n){var t=this,cp=false,r;var addons=this.getAddons(n);$.each(addons,function(addon,o){var fn=o[addon]||function(){};r=fn.call(this,v);if(typeof r!='undefined'){cp=r;}});return cp;}},trim:function(s){return $.trim(s);},setDimensions:function(w,h){$.Plugin.setDimensions(w,h,'jcemediabox_popup_');}};WFPopups.addPopup('jcemediabox',{params:{'attribute':'data-mediabox','popup_group':'','popup_icon':1,'popup_icon_position':'','popup_autopopup':'','popup_hide':0,'popup_mediatype':''},setup:function(){var self=this;$('#jcemediabox_popup_icon').change(function(){self.setIcon();});$('span.add','#jcemediabox_popup_params').click(function(){var $item=$('li:first','#jcemediabox_popup_params').clone().appendTo('#jcemediabox_popup_params');$('input',$item).val('');$('span.add',$item).hide();$('span.remove',$item).css('display','inline-block').click(function(){$item.remove();});});$.each(this.params,function(k,v){if(k==='popup_icon_position'){v=v.replace('icon-','zoom-');} $('#jcemediabox_'+k).val(v);});},check:function(n){return/jce(popup|_popup|lightbox)/.test(n.className);},getMediaType:function(n){var mt;switch(n.type){case'image/gif':case'image/jpeg':case'image/png':case'image/*':case'image':mt='image';break;case'iframe':mt='iframe';break;case'director':case'application/x-director':mt='application/x-director';break;case'windowsmedia':case'mplayer':case'application/x-mplayer2':mt='application/x-mplayer2';break;case'quicktime':case'video/quicktime':mt='video/quicktime';break;case'real':case'realaudio':case'audio/x-pn-realaudio-plugin':mt='audio/x-pn-realaudio-plugin';break;case'divx':case'video/divx':mt='video/divx';break;case'flash':case'application/x-shockwave-flash':mt='application/x-shockwave-flash';break;case'ajax':case'text/xml':case'text/html':mt='text/html';break;} if(!mt&&n.href){var o=JCEMediaBox.Popup.getAddon(n.href);if(o&&o.type){mt=o.type;}} return mt||n.type||'';},getImageType:function(s){var e=/\.(jp(eg|g)|png|bmp|gif|tiff)$/.exec(s);if(e){if(e[1]==="jpg"){e[1]="jpeg";} return"image/"+e[1];} return"image/jpeg";},remove:function(n){var ed=tinyMCEPopup.editor;$.each(['jcepopup','jcelightbox','jcebox','icon-left','icon-right','icon-top-left','icon-top-right','icon-bottom-left','icon-bottom-right','zoom-left','zoom-right','zoom-top-left','zoom-top-right','zoom-bottom-left','zoom-bottom-right','noicon','noshow','autopopup-single','autopopup-multiple'],function(i,v){ed.dom.removeClass(n,v);});ed.dom.setAttrib(n,'data-mediabox','');},convertData:function(s){var a=[];function trim(s){return s.replace(/:"([^"]+)"/,function(a,b){return':"'+b.replace(/^\s+|\s+$/,'').replace(/\s*::\s*/,'::')+'"';});} if(/^{[\w\W]+}$/.test(s)){return $.parseJSON(trim(s));} if(/\w+\[[^\]]+\]/.test(s)){s=s.replace(/([\w]+)\[([^\]]+)\](;)?/g,function(a,b,c,d){return'"'+b+'":"'+tinymce.DOM.encode(c)+'"'+(d?',':'');});return $.parseJSON('{'+trim(s)+'}');}},getAttributes:function(n,index){var ed=tinyMCEPopup.editor,data={},rv,v;index=index||0;index=index||0;var title=ed.dom.getAttrib(n,'title');var rel=ed.dom.getAttrib(n,'rel');var icon=/noicon/g.test(n.className);var hide=/noshow/g.test(n.className);if(/(autopopup(.?|-single|-multiple))/.test(n.className)){v=/autopopup-multiple/.test(n.className)?'autopopup-multiple':'autopopup-single';$('#jcemediabox_popup_autopopup').val(v);} $('#jcemediabox_popup_icon').val(icon?0:1);$('#jcemediabox_popup_icon_position').prop('disabled',icon);$('#jcemediabox_popup_hide').val(hide?1:0);if(s=/(zoom|icon)-(top-right|top-left|bottom-right|bottom-left|left|right)/.exec(n.className)){var v=s[0];if(v){v=v.replace('icon-','zoom-');$('#jcemediabox_popup_icon_position').val(v);}} var relRX=/(\w+|alternate|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark|nofollow|licence|tag|friend)\s+?/g;var json=ed.dom.getAttrib(n,'data-json')||ed.dom.getAttrib(n,'data-mediabox');if(json){data=this.convertData(json);} if(rel&&/\w+\[.*\]/.test(rel)){var ra='';if(rv=relRX.exec(rel)){ra=rv[1];rel=rel.replace(relRX,'');} if(/^\w+\[/.test((rel))){data=this.convertData($.trim(rel))||{};data.rel=ra;}}else{var group=$.trim(rel.replace(relRX,''));$('#jcemediabox_popup_group').val(group);} var params=[];if(/::/.test(data.title)){var parts=data.title.split('::');if(parts.length>1){data.caption=parts[1];} data.title=parts[0];} $.each(data,function(k,v){if($('#jcemediabox_popup_'+k).get(0)){v=tinymce.DOM.decode(v);if(k=='title'||k=='caption'){$('input[name^="jcemediabox_popup_'+k+'"]').eq(index).val(v);}else{$('#jcemediabox_popup_'+k).val(v);} delete data[k];}});var x=0;$.each(data,function(k,v){if(v!==''){if(x==0){$('li:first input.name','#jcemediabox_popup_params').val(k);$('li:first input.value','#jcemediabox_popup_params').val(v);}else{var $item=$('li:first','#jcemediabox_popup_params').clone().appendTo('#jcemediabox_popup_params');$('input.name',$item).val(k);$('input.value',$item).val(decodeURIComponent(v));$('span.add',$item).hide();$('span.remove').css('display','inline-block');}} x++;});$('#jcemediabox_popup_mediatype').val(this.getMediaType(n));$.extend(data,{src:ed.dom.getAttrib(n,'href'),type:ed.dom.getAttrib(n,'type')||''});return data;},setAttributes:function(n,args,index){var self=this,ed=tinyMCEPopup.editor;index=index||0;this.remove(n);index=index||0;ed.dom.addClass(n,'jcepopup');var auto=$('#jcemediabox_popup_autopopup').val();if(auto){ed.dom.addClass(n,auto);} var data={};if(args.title){ed.dom.setAttrib(n,'title',args.title);delete args.title;} tinymce.each(['group','width','height'],function(k){var v=$('#jcemediabox_popup_'+k).val();if(v==''||v==null){if(args[k]){v=args[k];}else{return;}} data[k]=v;});tinymce.each(['title','caption'],function(k){var v=$('input[name^=jcemediabox_popup_'+k+']').eq(index).val();if(v==''||v==null||typeof v==='undefined'){if(args[k]){v=args[k];}else{return;}} data[k]=v;});$('li','#jcemediabox_popup_params').each(function(){var k=$('input.name',this).val();var v=$('input.value',this).val();if(k!==''&&v!==''){data[k]=v;}});$.extend(data,args.data||{});if(data.title&&data.caption){data.title=data.title+'::'+data.caption;delete data.caption;} var mt=$('#jcemediabox_popup_mediatype').val()||n.type||data.type||'';if(mt=="image"){mt=this.getImageType(n.href);} ed.dom.setAttrib(n,'type',mt);if(data.type){delete data.type;} var rel=ed.dom.getAttrib(n,'rel','');if(rel){rel=rel.replace(/([a-z0-9]+)(\[([^\]]+)\]);?/gi,'');} var props=$.map(data,function(v,k){return k+'['+v+']';});if(this.params.attribute=='data-mediabox'){ed.dom.setAttrib(n,'data-mediabox',props.join(';'));}else{rel=' '+props.join(';');ed.dom.setAttrib(n,'data-json','');ed.dom.setAttrib(n,'data-mediabox','');} ed.dom.setAttrib(n,'rel',$.trim(rel));if($('#jcemediabox_popup_icon').val()==0){ed.dom.addClass(n,'noicon');}else{ed.dom.addClass(n,$('#jcemediabox_popup_icon_position').val());} if($('#jcemediabox_popup_hide').val()==1){ed.dom.addClass(n,'noshow');} ed.dom.setAttrib(n,'target','_blank');},setIcon:function(){var v=$('#jcemediabox_popup_icon').val();if(parseInt(v)){$('#jcemediabox_popup_icon_position').removeAttr('disabled');}else{$('#jcemediabox_popup_icon_position').attr('disabled','disabled');}},onSelect:function(){},onSelectFile:function(args){$.each(args,function(k,v){$('#jcemediabox_popup_'+k).val(v);});}});popups/jcemediabox/tmpl/default.php000066600000020552150775073120013474 0ustar00
    x
    popups/jcemediabox/tmpl/index.html000066600000000054150775073120013327 0ustar00popups/jcemediabox/index.html000066600000000054150775073120012353 0ustar00popups/jcemediabox/css/index.html000066600000000054150775073120013143 0ustar00popups/jcemediabox/css/jcemediabox.css000066600000002556150775073120014143 0ustar00/*JCE Editor - 2.4.3 | 11 September 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html*/ #popup_extension_jcemediabox input[type="text"]{width:250px;}#popup_extension_jcemediabox select{width:auto;}#popup_extension_jcemediabox #jcemediabox_popup_width,#popup_extension_jcemediabox #jcemediabox_popup_height{width:50px;}#popup_extension_jcemediabox #jcemediabox_popup_icon+label{margin-left:20px;}#popup_extension_jcemediabox p.required{text-align:center;font-weight:bold;color:red;margin:5px 0;}#popup_extension_jcemediabox #jcemediabox_popup_params label{min-width:40px;}#popup_extension_jcemediabox #jcemediabox_popup_params input.name{width:110px;margin:0 5px 0 0;}#popup_extension_jcemediabox #jcemediabox_popup_params input.value{width:220px;}#jcemediabox_popup_params span.add,#jcemediabox_popup_params span.remove{cursor:pointer;display:inline-block;height:20px;margin-left:1px;vertical-align:middle;width:20px;}#jcemediabox_popup_params span.add{background:url("../../../../libraries/img/icons.png") no-repeat 0 -300px;}#jcemediabox_popup_params span.remove{background:url("../../../../libraries/img/icons.png") no-repeat 0 -180px;display:none;}#jcemediabox_popup_params{list-style:none;padding:5px;margin:5px 0 0;}#jcemediabox_popup_params li{margin:5px 0;}popups/window.php000066600000002461150775073120010130 0ustar00addScript('window', 'extensions/popups/window/js'); $document->addStyleSheet('window', 'extensions/popups/window/css'); } } public function getParams() { return array(); } public function isEnabled() { $plugin = WFEditorPlugin::getInstance(); if ($plugin->getParam('popups.window.enable', 1) && ($plugin->getName() == 'link' || $plugin->getName() == 'imgmanager_ext')) { return true; } return false; } } ?>popups/jcemediabox.xml000066600000010534150775073120011104 0ustar00 WF_POPUPS_JCEMEDIABOX_TITLE 2.4.3 11 September 2014 Ryan Demmer info@joomlacontenteditor.net http://www.joomlacontenteditor.net/ Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html WF_POPUPS_JCEMEDIABOX_DESC jcemediabox.php jcemediabox link,imgmanager_ext,mediamanager,filemanager