From 22f172d69730d3c9c6f078ec206f90b1e91eee69 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 20 Feb 2016 14:01:20 +0100 Subject: grid->network, whitespace and bootstrapify create button --- mod/new_channel.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'mod') diff --git a/mod/new_channel.php b/mod/new_channel.php index 89a03714b..577137c37 100644 --- a/mod/new_channel.php +++ b/mod/new_channel.php @@ -8,7 +8,6 @@ function new_channel_init(&$a) { $cmd = ((argc() > 1) ? argv(1) : ''); - if($cmd === 'autofill.json') { require_once('library/urlify/URLify.php'); $result = array('error' => false, 'message' => ''); @@ -59,7 +58,6 @@ function new_channel_init(&$a) { } - function new_channel_post(&$a) { $arr = $_POST; @@ -94,12 +92,6 @@ function new_channel_post(&$a) { } - - - - - - function new_channel_content(&$a) { $acc = $a->get_account(); @@ -136,9 +128,9 @@ function new_channel_content(&$a) { $role = array('permissions_role' , t('Channel role and privacy'), ($privacy_role) ? $privacy_role : 'social', t('Select a channel role with your privacy requirements.') . ' ' . t('Read more about roles') . '',get_roles()); $o = replace_macros(get_markup_template('new_channel.tpl'), array( - '$title' => t('Create a Channel'), - '$desc' => t('A channel is your identity on the grid. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions.'), - '$label_import' => t('Or import an existing channel from another location'), + '$title' => t('Create Channel'), + '$desc' => t('A channel is your identity on this network. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions.'), + '$label_import' => t('or import an existing channel from another location.'), '$name' => $name, '$role' => $role, '$default_role' => $default_role, -- cgit v1.2.3 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') 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 From e37c1ed981056f5a96898b2436b3db70629c5e15 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 21 Feb 2016 20:00:09 +0100 Subject: Revert pubsites.php. There seems something wrong. Let me troubleshoot that first. --- mod/pubsites.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'mod') diff --git a/mod/pubsites.php b/mod/pubsites.php index 51744eb1b..ae8601366 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -15,29 +15,22 @@ function pubsites_content(&$a) { $o .= '
'; - $o .= '

' . t('Public Hubs') . '

'; + $o .= '

' . t('Public Sites') . '

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

' . $jj['location'] . '

'; - } - else { - $location = '
 '; - } - $urltext = str_replace(array('https://'), '', $jj['url']); - $o .= '' . $rate_links . ''; + $o .= '' . $rate_links . ''; } } -- cgit v1.2.3 From 1fcc863298ec2bb4f4e1f4cf240a72a420863445 Mon Sep 17 00:00:00 2001 From: jeroenpraat Date: Sun, 21 Feb 2016 23:00:12 +0100 Subject: There was nothing wrong with my pimped pubsites (was another problem). Took the opportunity to update schemas. Plus updated spanish and dutch strings. --- mod/pubsites.php | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'mod') diff --git a/mod/pubsites.php b/mod/pubsites.php index ae8601366..f401e301d 100644 --- a/mod/pubsites.php +++ b/mod/pubsites.php @@ -13,30 +13,37 @@ function pubsites_content(&$a) { } $url .= '/sites'; - $o .= '
'; + $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; + $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) { - $rate_meta = ((local_channel()) ? '
' : ''); - $o .= '
' . t('Site URL') . '' . t('Access Type') . '' . t('Registration Policy') . '' . t('Location') . '' . t('Project') . '' . t('View hub ratings') . '
' . t('Rate') . '
' . $urltext . '' . $location . '' . $jj['access'] . ' / ' . $jj['register'] . '' . $jj['project'] . ' ' . t('View') . '
' . '' . $jj['url'] . '' . '' . $jj['access'] . '' . $jj['register'] . '' . $jj['location'] . '' . $jj['project'] . ' ' . t('View ratings') . '
' . t('Rate this hub') . '
' . $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 . ''; } } $o .= '
' . 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') . '
'; - $o .= ''; + $o .= ''; } } -- cgit v1.2.3