aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-15 14:05:18 -0800
committerfriendica <info@friendica.com>2015-01-15 14:05:18 -0800
commit1c9299ed4224d37716079be173d75319d2501b71 (patch)
tree27a72ac0d09bcb67bdea55a8d24f9fd7ea8f4b9d /mod
parent56bc3bcdcee41d5ca6920c878aa8576dc673d039 (diff)
downloadvolse-hubzilla-1c9299ed4224d37716079be173d75319d2501b71.tar.gz
volse-hubzilla-1c9299ed4224d37716079be173d75319d2501b71.tar.bz2
volse-hubzilla-1c9299ed4224d37716079be173d75319d2501b71.zip
more backend work on poco rating
Diffstat (limited to 'mod')
-rw-r--r--mod/connedit.php8
-rw-r--r--mod/poco.php3
2 files changed, 10 insertions, 1 deletions
diff --git a/mod/connedit.php b/mod/connedit.php
index 5c36c3184..cf6ff6aad 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -524,6 +524,12 @@ function connedit_content(&$a) {
));
}
+
+ $rating = replace_macros(get_markup_template('rating_slider.tpl'),array(
+ '$min' => -10,
+ '$val' => (($contact['abook_rating']) ? $contact['abook_rating'] : 0),
+ ));
+
$perms = array();
$channel = $a->get_channel();
@@ -555,6 +561,8 @@ function connedit_content(&$a) {
'$buttons' => (($self) ? '' : $buttons),
'$viewprof' => t('View Profile'),
'$lbl_slider' => t('Slide to adjust your degree of friendship'),
+ '$lbl_rating' => t('Rating (this information is public)'),
+ '$rating' => $rating,
'$slide' => $slide,
'$tabs' => $t,
'$tab_str' => $tab_str,
diff --git a/mod/poco.php b/mod/poco.php
index 3f932e92f..892d79801 100644
--- a/mod/poco.php
+++ b/mod/poco.php
@@ -178,7 +178,8 @@ function poco_init(&$a) {
if($fields_ret['photos'])
$entry['photos'] = array(array('value' => $rr['xchan_photo_l'], 'mimetype' => $rr['xchan_photo_mimetype'], 'type' => 'profile'));
if($fields_ret['rating']) {
- $entry['rating'] = ((array_key_exists('abook_rating',$rr)) ? array(intval($rr['abook_rating'])) : 0);
+ $entry['rating'] = ((array_key_exists('abook_rating',$rr)) ? intval($rr['abook_rating'])) : 0);
+ $entry['rating_text'] = ((array_key_exists('abook_rating_text',$rr)) ? $rr['abook_rating_text'])) : '');
// maybe this should be a composite calculated rating in $system_mode
if($system_mode)
$entry['rating'] = 0;