aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Activity.php2
-rw-r--r--Zotlabs/Widget/Activity_order.php42
-rw-r--r--Zotlabs/Widget/Album.php11
-rw-r--r--Zotlabs/Widget/Channel_activities.php10
-rw-r--r--Zotlabs/Widget/Item.php2
-rw-r--r--Zotlabs/Widget/Messages.php79
-rw-r--r--Zotlabs/Widget/Notifications.php52
-rw-r--r--Zotlabs/Widget/Pinned.php98
-rw-r--r--Zotlabs/Widget/Portfolio.php10
-rw-r--r--Zotlabs/Widget/Tagcloud.php3
-rw-r--r--Zotlabs/Widget/Tasklist.php2
11 files changed, 148 insertions, 163 deletions
diff --git a/Zotlabs/Widget/Activity.php b/Zotlabs/Widget/Activity.php
index 34e0f67dc..19f7acadb 100644
--- a/Zotlabs/Widget/Activity.php
+++ b/Zotlabs/Widget/Activity.php
@@ -17,7 +17,7 @@ class Activity {
$o = '';
if(is_array($arr) && array_key_exists('limit',$arr))
- $limit = " limit " . intval($limit) . " ";
+ $limit = " limit " . intval($arr['limit']) . " ";
else
$limit = '';
diff --git a/Zotlabs/Widget/Activity_order.php b/Zotlabs/Widget/Activity_order.php
index e8ee11508..8d47370db 100644
--- a/Zotlabs/Widget/Activity_order.php
+++ b/Zotlabs/Widget/Activity_order.php
@@ -16,7 +16,7 @@ class Activity_order {
return '';
if(! feature_enabled(local_channel(),'order_tab')) {
- set_pconfig(local_channel(), 'mod_network', 'order', 0);
+ set_pconfig(local_channel(), 'mod_network', 'order', 'created');
return '';
}
@@ -26,17 +26,17 @@ class Activity_order {
if(x($_GET, 'order')) {
switch($_GET['order']){
- case 'post':
+ case 'created':
$postord_active = 'active';
- set_pconfig(local_channel(), 'mod_network', 'order', 1);
+ set_pconfig(local_channel(), 'mod_network', 'order', 'created');
break;
- case 'comment':
+ case 'commented':
$commentord_active = 'active';
- set_pconfig(local_channel(), 'mod_network', 'order', 0);
+ set_pconfig(local_channel(), 'mod_network', 'order', 'commented');
break;
case 'unthreaded':
$unthreaded_active = 'active';
- set_pconfig(local_channel(), 'mod_network', 'order', 2);
+ set_pconfig(local_channel(), 'mod_network', 'order', 'unthreaded');
break;
default:
$commentord_active = 'active';
@@ -44,19 +44,19 @@ class Activity_order {
}
}
else {
- $order = get_pconfig(local_channel(), 'mod_network', 'order', 0);
+ $order = get_pconfig(local_channel(), 'mod_network', 'order', 'created');
switch($order) {
- case 0:
+ case 'commented':
$commentord_active = 'active';
break;
- case 1:
+ case 'created':
$postord_active = 'active';
break;
- case 2:
+ case 'unthreaded':
$unthreaded_active = 'active';
break;
default:
- $commentord_active = 'active';
+ $postord_active = 'active';
}
}
@@ -90,26 +90,26 @@ class Activity_order {
// tabs
- $tabs = [];
+ $tabs[] = [
+ 'label' => t('Posted Date'),
+ 'icon' => '',
+ 'url'=>z_root() . '/' . $cmd . '?order=created' . $filter,
+ 'sel'=> $postord_active,
+ 'title' => t('Order by last posted date'),
+ ];
$tabs[] = [
'label' => t('Commented Date'),
'icon' => '',
- 'url'=>z_root() . '/' . $cmd . '?f=&order=comment' . $filter,
+ 'url'=>z_root() . '/' . $cmd . '?order=commented' . $filter,
'sel'=> $commentord_active,
'title' => t('Order by last commented date'),
];
- $tabs[] = [
- 'label' => t('Posted Date'),
- 'icon' => '',
- 'url'=>z_root() . '/' . $cmd . '?f=&order=post' . $filter,
- 'sel'=> $postord_active,
- 'title' => t('Order by last posted date'),
- ];
+
$tabs[] = array(
'label' => t('Date Unthreaded'),
'icon' => '',
- 'url' => z_root() . '/' . $cmd . '?f=&order=unthreaded' . $filter,
+ 'url' => z_root() . '/' . $cmd . '?order=unthreaded' . $filter,
'sel' => $unthreaded_active,
'title' => t('Order unthreaded by date'),
);
diff --git a/Zotlabs/Widget/Album.php b/Zotlabs/Widget/Album.php
index 003f6f49d..667952360 100644
--- a/Zotlabs/Widget/Album.php
+++ b/Zotlabs/Widget/Album.php
@@ -59,6 +59,9 @@ class Album {
//edit album name
$album_edit = null;
+ $ph = photo_factory('');
+ $phototypes = $ph->supportedTypes();
+
$photos = array();
if($r) {
$twist = 'rotright';
@@ -94,7 +97,7 @@ class Album {
$tpl = get_markup_template('photo_album.tpl');
- $o .= replace_macros($tpl, array(
+ return replace_macros($tpl, array(
'$photos' => $photos,
'$album' => (($title) ? $title : $album),
'$album_id' => rand(),
@@ -102,11 +105,9 @@ class Album {
'$can_post' => false,
'$upload' => array(t('Upload'), z_root() . '/photos/' . \App::$profile['channel_address'] . '/upload/' . bin2hex($album)),
'$order' => false,
- '$upload_form' => $upload_form,
- '$usage' => $usage_message
+ '$upload_form' => '', // $upload_form,
+ '$usage' => '', // $usage_message
));
-
- return $o;
}
}
diff --git a/Zotlabs/Widget/Channel_activities.php b/Zotlabs/Widget/Channel_activities.php
index a799ea81e..2677f82c3 100644
--- a/Zotlabs/Widget/Channel_activities.php
+++ b/Zotlabs/Widget/Channel_activities.php
@@ -91,7 +91,7 @@ class Channel_activities {
self::$activities['photos'] = [
'label' => t('Photos'),
- 'icon' => 'photo',
+ 'icon' => 'image',
'url' => z_root() . '/photos/' . self::$channel['channel_address'],
'date' => $r[0]['edited'],
'items' => $i,
@@ -123,7 +123,7 @@ class Channel_activities {
self::$activities['files'] = [
'label' => t('Files'),
- 'icon' => 'folder-open',
+ 'icon' => 'folder',
'url' => z_root() . '/cloud/' . self::$channel['channel_address'],
'date' => $r[0]['edited'],
'items' => $i,
@@ -166,7 +166,7 @@ class Channel_activities {
self::$activities['webpages'] = [
'label' => t('Webpages'),
- 'icon' => 'newspaper-o',
+ 'icon' => 'layout-text-sidebar',
'url' => z_root() . '/webpages/' . self::$channel['channel_address'],
'date' => $r[0]['edited'],
'items' => $i,
@@ -223,7 +223,7 @@ class Channel_activities {
$i[] = [
'url' => z_root() . '/manage/' . $rr['channel_id'],
'title' => '',
- 'summary' => '<div class="text-truncate lh-sm"><img src="' . $rr['xchan_photo_s'] . '" class="menu-img-2">' . '<strong>' . $rr['channel_name'] . '</strong><br><small class="opacity-75">' . $rr['xchan_addr'] . '</small></div>',
+ 'summary' => '<div class="text-truncate lh-sm"><img src="' . $rr['xchan_photo_s'] . '" class="menu-img-2">' . '<strong>' . $rr['channel_name'] . '</strong><br><small class="text-body-secondary">' . $rr['xchan_addr'] . '</small></div>',
'footer' => $footer
];
@@ -237,7 +237,7 @@ class Channel_activities {
self::$activities['channels'] = [
'label' => t('Channels'),
- 'icon' => 'home',
+ 'icon' => 'house',
'url' => z_root() . '/manage',
'date' => datetime_convert(),
'items' => $i,
diff --git a/Zotlabs/Widget/Item.php b/Zotlabs/Widget/Item.php
index 6f943ffdf..3de135cb9 100644
--- a/Zotlabs/Widget/Item.php
+++ b/Zotlabs/Widget/Item.php
@@ -34,7 +34,7 @@ class Item {
if($arr['title']) {
$r = q("select item.* from item left join iconfig on item.id = iconfig.iid
where item.uid = %d and iconfig.cat = 'system' and iconfig.v = '%s'
- and iconfig.k = 'WEBPAGE' and item_type = %d $sql_extra $revision limit 1",
+ and iconfig.k = 'WEBPAGE' and item_type = %d $sql_extra limit 1",
intval($channel_id),
dbesc($arr['title']),
intval(ITEM_TYPE_WEBPAGE)
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index 294a982b1..cc1811ffc 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -23,20 +23,37 @@ class Messages {
$_SESSION['messages_loadtime'] = datetime_convert();
+ $r = q("SELECT DISTINCT(term) FROM term WHERE uid = %d AND ttype = %d ORDER BY term",
+ intval(local_channel()),
+ intval(TERM_FILE)
+ );
+
+ $file_tags = [];
+
+ if ($r) {
+ foreach($r as $rr) {
+ $file_tags[] = $rr['term'];
+ }
+ }
+
$tpl = get_markup_template('messages_widget.tpl');
$o = replace_macros($tpl, [
'$entries' => $page['entries'] ?? [],
'$offset' => $page['offset'] ?? 0,
'$feature_star' => feature_enabled(local_channel(), 'star_posts'),
+ '$feature_file' => feature_enabled(local_channel(), 'filing'),
+ '$file_tags' => $file_tags,
'$strings' => [
- 'messages_title' => t('Public and restricted messages'),
- 'direct_messages_title' => t('Direct messages'),
- 'starred_messages_title' => t('Starred messages'),
- 'notice_messages_title' => t('Notices'),
+ 'messages_title' => t('Public and restricted conversations'),
+ 'direct_messages_title' => t('Private conversations'),
+ 'starred_messages_title' => t('Starred conversations'),
+ 'filed_messages_title' => t('Filed messages'),
+ 'notice_messages_title' => t('Notifications'),
'loading' => t('Loading'),
- 'empty' => t('No messages'),
- 'unseen_count' => t('Unseen'),
- 'filter' => t('Filter by name or address')
+ 'empty' => t('No conversations'),
+ 'unseen_count' => t('Unseen reactions'),
+ 'filter' => t('Filter by name or address'),
+ 'file_filter' => t('Filter by file name')
]
]);
@@ -50,6 +67,7 @@ class Messages {
$offset = $options['offset'] ?? 0;
$type = $options['type'] ?? '';
$author = $options['author'] ?? '';
+ $file = $options['file'] ?? '';
if ($offset == -1) {
return;
@@ -67,8 +85,7 @@ class Messages {
$item_normal_c = str_replace('item.', 'c.', $item_normal);
$entries = [];
$limit = 30;
- $dummy_order_sql = '';
- $author_sql = '';
+ $order_sql = 'i.created DESC';
$loadtime = (($offset) ? $_SESSION['messages_loadtime'] : datetime_convert());
$vnotify = get_pconfig(local_channel(), 'system', 'vnotify', -1);
@@ -84,43 +101,59 @@ class Messages {
$vnotify_sql_i = " AND i.verb NOT IN ('Dislike', '" . dbesc(ACTIVITY_DISLIKE) . "') ";
}
- if($author) {
- $author_sql = " AND (i.owner_xchan = '" . protect_sprintf(dbesc($author)) . "') ";
+ $filter_sql = '';
+ if($type !== 'filed' && $author) {
+ $filter_sql = " AND (i.owner_xchan = '" . protect_sprintf(dbesc($author)) . "') ";
}
+ $filed_filter_sql = '';
+ if($type === 'filed' && $file) {
+ $filed_filter_sql = " AND (term.term = '" . protect_sprintf(dbesc($file)) . "') ";
+ }
+
+ $dummy_order_sql = '';
+
switch($type) {
case 'direct':
- $type_sql = ' AND i.item_private = 2 ';
+ $type_sql = ' AND i.item_private = 2 AND i.item_thread_top = 1 ';
// $dummy_order_sql has no other meaning but to trick
// some mysql backends into using the right index.
$dummy_order_sql = ', i.received DESC ';
break;
case 'starred':
- $type_sql = ' AND i.item_starred = 1 ';
+ $type_sql = ' AND i.item_starred = 1 AND i.item_thread_top = 1 ';
+ break;
+ case 'filed':
+ $type_sql = ' AND i.id IN (SELECT term.oid FROM term WHERE term.ttype = ' . TERM_FILE . ' AND term.uid = i.uid ' . $filed_filter_sql . ')';
break;
default:
- $type_sql = ' AND i.item_private IN (0, 1) ';
+ $type_sql = ' AND i.item_private IN (0, 1) AND i.item_thread_top = 1 ';
}
$items = q("SELECT *,
(SELECT count(*) FROM item c WHERE c.uid = %d AND c.parent = i.parent AND c.item_unseen = 1 AND c.item_thread_top = 0 $item_normal_c $vnotify_sql_c) AS unseen_count
- FROM item i WHERE i.uid = %d
+ FROM item i
+ WHERE i.uid = %d
AND i.created <= '%s'
$type_sql
- AND i.item_thread_top = 1
- $author_sql
+ $filter_sql
$item_normal_i
- ORDER BY i.created DESC $dummy_order_sql
+ ORDER BY $order_sql $dummy_order_sql
LIMIT $limit OFFSET $offset",
intval(local_channel()),
intval(local_channel()),
dbescdate($loadtime)
);
+ if ($type === 'filed') {
+ $items = fetch_post_tags($items);
+ }
+
xchan_query($items, false);
$i = 0;
$entries = [];
+ $ids = [];
foreach($items as $item) {
@@ -149,6 +182,16 @@ class Messages {
$info .= t('via') . ' ' . $item['source']['xchan_name'];
}
+ if ($type == 'filed') {
+ $info = '';
+ foreach ($item['term'] as $t) {
+ if ($t['ttype'] !== TERM_FILE) {
+ continue;
+ }
+ $info .= '<span class="badge rounded-pill bg-danger me-1"><i class="bi bi-folder"></i>&nbsp;' . $t['term'] . '</span>';
+ }
+ }
+
$summary = $item['title'];
if (!$summary) {
$summary = $item['summary'];
diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php
index 225403535..f9cee6e71 100644
--- a/Zotlabs/Widget/Notifications.php
+++ b/Zotlabs/Widget/Notifications.php
@@ -21,16 +21,16 @@ class Notifications {
'icon' => 'grid-3x3',
'severity' => 'secondary',
'label' => t('Network'),
- 'title' => t('New network activity notifications'),
+ 'title' => t('Unseen network activity'),
'viewall' => [
'url' => 'network',
'label' => t('Network stream')
],
'markall' => [
- 'label' => t('Mark all notifications read')
+ 'label' => t('Mark all read')
],
'filter' => [
- 'posts_label' => t('Show new posts only'),
+ 'posts_label' => t('Conversation starters'),
'name_label' => t('Filter by name or address')
]
];
@@ -40,17 +40,17 @@ class Notifications {
'type' => 'home',
'icon' => 'house',
'severity' => 'danger',
- 'label' => t('Home'),
- 'title' => t('New home activity notifications'),
+ 'label' => t('Channel'),
+ 'title' => t('Unseen channel activity'),
'viewall' => [
'url' => 'channel/' . $channel['channel_address'],
- 'label' => t('Home stream')
+ 'label' => t('Channel stream')
],
'markall' => [
- 'label' => t('Mark all notifications seen')
+ 'label' => t('Mark all seen')
],
'filter' => [
- 'posts_label' => t('Show new posts only'),
+ 'posts_label' => t('Conversation starters'),
'name_label' => t('Filter by name or address')
]
];
@@ -59,17 +59,17 @@ class Notifications {
'type' => 'dm',
'icon' => 'envelope',
'severity' => 'danger',
- 'label' => t('Direct Messages'),
- 'title' => t('New direct messages notifications'),
+ 'label' => t('Private'),
+ 'title' => t('Unseen private activity'),
'viewall' => [
'url' => 'network/?dm=1',
- 'label' => t('Direct messages stream')
+ 'label' => t('Private stream')
],
'markall' => [
- 'label' => t('Mark all notifications read')
+ 'label' => t('Mark all read')
],
'filter' => [
- 'posts_label' => t('Show new posts only'),
+ 'posts_label' => t('Conversation starters'),
'name_label' => t('Filter by name or address')
]
];
@@ -79,13 +79,13 @@ class Notifications {
'icon' => 'calendar-date',
'severity' => 'secondary',
'label' => t('Events'),
- 'title' => t('New events notifications'),
+ 'title' => t('Unseen events activity'),
'viewall' => [
'url' => 'cdav/calendar',
'label' => t('View events')
],
'markall' => [
- 'label' => t('Mark all events seen')
+ 'label' => t('Mark all seen')
]
];
@@ -94,10 +94,10 @@ class Notifications {
'icon' => 'people',
'severity' => 'danger',
'label' => t('New Connections'),
- 'title' => t('New connections notifications'),
+ 'title' => t('New connections'),
'viewall' => [
'url' => 'connections',
- 'label' => t('View all connections')
+ 'label' => t('View all')
]
];
@@ -106,21 +106,21 @@ class Notifications {
'icon' => 'folder',
'severity' => 'danger',
'label' => t('Files'),
- 'title' => t('New files notifications'),
+ 'title' => t('Useen files activity'),
];
$notifications[] = [
'type' => 'notify',
'icon' => 'exclamation-circle',
'severity' => 'danger',
- 'label' => t('Notices'),
- 'title' => t('Notices'),
+ 'label' => t('Notifications'),
+ 'title' => t('Unseen notifications'),
'viewall' => [
'url' => 'notifications/system',
- 'label' => t('View all notices')
+ 'label' => t('View all')
],
'markall' => [
- 'label' => t('Mark all notices seen')
+ 'label' => t('Mark all seen')
]
];
@@ -129,7 +129,7 @@ class Notifications {
'icon' => 'chat-quote',
'severity' => 'secondary',
'label' => t('Forums'),
- 'title' => t('Forums'),
+ 'title' => t('Unseen forums activity'),
'filter' => [
'name_label' => t('Filter by name or address')
]
@@ -142,7 +142,7 @@ class Notifications {
'icon' => 'person-exclamation',
'severity' => 'danger',
'label' => t('Registrations'),
- 'title' => t('New registrations notifications'),
+ 'title' => t('Unseen registration activity'),
];
}
@@ -152,7 +152,7 @@ class Notifications {
'icon' => 'globe',
'severity' => 'secondary',
'label' => t('Public Stream'),
- 'title' => t('New public stream notifications'),
+ 'title' => t('Unseen public stream activity'),
'viewall' => [
'url' => 'pubstream',
'label' => t('Public stream')
@@ -163,7 +163,7 @@ class Notifications {
],
*/
'filter' => [
- 'posts_label' => t('Show new posts only'),
+ 'posts_label' => t('Conversation starters'),
'name_label' => t('Filter by name or address')
]
];
diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php
index 2ba170fe8..7b95d3bc6 100644
--- a/Zotlabs/Widget/Pinned.php
+++ b/Zotlabs/Widget/Pinned.php
@@ -67,19 +67,19 @@ class Pinned {
$attend = null;
$canvote = false;
- $conv_responses = [];
-
- if(in_array($item['obj_type'], ['Event', ACTIVITY_OBJ_EVENT])) {
- $conv_responses['attendyes'] = [ 'title' => t('Attending','title') ];
- $conv_responses['attendno'] = [ 'title' => t('Not attending','title') ];
- $conv_responses['attendmaybe'] = [ 'title' => t('Might attend','title') ];
- if($commentable && $observer) {
- $attend = [ t('I will attend'), t('I will not attend'), t('I might attend') ];
- $isevent = true;
- }
+ $response_verbs[] = 'like';
+
+ if(feature_enabled(\App::$profile['profile_uid'],'dislike')) {
+ $response_verbs[] = 'dislike';
+ }
+
+ $response_verbs[] = 'announce';
+
+ if ($item['obj_type'] === 'Question') {
+ $response_verbs[] = 'answer';
}
- $this->activity($item, $conv_responses);
+ $responses = get_responses($response_verbs, $item);
$verified = (intval($item['item_verified']) ? t('Message signature validated') : '');
$forged = ((! intval($item['item_verified']) && $item['sig']) ? t('Message signature incorrect') : '');
@@ -110,10 +110,12 @@ class Pinned {
'text' => strip_tags($body['html']),
'id' => $item['id'],
'mids' => json_encode([ $midb64 ]),
+ 'mid' => $item['uuid'],
+ 'rawmid' => $item['mid'],
+ 'parent' => $item['parent'],
'isevent' => $isevent,
'attend' => $attend,
- 'consensus' => $consensus,
- 'conlabels' => ($canvote ? $conlabels : []),
+ 'conlabels' => [],
'canvote' => $canvote,
'linktitle' => sprintf( t('View %s\'s profile - %s'), $profile_name, ($author['xchan_addr'] ? $author['xchan_addr'] : $author['xchan_url']) ),
'olinktitle' => sprintf( t('View %s\'s profile - %s'), $owner['xchan_name'], ($owner['xchan_addr'] ? $owner['xchan_addr'] : $owner['xchan_url']) ),
@@ -152,7 +154,7 @@ class Pinned {
'hide' => (! $is_new && isset($observer['xchan_hash']) && $observer['xchan_hash'] != $owner['xchan_hash'] ? t("Don't show") : ''),
// end toolbar buttons
'modal_dismiss' => t('Close'),
- 'responses' => $conv_responses,
+ 'responses' => $responses,
'author_id' => (($author['xchan_addr']) ? $author['xchan_addr'] : $author['xchan_url'])
];
@@ -194,74 +196,14 @@ class Pinned {
if(empty($mids_list))
return [];
- $r = q("SELECT * FROM item WHERE uuid IN ( '%s' ) AND uid = %d AND id = parent AND item_private = 0 ORDER BY created DESC",
+
+ $r = q("SELECT parent AS item_id FROM item WHERE uuid IN ( '%s' ) AND uid = %d AND id = parent AND item_private = 0",
dbesc(implode(",", $mids_list)),
intval($this->uid)
);
- if($r)
- return $r;
-
- return [];
- }
+ return items_by_parent_ids($r, blog_mode: true);
- /*
- * @brief List activities on item
- *
- * @param array $item
- * @param array $conv_responses
- * @return array
- *
- */
- private function activity($item, &$conv_responses) {
-
- foreach(array_keys($conv_responses) as $verb) {
- $verb_sql = '';
-
- switch($verb) {
- case 'like':
- $verb_sql = " AND verb IN ('Like', '" . ACTIVITY_LIKE . "') ";
- break;
- case 'dislike':
- $verb_sql = " AND verb IN ('Dislike', '" . ACTIVITY_DISLIKE . "') ";
- break;
- case 'attendyes':
- $verb_sql = " AND verb IN ('Accept', '" . ACTIVITY_ATTEND . "') ";
- break;
- case 'attendno':
- $verb_sql = " AND verb IN ('Reject', '" . ACTIVITY_ATTENDNO . "') ";
- break;
- case 'attendmaybe':
- $verb_sql = " AND verb IN ('TentativeAccept', '" . ACTIVITY_ATTENDMAYBE . "') ";
- break;
- default:
- break;
- }
-
- $r = q("SELECT * FROM item WHERE parent = %d AND id <> parent $verb_sql AND item_deleted = 0",
- intval($item['id'])
- );
- if(! $r) {
- unset($conv_responses[$verb]);
- continue;
- }
-
- $conv_responses[$verb]['count'] = count($r);
- $conv_responses[$verb]['button'] = get_response_button_text($verb, $conv_responses[$verb]['count']);
-
- foreach($r as $rr) {
-
- $author = q("SELECT * FROM xchan WHERE xchan_hash = '%s' LIMIT 1",
- dbesc($rr['author_xchan'])
- );
- $name = (($author && $author[0]['xchan_name']) ? $author[0]['xchan_name'] : t('Unknown'));
- $conv_responses[$verb]['list'][] = (($rr['author_xchan'] && $author && $author[0]['xchan_photo_s']) ?
- '<a class="dropdown-item" href="' . chanlink_hash($rr['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($author[0]['xchan_photo_s']) . '" alt="' . urlencode($name) . '" /> ' . $name . '</a>' :
- '<a class="dropdown-item" href="#" class="disabled">' . $name . '</a>'
- );
- }
- }
-
- $conv_responses['count'] = count($conv_responses);
}
+
}
diff --git a/Zotlabs/Widget/Portfolio.php b/Zotlabs/Widget/Portfolio.php
index a06f56e30..1c9dc162a 100644
--- a/Zotlabs/Widget/Portfolio.php
+++ b/Zotlabs/Widget/Portfolio.php
@@ -66,6 +66,10 @@ class Portfolio {
//edit album name
$album_edit = null;
+
+ $ph = photo_factory('');
+ $phototypes = $ph->supportedTypes();
+
$photos = array();
if($r) {
$twist = 'rotright';
@@ -103,7 +107,7 @@ class Portfolio {
$tpl = get_markup_template('photo_album_portfolio.tpl');
- $o .= replace_macros($tpl, array(
+ return replace_macros($tpl, array(
'$photos' => $photos,
'$mode' => $mode,
'$count' => $count,
@@ -113,11 +117,7 @@ class Portfolio {
'$can_post' => false,
'$upload' => array(t('Upload'), z_root() . '/photos/' . \App::$profile['channel_address'] . '/upload/' . bin2hex($album)),
'$order' => false,
- '$upload_form' => $upload_form,
- '$usage' => $usage_message
));
-
- return $o;
}
}
diff --git a/Zotlabs/Widget/Tagcloud.php b/Zotlabs/Widget/Tagcloud.php
index 00456f24f..efd571576 100644
--- a/Zotlabs/Widget/Tagcloud.php
+++ b/Zotlabs/Widget/Tagcloud.php
@@ -18,8 +18,7 @@ class Tagcloud {
$flags = 0;
$type = TERM_HASHTAG;
- // @FIXME there exists no $authors variable
- $r = tagadelic($uid, $count, $authors, $owner, $flags, 0, $type);
+ $r = tagadelic($uid, $count, '', '', $flags, 0, $type);
// @FIXME this should use a template
diff --git a/Zotlabs/Widget/Tasklist.php b/Zotlabs/Widget/Tasklist.php
index 96b70af15..9271269cf 100644
--- a/Zotlabs/Widget/Tasklist.php
+++ b/Zotlabs/Widget/Tasklist.php
@@ -19,7 +19,7 @@ class Tasklist {
if(App::$profile_uid !== local_channel())
return EMPTY_STR;
- $o .= '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>';
+ $o = '<script>var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});</script>';
$o .= '<script>function taskComplete(id) { $.post("tasks/complete/"+id, function(data) { tasksFetch();}); }
function tasksFetch() {
$.get("tasks/fetch" + ((tasksShowAll) ? "/all" : ""), function(data) {