aboutsummaryrefslogtreecommitdiffstats
path: root/mod/suggest.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-03-06 17:52:58 -0800
committerfriendica <info@friendica.com>2013-03-06 17:52:58 -0800
commit5a9dae78a2839d8d466a5c3ecda9e83cf1f4c50c (patch)
tree76515f87d200a34889570aef11adc39b09d7ddd1 /mod/suggest.php
parentb32b0102f79a4ecaaee62d08e2bceb51f69d79ad (diff)
downloadvolse-hubzilla-5a9dae78a2839d8d466a5c3ecda9e83cf1f4c50c.tar.gz
volse-hubzilla-5a9dae78a2839d8d466a5c3ecda9e83cf1f4c50c.tar.bz2
volse-hubzilla-5a9dae78a2839d8d466a5c3ecda9e83cf1f4c50c.zip
get rid of html from mod_suggest
Diffstat (limited to 'mod/suggest.php')
-rw-r--r--mod/suggest.php43
1 files changed, 23 insertions, 20 deletions
diff --git a/mod/suggest.php b/mod/suggest.php
index b66b06e65..f891ebefc 100644
--- a/mod/suggest.php
+++ b/mod/suggest.php
@@ -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;
+
}