aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-11 19:43:41 -0800
committerfriendica <info@friendica.com>2013-12-11 19:43:41 -0800
commitb4e1e8a4a43721d0134e41944afaa9f45bcd8aa8 (patch)
tree4ad54778112984ced01500e25cb16b44b98f256f /include/widgets.php
parent2f46bacded409c86514bc7542a01337c3cbf642a (diff)
downloadvolse-hubzilla-b4e1e8a4a43721d0134e41944afaa9f45bcd8aa8.tar.gz
volse-hubzilla-b4e1e8a4a43721d0134e41944afaa9f45bcd8aa8.tar.bz2
volse-hubzilla-b4e1e8a4a43721d0134e41944afaa9f45bcd8aa8.zip
The affinity tool is not a "traditional" widget. But it is nevertheless a widget. It just makes fewer page layout decisions which are hard-coded. If you want to shrink it down and put it on the sidebar in your theme, go for it.
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index abbe1e2e0..680c00df2 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -334,3 +334,29 @@ function widget_tagcloud_wall($arr) {
return tagblock('search',$a->profile['profile_uid'],$limit,$a->profile['channel_hash'],ITEM_WALL);
return '';
}
+
+
+function widget_affinity($arr) {
+
+ if(! local_user())
+ return '';
+
+ if(feature_enabled(local_user(),'affinity')) {
+ $tpl = get_markup_template('main_slider.tpl');
+ $x = replace_macros($tpl,array(
+ '$val' => intval($_REQUEST['cmin']) . ';' . intval($_REQUEST['cmax']),
+ '$refresh' => t('Refresh'),
+ '$me' => t('Me'),
+ '$intimate' => t('Best Friends'),
+ '$friends' => t('Friends'),
+ '$coworkers' => t('Co-workers'),
+ '$oldfriends' => t('Former Friends'),
+ '$acquaintances' => t('Acquaintances'),
+ '$world' => t('Everybody')
+ ));
+ $arr = array('html' => $x);
+ call_hooks('main_slider',$arr);
+ return $arr['html'];
+ }
+ return '';
+} \ No newline at end of file