Diaspora: Avatars of repeated items weren't found

Vier: Complete redesign of the navigation header
This commit is contained in:
Michael Vogel 2012-11-10 23:19:32 +01:00
parent 71e43e68d4
commit b875191237
4 changed files with 182 additions and 57 deletions

View file

@ -231,7 +231,7 @@ function q($sql) {
unset($args[0]);
if($db && $db->connected) {
$stmt = vsprintf($sql,$args);
$stmt = @vsprintf($sql,$args); // Disabled warnings
//logger("dba: q: $stmt", LOGGER_ALL);
if($stmt === false)
logger('dba: vsprintf error: ' . print_r(debug_backtrace(),true), LOGGER_DEBUG);

View file

@ -859,7 +859,8 @@ function diaspora_post($importer,$xml,$msg) {
$datarray['parent'] = 0;
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
$datarray['owner-avatar'] = $contact['thumb'];
//$datarray['owner-avatar'] = $contact['thumb'];
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
$datarray['author-name'] = $contact['name'];
$datarray['author-link'] = $contact['url'];
$datarray['author-avatar'] = $contact['thumb'];
@ -1021,7 +1022,7 @@ function diaspora_reshare($importer,$xml,$msg) {
$datarray['parent'] = 0;
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
$datarray['owner-avatar'] = $contact['thumb'];
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
$datarray['author-name'] = $person['name']; // Let reshared messages look like wall-to-wall posts
$datarray['author-link'] = $person['url']; // we have to set an additional value in the item in the future
// $datarray['author-avatar'] = $person['thumb']; // to distinct the wall-to-wall-posts from reshared/repeated messages
@ -1118,7 +1119,8 @@ function diaspora_asphoto($importer,$xml,$msg) {
$datarray['parent'] = 0;
$datarray['owner-name'] = $contact['name'];
$datarray['owner-link'] = $contact['url'];
$datarray['owner-avatar'] = $contact['thumb'];
//$datarray['owner-avatar'] = $contact['thumb'];
$datarray['owner-avatar'] = ((x($contact,'thumb')) ? $contact['thumb'] : $contact['photo']);
$datarray['author-name'] = $contact['name'];
$datarray['author-link'] = $contact['url'];
$datarray['author-avatar'] = $contact['thumb'];
@ -1866,7 +1868,8 @@ EOT;
$arr['owner-name'] = $parent_item['name'];
$arr['owner-link'] = $parent_item['url'];
$arr['owner-avatar'] = $parent_item['thumb'];
//$arr['owner-avatar'] = $parent_item['thumb'];
$arr['owner-avatar'] = ((x($parent_item,'thumb')) ? $parent_item['thumb'] : $parent_item['photo']);
$arr['author-name'] = $person['name'];
$arr['author-link'] = $person['url'];

View file

@ -6,20 +6,6 @@
</header>
<nav>
<ul>
{{ if $userinfo }}
<li id="nav-user-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-user-menu" title="$sitelocation"><img src="$userinfo.icon" alt="$userinfo.name"></a>
<ul id="nav-user-menu" class="menu-popup">
{{ for $nav.usermenu as $usermenu }}
<li><a class="$usermenu.2" href="$usermenu.0" title="$usermenu.3">$usermenu.1</a></li>
{{ endfor }}
{{ if $nav.notifications }}<li><a class="$nav.notifications.2" href="$nav.notifications.0" title="$nav.notifications.3" >$nav.notifications.1</a></li>{{ endif }}
{{ if $nav.messages }}<li><a class="$nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a></li>{{ endif }}
{{ if $nav.contacts }}<li><a class="$nav.contacts.2" href="$nav.contacts.0" title="$nav.contacts.3" >$nav.contacts.1</a></li>{{ endif }}
</ul>
</li>
{{ endif }}
{{ if $nav.community }}
<li id="nav-community-link" class="nav-menu $sel.community">
<a class="$nav.community.2" href="$nav.community.0" title="$nav.community.3" >$nav.community.1</a>
@ -38,7 +24,30 @@
<span id="home-update" class="nav-notify"></span>
</li>
{{ endif }}
{{ if $nav.messages }}
<li id="nav-messages-linkmenu" class="nav-menu">
<a href="$nav.messages.0" rel="#nav-messages-menu" title="$nav.messages.1">$nav.messages.1
<span id="mail-update" class="nav-notify"></span></a>
<ul id="nav-messages-menu" class="menu-popup">
<li id="nav-messages-see-all"><a href="$nav.messages.0">$nav.messages.1</a></li>
<li id="nav-messages-see-all"><a href="$nav.messages.new.0">$nav.messages.new.1</a></li>
</ul>
</li>
{{ endif }}
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
<ul id="nav-site-menu" class="menu-popup">
{{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}
{{ if $nav.help }} <li><a class="$nav.help.2" target="friendica-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a></li>{{ endif }}
<li><a class="$nav.search.2" href="friendica" title="Site Info / Impressum" >Info/Impressum</a></li>
<li><a class="$nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a></li>
{{ if $nav.settings }}<li><a class="$nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
{{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
{{ if $nav.logout }}<li><a class="menu-sep $nav.logout.2" href="$nav.logout.0" title="$nav.logout.3" >$nav.logout.1</a></li>{{ endif }}
{{ if $nav.login }}<li><a class="$nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a><li>{{ endif }}
</ul>
</li>
{{ if $nav.notifications }}
<li id="nav-notifications-linkmenu" class="nav-menu-icon"><a href="$nav.notifications.0" rel="#nav-notifications-menu" title="$nav.notifications.1"><span class="icon s22 notify">$nav.notifications.1</span></a>
<span id="notify-update" class="nav-notify"></span>
@ -50,30 +59,36 @@
</li>
{{ endif }}
<li id="nav-site-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-site-menu"><span class="icon s22 gear">Site</span></a>
<ul id="nav-site-menu" class="menu-popup">
{{ if $nav.manage }}<li><a class="$nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a></li>{{ endif }}
{{ if $nav.settings }}<li><a class="$nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>{{ endif }}
{{ if $nav.admin }}<li><a class="$nav.admin.2" href="$nav.admin.0" title="$nav.admin.3" >$nav.admin.1</a></li>{{ endif }}
{{ if $nav.logout }}<li><a class="menu-sep $nav.logout.2" href="$nav.logout.0" title="$nav.logout.3" >$nav.logout.1</a></li>{{ endif }}
{{ if $nav.login }}<li><a class="$nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a><li>{{ endif }}
</ul>
</li>
<!--
{{ if $nav.help }}
<li id="nav-help-link" class="nav-menu $sel.help">
<a class="$nav.help.2" target="friendica-help" href="$nav.help.0" title="$nav.help.3" >$nav.help.1</a>
</li>
{{ endif }}
-->
<li id="nav-search-link" class="nav-menu $sel.search">
<a class="$nav.search.2" href="$nav.search.0" title="$nav.search.3" >$nav.search.1</a>
</li>
<li id="nav-directory-link" class="nav-menu $sel.directory">
<a class="$nav.directory.2" href="$nav.directory.0" title="$nav.directory.3" >$nav.directory.1</a>
</li>
{{ if $userinfo }}
<li id="nav-user-linklabel" class="nav-menu"><a href="#" rel="#nav-user-menu" title="$sitelocation">$userinfo.name</a>
<li id="nav-user-linkmenu" class="nav-menu-icon"><a href="#" rel="#nav-user-menu" title="$sitelocation"><img src="$userinfo.icon" alt="$userinfo.name"></a>
<ul id="nav-user-menu" class="menu-popup">
{{ for $nav.usermenu as $usermenu }}
<li><a class="$usermenu.2" href="$usermenu.0" title="$usermenu.3">$usermenu.1</a></li>
{{ endfor }}
{{ if $nav.notifications }}<li><a class="$nav.notifications.2" href="$nav.notifications.0" title="$nav.notifications.3" >$nav.notifications.1</a></li>{{ endif }}
{{ if $nav.messages }}<li><a class="$nav.messages.2" href="$nav.messages.0" title="$nav.messages.3" >$nav.messages.1</a></li>{{ endif }}
{{ if $nav.contacts }}<li><a class="$nav.contacts.2" href="$nav.contacts.0" title="$nav.contacts.3" >$nav.contacts.1</a></li>{{ endif }}
</ul>
</li>
{{ endif }}
{{ if $nav.search}}
<li id="search-box">
<form method="get" action="$nav.search.0">
<input id="search-text" class="nav-menu-search" type="text" value="" name="search">
</form>
</li>
{{ endif }}
{{ if $nav.apps }}
<li id="nav-apps-link" class="nav-menu $sel.apps">
@ -120,7 +135,6 @@
{{ endif }}
{{ if $nav.manage }}<a id="nav-manage-link" class="nav-commlink $nav.manage.2" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a>{{ endif }}
{{ if $nav.settings }}<a id="nav-settings-link" class="nav-link $nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a>{{ endif }}
{{ if $nav.profiles }}<a id="nav-profiles-link" class="nav-link $nav.profiles.2" href="$nav.profiles.0" title="$nav.profiles.3" >$nav.profiles.1</a>{{ endif }}

View file

@ -319,7 +319,7 @@
.hide-comments-outer {
margin-left: 80px;
margin-bottom: 5px;
width: 684px;
width: 660px;
border-bottom: 1px solid #BDCDD4;
border-top: 1px solid #BDCDD4;
@ -449,8 +449,9 @@ div.jGrowl div.info {
/* header */
header {
position: fixed;
left: 43%;
right: 43%;
/* left: 43%;
right: 43%; */
left: 25px;
top: 0px;
margin: 0px;
padding: 0px;
@ -492,7 +493,8 @@ nav {
left: 0px;
top: 0px;
padding: 0px;
background: #364A84;
padding-left: 0px;
background: #364A84;
background: -moz-linear-gradient(top, #516499 0%, #364a84 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#516499), color-stop(100%,#364a84));
background: -webkit-linear-gradient(top, #516499 0%,#364a84 100%);
@ -529,6 +531,16 @@ nav ul li .menu-popup {
left: 0px;
right: auto;
}
nav #search-box #search-text {
background-image: url('icons/lupe.png');
background-repeat:no-repeat;
padding-left:20px;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
border-bottom-left-radius: 15px;
}
nav .nav-menu-icon {
position: relative;
height: 22px;
@ -548,11 +560,16 @@ nav .nav-menu-icon img {
nav .nav-menu-icon .nav-notify {
top: 3px;
}
nav .nav-menu-label {
margin: 3px 5px 0px;
}
nav .nav-menu {
position: relative;
height: 16px;
padding: 5px;
margin: 3px 15px 0px;
padding-left: 5px;
padding-right: 5px;
margin: 3px 5px 0px;
font-size: 13px;
border-bottom: 3px solid #364A84;
}
@ -581,17 +598,32 @@ nav #nav-help-link,
nav #nav-search-link,
nav #nav-directory-link,
nav #nav-apps-link,
nav #nav-site-linkmenu {
nav #nav-notifications-linkmenu,
nav #nav-site-linkmenu,
nav #nav-user-linklabel {
float: right;
}
nav #nav-user-linklabel {
padding-left: 0px;
margin-left: 0px;
}
nav #nav-help-link .menu-popup,
nav #nav-search-link .menu-popup,
nav #nav-directory-link .menu-popup,
nav #nav-apps-link .menu-popup,
nav #nav-notifications-linkmenu .menu-popup,
nav #nav-site-linkmenu .menu-popup {
right: 0px;
left: auto;
}
nav #nav-site-linkmenu {
margin-left: 0px;
margin-right: 0px;
}
nav #nav-notifications-linkmenu {
margin-left: 0px;
margin-right: 5px;
}
nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png");
}
@ -599,6 +631,17 @@ nav #nav-apps-link.selected {
background-color: #364e59;
}
nav #nav-community-link {
padding-left: 205px;
}
nav #nav-user-linkmenu {
float: right;
padding-left: 0px;
padding-right: 0px;
margin-right: 5px;
}
#nav-notifications-mark-all {
/* padding: 1px 1px 2px 26px; */
/* border-bottom: 1px solid #364E59; */
@ -798,7 +841,7 @@ aside #search-text {
margin-top: 0px;
}
.nets-all {
margin-left: 16px;
margin-left: 10px;
}
#contact-block {
@ -826,6 +869,18 @@ aside #search-text {
widht: 48px;
height: 58px;
}
.group_selected {
background: url("../../../view/theme/diabook/icons/selected.png") no-repeat left center;
float: left;
height: 22px;
width: 22px;
}
.group_unselected {
background: url("../../../view/theme/diabook/icons/unselected.png") no-repeat left center;
float: left;
height: 22px;
width: 22px;
}
/* widget */
.widget {
margin-bottom: 2em;
@ -879,11 +934,15 @@ aside #search-text {
}
.widget ul {
padding: 0px;
-webkit-margin-before: 0em;
-webkit-margin-after: 0em;
}
.widget ul li {
padding-left: 16px;
min-height: 16px;
padding-left: 10px;
/* min-height: 20px; */
list-style: none;
padding-top: 1px;
padding-bottom: 1px;
}
.widget .tool.selected {
background: url('../../../images/selected.png') no-repeat left center;
@ -897,7 +956,7 @@ aside #search-text {
section {
display: table-cell;
vertical-align: top;
width: 800px;
width: 760px;
padding: 0px 0px 0px 10px;
}
/* wall item */
@ -906,11 +965,11 @@ section {
position: relative;
padding: 5px;
margin-bottom: 0px;
width: 775px;
/* width: 755px; */
}
.wall-item-decor {
position: absolute;
left: 790px;
left: 755px;
top: -10px;
width: 16px;
}
@ -919,7 +978,7 @@ section {
}
.wall-item-container {
display: table;
width: 780px;
width: 745px;
}
.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom {
display: table-row;
@ -1022,7 +1081,7 @@ section {
margin-top: 5px;
margin-bottom: 5px;
margin-left: 80px;
width: 700px;
width: 665px;
border-bottom: 1px solid hsl(198, 21%, 79%);
}
.wall-item-container.comment .contact-photo {
@ -1060,7 +1119,7 @@ section {
border: 1px solid #2d2d2d;
}
.togglecomment {
.fakelink.togglecomment {
float: left;
margin-right: 1em;
}
@ -1098,6 +1157,38 @@ section {
border-right: 1px solid #A7C7F7;
padding-right: 12px;
}
#profile-jot-form #profile-jot-text {
height: 2.0em;
width: 99%;
font-size: 15px;
color: #999999;
border: 1px solid #DDD;
padding: 0.3em;
margin-bottom: 10px;
}
#profile-jot-form #jot-title, #profile-jot-form #jot-category {
border-radius: 5px 5px 5px 5px;
font-weight: bold;
height: 20px;
margin: 0 0 5px;
width: 60%;
border: 1px solid #d2d2d2;
}
#profile-jot-form #jot-title:-webkit-input-placeholder {
font-weight: normal;
}
#profile-jot-form #jot-title:-moz-placeholder {
font-weight: normal;
}
#profile-jot-form #profile-jot-text_parent #profile-jot-text_tbl{
width: 785px;
height: 100px;
}
#jot-preview-content .tread-wrapper {
background-color: #fce94f;
}
@ -1357,7 +1448,7 @@ section {
clear: both;
}
#profile-jot-text_tbl {
width: 800px;
width: 780px;
}
#profile-jot-wrapper {
margin-bottom: 20px;
@ -1890,7 +1981,7 @@ a.mail-list-link {
}
.app-title {
margin: 10px;
margin: 0px;
}
#identity-manage-desc {
@ -2048,3 +2139,20 @@ a.mail-list-link {
width: 175px;
}
.menu-profile-list{
height: auto;
overflow: auto;
min-height: 16px;
list-style: none;
}
.menu-profile-list:hover{
background: #E7F2F7;
}
.menu-profile-list-item{
padding-left: 5px;
vertical-align: middle;
}
.menu-profile-list-item:hover{
text-decoration: none;
}