';
$o .= '
' . t('Public Hubs') . '
';
$o .= '' .
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 sites may require subscription or provide tiered service plans. The hub may provide additional details.') . '
' . EOL;
$ret = z_fetch_url($url);
if($ret['success']) {
$j = json_decode($ret['body'],true);
if($j) {
$o .= '' . t('Hub URL') . ' | ' . t('Access Type') . ' / ' . ' ' . t('Registration Policy') . ' | ' . t('Project') . ' | ' . t('Ratings') . ' |
';
if($j['sites']) {
foreach($j['sites'] as $jj) {
$host = strtolower(substr($jj['url'],strpos($jj['url'],'://')+3));
$rate_links = ((local_channel()) ? ' ' . t('Rate') . ' | ' : '');
$location = '';
if(!empty($jj['location'])) {
$location = ' ' . $jj['location'] . '
';
}
else {
$location = '
';
}
$urltext = str_replace(array('https://'), '', $jj['url']);
$o .= ' ' . $urltext . '' . $location . ' | ' . $jj['access'] . ' / ' . $jj['register'] . ' | ' . $jj['project'] . ' | ' . t('View') . ' | ' . $rate_links . '
';
}
}
$o .= '
';
$o .= '';
}
}
return $o;
}