From bc2a0f550be71aea89b2c4f548aa187627bbbf38 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Fri, 25 Sep 2009 21:25:20 +0100 Subject: [PATCH 01/17] Updated Piwik plugin documentation to new addPlugin() installaation method --- plugins/PiwikAnalyticsPlugin.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/plugins/PiwikAnalyticsPlugin.php b/plugins/PiwikAnalyticsPlugin.php index 8191f51811..54faa0bdbe 100644 --- a/plugins/PiwikAnalyticsPlugin.php +++ b/plugins/PiwikAnalyticsPlugin.php @@ -38,22 +38,16 @@ if (!defined('STATUSNET')) { * This plugin will spoot out the correct JavaScript spell to invoke * Piwik Analytics on a page. * - * To use this plugin please add the following three lines to your config.php + * To use this plugin add the following to your config.php * - * require_once('plugins/PiwikAnalyticsPlugin.php'); - * $pa = new PiwikAnalyticsPlugin("example.com/piwik/","id"); + * addPlugin('PiwikAnalytics', array('piwikroot' => 'example.com/piwik/', + * 'piwikId' => 'id')); * - * exchange example.com/piwik/ with the url to your piwik installation and - * make sure you don't forget the final / - * exchange id with the ID your statusnet installation has in your Piwik analytics + * Replace 'example.com/piwik/' with the URL to your Piwik installation and + * make sure you don't forget the final /. + * Replace 'id' with the ID your statusnet installation has in your Piwik + * analytics setup - for example '8'. * - * @category Plugin - * @package StatusNet - * @author Tobias Diekershoff - * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://status.net/ - * - * @see Event */ class PiwikAnalyticsPlugin extends Plugin From 2b6dfbdf2b9df0992018f8df1f54b4cf16185599 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 26 Sep 2009 20:25:47 +0000 Subject: [PATCH 02/17] A different go at the realtime button location. Button is in a prominent location. --- plugins/Realtime/realtimeupdate.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 57fe0a8436..a31565177f 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -113,19 +113,19 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#site_nav_local_views .current a').append(''); + $('#content').prepend(''); $('#realtime_timeline').css({ - 'margin':'2px 0 0 11px', - 'background':'transparent url('+ iconurl + ') no-repeat 45% 45%', - 'text-indent':'-9999px', - 'width':'16px', - 'height':'16px', - 'padding':'0', + 'margin':'0 0 18px 0', + 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', + 'padding':'0 0 0 20px', 'display':'block', 'float':'right', 'border':'none', - 'cursor':'pointer' + 'cursor':'pointer', + 'color':$("a").css("color"), + 'font-weight':'bold', + 'font-size':'1em' }); $('#realtime_timeline').click(function() { From 7d843b11228bb55750177ca7809d5f067d52dc20 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 11:31:34 +0000 Subject: [PATCH 03/17] jQuery.prepend takes a single param --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index a31565177f..765710bfe2 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -27,7 +27,7 @@ RealtimeUpdate = { } var noticeItem = RealtimeUpdate.makeNoticeItem(data); - $("#notices_primary .notices").prepend(noticeItem, true); + $("#notices_primary .notices").prepend(noticeItem); $("#notices_primary .notice:first").css({display:"none"}); $("#notices_primary .notice:first").fadeIn(1000); NoticeReply(); From a51339a2195caed5a3833346f508b38953e4618b Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 11:49:18 +0000 Subject: [PATCH 04/17] Don't really need the header container. Adjusted some CSS instead --- plugins/Realtime/RealtimePlugin.php | 3 --- plugins/Realtime/realtimeupdate.js | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index e30c411567..0f0d0f9f42 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -216,8 +216,6 @@ class RealtimePlugin extends Plugin 'class' => 'user_in') : array('id' => $action->trimmed('action'))); - $action->elementStart('div', array('id' => 'header')); - // XXX hack to deal with JS that tries to get the // root url from page output @@ -230,7 +228,6 @@ class RealtimePlugin extends Plugin if (common_logged_in()) { $action->showNoticeForm(); } - $action->elementEnd('div'); $action->showContentBlock(); $action->elementEnd('body'); diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 765710bfe2..a5f6052eab 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -114,7 +114,7 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { $('#content').prepend(''); - + $('#realtime_timeline').css({ 'margin':'0 0 18px 0', 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%', @@ -127,12 +127,12 @@ RealtimeUpdate = { 'font-weight':'bold', 'font-size':'1em' }); - + $('#realtime_timeline').click(function() { window.open(url, timeline, 'toolbar=no,resizable=yes,scrollbars=yes,status=yes'); - + return false; }); }, @@ -142,6 +142,10 @@ RealtimeUpdate = { window.resizeTo(575, 640); $('address').hide(); $('#content').css({'width':'92%'}); + + $('#form_notice').css({ + 'margin':'18px 0 29px 1.795%' + }); } } From 74d537c834cf897e989d9909393c879129d99ae7 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 11:54:45 +0000 Subject: [PATCH 05/17] Using a relative value for the form_notice note location instead --- theme/base/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index 1f37a7637b..7706fba484 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -484,7 +484,7 @@ height:16px; #form_notice .form_note { position:absolute; bottom:2px; -right:98px; +right:21.715%; z-index:9; } #form_notice .form_note dt { From 4d92d7d52ff20b22232c32c40fc88a8d03085ec9 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:15:37 +0000 Subject: [PATCH 06/17] Removed form_notice label and h1 from view --- plugins/Realtime/realtimeupdate.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index a5f6052eab..bcbf1ba287 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -144,8 +144,12 @@ RealtimeUpdate = { $('#content').css({'width':'92%'}); $('#form_notice').css({ - 'margin':'18px 0 29px 1.795%' + 'margin':'18px 0 29px 1.795%' }); + + $('#form_notice label, h1').css({'display': 'none'}); + + $('.notices li:first-child').css({'border-top':'none'}); } } From 7c335c28da886f48439ad648bd5ab4957152f140 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:21:49 +0000 Subject: [PATCH 07/17] Updated window resize --- plugins/Realtime/realtimeupdate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index bcbf1ba287..984c1bf55e 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -139,12 +139,12 @@ RealtimeUpdate = { initPopupWindow: function() { - window.resizeTo(575, 640); + window.resizeTo(500, 550); $('address').hide(); $('#content').css({'width':'92%'}); $('#form_notice').css({ - 'margin':'18px 0 29px 1.795%' + 'margin':'18px 0 29px 1.795%', }); $('#form_notice label, h1').css({'display': 'none'}); From 3bc55e7b8bff2fe331371333de9ff4f96c8584d2 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:22:56 +0000 Subject: [PATCH 08/17] Reduced form_notice margin bottom --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 984c1bf55e..ad519158b0 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -144,7 +144,7 @@ RealtimeUpdate = { $('#content').css({'width':'92%'}); $('#form_notice').css({ - 'margin':'18px 0 29px 1.795%', + 'margin':'18px 0 18px 1.795%', }); $('#form_notice label, h1').css({'display': 'none'}); From c66a884ff5cec1e58a7ba40f310badd3f108d9a5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:26:01 +0000 Subject: [PATCH 09/17] Increated content width --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index ad519158b0..965fea9926 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -141,7 +141,7 @@ RealtimeUpdate = { { window.resizeTo(500, 550); $('address').hide(); - $('#content').css({'width':'92%'}); + $('#content').css({'width':'93.5%'}); $('#form_notice').css({ 'margin':'18px 0 18px 1.795%', From 8904f0f67dc8ab79b07d95452171a1d2b0af5efc Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:38:40 +0000 Subject: [PATCH 10/17] Removing only notie_data-text label from view --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 965fea9926..fa0334881b 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -147,7 +147,7 @@ RealtimeUpdate = { 'margin':'18px 0 18px 1.795%', }); - $('#form_notice label, h1').css({'display': 'none'}); + $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'}); $('.notices li:first-child').css({'border-top':'none'}); } From 3bba45102130e01032163f40e52005744623c686 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:40:35 +0000 Subject: [PATCH 11/17] Aligning notice_data-attach from top --- plugins/Realtime/realtimeupdate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index fa0334881b..86fb01a5d9 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -150,6 +150,8 @@ RealtimeUpdate = { $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'}); $('.notices li:first-child').css({'border-top':'none'}); + + $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'}); } } From 7466887a2f6e9d8f5f45a8b2e92e2147c572864c Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:43:40 +0000 Subject: [PATCH 12/17] Adjusted form_notice width --- plugins/Realtime/realtimeupdate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 86fb01a5d9..b791f4a2ab 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -145,6 +145,8 @@ RealtimeUpdate = { $('#form_notice').css({ 'margin':'18px 0 18px 1.795%', + 'width':'93%', + 'max-width':'451px' }); $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'}); From 22332555cf5eb920d6f95eced76446cf189d6f54 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 12:59:01 +0000 Subject: [PATCH 13/17] Aligned notice_data-attach input --- plugins/Realtime/realtimeupdate.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index b791f4a2ab..015c004397 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -154,6 +154,11 @@ RealtimeUpdate = { $('.notices li:first-child').css({'border-top':'none'}); $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'}); + + $('#form_notice #notice_data-attach').css({ + 'left':'auto', + 'right':'0' + }); } } From 60335fcbdf7b2ae4d27e7d413e7f5f46f61feda5 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 14:06:39 +0000 Subject: [PATCH 14/17] Draw a line to indicate new (unread) notice in a timeline since window blur. Inspired by Pidgin's Markerline plugin. --- plugins/Realtime/realtimeupdate.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index 015c004397..b5f78e4163 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -14,6 +14,18 @@ RealtimeUpdate = { RealtimeUpdate._replyurl = replyurl; RealtimeUpdate._favorurl = favorurl; RealtimeUpdate._deleteurl = deleteurl; + + $(window).blur(function() { + $('#notices_primary .notice').css({ + 'border-top-color':$('#notices_primary .notice:last').css('border-top-color'), + 'border-top-style':'dotted' + }); + + $('#notices_primary .notice:first').css({ + 'border-top-color':'#AAAAAA', + 'border-top-style':'solid' + }); + }); }, receive: function(data) @@ -151,7 +163,7 @@ RealtimeUpdate = { $('#form_notice label[for=notice_data-text], h1').css({'display': 'none'}); - $('.notices li:first-child').css({'border-top':'none'}); + $('.notices li:first-child').css({'border-top-color':'transparent'}); $('#form_notice label[for="notice_data-attach"], #form_notice #notice_data-attach').css({'top':'0'}); From 3694058976fca36edf2d7f43a75ffc74f0a7c672 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sun, 27 Sep 2009 14:24:31 +0000 Subject: [PATCH 15/17] Changed terminology for poping a window --- plugins/Realtime/realtimeupdate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js index b5f78e4163..4cd68a816b 100644 --- a/plugins/Realtime/realtimeupdate.js +++ b/plugins/Realtime/realtimeupdate.js @@ -125,7 +125,7 @@ RealtimeUpdate = { addPopup: function(url, timeline, iconurl) { - $('#content').prepend(''); + $('#content').prepend(''); $('#realtime_timeline').css({ 'margin':'0 0 18px 0', From 6b7a007ef2e3ea64be547923b97f08670dc13d14 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 27 Sep 2009 20:21:16 -0700 Subject: [PATCH 16/17] Forgot to add home_timeline to the list of methods that only require bareauth. --- actions/api.php | 1 + 1 file changed, 1 insertion(+) diff --git a/actions/api.php b/actions/api.php index c236378bcb..3705d035c4 100644 --- a/actions/api.php +++ b/actions/api.php @@ -142,6 +142,7 @@ class ApiAction extends Action static $bareauth = array('statuses/user_timeline', 'statuses/friends_timeline', + 'statuses/home_timeline', 'statuses/friends', 'statuses/replies', 'statuses/mentions', From 4e6c7302072eb6e11ae0025795a7a96fb28f2f29 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Sun, 27 Sep 2009 20:21:16 -0700 Subject: [PATCH 17/17] Forgot to add home_timeline to the list of methods that only require bareauth. --- actions/api.php | 1 + 1 file changed, 1 insertion(+) diff --git a/actions/api.php b/actions/api.php index d570bb0174..1bc90de110 100644 --- a/actions/api.php +++ b/actions/api.php @@ -160,6 +160,7 @@ class ApiAction extends Action static $bareauth = array('statuses/user_timeline', 'statuses/friends_timeline', + 'statuses/home_timeline', 'statuses/friends', 'statuses/replies', 'statuses/mentions',