diff options
author | Paolo Tacconi <p.tacconi@giunti.it> | 2016-04-15 09:22:27 +0200 |
---|---|---|
committer | Paolo Tacconi <p.tacconi@giunti.it> | 2016-04-15 09:22:27 +0200 |
commit | c38c79d71c8ef70ef649f83e322f1984b75ee2dd (patch) | |
tree | 958fcd22f04546f40b6ac68bb58cfe1a1b1fb7f6 /mod/pubsites.php | |
parent | 1806da0851dd5cf5978b19d12783ae3101a11257 (diff) | |
parent | 45a854762b451dafb882bc56efce054b64420627 (diff) | |
download | volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.tar.gz volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.tar.bz2 volse-hubzilla-c38c79d71c8ef70ef649f83e322f1984b75ee2dd.zip |
Merge branch 'redmatrix-master'
Diffstat (limited to 'mod/pubsites.php')
-rw-r--r-- | mod/pubsites.php | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/mod/pubsites.php b/mod/pubsites.php index ae8601366..dc6b09d9b 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -13,30 +13,39 @@ function pubsites_content(&$a) { } $url .= '/sites'; - $o .= '<div class="generic-content-wrapper-styled">'; + $o .= '<div class="generic-content-wrapper">'; - $o .= '<h1>' . t('Public Sites') . '</h1>'; + $o .= '<div class="section-title-wrapper"><h2>' . t('Public Hubs') . '</h2></div>'; - $o .= '<div class="descriptive-text">' . - t('The listed sites allow public registration for the $Projectname network. All sites in the network are interlinked so membership on any of them conveys membership in the network as a whole. Some sites may require subscription or provide tiered service plans. The provider links <strong>may</strong> provide additional details.') . '</div>' . EOL; + $o .= '<div class="section-content-tools-wrapper"><div class="descriptive-text">' . + t('The listed hubs allow public registration for the $Projectname network. All hubs in the network are interlinked so membership on any of them conveys membership in the network as a whole. Some hubs may require subscription or provide tiered service plans. The hub itself <strong>may</strong> provide additional details.') . '</div>' . EOL; $ret = z_fetch_url($url); if($ret['success']) { $j = json_decode($ret['body'],true); if($j) { - $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('Project') . '</td><td>' . t('View hub ratings') . '</td>' . $rate_meta . '</tr>'; + $o .= '<table class="table table-striped table-hover"><tr><td>' . t('Hub URL') . '</td><td>' . t('Access Type') . '</td><td>' . t('Registration Policy') . '</td><td colspan="2">' . t('Ratings') . '</td></tr>'; if($j['sites']) { foreach($j['sites'] as $jj) { + if($jj['project'] !== Zotlabs\Project\System::get_platform_name()) + continue; $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>' . $jj['project'] . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View ratings') . '</a></td>' . $rate_links . '</tr>'; + $location = ''; + if(!empty($jj['location'])) { + $location = '<p title="' . t('Location') . '" style="margin: 5px 5px 0 0; text-align: right"><i class="icon-globe"></i> ' . $jj['location'] . '</p>'; + } + else { + $location = '<br /> '; + } + $urltext = str_replace(array('https://'), '', $jj['url']); + $o .= '<tr><td><a href="'. (($jj['sellpage']) ? $jj['sellpage'] : $jj['url'] . '/register' ) . '" ><i class="icon-link"></i> ' . $urltext . '</a>' . $location . '</td><td>' . $jj['access'] . '</td><td>' . $jj['register'] . '</td><td><a href="ratings/' . $host . '" class="btn-btn-default"><i class="icon-eye-open"></i> ' . t('View') . '</a></td>' . $rate_links . '</tr>'; } } $o .= '</table>'; - $o .= '</div>'; + $o .= '</div></div>'; } } |