aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-05 05:35:00 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-05 05:35:00 -0400
commit6ce939491bf932c20c9777a8518da5875e02a6b1 (patch)
treee49b75c9017015677e6d550d75e4ce62ffaddc75 /include/widgets.php
parent8cb06e7af8c3a14a6513d2aee2beba091f3ecfb5 (diff)
parent8ffdc4859baa9f2ae9567a4c443dfbb227919167 (diff)
downloadvolse-hubzilla-6ce939491bf932c20c9777a8518da5875e02a6b1.tar.gz
volse-hubzilla-6ce939491bf932c20c9777a8518da5875e02a6b1.tar.bz2
volse-hubzilla-6ce939491bf932c20c9777a8518da5875e02a6b1.zip
Merge remote-tracking branch 'upstream/dev' into plugin-repo
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 1b9d3c07a..2641a718e 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -400,6 +400,55 @@ function widget_categories($arr) {
}
+function widget_appcategories($arr) {
+
+ if(! local_channel())
+ return '';
+
+ $cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : '');
+ $srchurl = App::$query_string;
+ $srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
+ $srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
+
+ $terms = array();
+
+ $r = q("select distinct(term.term)
+ from term join app on term.oid = app.id
+ where app_channel = %d
+ and term.uid = app_channel
+ and term.otype = %d
+ order by term.term asc",
+ intval(local_channel()),
+ intval(TERM_OBJ_APP)
+ );
+ if($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' => $srchurl,
+
+ ));
+ }
+
+
+
+}
+
+
+
+function widget_appcloud($arr) {
+ if(! local_channel())
+ return '';
+ return app_tagblock(z_root() . '/apps');
+}
+
+
function widget_tagcloud_wall($arr) {