From 388847e1f371554f50613357de06cf4a6ec751c9 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 28 Nov 2015 18:11:34 +0100 Subject: [PATCH] Issue 1779: There is now an atom feed link under the connect link on the profile page --- include/identity.php | 8 +++++++- mod/item.php | 3 +-- view/templates/profile_vcard.tpl | 3 +++ view/theme/duepuntozero/style.css | 1 + view/theme/duepuntozero/templates/profile_vcard.tpl | 3 +++ view/theme/frost/style.css | 1 + view/theme/frost/templates/profile_vcard.tpl | 5 +++-- view/theme/quattro/dark/style.css | 2 ++ view/theme/quattro/green/style.css | 2 ++ view/theme/quattro/lilac/style.css | 2 ++ view/theme/quattro/templates/profile_vcard.tpl | 3 +++ view/theme/smoothly/style.css | 3 +++ view/theme/vier/style.css | 3 +++ view/theme/vier/templates/profile_vcard.tpl | 3 +++ 14 files changed, 37 insertions(+), 5 deletions(-) diff --git a/include/identity.php b/include/identity.php index a785ce981d..0282b2d9a5 100644 --- a/include/identity.php +++ b/include/identity.php @@ -216,7 +216,12 @@ if(! function_exists('profile_sidebar')) { } if ($connect AND ($profile['network'] != NETWORK_DFRN) AND !isset($profile['remoteconnect'])) - $connect = false; + $connect = false; + + if ($connect) + $subscribe_feed = t("Atom feed"); + else + $subscribe_feed = false; if (isset($profile['remoteconnect'])) $remoteconnect = $profile['remoteconnect']; @@ -337,6 +342,7 @@ if(! function_exists('profile_sidebar')) { '$profile' => $p, '$connect' => $connect, '$remoteconnect' => $remoteconnect, + '$subscribe_feed' => $subscribe_feed, '$wallmessage' => $wallmessage, '$location' => $location, '$gender' => $gender, diff --git a/mod/item.php b/mod/item.php index 91a94974e9..a2b88a8e30 100644 --- a/mod/item.php +++ b/mod/item.php @@ -362,8 +362,7 @@ function item_post(&$a) { if((local_user()) && (local_user() == $profile_uid)) { $self = true; $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1", - intval($_SESSION['uid']) - ); + intval($_SESSION['uid'])); } elseif(remote_user()) { if(is_array($_SESSION['remote'])) { diff --git a/view/templates/profile_vcard.tpl b/view/templates/profile_vcard.tpl index 05e44432fd..fa209bf46f 100644 --- a/view/templates/profile_vcard.tpl +++ b/view/templates/profile_vcard.tpl @@ -55,6 +55,9 @@ {{if $wallmessage}}
  • {{$wallmessage}}
  • {{/if}} + {{if $subscribe_feed}} +
  • {{$subscribe_feed}}
  • + {{/if}} diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index 255a1d089a..eef8ad4ad8 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -205,6 +205,7 @@ aside { font-weight: bold; background: #3465a4 url('friendica-16.png') no-repeat 95% center; } +#subscribe-feed-link, #wallmessage-link { display: block; color: #FFFFFF; diff --git a/view/theme/duepuntozero/templates/profile_vcard.tpl b/view/theme/duepuntozero/templates/profile_vcard.tpl index bf2eb27349..fb5d4e420e 100644 --- a/view/theme/duepuntozero/templates/profile_vcard.tpl +++ b/view/theme/duepuntozero/templates/profile_vcard.tpl @@ -47,6 +47,9 @@ {{if $wallmessage}}
  • {{$wallmessage}}
  • {{/if}} + {{if $subscribe_feed}} +
  • {{$subscribe_feed}}
  • + {{/if}} diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css index 24fe47559a..2edb9221c6 100644 --- a/view/theme/frost/style.css +++ b/view/theme/frost/style.css @@ -284,6 +284,7 @@ aside { /* float:left;*/ } +#subscribe-feed-link, #dfrn-request-link { display: block; color: #FFFFFF; diff --git a/view/theme/frost/templates/profile_vcard.tpl b/view/theme/frost/templates/profile_vcard.tpl index 5157408713..b8f59ccaa8 100644 --- a/view/theme/frost/templates/profile_vcard.tpl +++ b/view/theme/frost/templates/profile_vcard.tpl @@ -43,10 +43,11 @@ {{if $wallmessage}}
  • {{$wallmessage}}
  • {{/if}} + {{if $subscribe_feed}} +
  • {{$subscribe_feed}}
  • + {{/if}} {{$contact_block}} - - diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css index 25102ba31d..785b527b27 100644 --- a/view/theme/quattro/dark/style.css +++ b/view/theme/quattro/dark/style.css @@ -838,6 +838,7 @@ aside #profile-extra-links li { margin: 0px; list-style: none; } +aside #subscribe-feed-link, aside #wallmessage-link { display: block; -moz-border-radius: 5px 5px 5px 5px; @@ -850,6 +851,7 @@ aside #wallmessage-link { padding: 4px 2px 2px 35px; margin-top: 3px; } +aside #subscribe-feed:hover, aside #wallmessage-link:hover { text-decoration: none; background-color: #19aeff; diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css index 78de886542..7335440319 100644 --- a/view/theme/quattro/green/style.css +++ b/view/theme/quattro/green/style.css @@ -854,6 +854,7 @@ aside #wallmessage-link:hover { text-decoration: none; background-color: #ccff42; } +aside #subscribe-feed-link, aside #dfrn-request-link { display: block; -moz-border-radius: 5px 5px 5px 5px; @@ -865,6 +866,7 @@ aside #dfrn-request-link { text-transform: uppercase; padding: 4px 2px 2px 35px; } +aside #subscribe-feed-link:hover, aside #dfrn-request-link:hover { text-decoration: none; background-color: #ccff42; diff --git a/view/theme/quattro/lilac/style.css b/view/theme/quattro/lilac/style.css index 1ca27b895c..c5027928b2 100644 --- a/view/theme/quattro/lilac/style.css +++ b/view/theme/quattro/lilac/style.css @@ -854,6 +854,7 @@ aside #wallmessage-link:hover { text-decoration: none; background-color: #86608e; } +aside #subscribe-feed-link, aside #dfrn-request-link { display: block; -moz-border-radius: 5px 5px 5px 5px; @@ -865,6 +866,7 @@ aside #dfrn-request-link { text-transform: uppercase; padding: 4px 2px 2px 35px; } +aside #subscribe-feed-link:hover, aside #dfrn-request-link:hover { text-decoration: none; background-color: #86608e; diff --git a/view/theme/quattro/templates/profile_vcard.tpl b/view/theme/quattro/templates/profile_vcard.tpl index dfa6d0445d..7a06e7588f 100644 --- a/view/theme/quattro/templates/profile_vcard.tpl +++ b/view/theme/quattro/templates/profile_vcard.tpl @@ -73,6 +73,9 @@ {{if $wallmessage}}
  • {{$wallmessage}}
  • {{/if}} + {{if $subscribe_feed}} +
  • {{$subscribe_feed}}
  • + {{/if}} diff --git a/view/theme/smoothly/style.css b/view/theme/smoothly/style.css index ba0c4bff6e..06f32abcdf 100644 --- a/view/theme/smoothly/style.css +++ b/view/theme/smoothly/style.css @@ -690,6 +690,7 @@ aside h4 { list-style: none; } +#subscribe-feed-link, #dfrn-request-link { box-shadow: inset 0px 1px 0px 0px #a65151; -moz-box-shadow: inset 0px 1px 0px 0px #a65151; @@ -725,6 +726,7 @@ aside h4 { background-color: #3465a4; } +#subscribe-feed-link:hover, #dfrn-request-link:hover { background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #1873a2), color-stop(1, #6da6c4) ); background: -moz-linear-gradient( center top, #1873a2 5%, #6da6c4 100% ); @@ -732,6 +734,7 @@ aside h4 { background-color: #1873a2; } +#subscribe-feed-link:active, #dfrn-request-link:active { position: relative; top: 1px; diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index ecbb2ad96c..07d72c0dde 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -1004,9 +1004,11 @@ aside #profile-extra-links ul { } aside #profile-extra-links li { padding: 0px; + padding-bottom: 4px; margin: 0px; list-style: none; } +aside #subscribe-feed-link, aside #dfrn-request-link, aside #wallmessage-link { display: block; @@ -1019,6 +1021,7 @@ aside #wallmessage-link { text-transform: uppercase; padding: 4px 2px 2px 35px; } +aside #subscribe-feed-link:hover, aside #dfrn-request-link:hover, aside #wallmessage-link:hover { text-decoration: none; diff --git a/view/theme/vier/templates/profile_vcard.tpl b/view/theme/vier/templates/profile_vcard.tpl index c5a51ccbaf..1882c15583 100644 --- a/view/theme/vier/templates/profile_vcard.tpl +++ b/view/theme/vier/templates/profile_vcard.tpl @@ -66,6 +66,9 @@ {{if $wallmessage}}
  • {{$wallmessage}}
  • {{/if}} + {{if $subscribe_feed}} +
  • {{$subscribe_feed}}
  • + {{/if}}