aboutsummaryrefslogtreecommitdiffstats
path: root/mod/pubsites.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-16 01:17:15 -0800
committerfriendica <info@friendica.com>2015-02-16 01:17:15 -0800
commiteb3c5916d759742fa87ec00622b363d0de29b283 (patch)
tree5bbef4c99fe2137d38da6d3075cc7c6015fbdc8f /mod/pubsites.php
parent1c4b9199809581504ee66212f3bb434fd9773aff (diff)
downloadvolse-hubzilla-eb3c5916d759742fa87ec00622b363d0de29b283.tar.gz
volse-hubzilla-eb3c5916d759742fa87ec00622b363d0de29b283.tar.bz2
volse-hubzilla-eb3c5916d759742fa87ec00622b363d0de29b283.zip
pubsites ratings (mod/pubsites really really needs to be templatised, this was quick and dirty)
Diffstat (limited to 'mod/pubsites.php')
-rw-r--r--mod/pubsites.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/pubsites.php b/mod/pubsites.php
index c31bbcf97..ddd7baf92 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><td>' . t('View hub ratings') . '</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>' . $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><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View ratings') . '</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>' . $rate_links . '</tr>';
}
}