aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2013-11-12 02:09:32 -0800
committerPaolo T <tuscanhobbit@users.noreply.github.com>2013-11-12 02:09:32 -0800
commit67a101452b82782114143dc0b5bdba15adc0ba99 (patch)
tree9daee3807b370d02ee4c28e6df7db08731fbb9f1 /include/widgets.php
parentb23f3fc03b6bc751aab67fe2258a21f7c65bab8e (diff)
parent7cb4c2f8ad813336aafdec05e40f3a8eb1808d00 (diff)
downloadvolse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.gz
volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.tar.bz2
volse-hubzilla-67a101452b82782114143dc0b5bdba15adc0ba99.zip
Merge pull request #4 from friendica/master
Fork aligned to red master
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
new file mode 100644
index 000000000..87941f40f
--- /dev/null
+++ b/include/widgets.php
@@ -0,0 +1,34 @@
+<?php /** @file */
+
+
+function widget_profile($args) {
+ $a = get_app();
+ $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
+ return profile_sidebar($a->profile, $block, true);
+}
+
+// FIXME The problem with the next widget is that we don't have a search function for webpages that we can send the links to.
+// Then we should also provide an option to search webpages and conversations.
+
+function widget_tagcloud($args) {
+
+ $o = '';
+ $tab = 0;
+ $a = get_app();
+ $uid = $a->profile_uid;
+ $count = ((x($args,'count')) ? intval($args['count']) : 24);
+ $flags = 0;
+ $type = TERM_CATEGORY;
+
+ $r = tagadelic($uid,$count,$authors,$flags,ITEM_WEBPAGE,$type);
+
+ if($r) {
+ $o = '<div class="tagblock widget"><h3>' . t('Categories') . '</h3><div class="tags" align="center">';
+ foreach($r as $rr) {
+ $o .= '<span class="tag'.$rr[2].'">'.$rr[0].'</span> ' . "\r\n";
+ }
+ $o .= '</div></div>';
+ }
+ return $o;
+}
+