From 84805501449aa03e86d985f3e2d9734184cea0db Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 10 Feb 2012 17:29:37 +0100 Subject: [PATCH 1/6] quattro: add "view in context" link in search results --- view/search_item.tpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/view/search_item.tpl b/view/search_item.tpl index c4f3ccac7b..de8bd23961 100755 --- a/view/search_item.tpl +++ b/view/search_item.tpl @@ -78,6 +78,14 @@
-
$dislike
+
$dislike
+ {{ if $conv }} +
+ $conv.title + {{ endif }} +
+ + + From ed38808aae6585bb6c31a18788f0290812bae2f8 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Fri, 10 Feb 2012 17:30:22 +0100 Subject: [PATCH 2/6] hidden jot in "display" to allow reshare --- include/conversation.php | 12 +++++++++--- mod/display.php | 4 ++++ view/jot-header.tpl | 3 +++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 6defefc731..947a9b040a 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -494,7 +494,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { } $likebuttons = ''; - $shareable = ((($profile_owner == local_user()) && ($mode != 'display') && (! $item['private'])) ? true : false); + $shareable = ((($profile_owner == local_user()) && (! $item['private'])) ? true : false); //($mode != 'display') && if($page_writeable) { if($toplevelpost) { @@ -832,7 +832,7 @@ function format_like($cnt,$arr,$type,$id) { }} -function status_editor($a,$x, $notes_cid = 0) { +function status_editor($a,$x, $notes_cid = 0, $popup=false) { $o = ''; @@ -896,7 +896,7 @@ function status_editor($a,$x, $notes_cid = 0) { $o .= replace_macros($tpl,array( '$return_path' => $a->cmd, - '$action' => 'item', + '$action' => $a->get_baseurl().'/item', '$share' => (($x['button']) ? $x['button'] : t('Share')), '$upload' => t('Upload photo'), '$shortupload' => t('upload photo'), @@ -935,6 +935,12 @@ function status_editor($a,$x, $notes_cid = 0) { '$preview' => t('Preview'), )); + + if ($popup==true){ + $o = ''; + + } + return $o; } diff --git a/mod/display.php b/mod/display.php index 02f080a790..79eaf37178 100755 --- a/mod/display.php +++ b/mod/display.php @@ -66,6 +66,10 @@ function display_content(&$a) { notice( t('Access to this profile has been restricted.') . EOL); return; } + + if ($is_owner) + $o .= status_editor($a,$x,0,true); + $sql_extra = permissions_sql($a->profile['uid'],$remote_contact,$groups); diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 22b4349166..482fb0e0dc 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -215,6 +215,9 @@ function enableOnUser(){ initEditor(function(){ addeditortext(data); $('#like-rotator-' + id).hide(); + if ($('#jot-popup').length != 0){ + $('#jot-popup').show(); + } $(window).scrollTop(0); }); From 3e664dbdfe4a7b0d27a7dd317ab7e85853822275 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Feb 2012 09:33:20 +0100 Subject: [PATCH 3/6] reshare in "display" view --- mod/display.php | 14 ++++++++++++++ view/jot-header.tpl | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mod/display.php b/mod/display.php index 79eaf37178..d96be4333b 100755 --- a/mod/display.php +++ b/mod/display.php @@ -11,6 +11,7 @@ function display_content(&$a) { require_once("include/bbcode.php"); require_once('include/security.php'); require_once('include/conversation.php'); + require_once('include/acl_selectors.php'); $o = '
' . "\r\n"; @@ -68,6 +69,19 @@ function display_content(&$a) { } if ($is_owner) + $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + + $x = array( + 'is_owner' => true, + 'allow_location' => $a->user['allow_location'], + 'default_location' => $a->user['default_location'], + 'nickname' => $a->user['nickname'], + 'lockstate' => ((($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid']))))) ? 'lock' : 'unlock'), + 'acl' => populate_acl((($group || $cid) ? $def_acl : $a->user), $celeb), + 'bang' => (($group || $cid) ? '!' : ''), + 'visitor' => 'block', + 'profile_uid' => local_user() + ); $o .= status_editor($a,$x,0,true); diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 482fb0e0dc..251b9cdd03 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -209,15 +209,14 @@ function enableOnUser(){ } function jotShare(id) { + if ($('#jot-popup').length != 0) $('#jot-popup').show(); + $('#like-rotator-' + id).show(); $.get('share/' + id, function(data) { if (!editor) $("#profile-jot-text").val(""); initEditor(function(){ addeditortext(data); $('#like-rotator-' + id).hide(); - if ($('#jot-popup').length != 0){ - $('#jot-popup').show(); - } $(window).scrollTop(0); }); From 16d3bc9deb5cb80f438a53f1bf483c79351674af Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Feb 2012 09:35:11 +0100 Subject: [PATCH 4/6] quattro: pause icon --- view/theme/quattro/quattro.less | 7 +++++++ view/theme/quattro/style.css | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less index c9fda0e1d7..1724ff30f0 100755 --- a/view/theme/quattro/quattro.less +++ b/view/theme/quattro/quattro.less @@ -503,6 +503,13 @@ section { } .wwto .contact-photo { width: 25px; height: 25px; } + +#pause { + position: fixed; + bottom: 5px; + right: 5px; +} + /* contacts menu */ .contact-photo-wrapper { position: relative; } .contact-photo { diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index 41adcd8d2c..8ff57813f8 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -844,6 +844,11 @@ section { width: 25px; height: 25px; } +#pause { + position: fixed; + bottom: 5px; + right: 5px; +} /* contacts menu */ .contact-photo-wrapper { position: relative; From 8369c243b321a421ea2ab92a49d8995b5724244e Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 13 Feb 2012 10:19:10 +0100 Subject: [PATCH 5/6] Fix 'item not found' message --- view/jot-header.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/jot-header.tpl b/view/jot-header.tpl index 251b9cdd03..02662d2d4b 100755 --- a/view/jot-header.tpl +++ b/view/jot-header.tpl @@ -118,7 +118,7 @@ function enableOnUser(){ } - +