From 3f94721d6257b4fe31054682b258223b992c4011 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Wed, 30 Mar 2011 17:10:14 +0200 Subject: first work --- mod/network.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 39679b48a..84efe52ba 100644 --- a/mod/network.php +++ b/mod/network.php @@ -543,6 +543,8 @@ function network_content(&$a, $update = 0) { $indent .= ' shiny'; + $contact_url = $a->get_baseurl()."/contacts/".$item['cid']; + // Build the HTML $tmp_item = replace_macros($template,array( @@ -553,6 +555,9 @@ function network_content(&$a, $update = 0) { '$wall' => t('Wall-to-Wall'), '$vwall' => t('via Wall-To-Wall:'), '$profile_url' => $profile_link, + '$profile_tab_url' => $profile_link."?tab=profile", //don't work with secure redirects + '$contact_url' => $contact_url, + '$pm_url' => "", '$name' => $profile_name, '$thumb' => $profile_avatar, '$osparkle' => $osparkle, @@ -596,4 +601,4 @@ function network_content(&$a, $update = 0) { } return $o; -} \ No newline at end of file +} -- cgit v1.2.3 From fe67c346e5ed9f65fe25dd9337b6424c04d09c4a Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Thu, 31 Mar 2011 16:52:51 +0200 Subject: Moved popup logic in boot.php, added 'item_photo_menu' hook --- mod/network.php | 9 ++++----- mod/profile.php | 2 ++ mod/search.php | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'mod') diff --git a/mod/network.php b/mod/network.php index 84efe52ba..13ce81abc 100644 --- a/mod/network.php +++ b/mod/network.php @@ -209,6 +209,7 @@ function network_content(&$a, $update = 0) { intval($a->pager['start']), intval($a->pager['itemspage']) ); + } else { @@ -315,11 +316,12 @@ function network_content(&$a, $update = 0) { $drop = replace_macros($droptpl,array('$id' => $item['id'])); $lock = '
'; - + $o .= replace_macros($tpl,array( '$id' => $item['item_id'], '$linktitle' => t('View $name\'s profile'), '$profile_url' => $profile_link, + '$item_photo_menu' => item_photo_menu($item), '$name' => $profile_name, '$sparkle' => $sparkle, '$lock' => $lock, @@ -543,7 +545,6 @@ function network_content(&$a, $update = 0) { $indent .= ' shiny'; - $contact_url = $a->get_baseurl()."/contacts/".$item['cid']; // Build the HTML @@ -555,9 +556,7 @@ function network_content(&$a, $update = 0) { '$wall' => t('Wall-to-Wall'), '$vwall' => t('via Wall-To-Wall:'), '$profile_url' => $profile_link, - '$profile_tab_url' => $profile_link."?tab=profile", //don't work with secure redirects - '$contact_url' => $contact_url, - '$pm_url' => "", + '$item_photo_menu' => item_photo_menu($item), '$name' => $profile_name, '$thumb' => $profile_avatar, '$osparkle' => $osparkle, diff --git a/mod/profile.php b/mod/profile.php index 17f6a2d45..ab1e8f738 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -454,10 +454,12 @@ function profile_content(&$a, $update = 0) { if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) $indent .= ' shiny'; + $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], '$linktitle' => t('View $name\'s profile'), '$profile_url' => $profile_link, + '$item_photo_menu' => item_photo_menu($item), '$name' => $profile_name, '$thumb' => $profile_avatar, '$sparkle' => $sparkle, diff --git a/mod/search.php b/mod/search.php index db7279fb5..64281dfcf 100644 --- a/mod/search.php +++ b/mod/search.php @@ -115,6 +115,7 @@ function search_content(&$a) { '$id' => $item['item_id'], '$linktitle' => t('View $name\'s profile'), '$profile_url' => $profile_link, + '$item_photo_menu' => item_photo_menu($item), '$name' => $profile_name, '$sparkle' => $sparkle, '$lock' => $lock, -- cgit v1.2.3 From 29878d9c267ef50eeb7aa5ef1b8725d2dfbb700f Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Thu, 31 Mar 2011 16:54:06 +0200 Subject: url \"/message/new/\" preselect contact in \"To\" select box --- mod/message.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/message.php b/mod/message.php index 9d30abd66..da35e1896 100644 --- a/mod/message.php +++ b/mod/message.php @@ -172,7 +172,9 @@ function message_content(&$a) { '$linkurl' => t('Please enter a link URL:') )); - $select = contact_select('messageto','message-to-select', false, 4, true); + $preselect = (isset($a->argv[2])?array($a->argv[2]):false); + + $select = contact_select('messageto','message-to-select', $preselect, 4, true); $tpl = load_view_file('view/prv_message.tpl'); $o .= replace_macros($tpl,array( '$header' => t('Send Private Message'), -- cgit v1.2.3 From afa0d8ff70465e71595165a2f4fb111bac306fd2 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 4 Apr 2011 09:50:25 +0200 Subject: fix profile redirect url in dfrn_poll --- mod/dfrn_poll.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod') diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 25b28c63c..8dd4d31ed 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -445,7 +445,8 @@ function dfrn_poll_content(&$a) { 'sec' => $sec )); } - + + $profile = $r[0]['nickname']; switch($destination_url) { case 'profile': $dest = $a->get_baseurl() . '/profile/' . $profile . '?tab=profile'; @@ -487,7 +488,7 @@ function dfrn_poll_content(&$a) { dbesc($session_id) ); } - $profile = $r[0]['nickname']; + goaway($dest); } -- cgit v1.2.3