From 3f1dc22c0edc87e332c436d0426f9616e6500880 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 27 Oct 2015 11:07:40 +0100 Subject: fix sharing of photo items --- include/photos.php | 11 ++++++----- mod/share.php | 12 +++++++++--- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/include/photos.php b/include/photos.php index a8619c372..d62d5aeb8 100644 --- a/include/photos.php +++ b/include/photos.php @@ -292,18 +292,19 @@ function photo_upload($channel, $observer, $args) { $tag = (($r2) ? '[zmg=' . $width . 'x' . $height . ']' : '[zmg]'); } + $body = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']' + . $tag . z_root() . "/photo/{$photo_hash}-{$scale}." . $ph->getExt() . '[/zmg]' + . '[/zrl]'; + // Create item object $object = array( 'type' => ACTIVITY_OBJ_PHOTO, 'title' => $title, 'id' => rawurlencode(z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash), - 'link' => $link + 'link' => $link, + 'bbcode' => $body ); - $body = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']' - . $tag . z_root() . "/photo/{$photo_hash}-{$scale}." . $ph->getExt() . '[/zmg]' - . '[/zrl]'; - // Create item container if($args['item']) { foreach($args['item'] as $i) { diff --git a/mod/share.php b/mod/share.php index d5a389bdf..12938ae0d 100644 --- a/mod/share.php +++ b/mod/share.php @@ -42,6 +42,12 @@ function share_init(&$a) { xchan_query($r); + $is_photo = (($r[0]['obj_type'] === ACTIVITY_OBJ_PHOTO) ? true : false); + if($is_photo) { + $object = json_decode($r[0]['object'],true); + $photo_bb = $object['bbcode']; + } + if (strpos($r[0]['body'], "[/share]") !== false) { $pos = strpos($r[0]['body'], "[share"); $o = substr($r[0]['body'], $pos); @@ -53,9 +59,9 @@ function share_init(&$a) { "' posted='".$r[0]['created']. "' message_id='".$r[0]['mid']."']"; if($r[0]['title']) - $o .= '[b]'.$r[0]['title'].'[/b]'."\n"; - $o .= $r[0]['body']; - $o.= "[/share]"; + $o .= '[b]'.$r[0]['title'].'[/b]'."\r\n"; + $o .= (($is_photo) ? $r[0]['body'] . "\r\n" . $photo_bb : $r[0]['body']); + $o .= "[/share]"; } if(local_channel()) { -- cgit v1.2.3 From c6daf4d41cd4de744f59ae0e8284eab2dc44fe19 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 27 Oct 2015 11:26:48 +0100 Subject: first the image than the body --- mod/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/share.php b/mod/share.php index 12938ae0d..7ed6cf9a6 100644 --- a/mod/share.php +++ b/mod/share.php @@ -60,7 +60,7 @@ function share_init(&$a) { "' message_id='".$r[0]['mid']."']"; if($r[0]['title']) $o .= '[b]'.$r[0]['title'].'[/b]'."\r\n"; - $o .= (($is_photo) ? $r[0]['body'] . "\r\n" . $photo_bb : $r[0]['body']); + $o .= (($is_photo) ? $photo_bb . "\r\n" . $r[0]['body'] : $r[0]['body']); $o .= "[/share]"; } -- cgit v1.2.3 From 71f70b4377fa33ceba6b8e6a198d5871c8a8f143 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 27 Oct 2015 12:52:21 +0100 Subject: css fixes --- view/tpl/cloud_actionspanel.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/view/tpl/cloud_actionspanel.tpl b/view/tpl/cloud_actionspanel.tpl index 44e4eb54c..81a586e75 100644 --- a/view/tpl/cloud_actionspanel.tpl +++ b/view/tpl/cloud_actionspanel.tpl @@ -1,4 +1,4 @@ -
+
@@ -7,7 +7,7 @@
-
+
{{if $quota.limit || $quota.used}}{{/if}}
-- cgit v1.2.3 From 605381f83deecc384a0ed7630dd1577e93b2cf8f Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Tue, 27 Oct 2015 22:52:54 +0100 Subject: More fine tuning bluegrid schema. Extra generic-wrapper-styled. --- view/theme/redbasic/schema/bluegrid.css | 57 ++++++++++++++++++++++++++------- view/tpl/404.tpl | 2 ++ view/tpl/chat.tpl | 2 ++ view/tpl/chatroom_new.tpl | 4 +-- view/tpl/chatrooms.tpl | 2 ++ view/tpl/locmanage.tpl | 3 +- view/tpl/profile_photo.tpl | 2 ++ 7 files changed, 58 insertions(+), 14 deletions(-) diff --git a/view/theme/redbasic/schema/bluegrid.css b/view/theme/redbasic/schema/bluegrid.css index 9638e4696..a2b795be9 100644 --- a/view/theme/redbasic/schema/bluegrid.css +++ b/view/theme/redbasic/schema/bluegrid.css @@ -11,7 +11,7 @@ body { border: 1px solid #FFF; } -.generic-content-wrapper-styled a:hover, .generic-content-wrapper-styled a:focus, .generic-content-wrapper-styled .field.checkbox:hover label, .generic-content-wrapper-styled .field.checkbox:focus label { +.generic-content-wrapper-styled a:hover, .generic-content-wrapper-styled a:focus, .generic-content-wrapper-styled .field.checkbox:hover label, .generic-content-wrapper-styled .field.checkbox:focus label, .allcontact-link:hover, .allcontact-link:focus { color: rgba(255,255,255,.8); } @@ -20,9 +20,18 @@ body { } .generic-content-wrapper { + background-color: rgba(255,255,255,.8); + color: #4d4d4d; +} + +.wall-item-content-wrapper { background-color: #FFF; } +.hide-comments-outer, .wall-item-content-wrapper.comment, .wall-item-comment-wrapper { + background-color: transparent; +} + .generic-content-wrapper-styled .generic-content-wrapper { color: #4d4d4d; } @@ -76,7 +85,7 @@ input#jot-title:hover, input#jot-title:focus { } nav .dropdown-menu, .wall-item-tools .dropdown-menu, .section-title-wrapper .dropdown-menu { - background-color: rgba(67,72,138,.95); + background-color: rgba(67,72,138,.97); color: #fff; border-radius: 0; border: none; @@ -89,6 +98,23 @@ nav .dropdown-menu, .wall-item-tools .dropdown-menu, .section-title-wrapper .dro text-decoration: underline; } +.vcard .dropdown-menu { + background-color: rgba(255,255,255,.97); + border-radius: 0; + border: none; + box-shadow: 0px 6px 12px rgba(169,169,169,.176); +} + +.vcard .dropdown-menu a, .fc-today { + color: #43488A; +} + +.vcard .dropdown-menu > li > a:focus, .vcard .dropdown-menu > li > a:hover { + color: #43488A; + background-color: rgba( 255,255,255,.7); + text-decoration: underline; +} + nav .badge { background-color: rgba(255,255,255,.8); color: #43488A; @@ -173,10 +199,6 @@ nav .badge:hover, nav .badge:focus { text-shadow: none !important; } -.fc-today { - color: #43488A; -} - div.rateme { border-radius: 0px; font-weight: 400; @@ -197,8 +219,12 @@ div.rateme:hover, div.rateme:focus, a.rateme:hover, a.rateme:focus { color: #43488A !important; } +.notice { + background: rgba(215,43,52,.7) url("/images/hz-white-32.png") no-repeat scroll 15px center !important; + color: #FFF !important; +} + input { - -moz-border-radius: 0px; border-radius: 0px; } @@ -211,9 +237,18 @@ input { border: 1px solid rgba(255,255,255,.5); } -.contact-entry-edit a:hover, .contact-entry-edit a:focus { +.contact-entry-edit a:hover, .contact-entry-edit a:focus, .generic-content-wrapper-styled > p > span.btn.btn-default > a:hover,.generic-content-wrapper-styled > p > span.btn.btn-default > a:focus, div#profile-edit-links a:hover, div#profile-edit-links a:focus { color: #43488A; -} +} + +.profile-edit-side-link, input#profile-photo-upload, .allcontact-link { + color: #FFF; +} + +.profile-edit-side-link:hover, .profile-edit-side-link:focus { + color: #FFF; + text-decoration: none; +} .btn, #event-edit-form .btn { border: 1px solid #FFF; @@ -252,7 +287,7 @@ input { border-color: #398439; } -.btn-primary, input#event-submit, input#rmagic-submit-button, input#lostpass-submit-button, input#side-follow-submit { +.btn-primary, input#event-submit, input#rmagic-submit-button, input#lostpass-submit-button, input#side-follow-submit, .profile-edit-submit-wrapper > input.profile-edit-submit-button, input#profile-photo-submit { background-color: #FFF; color: #43488A; border-radius: 0px; @@ -261,7 +296,7 @@ input { transition: all .3s ease-in-out; } -.btn-primary:hover, .btn-primary:focus, input#event-submit:hover, input#event-submit:focus, input#rmagic-submit-button:hover, input#rmagic-submit-button:focus, input#lostpass-submit-button:hover, input#lostpass-submit-button:focus, input#side-follow-submit:hover, input#side-follow-submit:focus { +.btn-primary:hover, .btn-primary:focus, input#event-submit:hover, input#event-submit:focus, input#rmagic-submit-button:hover, input#rmagic-submit-button:focus, input#lostpass-submit-button:hover, input#lostpass-submit-button:focus, input#side-follow-submit:hover, input#side-follow-submit:focus, .profile-edit-submit-wrapper > input.profile-edit-submit-button:hover, .profile-edit-submit-wrapper > input.profile-edit-submit-button:focus, input#profile-photo-submit:hover, input#profile-photo-submit:focus { border-color: #FFF; background-color: #43488A; color: #FFF; diff --git a/view/tpl/404.tpl b/view/tpl/404.tpl index 518ad1d29..c9b51a63b 100755 --- a/view/tpl/404.tpl +++ b/view/tpl/404.tpl @@ -1 +1,3 @@ +

{{$message}}

+
diff --git a/view/tpl/chat.tpl b/view/tpl/chat.tpl index 9f95d2999..003e0192b 100644 --- a/view/tpl/chat.tpl +++ b/view/tpl/chat.tpl @@ -1,3 +1,4 @@ +

{{$room_name}}

@@ -33,6 +34,7 @@
+