From 5c52736221a1086229943d18a6ecfbad0f4da676 Mon Sep 17 00:00:00 2001
From: rabuzarus <>
Date: Mon, 6 Jun 2016 16:54:29 +0200
Subject: [PATCH] photo_menu: now the photo_menu does have at all places the
same structure
---
mod/allfriends.php | 6 ++++--
mod/directory.php | 4 +++-
mod/dirfind.php | 6 ++++--
mod/match.php | 6 ++++--
mod/suggest.php | 9 ++++++---
view/theme/frio/templates/contact_template.tpl | 1 +
6 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/mod/allfriends.php b/mod/allfriends.php
index 360b222b5..498b9d7db 100644
--- a/mod/allfriends.php
+++ b/mod/allfriends.php
@@ -61,8 +61,10 @@ function allfriends_content(&$a) {
}
else {
$connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['url'];
- $photo_menu = array(array(t("View Profile"), zrl($rr['url'])));
- $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+ $photo_menu = array(
+ 'profile' => array(t("View Profile"), zrl($rr['url'])),
+ 'follow' => array(t("Connect/Follow"), $connlnk)
+ );
}
$entry = array(
diff --git a/mod/directory.php b/mod/directory.php
index 625f6c95a..9050a050a 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -159,7 +159,9 @@ function directory_content(&$a) {
$location_e = $location;
}
- $photo_menu = array(array(t("View Profile"), zrl($profile_link)));
+ $photo_menu = array(
+ 'profile' => array(t("View Profile"), zrl($profile_link))
+ );
$entry = array(
'id' => $rr['id'],
diff --git a/mod/dirfind.php b/mod/dirfind.php
index 0d89f56f8..f193a5c45 100644
--- a/mod/dirfind.php
+++ b/mod/dirfind.php
@@ -196,8 +196,10 @@ function dirfind_content(&$a, $prefix = "") {
} else {
$connlnk = $a->get_baseurl().'/follow/?url='.(($jj->connect) ? $jj->connect : $jj->url);
$conntxt = t('Connect');
- $photo_menu = array(array(t("View Profile"), zrl($jj->url)));
- $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+ $photo_menu = array(
+ 'profile' => array(t("View Profile"), zrl($jj->url)),
+ 'follow' => array(t("Connect/Follow"), $connlnk)
+ );
}
$jj->photo = str_replace("http:///photo/", get_server()."/photo/", $jj->photo);
diff --git a/mod/match.php b/mod/match.php
index 3b0367b42..834191157 100644
--- a/mod/match.php
+++ b/mod/match.php
@@ -67,8 +67,10 @@ function match_content(&$a) {
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);
+ $photo_menu = array(
+ 'profile' => array(t("View Profile"), zrl($jj->url)),
+ 'follow' => array(t("Connect/Follow"), $connlnk)
+ );
$contact_details = get_contact_details_by_url($jj->url, local_user());
diff --git a/mod/suggest.php b/mod/suggest.php
index bb8823d9e..00033b2d2 100644
--- a/mod/suggest.php
+++ b/mod/suggest.php
@@ -78,9 +78,12 @@ function suggest_content(&$a) {
$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($rr["url"])));
- $photo_menu[] = array(t("Connect/Follow"), $connlnk);
- $photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
+ $photo_menu = array(
+ 'profile' => array(t("View Profile"), zrl($rr["url"])),
+ 'follow' => array(t("Connect/Follow"), $connlnk),
+ 'hide' => array(t('Ignore/Hide'), $ignlnk)
+ );
+
$contact_details = get_contact_details_by_url($rr["url"], local_user(), $rr);
$entry = array(
diff --git a/view/theme/frio/templates/contact_template.tpl b/view/theme/frio/templates/contact_template.tpl
index 4c2395fd0..5e0e3ddef 100644
--- a/view/theme/frio/templates/contact_template.tpl
+++ b/view/theme/frio/templates/contact_template.tpl
@@ -54,6 +54,7 @@
{{if $contact.photo_menu.edit}}{{/if}}
{{if $contact.photo_menu.drop}}{{/if}}
{{if $contact.photo_menu.follow}}{{/if}}
+ {{if $contact.photo_menu.hide}}{{/if}}
{{* The contact description (e.g. Name, Network, kind of connection and so on *}}