From dfe31dc3b7a041050203b7c0edfd245b1efc0121 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Jan 2015 19:05:42 -0800 Subject: more heavy lifting on poco rep --- mod/prep.php | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'mod/prep.php') diff --git a/mod/prep.php b/mod/prep.php index 7cff34bfc..45cdddad6 100644 --- a/mod/prep.php +++ b/mod/prep.php @@ -1,7 +1,7 @@ poi = $p[0]; + +} + + + + + +function prep_content(&$a) { + + + $poco_rating = get_config('system','poco_rating_enable'); + // if unset default to enabled + if($poco_rating === false) + $poco_rating = true; + + if(! $poco_rating) + return; + + if(! $a->poi) + return; + $r = q("select * from xlink left join xchan on xlink_xchan = xchan_hash where xlink_link like '%s' and xlink_rating != 0", - dbesc($hash . '%') + dbesc($a->poi['xchan_hash']) ); $ret = array(); - if($p && $r) { - $ret['poi'] = $p[0]; - $ret['raters'] = $r; - + if($r) { $o = replace_macros(get_markup_template('prep.tpl'),array( '$header' => t('Ratings'), - '$poi' => $p[0], + '$rating_lbl' => t('Rating: ' ), + '$rating_text_lbl' => t('Description: '), '$raters' => $r )); -- cgit v1.2.3