get rid of html from mod_suggest
This commit is contained in:
@@ -18,7 +18,11 @@ function suggest_init(&$a) {
|
||||
}
|
||||
|
||||
|
||||
function suggest_aside(&$a) {
|
||||
|
||||
$a->set_widget('follow', follow_widget());
|
||||
$a->set_widget('findpeople', findpeople_widget());
|
||||
}
|
||||
|
||||
|
||||
function suggest_content(&$a) {
|
||||
@@ -31,37 +35,36 @@ function suggest_content(&$a) {
|
||||
|
||||
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
||||
|
||||
$a->page['aside'] .= follow_widget();
|
||||
$a->page['aside'] .= findpeople_widget();
|
||||
|
||||
|
||||
$o .= '<h2>' . t('Friend Suggestions') . '</h2>';
|
||||
|
||||
$r = suggestion_query(local_user(),get_observer_hash());
|
||||
|
||||
if(! $r) {
|
||||
$o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
|
||||
return $o;
|
||||
info( t('No suggestions available. If this is a new site, please try again in 24 hours.'));
|
||||
return;
|
||||
}
|
||||
|
||||
$tpl = get_markup_template('suggest_friends.tpl');
|
||||
$arr = array();
|
||||
|
||||
foreach($r as $rr) {
|
||||
|
||||
$connlnk = $a->get_baseurl() . '/follow/?url=' . $rr['xchan_addr'];
|
||||
|
||||
$o .= replace_macros($tpl,array(
|
||||
'$url' => chanlink_url($rr['xchan_url']),
|
||||
'$name' => $rr['xchan_name'],
|
||||
'$photo' => $rr['xchan_photo_m'],
|
||||
'$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['xchan_hash'],
|
||||
'$conntxt' => t('Connect'),
|
||||
'$connlnk' => $connlnk,
|
||||
'$ignore' => t('Ignore/Hide')
|
||||
));
|
||||
$arr[] = array(
|
||||
'url' => chanlink_url($rr['xchan_url']),
|
||||
'name' => $rr['xchan_name'],
|
||||
'photo' => $rr['xchan_photo_m'],
|
||||
'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['xchan_hash'],
|
||||
'conntxt' => t('Connect'),
|
||||
'connlnk' => $connlnk,
|
||||
'ignore' => t('Ignore/Hide')
|
||||
);
|
||||
}
|
||||
|
||||
$o .= cleardiv();
|
||||
// $o .= paginate($a);
|
||||
|
||||
$o = replace_macros(get_markup_template('suggest_page.tpl'),array(
|
||||
'$title' => t('Channel Suggestions'),
|
||||
'$entries' => $arr
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user