aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-05-24 09:18:41 +0000
committerMario <mario@mariovavti.com>2022-05-24 09:18:41 +0000
commitae780c977b868c2b3588c8699dde959e542fe3b8 (patch)
tree7bbda1ad92b0a942cb99113ea94708cdbee45d5e /include
parente146a67f4b34a067229f008e9f6ddff95da18e67 (diff)
downloadvolse-hubzilla-ae780c977b868c2b3588c8699dde959e542fe3b8.tar.gz
volse-hubzilla-ae780c977b868c2b3588c8699dde959e542fe3b8.tar.bz2
volse-hubzilla-ae780c977b868c2b3588c8699dde959e542fe3b8.zip
move article and card categories widgets to addons
Diffstat (limited to 'include')
-rw-r--r--include/contact_widgets.php91
1 files changed, 0 insertions, 91 deletions
diff --git a/include/contact_widgets.php b/include/contact_widgets.php
index 1ae8b17c5..182f674ca 100644
--- a/include/contact_widgets.php
+++ b/include/contact_widgets.php
@@ -59,7 +59,6 @@ function fileas_widget($baseurl,$selected = '') {
));
}
-
function categories_widget($baseurl,$selected = '') {
if(! feature_enabled(App::$profile['profile_uid'],'categories'))
@@ -124,96 +123,6 @@ function categories_widget($baseurl,$selected = '') {
return '';
}
-
-function cardcategories_widget($baseurl,$selected = '') {
-
- if(! feature_enabled(App::$profile['profile_uid'],'categories'))
- return '';
-
- $sql_extra = item_permissions_sql(App::$profile['profile_uid']);
-
- $item_normal = "and item.item_hidden = 0 and item.item_type = 6 and item.item_deleted = 0
- and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0
- and item.item_blocked = 0 ";
-
- $terms = array();
- $r = q("select distinct(term.term)
- from term join item on term.oid = item.id
- where item.uid = %d
- and term.uid = item.uid
- and term.ttype = %d
- and term.otype = %d
- and item.owner_xchan = '%s'
- $item_normal
- $sql_extra
- order by term.term asc",
- intval(App::$profile['profile_uid']),
- intval(TERM_CATEGORY),
- intval(TERM_OBJ_POST),
- dbesc(App::$profile['channel_hash'])
- );
- if($r && count($r)) {
- foreach($r as $rr)
- $terms[] = array('name' => $rr['term'], 'selected' => (($selected == $rr['term']) ? 'selected' : ''));
-
- return replace_macros(get_markup_template('categories_widget.tpl'),array(
- '$title' => t('Categories'),
- '$desc' => '',
- '$sel_all' => (($selected == '') ? 'selected' : ''),
- '$all' => t('Everything'),
- '$terms' => $terms,
- '$base' => $baseurl,
- ));
- }
-
- return '';
-}
-
-
-function articlecategories_widget($baseurl,$selected = '') {
-
- if(! feature_enabled(App::$profile['profile_uid'],'categories'))
- return '';
-
- $sql_extra = item_permissions_sql(App::$profile['profile_uid']);
-
- $item_normal = "and item.item_hidden = 0 and item.item_type = 7 and item.item_deleted = 0
- and item.item_unpublished = 0 and item.item_delayed = 0 and item.item_pending_remove = 0
- and item.item_blocked = 0 ";
-
- $terms = array();
- $r = q("select distinct(term.term)
- from term join item on term.oid = item.id
- where item.uid = %d
- and term.uid = item.uid
- and term.ttype = %d
- and term.otype = %d
- and item.owner_xchan = '%s'
- $item_normal
- $sql_extra
- order by term.term asc",
- intval(App::$profile['profile_uid']),
- intval(TERM_CATEGORY),
- intval(TERM_OBJ_POST),
- dbesc(App::$profile['channel_hash'])
- );
- if($r && count($r)) {
- foreach($r as $rr)
- $terms[] = array('name' => $rr['term'], 'selected' => (($selected == $rr['term']) ? 'selected' : ''));
-
- return replace_macros(get_markup_template('categories_widget.tpl'),array(
- '$title' => t('Categories'),
- '$desc' => '',
- '$sel_all' => (($selected == '') ? 'selected' : ''),
- '$all' => t('Everything'),
- '$terms' => $terms,
- '$base' => $baseurl,
- ));
- }
-
- return '';
-}
-
function filecategories_widget($baseurl,$selected = '') {
$perms = permissions_sql(App::$profile['profile_uid']);