From e0e6762ed8074ad24e4a066d8b4ae22d0eafc2db Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sun, 25 Oct 2015 14:00:08 +0100
Subject: [PATCH 1/4] some inital work to have profile pics on manage page
---
mod/manage.php | 11 ++++++++++-
view/templates/manage.tpl | 22 +++++++++++++++++++---
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/mod/manage.php b/mod/manage.php
index 5513ebe08..236a3fb05 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -98,7 +98,16 @@ function manage_content(&$a) {
}
$identities = $a->identities;
- foreach($identities as $key=>$id) {
+
+ //getting profile pics for delegates
+ foreach ($identities as $key=>$id) {
+ $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (network = 'dfrn' OR self = 1)",
+ intval($a->user['uid']),
+ dbesc($id['username']),
+ dbesc($id['nickname'])
+ );
+ $identities[$key][thumb] = $thumb[0][thumb];
+
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
}
diff --git a/view/templates/manage.tpl b/view/templates/manage.tpl
index 80477bc40..d82ddb6d7 100644
--- a/view/templates/manage.tpl
+++ b/view/templates/manage.tpl
@@ -2,7 +2,7 @@
{{$title}}
{{$desc}}
{{$choose}}
-*}}
+
+
+
\ No newline at end of file
From bac61cf596c143a15a430b5ba15d9f3a8dfe21e5 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sun, 25 Oct 2015 16:49:45 +0100
Subject: [PATCH 2/4] manage-selector: some cleanup and css work
---
mod/manage.php | 9 +++---
view/global.css | 45 ++++++++++++++++++++++++++++++
view/templates/manage.tpl | 35 +++++++++++------------
view/theme/frost-mobile/style.css | 46 ++++++++++++++++++++++++++-----
view/theme/frost/style.css | 46 ++++++++++++++++++++++++++-----
5 files changed, 144 insertions(+), 37 deletions(-)
diff --git a/mod/manage.php b/mod/manage.php
index 236a3fb05..3f553dfa6 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -99,16 +99,17 @@ function manage_content(&$a) {
$identities = $a->identities;
- //getting profile pics for delegates
+ //getting additinal information for each identity
foreach ($identities as $key=>$id) {
- $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (network = 'dfrn' OR self = 1)",
+ $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (`network` = '%s' OR `self` = 1)",
intval($a->user['uid']),
dbesc($id['username']),
- dbesc($id['nickname'])
+ dbesc($id['nickname']),
+ dbesc(NETWORK_DFRN)
);
$identities[$key][thumb] = $thumb[0][thumb];
- $identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
+ $identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);
}
$o = replace_macros(get_markup_template('manage.tpl'), array(
diff --git a/view/global.css b/view/global.css
index c2f584003..d1c07d60a 100644
--- a/view/global.css
+++ b/view/global.css
@@ -212,3 +212,48 @@ a {
clip: rect(0,0,0,0);
border: 0;
}
+
+.itentity-match-wrapper {
+ float: left;
+ padding: 10px;
+ width: 120px;
+ height: 140px;
+ margin-bottom: 20px;
+}
+
+.identity-match-photo {
+ float: left;
+ text-align: center;
+ width: 120px;
+}
+
+.identity-match-name {
+ text-align: center;
+}
+
+.identity-match-details {
+ float: left;
+ text-align: center;
+ width: 120px;
+ overflow: hidden;
+ font-size: 10px;
+ font-weight: 500;
+ color: #999999;
+}
+
+.identity-match-break, .identity-match-end {
+ clear: both;
+}
+
+.identity-match-photo button {
+ border: none;
+ padding: 0;
+ margin: 0;
+ background: none;
+ height: 80px;
+ width: 80px;
+}
+
+.selected-identity img {
+ border: 2px solid #ff0000;
+}
\ No newline at end of file
diff --git a/view/templates/manage.tpl b/view/templates/manage.tpl
index d82ddb6d7..8a7922d7b 100644
--- a/view/templates/manage.tpl
+++ b/view/templates/manage.tpl
@@ -2,32 +2,29 @@
{{$title}}
{{$desc}}
{{$choose}}
-{{**}}
diff --git a/view/theme/frost-mobile/style.css b/view/theme/frost-mobile/style.css
index f4b46fed8..7d47c0b98 100644
--- a/view/theme/frost-mobile/style.css
+++ b/view/theme/frost-mobile/style.css
@@ -3234,17 +3234,49 @@ aside input[type='text'] {
margin: 10px;
}
-#identity-manage-desc {
- margin-top:15px;
- margin-bottom: 15px;
+.itentity-match-wrapper {
+ float: left;
+ padding: 10px;
+ width: 120px;
+ height: 140px;
+ margin-bottom: 20px;
}
-#identity-manage-choose {
- margin-bottom: 15px;
+.identity-match-photo {
+ float: left;
+ text-align: center;
+ width: 120px;
}
-#identity-submit {
- margin-top: 20px;
+.identity-match-name {
+ text-align: center;
+}
+
+.identity-match-details {
+ float: left;
+ text-align: center;
+ width: 120px;
+ overflow: hidden;
+ font-size: 10px;
+ font-weight: 500;
+ color: #999999;
+}
+
+.identity-match-break, .identity-match-end {
+ clear: both;
+}
+
+.identity-match-photo button {
+ border: none;
+ padding: 0;
+ margin: 0;
+ background: none;
+ height: 80px;
+ width: 80px;
+}
+
+.selected-identity img {
+ border: 2px solid #ff0000;
}
#photo-nav {
diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css
index 8b87c3bd4..5f3ea646e 100644
--- a/view/theme/frost/style.css
+++ b/view/theme/frost/style.css
@@ -3006,17 +3006,49 @@ aside input[type='text'] {
margin: 10px;
}
-#identity-manage-desc {
- margin-top:15px;
- margin-bottom: 15px;
+.itentity-match-wrapper {
+ float: left;
+ padding: 10px;
+ width: 120px;
+ height: 140px;
+ margin-bottom: 20px;
}
-#identity-manage-choose {
- margin-bottom: 15px;
+.identity-match-photo {
+ float: left;
+ text-align: center;
+ width: 120px;
}
-#identity-submit {
- margin-top: 20px;
+.identity-match-name {
+ text-align: center;
+}
+
+.identity-match-details {
+ float: left;
+ text-align: center;
+ width: 120px;
+ overflow: hidden;
+ font-size: 10px;
+ font-weight: 500;
+ color: #999999;
+}
+
+.identity-match-break, .identity-match-end {
+ clear: both;
+}
+
+.identity-match-photo button {
+ border: none;
+ padding: 0;
+ margin: 0;
+ background: none;
+ height: 80px;
+ width: 80px;
+}
+
+.selected-identity img {
+ border: 2px solid #ff0000;
}
#photo-prev-link, #photo-next-link {
From 87c559d60504ed7069f1fdb4784303437f11eb8f Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sun, 25 Oct 2015 18:04:20 +0100
Subject: [PATCH 3/4] manage-selector: sql - check for same baseurl
---
mod/manage.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mod/manage.php b/mod/manage.php
index 3f553dfa6..37d7542fe 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -101,10 +101,12 @@ function manage_content(&$a) {
//getting additinal information for each identity
foreach ($identities as $key=>$id) {
- $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (`network` = '%s' OR `self` = 1)",
+ $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND `nurl` = '%s'
+ AND (`network` = '%s' OR `self` = 1)",
intval($a->user['uid']),
dbesc($id['username']),
dbesc($id['nickname']),
+ dbesc(normalise_link($a->get_baseurl() . '/profile/' . $id['nickname'])),
dbesc(NETWORK_DFRN)
);
$identities[$key][thumb] = $thumb[0][thumb];
From fdda4be452b6c3f95288fcd8cac456faad08a426 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Mon, 26 Oct 2015 00:19:55 +0100
Subject: [PATCH 4/4] manage-selector: use an easier sql querry
---
mod/manage.php | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/mod/manage.php b/mod/manage.php
index 37d7542fe..bfa4d1475 100644
--- a/mod/manage.php
+++ b/mod/manage.php
@@ -101,14 +101,10 @@ function manage_content(&$a) {
//getting additinal information for each identity
foreach ($identities as $key=>$id) {
- $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND `nurl` = '%s'
- AND (`network` = '%s' OR `self` = 1)",
- intval($a->user['uid']),
- dbesc($id['username']),
- dbesc($id['nickname']),
- dbesc(normalise_link($a->get_baseurl() . '/profile/' . $id['nickname'])),
- dbesc(NETWORK_DFRN)
- );
+ $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = '%s' AND `self` = 1",
+ dbesc($id['uid'])
+ );
+
$identities[$key][thumb] = $thumb[0][thumb];
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);