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 /mod | |
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 'mod')
-rw-r--r-- | mod/connedit.php | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index 2c4c0cef8..70839e373 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -558,16 +558,32 @@ function connedit_content(&$a) { 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 . "'"; + } + } + $slider_tpl = get_markup_template('contact_slider.tpl'); $slide = replace_macros($slider_tpl,array( - '$me' => t('Me'), '$min' => 1, '$val' => (($contact['abook_closeness']) ? $contact['abook_closeness'] : 99), - '$intimate' => t('Best Friends'), - '$friends' => t('Friends'), - '$oldfriends' => t('Former Friends'), - '$acquaintances' => t('Acquaintances'), - '$world' => t('Unknown') + '$labels' => $label_str, )); } |