diff options
author | Habeas Codice <habeascodice@federated.social> | 2015-02-16 15:13:31 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2015-02-16 15:13:31 -0800 |
commit | d9d029470f188796988e002eb90e9dbf96d3dd29 (patch) | |
tree | ef922432ae326f358374535bf68492729134e49e /mod/pubsites.php | |
parent | ca8e22101803454be60af35d2cf71ae80224805a (diff) | |
parent | 1d1676094dd82482f113d6de9c2a95407a1a692f (diff) | |
download | volse-hubzilla-d9d029470f188796988e002eb90e9dbf96d3dd29.tar.gz volse-hubzilla-d9d029470f188796988e002eb90e9dbf96d3dd29.tar.bz2 volse-hubzilla-d9d029470f188796988e002eb90e9dbf96d3dd29.zip |
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'mod/pubsites.php')
-rw-r--r-- | mod/pubsites.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/pubsites.php b/mod/pubsites.php index c31bbcf97..ff3854492 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -22,10 +22,13 @@ function pubsites_content(&$a) { if($ret['success']) { $j = json_decode($ret['body'],true); if($j) { - $o .= '<table border="1"><tr><td>' . t('Site URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td>' . t('Location') . '</td></tr>'; + $rate_meta = ((local_channel()) ? '<td>' . t('Rate this hub') . '</td>' : ''); + $o .= '<table border="1"><tr><td>' . t('Site URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td>' . t('Location') . '</td><td>' . t('View hub ratings') . '</td>' . $rate_meta . '</tr>'; if($j['sites']) { foreach($j['sites'] as $jj) { - $o .= '<tr><td>' . '<a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" >' . $jj['url'] . '</a>' . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td>' . $jj['location'] . '</td></tr>'; + $host = strtolower(substr($jj['url'],strpos($jj['url'],'://')+3)); + $rate_links = ((local_channel()) ? '<td><a href="rate?f=&target=' . $host . '" class="btn-btn-default"><i class="icon-check"></i> ' . t('Rate') . '</a></td>' : ''); + $o .= '<tr><td>' . '<a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" >' . $jj['url'] . '</a>' . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td>' . $jj['location'] . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View ratings') . '</a></td>' . $rate_links . '</tr>'; } } |