From 16a6aa53907de29c6d993fd18e62d45e4380f451 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 6 Mar 2009 17:18:21 -0800 Subject: Some fixes for OpenID and OMB URLs --- lib/util.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 9637dc506..ca8376f28 100644 --- a/lib/util.php +++ b/lib/util.php @@ -722,12 +722,15 @@ function common_local_url($action, $args=null, $params=null, $fragment=null) { $r = Router::get(); $path = $r->build($action, $args, $params, $fragment); - if ($path) { - } + if (common_config('site','fancy')) { $url = common_path(mb_substr($path, 1)); } else { - $url = common_path('index.php'.$path); + if (mb_strpos($path, '/index.php') === 0) { + $url = common_path(mb_substr($path, 1)); + } else { + $url = common_path('index.php'.$path); + } } return $url; } -- cgit v1.2.3-54-g00ecf From 2133d5a4e7fc694b097fe65282e557d99ee109ad Mon Sep 17 00:00:00 2001 From: CiaranG Date: Sun, 8 Mar 2009 16:16:10 +0000 Subject: PostgreSQL - some more fixes to make queries compatible with both databases. (submitted by oxygene) --- actions/postnotice.php | 2 +- actions/twittersettings.php | 8 ++++---- lib/jabber.php | 4 ++-- lib/util.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/util.php') diff --git a/actions/postnotice.php b/actions/postnotice.php index 0b4735296..c32d8ca94 100644 --- a/actions/postnotice.php +++ b/actions/postnotice.php @@ -79,7 +79,7 @@ class PostnoticeAction extends Action } $notice = Notice::staticGet('uri', $notice_uri); if (!$notice) { - $notice = Notice::saveNew($remote_profile->id, $content, 'omb', false, 0, $notice_uri); + $notice = Notice::saveNew($remote_profile->id, $content, 'omb', false, null, $notice_uri); if (is_string($notice)) { common_server_serror($notice, 500); return false; diff --git a/actions/twittersettings.php b/actions/twittersettings.php index a79859bbf..45725d3ff 100644 --- a/actions/twittersettings.php +++ b/actions/twittersettings.php @@ -186,12 +186,12 @@ class TwittersettingsAction extends ConnectSettingsAction $current_user = common_current_user(); - $qry = 'SELECT user.* ' . + $qry = 'SELECT "user".* ' . 'FROM subscription ' . - 'JOIN user ON subscription.subscribed = user.id ' . - 'JOIN foreign_link ON foreign_link.user_id = user.id ' . + 'JOIN "user" ON subscription.subscribed = "user".id ' . + 'JOIN foreign_link ON foreign_link.user_id = "user".id ' . 'WHERE subscriber = %d ' . - 'ORDER BY user.nickname'; + 'ORDER BY "user".nickname'; $user = new User(); diff --git a/lib/jabber.php b/lib/jabber.php index 3fbb3e1ab..3cd3b0d37 100644 --- a/lib/jabber.php +++ b/lib/jabber.php @@ -410,8 +410,8 @@ function jabber_broadcast_notice($notice) "ON $UT.id = notice_inbox.user_id " . 'WHERE notice_inbox.notice_id = ' . $notice->id . ' ' . 'AND notice_inbox.source = 2 ' . - 'AND user.jabber is not null ' . - 'AND user.jabbernotify = 1 '); + "AND $UT.jabber is not null " . + "AND $UT.jabbernotify = 1 "); while ($user->fetch()) { if (!array_key_exists($user->id, $sent_to)) { diff --git a/lib/util.php b/lib/util.php index ca8376f28..221175ccd 100644 --- a/lib/util.php +++ b/lib/util.php @@ -688,7 +688,7 @@ function common_relative_profile($sender, $nickname, $dt=null) $recipient = new Profile(); // XXX: use a join instead of a subquery $recipient->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$sender->id.' and subscribed = id)', 'AND'); - $recipient->whereAdd('nickname = "' . trim($nickname) . '"', 'AND'); + $recipient->whereAdd("nickname = '" . trim($nickname) . "'", 'AND'); if ($recipient->find(true)) { // XXX: should probably differentiate between profiles with // the same name by date of most recent update @@ -698,7 +698,7 @@ function common_relative_profile($sender, $nickname, $dt=null) $recipient = new Profile(); // XXX: use a join instead of a subquery $recipient->whereAdd('EXISTS (SELECT subscriber from subscription where subscribed = '.$sender->id.' and subscriber = id)', 'AND'); - $recipient->whereAdd('nickname = "' . trim($nickname) . '"', 'AND'); + $recipient->whereAdd("nickname = '" . trim($nickname) . "'", 'AND'); if ($recipient->find(true)) { // XXX: should probably differentiate between profiles with // the same name by date of most recent update -- cgit v1.2.3-54-g00ecf From e55808698bedb489e8f9b6d46a81dceb0e32e07d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Sun, 8 Mar 2009 11:49:34 -0700 Subject: use call_user_func for callbacks --- lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/util.php') diff --git a/lib/util.php b/lib/util.php index 221175ccd..ca9006d64 100644 --- a/lib/util.php +++ b/lib/util.php @@ -467,7 +467,7 @@ function common_replace_urls_callback($text, $callback) { $url = (mb_strpos($orig_url, htmlspecialchars($url)) === FALSE) ? $url:htmlspecialchars($url); // Call user specified func - $modified_url = $callback($url); + $modified_url = call_user_func($callback, $url); // Replace it! $start = mb_strpos($text, $url, $offset); -- cgit v1.2.3-54-g00ecf From c6cd87c106b763ed5610dae64e5a02ba86609ece Mon Sep 17 00:00:00 2001 From: Eric Helgeson Date: Mon, 9 Mar 2009 20:01:35 -0500 Subject: Changed all $config[][] calls to common_config() --- actions/finishopenidlogin.php | 3 +-- actions/noticesearchrss.php | 3 +-- actions/publicrss.php | 5 ++--- actions/remotesubscribe.php | 4 +--- lib/mail.php | 7 +++---- lib/omb.php | 1 - lib/searchaction.php | 4 +--- lib/twitter.php | 3 +-- lib/util.php | 11 ++++------- 9 files changed, 14 insertions(+), 27 deletions(-) (limited to 'lib/util.php') diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php index 6d92cb9aa..52d9be29c 100644 --- a/actions/finishopenidlogin.php +++ b/actions/finishopenidlogin.php @@ -62,9 +62,8 @@ class FinishopenidloginAction extends Action if ($this->error) { $this->element('div', array('class' => 'error'), $this->error); } else { - global $config; $this->element('div', 'instructions', - sprintf(_('This is the first time you\'ve logged into %s so we must connect your OpenID to a local account. You can either create a new account, or connect with your existing account, if you have one.'), $config['site']['name'])); + sprintf(_('This is the first time you\'ve logged into %s so we must connect your OpenID to a local account. You can either create a new account, or connect with your existing account, if you have one.'), common_config('site', 'name'))); } } diff --git a/actions/noticesearchrss.php b/actions/noticesearchrss.php index 7172977ee..0f98ed04b 100644 --- a/actions/noticesearchrss.php +++ b/actions/noticesearchrss.php @@ -82,10 +82,9 @@ class NoticesearchrssAction extends Rss10Action function getChannel() { - global $config; $q = $this->trimmed('q'); $c = array('url' => common_local_url('noticesearchrss', array('q' => $q)), - 'title' => $config['site']['name'] . sprintf(_(' Search Stream for "%s"'), $q), + 'title' => common_config('site', 'name') . sprintf(_(' Search Stream for "%s"'), $q), 'link' => common_local_url('noticesearch', array('q' => $q)), 'description' => sprintf(_('All updates matching search term "%s"'), $q)); return $c; diff --git a/actions/publicrss.php b/actions/publicrss.php index c35877997..77e26e0f4 100644 --- a/actions/publicrss.php +++ b/actions/publicrss.php @@ -84,12 +84,11 @@ class PublicrssAction extends Rss10Action */ function getChannel() { - global $config; $c = array( 'url' => common_local_url('publicrss') - , 'title' => sprintf(_('%s Public Stream'), $config['site']['name']) + , 'title' => sprintf(_('%s Public Stream'), common_config('site', 'name')) , 'link' => common_local_url('public') - , 'description' => sprintf(_('All updates for %s'), $config['site']['name'])); + , 'description' => sprintf(_('All updates for %s'), common_config('site', 'name'))); return $c; } diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php index a2e01bd3a..af130f425 100644 --- a/actions/remotesubscribe.php +++ b/actions/remotesubscribe.php @@ -333,8 +333,6 @@ class RemotesubscribeAction extends Action function requestAuthorization($user, $omb, $token, $secret) { - global $config; # for license URL - $con = omb_oauth_consumer(); $tok = new OAuthToken($token, $secret); @@ -358,7 +356,7 @@ class RemotesubscribeAction extends Action $req->set_parameter('omb_listenee', $user->uri); $req->set_parameter('omb_listenee_profile', common_profile_url($user->nickname)); $req->set_parameter('omb_listenee_nickname', $user->nickname); - $req->set_parameter('omb_listenee_license', $config['license']['url']); + $req->set_parameter('omb_listenee_license', common_config('license', 'url')); $profile = $user->getProfile(); if (!$profile) { diff --git a/lib/mail.php b/lib/mail.php index 9fa86de5c..dde7571eb 100644 --- a/lib/mail.php +++ b/lib/mail.php @@ -50,10 +50,9 @@ function mail_backend() static $backend = null; if (!$backend) { - global $config; - $backend = Mail::factory($config['mail']['backend'], - ($config['mail']['params']) ? - $config['mail']['params'] : + $backend = Mail::factory(common_config('mail', 'backend'), + (common_config('mail', 'params')) ? + common_config('mail', 'params') : array()); if (PEAR::isError($backend)) { common_server_error($backend->getMessage(), 500); diff --git a/lib/omb.php b/lib/omb.php index c302a7b64..878c735da 100644 --- a/lib/omb.php +++ b/lib/omb.php @@ -251,7 +251,6 @@ function omb_broadcast_profile($profile) function omb_update_profile($profile, $remote_profile, $subscription) { - global $config; # for license URL $user = User::staticGet($profile->id); $con = omb_oauth_consumer(); $token = new OAuthToken($subscription->token, $subscription->secret); diff --git a/lib/searchaction.php b/lib/searchaction.php index df6876445..c762db16f 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -110,8 +110,6 @@ class SearchAction extends Action function showForm($error=null) { - global $config; - $q = $this->trimmed('q'); $page = $this->trimmed('page', 1); $this->elementStart('form', array('method' => 'get', @@ -122,7 +120,7 @@ class SearchAction extends Action $this->element('legend', null, _('Search site')); $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - if (!isset($config['site']['fancy']) || !$config['site']['fancy']) { + if (!common_config('site', 'fancy')) { $this->hidden('action', $this->trimmed('action')); } $this->input('q', 'Keyword(s)', $q); diff --git a/lib/twitter.php b/lib/twitter.php index deb6fd276..a3929524b 100644 --- a/lib/twitter.php +++ b/lib/twitter.php @@ -224,7 +224,6 @@ function is_twitter_bound($notice, $flink) { function broadcast_twitter($notice) { - global $config; $success = true; $flink = Foreign_link::getByUserID($notice->profile_id, @@ -248,7 +247,7 @@ function broadcast_twitter($notice) CURLOPT_POSTFIELDS => array( 'status' => $statustxt, - 'source' => $config['integration']['source'] + 'source' => common_config('integration', 'source') ), CURLOPT_RETURNTRANSFER => true, CURLOPT_FAILONERROR => true, diff --git a/lib/util.php b/lib/util.php index ca9006d64..6341438ca 100644 --- a/lib/util.php +++ b/lib/util.php @@ -72,8 +72,7 @@ function common_timezone() } } - global $config; - return $config['site']['timezone']; + return common_config('site', 'timezone'); } function common_language() @@ -737,9 +736,8 @@ function common_local_url($action, $args=null, $params=null, $fragment=null) function common_path($relative) { - global $config; - $pathpart = ($config['site']['path']) ? $config['site']['path']."/" : ''; - return "http://".$config['site']['server'].'/'.$pathpart.$relative; + $pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : ''; + return "http://".common_config('site', 'server').'/'.$pathpart.$relative; } function common_date_string($dt) @@ -992,8 +990,7 @@ function common_ensure_syslog() { static $initialized = false; if (!$initialized) { - global $config; - openlog($config['syslog']['appname'], 0, LOG_USER); + openlog(common_config('syslog', 'appname'), 0, LOG_USER); $initialized = true; } } -- cgit v1.2.3-54-g00ecf From e185c0395a6cd250ccd7c8e385c54830be73f937 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 12 Mar 2009 00:13:28 -0400 Subject: Revert "trac #201 Add flowplayer to enable multimedia playback capability." This reverts commit 9c9b6790ce78296c0b182f03b5f6f2c035e43a7c. This code wasn't ready for release, so I've reverted it for now. Conflicts: lib/action.php lib/util.php --- bin/flowplayer-3.0.5.swf | Bin 92317 -> 0 bytes bin/flowplayer.audio-3.0.3.swf | Bin 2756 -> 0 bytes bin/flowplayer.controls-3.0.3.swf | Bin 15977 -> 0 bytes js/flowplayer-3.0.5.min.js | 24 ------------------------ js/jquery.simplemodal-1.2.2.pack.js | 8 -------- js/video.js | 9 --------- lib/action.php | 18 ------------------ lib/util.php | 6 ------ theme/base/css/modal.css | 22 ---------------------- theme/base/css/modal_ie.css | 16 ---------------- theme/base/images/x.png | Bin 1066 -> 0 bytes 11 files changed, 103 deletions(-) delete mode 100644 bin/flowplayer-3.0.5.swf delete mode 100644 bin/flowplayer.audio-3.0.3.swf delete mode 100644 bin/flowplayer.controls-3.0.3.swf delete mode 100644 js/flowplayer-3.0.5.min.js delete mode 100644 js/jquery.simplemodal-1.2.2.pack.js delete mode 100644 js/video.js delete mode 100644 theme/base/css/modal.css delete mode 100644 theme/base/css/modal_ie.css delete mode 100644 theme/base/images/x.png (limited to 'lib/util.php') diff --git a/bin/flowplayer-3.0.5.swf b/bin/flowplayer-3.0.5.swf deleted file mode 100644 index 05b64a032..000000000 Binary files a/bin/flowplayer-3.0.5.swf and /dev/null differ diff --git a/bin/flowplayer.audio-3.0.3.swf b/bin/flowplayer.audio-3.0.3.swf deleted file mode 100644 index ef85f1bff..000000000 Binary files a/bin/flowplayer.audio-3.0.3.swf and /dev/null differ diff --git a/bin/flowplayer.controls-3.0.3.swf b/bin/flowplayer.controls-3.0.3.swf deleted file mode 100644 index 09a27e8a9..000000000 Binary files a/bin/flowplayer.controls-3.0.3.swf and /dev/null differ diff --git a/js/flowplayer-3.0.5.min.js b/js/flowplayer-3.0.5.min.js deleted file mode 100644 index b1c33150a..000000000 --- a/js/flowplayer-3.0.5.min.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * flowplayer.js 3.0.5. The Flowplayer API - * - * Copyright 2009 Flowplayer Oy - * - * This file is part of Flowplayer. - * - * Flowplayer is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Flowplayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Flowplayer. If not, see . - * - * Version: 3.0.5 - Tue Feb 03 2009 13:14:17 GMT-0000 (GMT+00:00) - */ -(function(){function log(args){console.log("$f.fireEvent",[].slice.call(args));}function clone(obj){if(!obj||typeof obj!='object'){return obj;}var temp=new obj.constructor();for(var key in obj){if(obj.hasOwnProperty(key)){temp[key]=clone(obj[key]);}}return temp;}function each(obj,fn){if(!obj){return;}var name,i=0,length=obj.length;if(length===undefined){for(name in obj){if(fn.call(obj[name],name,obj[name])===false){break;}}}else{for(var value=obj[0];i1){var swf=arguments[1];var conf=(arguments.length==3)?arguments[2]:{};if(typeof arg=='string'){if(arg.indexOf(".")!=-1){var instances=[];each(select(arg),function(){instances.push(new Player(this,clone(swf),clone(conf)));});return new Iterator(instances);}else{var node=el(arg);return new Player(node!==null?node:arg,swf,conf);}}else if(arg){return new Player(arg,swf,conf);}}return null;};extend(window.$f,{fireEvent:function(id,evt,a0,a1,a2){var p=$f(id);return p?p._fireEvent(evt,a0,a1,a2):null;},addPlugin:function(name,fn){Player.prototype[name]=fn;return $f;},each:each,extend:extend});if(document.all){window.onbeforeunload=function(){$f("*").each(function(){if(this.isLoaded()){this.close();}});};}if(typeof jQuery=='function'){jQuery.prototype.flowplayer=function(params,conf){if(!arguments.length||typeof arguments[0]=='number'){var arr=[];this.each(function(){var p=$f(this);if(p){arr.push(p);}});return arguments.length?arr[arguments[0]]:new Iterator(arr);}return this.each(function(){$f(this,clone(params),conf?clone(conf):{});});};}})();(function(){var jQ=typeof jQuery=='function';function isDomReady(){if(domReady.done){return false;}var d=document;if(d&&d.getElementsByTagName&&d.getElementById&&d.body){clearInterval(domReady.timer);domReady.timer=null;for(var i=0;i';}var e=extend({},p);e.width=e.height=e.id=e.w3c=e.src=null;for(var k in e){if(e[k]!==null){html+='';}}var vars="";if(c){for(var key in c){if(c[key]!==null){vars+=key+'='+(typeof c[key]=='object'?asString(c[key]):c[key])+'&';}}vars=vars.substring(0,vars.length-1);html+='';}html+="";return html;}function Flash(root,opts,flashvars){var version=flashembed.getVersion();extend(this,{getContainer:function(){return root;},getConf:function(){return conf;},getVersion:function(){return version;},getFlashvars:function(){return flashvars;},getApi:function(){return root.firstChild;},getHTML:function(){return getHTML(opts,flashvars);}});var required=opts.version;var express=opts.expressInstall;var ok=!required||flashembed.isSupported(required);if(ok){opts.onFail=opts.version=opts.expressInstall=null;root.innerHTML=getHTML(opts,flashvars);}else if(required&&express&&flashembed.isSupported([6,65])){extend(opts,{src:express});flashvars={MMredirectURL:location.href,MMplayerType:'PlugIn',MMdoctitle:document.title};root.innerHTML=getHTML(opts,flashvars);}else{if(root.innerHTML.replace(/\s/g,'')!==''){}else{root.innerHTML="

Flash version "+required+" or greater is required

"+"

"+(version[0]>0?"Your version is "+version:"You have no flash plugin installed")+"

"+"

Download latest version from here

";}}if(!ok&&opts.onFail){var ret=opts.onFail.call(this);if(typeof ret=='string'){root.innerHTML=ret;}}}window.flashembed=function(root,conf,flashvars){if(typeof root=='string'){var el=document.getElementById(root);if(el){root=el;}else{domReady(function(){flashembed(root,conf,flashvars);});return;}}if(!root){return;}var opts={width:'100%',height:'100%',allowfullscreen:true,allowscriptaccess:'always',quality:'high',version:null,onFail:null,expressInstall:null,w3c:false};if(typeof conf=='string'){conf={src:conf};}extend(opts,conf);return new Flash(root,opts,flashvars);};extend(window.flashembed,{getVersion:function(){var version=[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var _d=navigator.plugins["Shockwave Flash"].description;if(typeof _d!="undefined"){_d=_d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var _m=parseInt(_d.replace(/^(.*)\..*$/,"$1"),10);var _r=/r/.test(_d)?parseInt(_d.replace(/^.*r(.*)$/,"$1"),10):0;version=[_m,_r];}}else if(window.ActiveXObject){try{var _a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{_a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version=[6,0];_a.AllowScriptAccess="always";}catch(ee){if(version[0]==6){return;}}try{_a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(eee){}}if(typeof _a=="object"){_d=_a.GetVariable("$version");if(typeof _d!="undefined"){_d=_d.replace(/^\S+\s+(.*)$/,"$1").split(",");version=[parseInt(_d[0],10),parseInt(_d[2],10)];}}}return version;},isSupported:function(version){var now=flashembed.getVersion();var ret=(now[0]>version[0])||(now[0]==version[0]&&now[1]>=version[1]);return ret;},domReady:domReady,asString:asString,getHTML:getHTML});if(jQ){jQuery.prototype.flashembed=function(conf,flashvars){return this.each(function(){flashembed(this,conf,flashvars);});};}})(); \ No newline at end of file diff --git a/js/jquery.simplemodal-1.2.2.pack.js b/js/jquery.simplemodal-1.2.2.pack.js deleted file mode 100644 index b5ad5c23a..000000000 --- a/js/jquery.simplemodal-1.2.2.pack.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SimpleModal 1.2.2 - jQuery Plugin - * http://www.ericmmartin.com/projects/simplemodal/ - * Copyright (c) 2008 Eric Martin - * Dual licensed under the MIT and GPL licenses - * Revision: $Id: jquery.simplemodal.js 181 2008-12-16 16:51:44Z emartin24 $ - */ -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(g($){m f=$.Q.1Q&&1a($.Q.1D)==6&&!10[\'2g\'],1f=$.Q.1Q&&!$.2a,w=[];$.y=g(a,b){I $.y.12.1n(a,b)};$.y.D=g(){$.y.12.D()};$.1P.y=g(a){I $.y.12.1n(3,a)};$.y.1O={V:29,1J:\'r-H\',1B:{},1z:\'r-n\',20:{},1Z:{},v:2t,D:1o,1T:\'\',X:\'r-D\',l:F,1g:K,1e:F,1d:F,1c:F};$.y.12={7:F,4:{},1n:g(a,b){8(3.4.j){I K}3.7=$.U({},$.y.1O,b);3.v=3.7.v;3.1w=K;8(J a==\'27\'){a=a 25 1A?a:$(a);8(a.1v().1v().23()>0){3.4.T=a.1v();8(!3.7.1g){3.4.21=a.2x(1o)}}}q 8(J a==\'2w\'||J a==\'1r\'){a=$(\'<1q/>\').2s(a)}q{2r(\'2q 2p: 2o j 2l: \'+J a);I K}3.4.j=a.11(\'r-j\').E(3.7.1Z);a=F;3.1S();3.1R();8($.1m(3.7.1d)){3.7.1d.1l(3,[3.4])}I 3},1S:g(){w=3.1k();8(f){3.4.x=$(\'\').E($.U(3.7.2b,{1j:\'1i\',V:0,l:\'1h\',A:w[0],z:w[1],v:3.7.v,L:0,B:0})).O(\'u\')}3.4.H=$(\'<1q/>\').1N(\'1M\',3.7.1J).11(\'r-H\').E($.U(3.7.1B,{1j:\'1i\',V:3.7.V/1b,A:w[0],z:w[1],l:\'1h\',B:0,L:0,v:3.7.v+1})).O(\'u\');3.4.n=$(\'<1q/>\').1N(\'1M\',3.7.1z).11(\'r-n\').E($.U(3.7.20,{1j:\'1i\',l:\'1h\',v:3.7.v+2})).1K(3.7.D?$(3.7.1T).11(3.7.X):\'\').O(\'u\');3.19();8(f||1f){3.18()}3.4.n.1K(3.4.j.1I())},1H:g(){m a=3;$(\'.\'+3.7.X).1G(\'1L.r\',g(e){e.28();a.D()});$(10).1G(\'1F.r\',g(){w=a.1k();a.19();8(f||1f){a.18()}q{a.4.x&&a.4.x.E({A:w[0],z:w[1]});a.4.H.E({A:w[0],z:w[1]})}})},1E:g(){$(\'.\'+3.7.X).1C(\'1L.r\');$(10).1C(\'1F.r\')},18:g(){m p=3.7.l;$.26([3.4.x||F,3.4.H,3.4.n],g(i,e){8(e){m a=\'k.u.17\',N=\'k.u.1W\',16=\'k.u.24\',S=\'k.u.1y\',R=\'k.u.1x\',15=\'k.u.22\',1t=\'k.P.17\',1s=\'k.P.1W\',C=\'k.P.1y\',G=\'k.P.1x\',s=e[0].2v;s.l=\'2u\';8(i<2){s.14(\'A\');s.14(\'z\');s.Z(\'A\',\'\'+16+\' > \'+a+\' ? \'+16+\' : \'+a+\' + "o"\');s.Z(\'z\',\'\'+15+\' > \'+N+\' ? \'+15+\' : \'+N+\' + "o"\')}q{m b,W;8(p&&p.1Y==1X){8(p[0]){m c=J p[0]==\'1r\'?p[0].1V():p[0].13(/o/,\'\');b=c.1U(\'%\')==-1?c+\' + (t = \'+G+\' ? \'+G+\' : \'+R+\') + "o"\':1a(c.13(/%/,\'\'))+\' * ((\'+1t+\' || \'+a+\') / 1b) + (t = \'+G+\' ? \'+G+\' : \'+R+\') + "o"\'}8(p[1]){m d=J p[1]==\'1r\'?p[1].1V():p[1].13(/o/,\'\');W=d.1U(\'%\')==-1?d+\' + (t = \'+C+\' ? \'+C+\' : \'+S+\') + "o"\':1a(d.13(/%/,\'\'))+\' * ((\'+1s+\' || \'+N+\') / 1b) + (t = \'+C+\' ? \'+C+\' : \'+S+\') + "o"\'}}q{b=\'(\'+1t+\' || \'+a+\') / 2 - (3.2n / 2) + (t = \'+G+\' ? \'+G+\' : \'+R+\') + "o"\';W=\'(\'+1s+\' || \'+N+\') / 2 - (3.2m / 2) + (t = \'+C+\' ? \'+C+\' : \'+S+\') + "o"\'}s.14(\'L\');s.14(\'B\');s.Z(\'L\',b);s.Z(\'B\',W)}}})},1k:g(){m a=$(10);m h=$.Q.2k&&$.Q.1D>\'9.5\'&&$.1P.2i<=\'1.2.6\'?k.P[\'17\']:a.A();I[h,a.z()]},19:g(){m a,B,1u=(w[0]/2)-((3.4.n.A()||3.4.j.A())/2),1p=(w[1]/2)-((3.4.n.z()||3.4.j.z())/2);8(3.7.l&&3.7.l.1Y==1X){a=3.7.l[0]||1u;B=3.7.l[1]||1p}q{a=1u;B=1p}3.4.n.E({B:B,L:a})},1R:g(){3.4.x&&3.4.x.Y();8($.1m(3.7.1e)){3.7.1e.1l(3,[3.4])}q{3.4.H.Y();3.4.n.Y();3.4.j.Y()}3.1H()},D:g(){8(!3.4.j){I K}8($.1m(3.7.1c)&&!3.1w){3.1w=1o;3.7.1c.1l(3,[3.4])}q{8(3.4.T){8(3.7.1g){3.4.j.1I().O(3.4.T)}q{3.4.j.M();3.4.21.O(3.4.T)}}q{3.4.j.M()}3.4.n.M();3.4.H.M();3.4.x&&3.4.x.M();3.4={}}3.1E()}}})(1A);',62,158,'|||this|dialog|||opts|if||||||||function|||data|document|position|var|container|px||else|simplemodal|||body|zIndex||iframe|modal|width|height|left|sl|close|css|null|st|overlay|return|typeof|false|top|remove|bcw|appendTo|documentElement|browser|bst|bsl|parentNode|extend|opacity|le|closeClass|show|setExpression|window|addClass|impl|replace|removeExpression|bsw|bsh|clientHeight|fixIE|setPosition|parseInt|100|onClose|onShow|onOpen|ieQuirks|persist|fixed|none|display|getDimensions|apply|isFunction|init|true|vCenter|div|number|cw|ch|hCenter|parent|occb|scrollTop|scrollLeft|containerId|jQuery|overlayCss|unbind|version|unbindEvents|resize|bind|bindEvents|hide|overlayId|append|click|id|attr|defaults|fn|msie|open|create|closeHTML|indexOf|toString|clientWidth|Array|constructor|dataCss|containerCss|orig|scrollWidth|size|scrollHeight|instanceof|each|object|preventDefault|50|boxModel|iframeCss|javascript|src|Close|title|XMLHttpRequest|modalCloseImg|jquery|class|opera|type|offsetWidth|offsetHeight|Unsupported|Error|SimpleModal|alert|html|1000|absolute|style|string|clone'.split('|'),0,{})) \ No newline at end of file diff --git a/js/video.js b/js/video.js deleted file mode 100644 index 936a6312e..000000000 --- a/js/video.js +++ /dev/null @@ -1,9 +0,0 @@ -$('document').ready(function() { - $('a.media, a.mediamp3').append(' [PLAY]'); - $('a.mediamp3').html('').css('display', 'block').css('width', '224px').css('height','24px').flowplayer('../bin/flowplayer-3.0.5.swf'); - $('a.media').click(function() { - $('').attr('href', $(this).attr('href')).flowplayer('../bin/flowplayer-3.0.5.swf').modal({'closeHTML':''}); - return false; - }); -}); - diff --git a/lib/action.php b/lib/action.php index 45ce56ac0..975c2bfcb 100644 --- a/lib/action.php +++ b/lib/action.php @@ -156,15 +156,10 @@ class Action extends HTMLOutputter // lawsuit { if (Event::handle('StartShowStyles', array($this))) { if (Event::handle('StartShowLaconicaStyles', array($this))) { - $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => theme_path('css/display.css', 'base') . '?version=' . LACONICA_VERSION, 'media' => 'screen, projection, tv')); - $this->element('link', array('rel' => 'stylesheet', - 'type' => 'text/css', - 'href' => theme_path('css/modal.css', 'base') . '?version=' . LACONICA_VERSION, - 'media' => 'screen, projection, tv')); $this->element('link', array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => theme_path('css/display.css', null) . '?version=' . LACONICA_VERSION, @@ -215,11 +210,6 @@ class Action extends HTMLOutputter // lawsuit $this->element('script', array('type' => 'text/javascript', 'src' => common_path('js/jquery.form.js')), ' '); - - $this->element('script', array('type' => 'text/javascript', - 'src' => common_path('js/jquery.simplemodal-1.2.2.pack.js')), - ' '); - Event::handle('EndShowJQueryScripts', array($this)); } if (Event::handle('StartShowLaconicaScripts', array($this))) { @@ -232,14 +222,6 @@ class Action extends HTMLOutputter // lawsuit // Frame-busting code to avoid clickjacking attacks. $this->element('script', array('type' => 'text/javascript'), 'if (window.top !== window.self) { window.top.location.href = window.self.location.href; }'); - - $this->element('script', array('type' => 'text/javascript', - 'src' => common_path('js/flowplayer-3.0.5.min.js')), - ' '); - - $this->element('script', array('type' => 'text/javascript', - 'src' => common_path('js/video.js')), - ' '); Event::handle('EndShowLaconicaScripts', array($this)); } Event::handle('EndShowScripts', array($this)); diff --git a/lib/util.php b/lib/util.php index 6341438ca..a43666fa5 100644 --- a/lib/util.php +++ b/lib/util.php @@ -480,18 +480,12 @@ function common_replace_urls_callback($text, $callback) { function common_linkify($url) { // It comes in special'd, so we unspecial it before passing to the stringifying // functions - $ext = pathinfo($url, PATHINFO_EXTENSION); $url = htmlspecialchars_decode($url); - $video_ext = array('mp4', 'flv', 'avi', 'mpg', 'mp3', 'ogg'); $display = $url; $url = (!preg_match('#^([a-z]+://|(mailto|aim|tel):)#i', $url)) ? 'http://'.$url : $url; $attrs = array('href' => $url, 'rel' => 'external'); - if (in_array($ext, $video_ext)) { - $attrs['class'] = 'media'; - } - if ($longurl = common_longurl($url)) { $attrs['title'] = $longurl; } diff --git a/theme/base/css/modal.css b/theme/base/css/modal.css deleted file mode 100644 index 985e4adfa..000000000 --- a/theme/base/css/modal.css +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SimpleModal Basic Modal Dialog - * http://www.ericmmartin.com/projects/simplemodal/ - * http://code.google.com/p/simplemodal/ - * - * Copyright (c) 2008 Eric Martin - http://ericmmartin.com - * - * Licensed under the MIT license: - * http://www.opensource.org/licenses/mit-license.php - * - * Revision: $Id: basic.css 162 2008-12-01 23:36:58Z emartin24 $ - * - */ - - -/* Overlay */ -#simplemodal-overlay {background-color:#000; cursor:wait;} - -/* Container */ -#simplemodal-container {height:240px; width:320px; background-color:#fff; border:3px solid #ccc;} -#simplemodal-container a.modalCloseImg {background:url(../images/x.png) no-repeat; width:25px; height:29px; display:inline; z-index:3200; position:absolute; top:-15px; right:-18px; cursor:pointer;} -#simplemodal-container #basicModalContent {padding:8px;} diff --git a/theme/base/css/modal_ie.css b/theme/base/css/modal_ie.css deleted file mode 100644 index eab4637c0..000000000 --- a/theme/base/css/modal_ie.css +++ /dev/null @@ -1,16 +0,0 @@ -/* - * SimpleModal Basic Modal Dialog - * http://www.ericmmartin.com/projects/simplemodal/ - * http://code.google.com/p/simplemodal/ - * - * Copyright (c) 2008 Eric Martin - http://ericmmartin.com - * - * Licensed under the MIT license: - * http://www.opensource.org/licenses/mit-license.php - * - * Revision: $Id: basic_ie.css 162 2008-12-01 23:36:58Z emartin24 $ - * - */ - -/* IE 6 hacks*/ -#simplemodal-container a.modalCloseImg {background:none; right:-14px; width:22px; height:26px; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/x.png',sizingMethod='scale');} diff --git a/theme/base/images/x.png b/theme/base/images/x.png deleted file mode 100644 index c11f7af69..000000000 Binary files a/theme/base/images/x.png and /dev/null differ -- cgit v1.2.3-54-g00ecf