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_filter.php12
-rw-r--r--Zotlabs/Widget/Album.php8
-rw-r--r--Zotlabs/Widget/Channel_activities.php8
-rw-r--r--Zotlabs/Widget/Helpindex.php65
-rw-r--r--Zotlabs/Widget/Hq_controls.php4
-rw-r--r--Zotlabs/Widget/Item.php2
-rw-r--r--Zotlabs/Widget/Messages.php67
-rw-r--r--Zotlabs/Widget/Newmember.php6
-rw-r--r--Zotlabs/Widget/Notes.php9
-rw-r--r--Zotlabs/Widget/Notifications.php16
-rw-r--r--Zotlabs/Widget/Permcats.php2
-rw-r--r--Zotlabs/Widget/Pinned.php7
-rw-r--r--Zotlabs/Widget/Portfolio.php6
-rw-r--r--Zotlabs/Widget/Privacygroups.php2
-rw-r--r--Zotlabs/Widget/Pubtagcloud.php8
-rw-r--r--Zotlabs/Widget/Rating.php10
-rw-r--r--Zotlabs/Widget/Tagcloud.php3
-rw-r--r--Zotlabs/Widget/Tasklist.php2
-rw-r--r--Zotlabs/Widget/Tokens.php2
20 files changed, 132 insertions, 109 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_filter.php b/Zotlabs/Widget/Activity_filter.php
index a8a00bda6..6884963d4 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -42,7 +42,7 @@ class Activity_filter {
$tabs[] = [
'label' => t('Direct Messages'),
- 'icon' => 'envelope-o',
+ 'icon' => 'envelope',
'url' => z_root() . '/' . $cmd . '/?f=&dm=1',
'sel' => $dm_active,
'title' => t('Show direct (private) messages')
@@ -51,7 +51,7 @@ class Activity_filter {
if(feature_enabled(local_channel(),'events_tab')) {
$tabs[] = [
'label' => t('Events'),
- 'icon' => 'calendar',
+ 'icon' => 'calendar-date',
'url' => z_root() . '/' . $cmd . '/?verb=%2EEvent',
'sel' => $events_active,
'title' => t('Show posts that include events')
@@ -93,7 +93,7 @@ class Activity_filter {
$tabs[] = [
'id' => 'privacy_groups',
'label' => t('Privacy Groups'),
- 'icon' => 'users',
+ 'icon' => 'person',
'url' => '#',
'sel' => (($filter_active == 'group') ? true : false),
'title' => t('Show my privacy groups'),
@@ -128,7 +128,7 @@ class Activity_filter {
$tabs[] = [
'id' => 'forums',
'label' => t('Forums'),
- 'icon' => 'comments-o',
+ 'icon' => 'chat-quote',
'url' => '#',
'sel' => (($filter_active == 'forums') ? true : false),
'title' => t('Show forums'),
@@ -161,7 +161,7 @@ class Activity_filter {
$tabs[] = [
'label' => t('Personal Posts'),
- 'icon' => 'user-circle',
+ 'icon' => 'person-circle',
'url' => z_root() . '/' . $cmd . '/?f=&conv=1',
'sel' => $conv_active,
'title' => t('Show posts that mention or involve me')
@@ -233,7 +233,7 @@ class Activity_filter {
if($filter_active) {
$reset = [
'label' => '',
- 'icon' => 'remove',
+ 'icon' => 'x-lg',
'url'=> z_root() . '/' . $cmd,
'sel'=> '',
'title' => t('Remove active filter')
diff --git a/Zotlabs/Widget/Album.php b/Zotlabs/Widget/Album.php
index 003f6f49d..f1fa69182 100644
--- a/Zotlabs/Widget/Album.php
+++ b/Zotlabs/Widget/Album.php
@@ -94,7 +94,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 +102,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..debaf20d4 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,
@@ -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/Helpindex.php b/Zotlabs/Widget/Helpindex.php
index 63e686d3a..fd9204c9e 100644
--- a/Zotlabs/Widget/Helpindex.php
+++ b/Zotlabs/Widget/Helpindex.php
@@ -1,6 +1,9 @@
<?php
-
/**
+ * Widget to show the help index.
+ *
+ * By default used by the left sidebar by the help module.
+ *
* * Name: Help index
* * Description: Help pages index
*/
@@ -9,54 +12,30 @@ namespace Zotlabs\Widget;
class Helpindex {
- function widget($arr) {
-
- require_once('include/help.php');
-
- $o = '<div class="widget">';
-
- $level_0 = get_help_content('sitetoc');
- if(! $level_0) {
- $path = 'toc';
- $x = determine_help_language();
- $lang = $x['language'];
- if($lang !== 'en') {
- $path = $lang . '/toc';
- }
- $level_0 = get_help_content($path);
- }
+ use \Zotlabs\Lib\Traits\HelpHelperTrait;
- $level_0 = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$level_0);
+ private string $contents = '';
- $levels = array();
+ function widget() {
+ $this->determine_help_language();
+ $this->find_help_file('toc', $this->lang['language']);
- // TODO: Implement support for translations in hierarchical table of content files
- /*
- if(argc() > 2) {
- $path = '';
- for($x = 1; $x < argc(); $x ++) {
- $path .= argv($x) . '/';
- $y = get_help_content($path . 'sitetoc');
- if(! $y)
- $y = get_help_content($path . 'toc');
- if($y)
- $levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y);
- }
- }
- */
-
- if($level_0)
- $o .= $level_0;
- if($levels) {
- foreach($levels as $l) {
- $o .= '<br /><br />';
- $o .= $l;
- }
+ if (! empty($this->file_name)) {
+ $this->contents = translate_projectname(
+ file_get_contents($this->file_name)
+ );
}
- $o .= '</div>';
+ $tpl = get_markup_template('widget.tpl');
+ return replace_macros($tpl, [ '$widget' => $this ]);
+ }
+
+ public function title(): string {
+ return '';
+ }
- return $o;
+ public function contents(): string {
+ return $this->contents;
}
}
diff --git a/Zotlabs/Widget/Hq_controls.php b/Zotlabs/Widget/Hq_controls.php
index 51212d145..0db492c37 100644
--- a/Zotlabs/Widget/Hq_controls.php
+++ b/Zotlabs/Widget/Hq_controls.php
@@ -34,7 +34,7 @@ class Hq_controls {
'href' => '#',
'class' => 'btn notes-toggle',
'type' => 'button',
- 'icon' => 'sticky-note-o',
+ 'icon' => 'sticky',
'extra' => 'data-toggle="button"'
];
}
@@ -44,7 +44,7 @@ class Hq_controls {
'href' => '#',
'class' => 'btn channel-activities-toggle d-none',
'type' => 'button',
- 'icon' => 'user-circle-o',
+ 'icon' => 'person-circle',
'extra' => 'data-toggle="button"'
];
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 8654d8e8f..f90b4f99e 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -23,20 +23,35 @@ 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)
+ );
+
+ 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'),
+ 'filed_messages_title' => t('Filed messages'),
'notice_messages_title' => t('Notices'),
'loading' => t('Loading'),
'empty' => t('No messages'),
'unseen_count' => t('Unseen'),
- 'filter' => t('Filter by name or address')
+ 'filter' => t('Filter by name or address'),
+ 'file_filter' => t('Filter by file name')
]
]);
@@ -50,6 +65,7 @@ class Messages {
$offset = $options['offset'] ?? 0;
$type = $options['type'] ?? '';
$author = $options['author'] ?? '';
+ $file = $options['file'] ?? '';
if ($offset == -1) {
return;
@@ -67,8 +83,9 @@ class Messages {
$item_normal_c = str_replace('item.', 'c.', $item_normal);
$entries = [];
$limit = 30;
+ $order_sql = 'i.created DESC';
$dummy_order_sql = '';
- $author_sql = '';
+ $filter_sql = '';
$loadtime = (($offset) ? $_SESSION['messages_loadtime'] : datetime_convert());
$vnotify = get_pconfig(local_channel(), 'system', 'vnotify', -1);
@@ -84,43 +101,55 @@ 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)) . "') ";
+ if($type !== 'filed' && $author) {
+ $filter_sql = " AND (i.owner_xchan = '" . protect_sprintf(dbesc($author)) . "') ";
+ }
+
+ if($type === 'filed' && $file) {
+ $filed_filter_sql = " AND (term.term = '" . protect_sprintf(dbesc($file)) . "') ";
}
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 +178,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'];
@@ -170,10 +209,10 @@ class Messages {
switch(intval($item['item_private'])) {
case 1:
- $icon = '<i class="fa fa-lock"></i>';
+ $icon = '<i class="bi bi-lock"></i>';
break;
case 2:
- $icon = '<i class="fa fa-envelope-o"></i>';
+ $icon = '<i class="bi bi-envelope"></i>';
break;
default:
$icon = '';
@@ -293,7 +332,7 @@ class Messages {
$entries[$i]['summary'] = $summary;
$entries[$i]['b64mid'] = (($notice['ntype'] & NOTIFY_INTRO) ? '' : ((str_contains($notice['hash'], '-')) ? $notice['hash'] : basename($notice['link'])));
$entries[$i]['href'] = (($notice['ntype'] & NOTIFY_INTRO) ? $notice['link'] : z_root() . '/hq/' . ((str_contains($notice['hash'], '-')) ? $notice['hash'] : basename($notice['link'])));
- $entries[$i]['icon'] = (($notice['ntype'] & NOTIFY_INTRO) ? '<i class="fa fa-user-plus"></i>' : '');
+ $entries[$i]['icon'] = (($notice['ntype'] & NOTIFY_INTRO) ? '<i class="bi bi-person-plus"></i>' : '');
$i++;
}
diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php
index 70a858fb0..79bdf9f9f 100644
--- a/Zotlabs/Widget/Newmember.php
+++ b/Zotlabs/Widget/Newmember.php
@@ -7,6 +7,8 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Config;
+
class Newmember {
function widget($arr) {
@@ -66,8 +68,8 @@ class Newmember {
]
];
- $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
- $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true);
+ $site_firehose = ((intval(Config::Get('system','site_firehose',0))) ? true : false);
+ $net_firehose = ((Config::Get('system','disable_discover_tab',1)) ? false : true);
// hack to put this in the correct spot of the array
diff --git a/Zotlabs/Widget/Notes.php b/Zotlabs/Widget/Notes.php
index 836159edd..be4ec64a6 100644
--- a/Zotlabs/Widget/Notes.php
+++ b/Zotlabs/Widget/Notes.php
@@ -16,14 +16,17 @@ use Zotlabs\Lib\Apps;
class Notes {
function widget($arr) {
- if(! local_channel())
+ if(!local_channel()) {
return EMPTY_STR;
+ }
- if(App::$profile_uid !== local_channel())
+ if (App::$profile_uid !== local_channel()) {
return EMPTY_STR;
+ }
- if(! Apps::system_app_installed(local_channel(), 'Notes'))
+ if(!Apps::system_app_installed(local_channel(), 'Notes')) {
return EMPTY_STR;
+ }
$text = get_pconfig(local_channel(),'notes','text');
diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php
index b16303be6..225403535 100644
--- a/Zotlabs/Widget/Notifications.php
+++ b/Zotlabs/Widget/Notifications.php
@@ -18,7 +18,7 @@ class Notifications {
if(local_channel()) {
$notifications[] = [
'type' => 'network',
- 'icon' => 'th',
+ 'icon' => 'grid-3x3',
'severity' => 'secondary',
'label' => t('Network'),
'title' => t('New network activity notifications'),
@@ -38,7 +38,7 @@ class Notifications {
$notifications[] = [
'type' => 'home',
- 'icon' => 'home',
+ 'icon' => 'house',
'severity' => 'danger',
'label' => t('Home'),
'title' => t('New home activity notifications'),
@@ -76,7 +76,7 @@ class Notifications {
$notifications[] = [
'type' => 'all_events',
- 'icon' => 'calendar',
+ 'icon' => 'calendar-date',
'severity' => 'secondary',
'label' => t('Events'),
'title' => t('New events notifications'),
@@ -91,7 +91,7 @@ class Notifications {
$notifications[] = [
'type' => 'intros',
- 'icon' => 'users',
+ 'icon' => 'people',
'severity' => 'danger',
'label' => t('New Connections'),
'title' => t('New connections notifications'),
@@ -111,7 +111,7 @@ class Notifications {
$notifications[] = [
'type' => 'notify',
- 'icon' => 'exclamation',
+ 'icon' => 'exclamation-circle',
'severity' => 'danger',
'label' => t('Notices'),
'title' => t('Notices'),
@@ -126,7 +126,7 @@ class Notifications {
$notifications[] = [
'type' => 'forums',
- 'icon' => 'comments-o',
+ 'icon' => 'chat-quote',
'severity' => 'secondary',
'label' => t('Forums'),
'title' => t('Forums'),
@@ -139,7 +139,7 @@ class Notifications {
if(local_channel() && is_site_admin()) {
$notifications[] = [
'type' => 'register',
- 'icon' => 'user-o',
+ 'icon' => 'person-exclamation',
'severity' => 'danger',
'label' => t('Registrations'),
'title' => t('New registrations notifications'),
@@ -173,6 +173,8 @@ class Notifications {
'$notifications' => $notifications,
'$no_notifications' => t('Sorry, you have got no notifications at the moment'),
'$loading' => t('Loading'),
+ '$sys_only' => empty($arr['sys_only']) ? 0 : 1
+
]);
return $o;
diff --git a/Zotlabs/Widget/Permcats.php b/Zotlabs/Widget/Permcats.php
index 9bda5b8f1..f0e43b937 100644
--- a/Zotlabs/Widget/Permcats.php
+++ b/Zotlabs/Widget/Permcats.php
@@ -40,7 +40,7 @@ class Permcats {
if($active_role) {
$roles[] = [
- 'name' => '<i class="fa fa-plus"></i>&nbsp;' . t('Add new role'),
+ 'name' => '<i class="bi bi-plus-lg"></i>&nbsp;' . t('Add new role'),
'url' => z_root() . '/permcats',
'active' => ''
];
diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php
index 1380c156b..be6b98434 100644
--- a/Zotlabs/Widget/Pinned.php
+++ b/Zotlabs/Widget/Pinned.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Config;
+
/**
* * Name: Pinned items
* * Description: Display pinned items
@@ -31,7 +33,7 @@ class Pinned {
if(! $this->uid)
return $ret;
- $this->allowed_types = get_config('system', 'pin_types', [ ITEM_TYPE_POST ]);
+ $this->allowed_types = Config::Get('system', 'pin_types', [ ITEM_TYPE_POST ]);
$items = $this->list($types);
@@ -110,8 +112,7 @@ class Pinned {
'mids' => json_encode([ $midb64 ]),
'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']) ),
diff --git a/Zotlabs/Widget/Portfolio.php b/Zotlabs/Widget/Portfolio.php
index a06f56e30..bde1c7d6a 100644
--- a/Zotlabs/Widget/Portfolio.php
+++ b/Zotlabs/Widget/Portfolio.php
@@ -103,7 +103,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 +113,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/Privacygroups.php b/Zotlabs/Widget/Privacygroups.php
index 62f343ea6..129c939fd 100644
--- a/Zotlabs/Widget/Privacygroups.php
+++ b/Zotlabs/Widget/Privacygroups.php
@@ -42,7 +42,7 @@ class Privacygroups {
if ($active) {
$menu_items[] = [
'href' => $z_root . '/group',
- 'label' => '<i class="fa fa-plus"></i> &nbsp;' . t('Add new group'),
+ 'label' => '<i class="bi bi-plus-lg"></i> &nbsp;' . t('Add new group'),
'title' => '',
'active' => '',
'count' => ''
diff --git a/Zotlabs/Widget/Pubtagcloud.php b/Zotlabs/Widget/Pubtagcloud.php
index 90bf5eb97..8119d0c73 100644
--- a/Zotlabs/Widget/Pubtagcloud.php
+++ b/Zotlabs/Widget/Pubtagcloud.php
@@ -7,6 +7,8 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Config;
+
class Pubtagcloud {
function widget($arr) {
@@ -16,19 +18,19 @@ class Pubtagcloud {
return EMPTY_STR;
}
- if(! intval(get_config('system','open_pubstream',1))) {
+ if(! intval(Config::Get('system','open_pubstream',1))) {
if(! get_observer_hash()) {
return EMPTY_STR;
}
}
- $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true);
+ $net_firehose = ((Config::Get('system','disable_discover_tab',1)) ? false : true);
if(!$net_firehose) {
return '';
}
- $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
+ $site_firehose = ((intval(Config::Get('system','site_firehose',0))) ? true : false);
$safemode = get_xconfig(get_observer_hash(),'directory','safemode',1);
diff --git a/Zotlabs/Widget/Rating.php b/Zotlabs/Widget/Rating.php
index 20c27ff1c..a90052411 100644
--- a/Zotlabs/Widget/Rating.php
+++ b/Zotlabs/Widget/Rating.php
@@ -8,12 +8,14 @@
namespace Zotlabs\Widget;
+use Zotlabs\Lib\Config;
+
class Rating {
function widget($arr) {
- $rating_enabled = get_config('system','rating_enabled');
+ $rating_enabled = Config::Get('system','rating_enabled');
if(! $rating_enabled) {
return;
}
@@ -58,12 +60,12 @@ class Rating {
if((($remote) || (local_channel())) && (! $self)) {
if($remote)
- $o .= '<a class="btn btn-block btn-primary btn-sm" href="' . $url . '"><i class="fa fa-pencil"></i> ' . t('Rate Me') . '</a>';
+ $o .= '<a class="btn btn-block btn-primary btn-sm" href="' . $url . '"><i class="bi bi-pencil"></i> ' . t('Rate Me') . '</a>';
else
- $o .= '<div class="btn btn-block btn-primary btn-sm" onclick="doRatings(\'' . $hash . '\'); return false;"><i class="fa fa-pencil"></i> ' . t('Rate Me') . '</div>';
+ $o .= '<div class="btn btn-block btn-primary btn-sm" onclick="doRatings(\'' . $hash . '\'); return false;"><i class="bi bi-pencil"></i> ' . t('Rate Me') . '</div>';
}
- $o .= '<a class="btn btn-block btn-default btn-sm" href="ratings/' . $hash . '"><i class="fa fa-eye"></i> ' . t('View Ratings') . '</a>';
+ $o .= '<a class="btn btn-block btn-default btn-sm" href="ratings/' . $hash . '"><i class="bi bi-eye"></i> ' . t('View Ratings') . '</a>';
$o .= '</div>';
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) {
diff --git a/Zotlabs/Widget/Tokens.php b/Zotlabs/Widget/Tokens.php
index 69452d628..08fe67680 100644
--- a/Zotlabs/Widget/Tokens.php
+++ b/Zotlabs/Widget/Tokens.php
@@ -38,7 +38,7 @@ class Tokens {
if ($active) {
$menu_items[] = [
'href' => $z_root . '/tokens',
- 'label' => '<i class="fa fa-plus"></i> &nbsp;' . t('Add new guest'),
+ 'label' => '<i class="bi bi-plus-lg"></i> &nbsp;' . t('Add new guest'),
'title' => '',
'active' => ''
];