aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-02-21 10:02:33 +0000
committerMario <mario@mariovavti.com>2022-02-21 10:02:33 +0000
commita80454978181eebf7813a10c00b3166f66300b3f (patch)
tree7f68f93c3d3894ebc05a9382ea3d7449dfdc288a /Zotlabs
parent2a60f1cc6ed49ab559090c831788308fe3df0706 (diff)
downloadvolse-hubzilla-a80454978181eebf7813a10c00b3166f66300b3f.tar.gz
volse-hubzilla-a80454978181eebf7813a10c00b3166f66300b3f.tar.bz2
volse-hubzilla-a80454978181eebf7813a10c00b3166f66300b3f.zip
remove deprecated widgets and add some more widget descriptions
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/AccessList.php49
-rw-r--r--Zotlabs/Widget/Activity.php5
-rw-r--r--Zotlabs/Widget/Album.php8
-rw-r--r--Zotlabs/Widget/Appcategories.php6
-rw-r--r--Zotlabs/Widget/Appcloud.php6
-rw-r--r--Zotlabs/Widget/Appstore.php6
-rw-r--r--Zotlabs/Widget/Archive.php6
-rw-r--r--Zotlabs/Widget/Bookmarkedchats.php9
-rw-r--r--Zotlabs/Widget/Catcloud.php9
-rw-r--r--Zotlabs/Widget/Catcloud_wall.php6
-rw-r--r--Zotlabs/Widget/Categories.php6
-rw-r--r--Zotlabs/Widget/Cdav.php10
-rw-r--r--Zotlabs/Widget/Chatroom_list.php6
-rw-r--r--Zotlabs/Widget/Chatroom_members.php6
-rw-r--r--Zotlabs/Widget/Clock.php5
-rw-r--r--Zotlabs/Widget/Collections.php54
-rw-r--r--Zotlabs/Widget/Common_friends.php8
-rw-r--r--Zotlabs/Widget/Cover_photo.php6
-rw-r--r--Zotlabs/Widget/Design_tools.php8
-rw-r--r--Zotlabs/Widget/Dirsort.php6
-rw-r--r--Zotlabs/Widget/Dirtags.php6
-rw-r--r--Zotlabs/Widget/Eventstools.php19
-rw-r--r--Zotlabs/Widget/Filer.php6
-rw-r--r--Zotlabs/Widget/Findpeople.php5
-rw-r--r--Zotlabs/Widget/Follow.php7
-rw-r--r--Zotlabs/Widget/Forums.php36
-rw-r--r--Zotlabs/Widget/Suggestedchats.php10
27 files changed, 148 insertions, 166 deletions
diff --git a/Zotlabs/Lib/AccessList.php b/Zotlabs/Lib/AccessList.php
index 026148c9f..f4b762eaa 100644
--- a/Zotlabs/Lib/AccessList.php
+++ b/Zotlabs/Lib/AccessList.php
@@ -311,55 +311,6 @@ class AccessList {
return $o;
}
-/* deprecated
- static function widget($every = "connections", $each = "lists", $edit = false, $group_id = 0, $cid = '', $mode = 1) {
-
- $groups = [];
-
- $r = q("SELECT * FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
- intval($_SESSION['uid'])
- );
- $member_of = [];
- if ($cid) {
- $member_of = self::containing(local_channel(), $cid);
- }
-
- if ($r) {
- foreach ($r as $rr) {
- $selected = (($group_id == $rr['id']) ? ' group-selected' : '');
-
- if ($edit) {
- $groupedit = ['href' => "lists/" . $rr['id'], 'title' => t('edit')];
- }
- else {
- $groupedit = null;
- }
-
- $groups[] = [
- 'id' => $rr['id'],
- 'enc_cid' => base64url_encode($cid),
- 'cid' => $cid,
- 'text' => $rr['gname'],
- 'selected' => $selected,
- 'href' => (($mode == 0) ? $each . '?f=&gid=' . $rr['id'] : $each . "/" . $rr['id']) . ((x($_GET, 'new')) ? '&new=' . $_GET['new'] : '') . ((x($_GET, 'order')) ? '&order=' . $_GET['order'] : ''),
- 'edit' => $groupedit,
- 'ismember' => in_array($rr['id'], $member_of),
- ];
- }
- }
-
- return replace_macros(get_markup_template('group_side.tpl'), [
- '$title' => t('Privacy Groups'),
- '$edittext' => t('Edit group'),
- '$createtext' => t('Create new group'),
- '$ungrouped' => (($every === 'contacts') ? t('Channels not in any privacy group') : ''),
- '$groups' => $groups,
- '$add' => t('Add'),
- ]);
-
- }
-*/
-
static function expand($g) {
if (!(is_array($g) && count($g))) {
return [];
diff --git a/Zotlabs/Widget/Activity.php b/Zotlabs/Widget/Activity.php
index 5d9795c7e..34e0f67dc 100644
--- a/Zotlabs/Widget/Activity.php
+++ b/Zotlabs/Widget/Activity.php
@@ -1,5 +1,10 @@
<?php
+/**
+ * * Name: Activity
+ * * Description: Shows the unseen activity count per contact
+ */
+
namespace Zotlabs\Widget;
class Activity {
diff --git a/Zotlabs/Widget/Album.php b/Zotlabs/Widget/Album.php
index f359e6d0f..003f6f49d 100644
--- a/Zotlabs/Widget/Album.php
+++ b/Zotlabs/Widget/Album.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Album
+ * * Description: Displays an album with a title which can be defined via the 'album' and 'title' variable
+ * * Requires: channel, articles, cards, wiki
+ */
+
namespace Zotlabs\Widget;
require_once('include/attach.php');
@@ -99,7 +105,7 @@ class Album {
'$upload_form' => $upload_form,
'$usage' => $usage_message
));
-
+
return $o;
}
}
diff --git a/Zotlabs/Widget/Appcategories.php b/Zotlabs/Widget/Appcategories.php
index e916f095f..31fb2542e 100644
--- a/Zotlabs/Widget/Appcategories.php
+++ b/Zotlabs/Widget/Appcategories.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: App categories
+ * * Description: Shows a menu with various app categories
+ * * Requires: apps
+ */
+
namespace Zotlabs\Widget;
class Appcategories {
diff --git a/Zotlabs/Widget/Appcloud.php b/Zotlabs/Widget/Appcloud.php
index 2a4671eee..791d534c2 100644
--- a/Zotlabs/Widget/Appcloud.php
+++ b/Zotlabs/Widget/Appcloud.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: App cloud
+ * * Description: Shows a cloud with various app categories
+ * * Requires: apps
+ */
+
namespace Zotlabs\Widget;
class Appcloud {
diff --git a/Zotlabs/Widget/Appstore.php b/Zotlabs/Widget/Appstore.php
index da05c0b62..d8499152a 100644
--- a/Zotlabs/Widget/Appstore.php
+++ b/Zotlabs/Widget/Appstore.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: App store menu
+ * * Description: Shows a menu with links to installed and available apps
+ * * Requires: apps
+ */
+
namespace Zotlabs\Widget;
diff --git a/Zotlabs/Widget/Archive.php b/Zotlabs/Widget/Archive.php
index 9adaac38f..e712a8236 100644
--- a/Zotlabs/Widget/Archive.php
+++ b/Zotlabs/Widget/Archive.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Archive
+ * * Description: A menu with links to content sorted by years and months
+ * * Requires: channel, articles, cards
+ */
+
namespace Zotlabs\Widget;
diff --git a/Zotlabs/Widget/Bookmarkedchats.php b/Zotlabs/Widget/Bookmarkedchats.php
index d64bbdb4b..5d6d000c1 100644
--- a/Zotlabs/Widget/Bookmarkedchats.php
+++ b/Zotlabs/Widget/Bookmarkedchats.php
@@ -1,14 +1,15 @@
<?php
+/**
+ * * Name: Bookmarked chats
+ * * Description: A menu with bookmarked chats
+ */
+
namespace Zotlabs\Widget;
class Bookmarkedchats {
function widget($arr) {
-
- if(! feature_enabled(\App::$profile['profile_uid'],'ajaxchat'))
- return '';
-
$h = get_observer_hash();
if(! $h)
return;
diff --git a/Zotlabs/Widget/Catcloud.php b/Zotlabs/Widget/Catcloud.php
index c53f9bbf6..5740caab7 100644
--- a/Zotlabs/Widget/Catcloud.php
+++ b/Zotlabs/Widget/Catcloud.php
@@ -2,6 +2,13 @@
namespace Zotlabs\Widget;
+/**
+ * * Name: Category cloud
+ * * Description: Display category links in a cloud
+ * * Requires: channel, cards, articles
+ */
+
+
class Catcloud {
function widget($arr) {
@@ -22,7 +29,7 @@ class Catcloud {
return card_catblock(\App::$profile['profile_uid'], $limit, '', \App::$profile['channel_hash']);
case 'articles':
-
+
if(! perm_is_allowed(\App::$profile['profile_uid'], get_observer_hash(), 'view_pages'))
return '';
diff --git a/Zotlabs/Widget/Catcloud_wall.php b/Zotlabs/Widget/Catcloud_wall.php
index 3795987cc..4ee30d023 100644
--- a/Zotlabs/Widget/Catcloud_wall.php
+++ b/Zotlabs/Widget/Catcloud_wall.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Category cloud wall
+ * * Description: Display category links in a cloud restricted to wall posts
+ * * Requires: channel
+ */
+
namespace Zotlabs\Widget;
class Catcloud_wall {
diff --git a/Zotlabs/Widget/Categories.php b/Zotlabs/Widget/Categories.php
index 94ad469da..0c6996d55 100644
--- a/Zotlabs/Widget/Categories.php
+++ b/Zotlabs/Widget/Categories.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Categories
+ * * Description: Display a menu with links to categories
+ * * Requires: channel, articles, cards, cloud
+ */
+
namespace Zotlabs\Widget;
use App;
diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php
index ce716b455..f84f5cb04 100644
--- a/Zotlabs/Widget/Cdav.php
+++ b/Zotlabs/Widget/Cdav.php
@@ -1,8 +1,12 @@
<?php
-namespace Zotlabs\Widget;
-
+/**
+ * * Name: CalDAV/CardDAV tools
+ * * Description: A widget with various CalDAV and CardDAV tools
+ * * Requires: cdav
+ */
+namespace Zotlabs\Widget;
class Cdav {
@@ -164,7 +168,7 @@ class Cdav {
'uri' => $sabreabook['uri'],
'displayname' => $sabreabook['{DAV:}displayname'],
'id' => $sabreabook['id']
-
+
];
}
diff --git a/Zotlabs/Widget/Chatroom_list.php b/Zotlabs/Widget/Chatroom_list.php
index e2aad0e05..42b92ddb2 100644
--- a/Zotlabs/Widget/Chatroom_list.php
+++ b/Zotlabs/Widget/Chatroom_list.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Chantroom list
+ * * Description: A menu with links to your chatrooms
+ * * Requires: chat, channel, articles, cards, wiki
+ */
+
namespace Zotlabs\Widget;
class Chatroom_list {
diff --git a/Zotlabs/Widget/Chatroom_members.php b/Zotlabs/Widget/Chatroom_members.php
index 8ed77fb3c..0846192ce 100644
--- a/Zotlabs/Widget/Chatroom_members.php
+++ b/Zotlabs/Widget/Chatroom_members.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Chatroom members
+ * * Description: A widget that shows members of a chatroom
+ * * Requires: chat
+ */
+
namespace Zotlabs\Widget;
class Chatroom_members {
diff --git a/Zotlabs/Widget/Clock.php b/Zotlabs/Widget/Clock.php
index b63b5f748..3b9751cc5 100644
--- a/Zotlabs/Widget/Clock.php
+++ b/Zotlabs/Widget/Clock.php
@@ -1,5 +1,10 @@
<?php
+/**
+ * * Name: Clock
+ * * Description: A simple widget that shows the current time
+ */
+
namespace Zotlabs\Widget;
class Clock {
diff --git a/Zotlabs/Widget/Collections.php b/Zotlabs/Widget/Collections.php
deleted file mode 100644
index ad1a10f4b..000000000
--- a/Zotlabs/Widget/Collections.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-namespace Zotlabs\Widget;
-
-use Zotlabs\Lib\AccessList;
-
-class Collections {
-
- function widget($args) {
-
- if(argc() < 2)
- // return;
-
- $mode = ((array_key_exists('mode',$args)) ? $args['mode'] : 'conversation');
- switch($mode) {
- case 'conversation':
- $every = argv(0);
- $each = argv(0);
- $edit = true;
- $current = $_REQUEST['gid'];
- $abook_id = 0;
- $wmode = 0;
- break;
- case 'connections':
- $every = 'connections';
- $each = 'group';
- $edit = true;
- $current = $_REQUEST['gid'];
- $abook_id = 0;
- $wmode = 0;
- case 'groups':
- $every = 'connections';
- $each = argv(0);
- $edit = false;
- $current = intval(argv(1));
- $abook_id = 0;
- $wmode = 1;
- break;
- case 'abook':
- $every = 'connections';
- $each = 'group';
- $edit = false;
- $current = 0;
- $abook_id = \App::$poi['abook_xchan'];
- $wmode = 1;
- break;
- default:
- return '';
- break;
- }
-
- return AccessList::widget($every, $each, $edit, $current, $abook_id, $wmode);
- }
-}
diff --git a/Zotlabs/Widget/Common_friends.php b/Zotlabs/Widget/Common_friends.php
index a67b9312c..dfeeb41b0 100644
--- a/Zotlabs/Widget/Common_friends.php
+++ b/Zotlabs/Widget/Common_friends.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Common friends
+ * * Description: Display common friends to viitors
+ * * Requires: channel, articles, cards, wiki
+ */
+
namespace Zotlabs\Widget;
require_once('include/contact_widgets.php');
@@ -8,7 +14,7 @@ class Common_friends {
function widget($arr) {
- if((! \App::$profile['profile_uid'])
+ if((! \App::$profile['profile_uid'])
|| (! perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'view_contacts'))) {
return '';
}
diff --git a/Zotlabs/Widget/Cover_photo.php b/Zotlabs/Widget/Cover_photo.php
index 97323ea8c..11d9c4715 100644
--- a/Zotlabs/Widget/Cover_photo.php
+++ b/Zotlabs/Widget/Cover_photo.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Cover photo
+ * * Description: Display a cover photo in the banner region
+ * * Requires: disabled_for_pdledit_gui
+ */
+
namespace Zotlabs\Widget;
class Cover_photo {
diff --git a/Zotlabs/Widget/Design_tools.php b/Zotlabs/Widget/Design_tools.php
index a15c0c98d..0f94577d8 100644
--- a/Zotlabs/Widget/Design_tools.php
+++ b/Zotlabs/Widget/Design_tools.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Design tools
+ * * Description: Links to useful tools for webpages
+ * * Requires: webpages
+ */
+
namespace Zotlabs\Widget;
class Design_tools {
@@ -11,4 +17,4 @@ class Design_tools {
return EMPTY_STR;
}
-} \ No newline at end of file
+}
diff --git a/Zotlabs/Widget/Dirsort.php b/Zotlabs/Widget/Dirsort.php
index 2fb38b7df..569782bb9 100644
--- a/Zotlabs/Widget/Dirsort.php
+++ b/Zotlabs/Widget/Dirsort.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Dirsort
+ * * Description: Various options to provide different vies of the directory
+ * * Requires: directory
+ */
+
namespace Zotlabs\Widget;
use Zotlabs\Lib\Libzotdir;
diff --git a/Zotlabs/Widget/Dirtags.php b/Zotlabs/Widget/Dirtags.php
index 246c47dde..183c2f20f 100644
--- a/Zotlabs/Widget/Dirtags.php
+++ b/Zotlabs/Widget/Dirtags.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Directory tags
+ * * Description: Show directory tags in a cloud
+ * * Requires: directory
+ */
+
namespace Zotlabs\Widget;
class Dirtags {
diff --git a/Zotlabs/Widget/Eventstools.php b/Zotlabs/Widget/Eventstools.php
deleted file mode 100644
index 7efd3f72e..000000000
--- a/Zotlabs/Widget/Eventstools.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-
-namespace Zotlabs\Widget;
-
-class Eventstools {
-
- function widget($arr) {
-
- if(! local_channel())
- return;
-
- return replace_macros(get_markup_template('events_tools_side.tpl'), array(
- '$title' => t('Events Tools'),
- '$export' => t('Export Calendar'),
- '$import' => t('Import Calendar'),
- '$submit' => t('Submit')
- ));
- }
-}
diff --git a/Zotlabs/Widget/Filer.php b/Zotlabs/Widget/Filer.php
index bac1c339e..6c5ac47a9 100644
--- a/Zotlabs/Widget/Filer.php
+++ b/Zotlabs/Widget/Filer.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Saved folders
+ * * Description: A menu containing saved folders
+ * * Requires: network
+ */
+
namespace Zotlabs\Widget;
require_once('include/contact_widgets.php');
diff --git a/Zotlabs/Widget/Findpeople.php b/Zotlabs/Widget/Findpeople.php
index f450b96ae..45d62bb7f 100644
--- a/Zotlabs/Widget/Findpeople.php
+++ b/Zotlabs/Widget/Findpeople.php
@@ -1,5 +1,10 @@
<?php
+/**
+ * * Name: Find channels
+ * * Description: A simple form to search for channels in the directory
+ */
+
namespace Zotlabs\Widget;
require_once('include/contact_widgets.php');
diff --git a/Zotlabs/Widget/Follow.php b/Zotlabs/Widget/Follow.php
index c4aecc8e1..2a0abb027 100644
--- a/Zotlabs/Widget/Follow.php
+++ b/Zotlabs/Widget/Follow.php
@@ -1,5 +1,10 @@
<?php
+/**
+ * * Name: Follow
+ * * Description: A simple form which allows you to enter an address and send a follow request
+ */
+
namespace Zotlabs\Widget;
@@ -24,7 +29,7 @@ class Follow {
else {
$abook_usage_message = '';
}
-
+
return replace_macros(get_markup_template('follow.tpl'),array(
'$connect' => t('Add New Connection'),
'$desc' => t('Enter channel address'),
diff --git a/Zotlabs/Widget/Forums.php b/Zotlabs/Widget/Forums.php
index 2af7347f1..454cc7a26 100644
--- a/Zotlabs/Widget/Forums.php
+++ b/Zotlabs/Widget/Forums.php
@@ -1,5 +1,11 @@
<?php
+/**
+ * * Name: Forums
+ * * Description: A list of forum channels with unseen item counts
+ * * Requires: network
+ */
+
namespace Zotlabs\Widget;
class Forums {
@@ -21,35 +27,7 @@ class Forums {
$unseen = 1;
$perms_sql = item_permissions_sql(local_channel()) . item_normal();
-
- $xf = false;
-
- $x1 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'send_stream' and v = '0'",
- intval(local_channel())
- );
- if($x1) {
- $xc = ids_to_querystr($x1,'xchan',true);
-
- $x2 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'tag_deliver' and v = '1' and xchan in (" . $xc . ") ",
- intval(local_channel())
- );
-
- if($x2) {
- $xf = ids_to_querystr($x2,'xchan',true);
-
- // private forums
- $x3 = q("select xchan from abconfig where chan = %d and cat = 'their_perms' and k = 'post_wall' and v = '1' and xchan in (" . $xc . ") and not xchan in (" . $xf . ") ",
- intval(local_channel())
- );
- if($x3) {
- $xf = ids_to_querystr(array_merge($x2,$x3),'xchan',true);
- }
- }
- }
-
- $sql_extra = (($xf) ? " and ( xchan_hash in (" . $xf . ") or xchan_pubforum = 1 ) " : " and xchan_pubforum = 1 ");
-
-
+ $sql_extra = " and xchan_pubforum = 1 ";
$r1 = q("select abook_id, xchan_hash, xchan_name, xchan_url, xchan_photo_s from abook left join xchan on abook_xchan = xchan_hash where xchan_deleted = 0 and abook_channel = %d and abook_pending = 0 and abook_ignored = 0 and abook_blocked = 0 and abook_archived = 0 $sql_extra order by xchan_name $limit ",
intval(local_channel())
diff --git a/Zotlabs/Widget/Suggestedchats.php b/Zotlabs/Widget/Suggestedchats.php
index 7df42944d..75df0c9e6 100644
--- a/Zotlabs/Widget/Suggestedchats.php
+++ b/Zotlabs/Widget/Suggestedchats.php
@@ -1,14 +1,18 @@
<?php
+/**
+ * * Name: Suggested chats
+ * * Description: A menu with chatroom suggestions
+ * * Requires: disabled_due_to_reasons
+ */
+
+
namespace Zotlabs\Widget;
class Suggestedchats {
function widget($arr) {
- if(! feature_enabled(\App::$profile['profile_uid'],'ajaxchat'))
- return '';
-
// There are reports that this tool does not ever remove chatrooms on dead sites,
// and also will happily link to private chats which you cannot enter.
// For those reasons, it will be disabled until somebody decides it's worth