aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php47
1 files changed, 41 insertions, 6 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 747bb5d0a..676067f86 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -942,25 +942,35 @@ function item_photo_menu($item){
$clean_url = normalise_link($item['author-link']);
}
- $menu = Array(
+ $poco_rating = get_config('system','poco_rating_enable');
+ // if unset default to enabled
+ if($poco_rating === false)
+ $poco_rating = true;
+
+ $ratings_url = (($poco_rating) ? z_root() . '/ratings/' . urlencode($item['author_xchan']) : '');
+
+ $post_menu = Array(
t("View Source") => $vsrc_link,
t("Follow Thread") => $sub_link,
t("Unfollow Thread") => $unsub_link,
- t("View Status") => $status_link,
+ );
+
+ $author_menu = array(
t("View Profile") => $profile_link,
- t("View Photos") => $photos_link,
t("Activity/Posts") => $posts_link,
t("Connect") => $follow_url,
t("Edit Connection") => $contact_url,
- t("Send PM") => $pm_url,
+ t("Message") => $pm_url,
+ t('Ratings') => $ratings_url,
t("Poke") => $poke_link
);
- $args = array('item' => $item, 'menu' => $menu);
+
+ $args = array('item' => $item, 'post_menu' => $post_menu, 'author_menu' => $author_menu);
call_hooks('item_photo_menu', $args);
- $menu = $args['menu'];
+ $menu = array_merge($args['post_menu'],$args['author_menu']);
$o = "";
foreach($menu as $k=>$v){
@@ -1100,6 +1110,11 @@ function status_editor($a, $x, $popup = false) {
$o = '';
+ require_once('include/Contact.php');
+ $c = channelx_by_n($x['profile_uid']);
+ if($c && $c['channel_moved'])
+ return $o;
+
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
$plaintext = true;
@@ -1585,8 +1600,17 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
if (is_null($nickname))
$nickname = $channel['channel_address'];
+
$uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel());
+ if($uid == local_channel()) {
+ $cal_link = '';
+ }
+ else {
+ $cal_link = '/cal/' . $nickname;
+ }
+
+
if (get_pconfig($uid, 'system', 'noprofiletabs'))
return;
@@ -1634,6 +1658,17 @@ function profile_tabs($a, $is_owner = false, $nickname = null){
);
}
+ if($p['view_stream'] && $cal_link) {
+ $tabs[] = array(
+ 'label' => t('Events'),
+ 'url' => $a->get_baseurl() . $cal_link,
+ 'sel' => ((argv(0) == 'cal' || argv(0) == 'events') ? 'active' : ''),
+ 'title' => t('Events'),
+ 'id' => 'event-tab',
+ );
+ }
+
+
if ($p['chat']) {
require_once('include/chat.php');
$has_chats = chatroom_list_count($uid);