diff --git a/view/theme/frost/templates/suggest_friends.tpl b/view/theme/frost/templates/suggest_friends.tpl
index e39cca6e5..a386f30d0 100644
--- a/view/theme/frost/templates/suggest_friends.tpl
+++ b/view/theme/frost/templates/suggest_friends.tpl
@@ -1,17 +1,23 @@
-
-
-
-
-
+{{include file="section_title.tpl"}}
+
+{{foreach $entries as $entry}}
+
+
+
+
+
+ {{if $entry.connlnk}}
+
+ {{/if}}
+
-
-
-
- {{if $connlnk}}
-
- {{/if}}
-
-
+{{/foreach}}
+
+
From 6d559bf8a9e36ae9695dc77617f6ae8f574c7fa6 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sat, 17 Oct 2015 21:40:41 +0200
Subject: [PATCH 06/21] viewcontact: use section_title.tpl as headding
---
view/templates/viewcontact_template.tpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/view/templates/viewcontact_template.tpl b/view/templates/viewcontact_template.tpl
index ff33d6521..455551c68 100644
--- a/view/templates/viewcontact_template.tpl
+++ b/view/templates/viewcontact_template.tpl
@@ -1,5 +1,5 @@
-
{{$title}}
+{{include file="section_title.tpl"}}
{{foreach $contacts as $contact}}
{{include file="contact_template.tpl"}}
From b9d9bf8ecdc4e82637524eb59386ff8a7f54de6c Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sat, 17 Oct 2015 21:45:55 +0200
Subject: [PATCH 07/21] directory: move pagination into template
---
mod/directory.php | 5 ++---
view/templates/directory_header.tpl | 4 +++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/mod/directory.php b/mod/directory.php
index d256c590a..46c4f38ad 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -196,11 +196,10 @@ function directory_content(&$a) {
'$finding' => t('Finding:'),
'$findterm' => (strlen($search) ? $search : ""),
'$title' => t('Site Directory'),
- '$submit' => t('Find')
+ '$submit' => t('Find'),
+ '$paginate' => paginate($a),
));
- $o .= paginate($a);
-
}
else
info( t("No entries \x28some entries may be hidden\x29.") . EOL);
diff --git a/view/templates/directory_header.tpl b/view/templates/directory_header.tpl
index 07d625ed4..eda887a89 100644
--- a/view/templates/directory_header.tpl
+++ b/view/templates/directory_header.tpl
@@ -26,4 +26,6 @@
{{include file="directory_item.tpl"}}
{{/foreach}}
-
\ No newline at end of file
+
+
+{{$paginate}}
From 4b8ca578d1245c760a1c04bea6daf5b8582d0cbd Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sat, 17 Oct 2015 22:09:19 +0200
Subject: [PATCH 08/21] dirfind: move pagination into template
---
mod/dirfind.php | 2 +-
mod/match.php | 2 +-
view/templates/match.tpl | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/mod/dirfind.php b/mod/dirfind.php
index 39c13dcb7..9e02a47e2 100644
--- a/mod/dirfind.php
+++ b/mod/dirfind.php
@@ -156,6 +156,7 @@ function dirfind_content(&$a, $prefix = "") {
$o .= replace_macros($tpl,array(
'title' => sprintf( t('People Search - %s'), $search),
'$entries' => $entries,
+ '$paginate' => paginate($a),
));
}
@@ -165,6 +166,5 @@ function dirfind_content(&$a, $prefix = "") {
}
- $o .= paginate($a);
return $o;
}
diff --git a/mod/match.php b/mod/match.php
index 30d057a0d..380f6e74a 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -82,6 +82,7 @@ function match_content(&$a) {
$o .= replace_macros($tpl,array(
'$title' => t('Profile Match'),
'entries' => $entries,
+ '$paginate' => paginate($a),
));
}
@@ -91,6 +92,5 @@ function match_content(&$a) {
}
- $o .= paginate($a);
return $o;
}
diff --git a/view/templates/match.tpl b/view/templates/match.tpl
index db612e3dc..d269a253b 100644
--- a/view/templates/match.tpl
+++ b/view/templates/match.tpl
@@ -36,3 +36,5 @@
{{/foreach}}
+
+{{$paginate}}
From f9c0c1d6967bdefe4f00700a19b8eba44063e3f7 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Sun, 18 Oct 2015 17:12:48 +0200
Subject: [PATCH 09/21] template rework: use viewcontact_template.tpl for
contact dealing pages
---
mod/contacts.php | 1 +
mod/dirfind.php | 8 +++---
mod/match.php | 18 +++++++++----
mod/suggest.php | 24 ++++++++++++------
mod/viewcontacts.php | 2 +-
view/templates/contact_template.tpl | 3 ++-
view/templates/contacts-template.tpl | 2 +-
view/theme/duepuntozero/style.css | 4 +++
view/theme/frost-mobile/style.css | 2 ++
.../templates/contact_template.tpl | 4 +--
.../templates/viewcontact_template.tpl | 12 +++++++++
view/theme/frost/style.css | 8 ++++--
.../frost/templates/contact_template.tpl | 12 ++++-----
view/theme/quattro/dark/style.css | 25 +++++++++++++++++++
view/theme/quattro/green/style.css | 25 +++++++++++++++++++
view/theme/quattro/lilac/style.css | 25 +++++++++++++++++++
view/theme/quattro/quattro.less | 21 ++++++++++++++++
.../quattro/templates/contact_template.tpl | 7 +++++-
view/theme/smoothly/style.css | 9 +++++--
view/theme/vier/style.css | 4 +++
.../theme/vier/templates/contact_template.tpl | 2 +-
21 files changed, 185 insertions(+), 33 deletions(-)
create mode 100644 view/theme/frost-mobile/templates/viewcontact_template.tpl
diff --git a/mod/contacts.php b/mod/contacts.php
index c562c9822..bdb25b022 100644
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -799,6 +799,7 @@ function contacts_content(&$a) {
'$cmd' => $a->cmd,
'$contacts' => $contacts,
'$contact_drop_confirm' => t('Do you really want to delete this contact?'),
+ 'multiselect' => 1,
'$batch_actions' => array(
'contacts_batch_update' => t('Update'),
'contacts_batch_block' => t('Block')."/".t("Unblock"),
diff --git a/mod/dirfind.php b/mod/dirfind.php
index 9e02a47e2..77e86c5db 100644
--- a/mod/dirfind.php
+++ b/mod/dirfind.php
@@ -141,8 +141,8 @@ function dirfind_content(&$a, $prefix = "") {
$entry = array(
'url' => zrl($jj->url),
'name' => htmlentities($jj->name),
- 'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
- 'tags' => $jj->tags,
+ 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
+ 'img_hover' => $jj->tags,
'conntxt' => $conntxt,
'connlnk' => $connlnk,
'photo_menu' => $photo_menu,
@@ -151,11 +151,11 @@ function dirfind_content(&$a, $prefix = "") {
$entries[] = $entry;
}
- $tpl = get_markup_template('match.tpl');
+ $tpl = get_markup_template('viewcontact_template.tpl');
$o .= replace_macros($tpl,array(
'title' => sprintf( t('People Search - %s'), $search),
- '$entries' => $entries,
+ '$contacts' => $entries,
'$paginate' => paginate($a),
));
diff --git a/mod/match.php b/mod/match.php
index 380f6e74a..f6174da66 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -56,32 +56,40 @@ function match_content(&$a) {
if(count($j->results)) {
+ $id = 0;
+
foreach($j->results as $jj) {
$match_nurl = normalise_link($jj->url);
$match = q("SELECT `nurl` FROM `contact` WHERE `uid` = '%d' AND nurl='%s' LIMIT 1",
intval(local_user()),
dbesc($match_nurl));
+
if (!count($match)) {
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
$connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
+ $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
+ $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+
$entry = array(
'url' => zrl($jj->url),
'name' => $jj->name,
- 'photo' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
+ 'thumb' => proxy_url($jj->photo, false, PROXY_SIZE_THUMB),
'inttxt' => ' ' . t('is interested in:'),
'conntxt' => t('Connect'),
'connlnk' => $connlnk,
- 'tags' => $jj->tags
+ 'img_hover' => $jj->tags,
+ 'photo_menu' => $photo_menu,
+ 'id' => ++$id,
);
- $entries[] = $entry;
}
+ $entries[] = $entry;
}
- $tpl = get_markup_template('match.tpl');
+ $tpl = get_markup_template('viewcontact_template.tpl');
$o .= replace_macros($tpl,array(
'$title' => t('Profile Match'),
- 'entries' => $entries,
+ '$contacts' => $entries,
'$paginate' => paginate($a),
));
diff --git a/mod/suggest.php b/mod/suggest.php
index 760bbf06a..5241e485e 100644
--- a/mod/suggest.php
+++ b/mod/suggest.php
@@ -72,31 +72,41 @@ function suggest_content(&$a) {
return $o;
}
+ require_once 'include/contact_selectors.php';
+
foreach($r as $rr) {
$connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
+ $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
+ $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
+ $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+ $photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
$entry = array(
'url' => zrl($rr['url']),
- 'url_clean' => $rr['url'],
+ 'itemurl' => $rr['url'],
+ 'img_hover' => $rr['url'],
'name' => $rr['name'],
- 'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
- 'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
+ 'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+ 'ignlnk' => $ignlnk,
'ignid' => $rr['id'],
'conntxt' => t('Connect'),
'connlnk' => $connlnk,
- 'ignore' => t('Ignore/Hide')
+ 'photo_menu' => $photo_menu,
+ 'ignore' => t('Ignore/Hide'),
+ 'network' => network_to_name($rr['network'], $rr['url']),
+ 'id' => ++$id,
);
$entries[] = $entry;
}
- $tpl = get_markup_template('suggest_friends.tpl');
+ $tpl = get_markup_template('viewcontact_template.tpl');
$o .= replace_macros($tpl,array(
'$title' => t('Friend Suggestions'),
- '$entries' => $entries,
+ '$contacts' => $entries,
+
));
-// $o .= paginate($a);
return $o;
}
diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php
index a6bf74b28..927a59752 100644
--- a/mod/viewcontacts.php
+++ b/mod/viewcontacts.php
@@ -48,7 +48,7 @@ function viewcontacts_content(&$a) {
if($rr['self'])
continue;
- $url = $rr['url'];
+ $url = $rr['url'];
// route DFRN profiles through the redirect
diff --git a/view/templates/contact_template.tpl b/view/templates/contact_template.tpl
index d4f65f70f..4e8c04297 100644
--- a/view/templates/contact_template.tpl
+++ b/view/templates/contact_template.tpl
@@ -7,9 +7,10 @@
- {{if !$no_contacts_checkbox}}
+ {{if $multiselect}}
{{/if}}
+
{{if $contact.photo_menu}}
-
{{$contact.name}}
-{{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}}
+
{{$contact.name}}
+ {{if $contact.alt_text}}
{{$contact.alt_text}}
{{/if}}
{{$contact.network}}
diff --git a/view/theme/frost-mobile/templates/viewcontact_template.tpl b/view/theme/frost-mobile/templates/viewcontact_template.tpl
new file mode 100644
index 000000000..3b68410f9
--- /dev/null
+++ b/view/theme/frost-mobile/templates/viewcontact_template.tpl
@@ -0,0 +1,12 @@
+
+{{include file="section_title.tpl"}}
+
+
+{{foreach $contacts as $contact}}
+ {{include file="contact_template.tpl"}}
+{{/foreach}}
+
+
+
+
+{{$paginate}}
diff --git a/view/theme/frost/style.css b/view/theme/frost/style.css
index 8b87c3bd4..66121baf3 100644
--- a/view/theme/frost/style.css
+++ b/view/theme/frost/style.css
@@ -1093,15 +1093,19 @@ input#dfrn-url {
.contact-entry-photo img {
border: none;
}
+.contact-entry-photo a img {
+ width: 80px;
+ height: 80px;
+}
.contact-entry-photo-end {
clear: both;
}
.contact-entry-name {
- float: left;
+ /*float: left;*/
margin-left: 0px;
margin-right: 10px;
padding-bottom: 5px;
- width: 120px;
+ /*width: 120px;*/
font-weight: 600;
overflow: hidden;
}
diff --git a/view/theme/frost/templates/contact_template.tpl b/view/theme/frost/templates/contact_template.tpl
index 7a29bd045..1ed1471a6 100644
--- a/view/theme/frost/templates/contact_template.tpl
+++ b/view/theme/frost/templates/contact_template.tpl
@@ -10,8 +10,8 @@
{{if $contact.photo_menu}}
-
{{/if}}