program the affinity slider labels
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user