aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-04-04 09:51:20 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-04-04 09:51:20 +0200
commit890753e5b545ca5777c6c9084e99cacf42a3b485 (patch)
treeb0aa4c779ad523794e3621c43e9b5fde03506a24
parentafa0d8ff70465e71595165a2f4fb111bac306fd2 (diff)
downloadvolse-hubzilla-890753e5b545ca5777c6c9084e99cacf42a3b485.tar.gz
volse-hubzilla-890753e5b545ca5777c6c9084e99cacf42a3b485.tar.bz2
volse-hubzilla-890753e5b545ca5777c6c9084e99cacf42a3b485.zip
add popupmenu links to status, profile and photos if contact is in dfrn
-rw-r--r--boot.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 334f0a742..708d90901 100644
--- a/boot.php
+++ b/boot.php
@@ -2682,17 +2682,27 @@ function item_photo_menu($item){
$contact_url="";
$pm_url="";
+ $status_link="";
+ $photo_link="";
$profile_link = ((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
$redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
+
+
if(strlen($item['author-link'])) {
if(link_compare($item['author-link'],$item['url']) && ($item['network'] === 'dfrn') && (! $item['self'])) {
- $profile_link = $redirect_url;
+ $status_link = $redirect_url."?url=status";
+ $profile_link = $redirect_url."?url=profile";
+ $photos_link = $redirect_url."?url=photos";
$pm_url = $a->get_baseurl() . '/message/new/' . $item['cid'] ;
$contact_url = $item['self']?"":$a->get_baseurl() . '/contacts/' . $item['cid'] ;
}
elseif(isset($a->authors[$item['author-link']])) {
- $profile_link = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
+ $redirect_url = $a->get_baseurl() . '/redir/' . $a->authors[$item['author-link']]['id'];
+ $status_link = $redirect_url."?url=status";
+ $profile_link = $redirect_url."?url=profile";
+ $photos_link = $redirect_url."?url=photos";
+
if ($a->authors[$item['author-link']]['network']==='dfrn'){
$pm_url = $a->get_baseurl() . '/message/new/' . $a->authors[$item['author-link']]['id'];
}
@@ -2703,11 +2713,14 @@ function item_photo_menu($item){
$menu = Array(
+ t("View status") => $status_link,
t("View profile") => $profile_link,
+ t("View photos") => $photos_link,
t("Edit contact") => $contact_url,
- t("Send PM") => $pm_url
+ t("Send PM") => $pm_url,
);
+
$args = array($item, &$menu);
call_hooks('item_photo_menu', $args);