From 0c5a2925ad14022148060d1f07077bf485714665 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 21 Feb 2016 19:31:11 +0100 Subject: Pimped the pubsites page. I tried to get this into a .tpl-file, but it was to complicated for me. Pubsites page is now more narrow (fits on most devices) and location is not taking a complete column (location is almost never used). Also a fix on the auto-create-channel part on the register page. --- mod/pubsites.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'mod/pubsites.php') diff --git a/mod/pubsites.php b/mod/pubsites.php index ae8601366..51744eb1b 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -15,22 +15,29 @@ function pubsites_content(&$a) { $o .= '
'; - $o .= '

' . t('Public Sites') . '

'; + $o .= '

' . t('Public Hubs') . '

'; $o .= '
' . - 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 may provide additional details.') . '
' . EOL; + 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) { - $rate_meta = ((local_channel()) ? '' . t('Rate this hub') . '' : ''); - $o .= '' . $rate_meta . ''; + $o .= '
' . t('Site URL') . '' . t('Access Type') . '' . t('Registration Policy') . '' . t('Location') . '' . t('Project') . '' . t('View hub ratings') . '
'; if($j['sites']) { foreach($j['sites'] as $jj) { $host = strtolower(substr($jj['url'],strpos($jj['url'],'://')+3)); $rate_links = ((local_channel()) ? '' : ''); - $o .= '' . $rate_links . ''; + $location = ''; + if(!empty($jj['location'])) { + $location = '

' . $jj['location'] . '

'; + } + else { + $location = '
 '; + } + $urltext = str_replace(array('https://'), '', $jj['url']); + $o .= '' . $rate_links . ''; } } -- cgit v1.2.3
' . t('Hub URL') . '' . t('Access Type') . ' / ' . '
' . t('Registration Policy') . '
' . t('Project') . '' . t('Ratings') . '
' . t('Rate') . '
' . '' . $jj['url'] . '' . '' . $jj['access'] . '' . $jj['register'] . '' . $jj['location'] . '' . $jj['project'] . ' ' . t('View ratings') . '
' . $urltext . '' . $location . '' . $jj['access'] . ' / ' . $jj['register'] . '' . $jj['project'] . ' ' . t('View') . '