diff options
author | friendica <redmatrix@redmatrix.me> | 2015-04-09 19:51:58 -0700 |
---|---|---|
committer | friendica <redmatrix@redmatrix.me> | 2015-04-09 19:51:58 -0700 |
commit | 3fd2e4b716aaf4626b774ac5d808cc4088e6f3f2 (patch) | |
tree | fb6899c04d2750a15e8f5bf168ed2234173f6791 /include | |
parent | 07248dbc803e99245e17dd80cfd3e884579a40b0 (diff) | |
download | volse-hubzilla-3fd2e4b716aaf4626b774ac5d808cc4088e6f3f2.tar.gz volse-hubzilla-3fd2e4b716aaf4626b774ac5d808cc4088e6f3f2.tar.bz2 volse-hubzilla-3fd2e4b716aaf4626b774ac5d808cc4088e6f3f2.zip |
program the affinity slider labels
Diffstat (limited to 'include')
-rw-r--r-- | include/widgets.php | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/include/widgets.php b/include/widgets.php index e84c029d2..4a9032a21 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -420,18 +420,35 @@ function widget_affinity($arr) { $cmin = ((x($_REQUEST,'cmin')) ? intval($_REQUEST['cmin']) : 0); $cmax = ((x($_REQUEST,'cmax')) ? intval($_REQUEST['cmax']) : 99); + if(feature_enabled(local_channel(),'affinity')) { + + $labels = array( + t('Me'), + t('Family'), + t('Friends'), + t('Acquaintances'), + t('All') + ); + call_hooks('affinity_labels',$labels); + $label_str = ''; + + if($labels) { + foreach($labels as $l) { + if($label_str) { + $label_str .= ", '|'"; + $label_str .= ", '" . $l . "'"; + } + else + $label_str .= "'" . $l . "'"; + } + } + $tpl = get_markup_template('main_slider.tpl'); $x = replace_macros($tpl,array( '$val' => $cmin . ',' . $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('All') + '$labels' => $label_str, )); $arr = array('html' => $x); call_hooks('main_slider',$arr); |