From b4f639239fb0d6d5ed58fb7139bb7f88f1b77150 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 16 Feb 2015 11:09:12 -0800 Subject: mopping up the public site ratings --- include/widgets.php | 7 +++++++ mod/pubsites.php | 8 ++++---- view/pdl/mod_ratings.pdl | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/widgets.php b/include/widgets.php index d457db07d..fbbc74224 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -962,4 +962,11 @@ function widget_rating($arr) { return $o; +} + +// used by site ratings pages to provide a return link +function widget_pubsites() { + if(get_app()->poi) + return; + return '
'; } \ No newline at end of file diff --git a/mod/pubsites.php b/mod/pubsites.php index ddd7baf92..ff3854492 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -22,13 +22,13 @@ function pubsites_content(&$a) { if($ret['success']) { $j = json_decode($ret['body'],true); if($j) { - $rate_meta = ((local_channel()) ? '' . t('Rate this hub') . '' . t('View hub ratings') . '' : ''); - $o .= '' . $rate_meta . ''; + $rate_meta = ((local_channel()) ? '' : ''); + $o .= '
' . t('Site URL') . '' . t('Access Type') . '' . t('Registration Policy') . '' . t('Location') . '
' . t('Rate this hub') . '
' . $rate_meta . ''; if($j['sites']) { foreach($j['sites'] as $jj) { $host = strtolower(substr($jj['url'],strpos($jj['url'],'://')+3)); - $rate_links = ((local_channel()) ? '' : ''); - $o .= '' . $rate_links . ''; + $rate_links = ((local_channel()) ? '' : ''); + $o .= '' . $rate_links . ''; } } diff --git a/view/pdl/mod_ratings.pdl b/view/pdl/mod_ratings.pdl index 0b6e32283..df1486c9b 100644 --- a/view/pdl/mod_ratings.pdl +++ b/view/pdl/mod_ratings.pdl @@ -1,4 +1,5 @@ [region=aside] +[widget=pubsites][/widget] [widget=vcard][/widget] [widget=rating][/widget] [widget=suggestions][/widget] -- cgit v1.2.3
' . t('Site URL') . '' . t('Access Type') . '' . t('Registration Policy') . '' . t('Location') . '' . t('View hub ratings') . '
' . t('Rate') . ' ' . t('View ratings') . '
' . '' . $jj['url'] . '' . '' . $jj['access'] . '' . $jj['register'] . '' . $jj['location'] . '
' . t('Rate') . '
' . '' . $jj['url'] . '' . '' . $jj['access'] . '' . $jj['register'] . '' . $jj['location'] . ' ' . t('View ratings') . '