aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-09 16:22:32 -0700
committerFriendika <info@friendika.com>2011-09-09 16:22:32 -0700
commitd7a2ab9c1f34b8a20d63b275d308601b7309d9b8 (patch)
treeeee1e9846bac7cd8c897cdd2500ed2fba872d634 /include
parentf5c9de19d506ebadf09059f1c72d190ff98a9cdf (diff)
downloadvolse-hubzilla-d7a2ab9c1f34b8a20d63b275d308601b7309d9b8.tar.gz
volse-hubzilla-d7a2ab9c1f34b8a20d63b275d308601b7309d9b8.tar.bz2
volse-hubzilla-d7a2ab9c1f34b8a20d63b275d308601b7309d9b8.zip
send profile visits to 'redir' window
Diffstat (limited to 'include')
-rw-r--r--include/Contact.php7
-rw-r--r--include/text.php4
2 files changed, 10 insertions, 1 deletions
diff --git a/include/Contact.php b/include/Contact.php
index 7524c0cea..45920041e 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -133,7 +133,12 @@ function contact_photo_menu($contact) {
$o = "";
foreach($menu as $k=>$v){
- if ($v!="") $o .= "<li><a href='$v'>$k</a></li>\n";
+ if ($v!="") {
+ if(($k !== t("View recent")) && ($k !== t("Send PM")))
+ $o .= "<li><a target=\"redir\" href=\"$v\">$k</a></li>\n";
+ else
+ $o .= "<li><a href=\"$v\">$k</a></li>\n";
+ }
}
return $o;
}}
diff --git a/include/text.php b/include/text.php
index e3d984a1f..536c998de 100644
--- a/include/text.php
+++ b/include/text.php
@@ -571,11 +571,13 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
$url = $contact['url'];
$sparkle = '';
+ $redir = false;
if($redirect) {
$a = get_app();
$redirect_url = $a->get_baseurl() . '/redir/' . $contact['id'];
if(local_user() && ($contact['uid'] == local_user()) && ($contact['network'] === 'dfrn')) {
+ $redir = true;
$url = $redirect_url;
$sparkle = ' sparkle';
}
@@ -586,6 +588,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
if($textmode) {
return '<div class="contact-block-textdiv' . $class . '"><a class="contact-block-link' . $class . $sparkle
. (($click) ? ' fakelink' : '') . '" '
+ . (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click
. '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
. '" >'. $contact['name'] . '</a></div>' . "\r\n";
@@ -593,6 +596,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
else {
return '<div class="contact-block-div' . $class . '"><a class="contact-block-link' . $class . $sparkle
. (($click) ? ' fakelink' : '') . '" '
+ . (($redir) ? ' target="redir" ' : '')
. (($url) ? ' href="' . $url . '"' : '') . $click . ' ><img class="contact-block-img' . $class . $sparkle . '" src="'
. $contact['micro'] . '" title="' . $contact['name'] . ' [' . $contact['url'] . ']" alt="' . $contact['name']
. '" /></a></div>' . "\r\n";