diff --git a/include/Contact.php b/include/Contact.php index 4f7a2a19f..4c80f5d6a 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -119,6 +119,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { '$name' => $xchan['xchan_name'], '$photo' => ((is_array($a->profile) && array_key_exists('photo',$a->profile)) ? $a->profile['photo'] : $xchan['xchan_photo_l']), '$follow' => $xchan['xchan_addr'], + '$link' => zid($xchan['xchan_url']), '$connect' => $connect, '$newwin' => (($mode === 'chanview') ? t('New window') : ''), '$newtit' => t('Open the selected location in a different window or browser tab'), 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 )); diff --git a/view/css/mod_prep.css b/view/css/mod_prep.css new file mode 100644 index 000000000..3701cbdff --- /dev/null +++ b/view/css/mod_prep.css @@ -0,0 +1,8 @@ +.contact-photo-wrapper { + float: left; + width: 120px; +} + +.prep-details { + float: left; +} \ No newline at end of file diff --git a/view/pdl/mod_prep.pdl b/view/pdl/mod_prep.pdl new file mode 100644 index 000000000..3d40386cd --- /dev/null +++ b/view/pdl/mod_prep.pdl @@ -0,0 +1,5 @@ +[region=aside] +[widget=vcard][/widget] +[widget=suggestions][/widget] +[widget=findpeople][/widget] +[/region] diff --git a/view/tpl/prep.tpl b/view/tpl/prep.tpl index d0c1e5ec6..49dea7d72 100644 --- a/view/tpl/prep.tpl +++ b/view/tpl/prep.tpl @@ -1,17 +1,5 @@