From 012b771af9a919e6fdec0d6da5589ee6cd7075fe Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Sat, 30 Jun 2012 18:05:33 +0000 Subject: better output for news summary --- en/community/index.php | 6 +++--- en/community/locales.php | 2 -- lib/news.php | 25 ++++++++++++++++++++++--- 3 files changed, 25 insertions(+), 8 deletions(-) delete mode 100644 en/community/locales.php diff --git a/en/community/index.php b/en/community/index.php index 4e438f872..83b542f77 100644 --- a/en/community/index.php +++ b/en/community/index.php @@ -2,7 +2,6 @@ define('HLANG', true); require '../../langs.php'; -include 'locales.php'; $_t = array( 'de' => array( @@ -67,6 +66,7 @@ $_t = array( ); $_t = i18n::get_strings($_t, $locale, $i18n_fallback_rules); +_lang_load($locale, 'community'); include '../../lib/news.php'; ?> @@ -108,9 +108,9 @@ include '../../lib/news.php';

%s %s', - $d['link'], $d['title'], news_date($d['date'], $locale)); + if ($split && strpos($d['title'], ' : ') !== false) { + $title = explode(' : ', $d['title']); + $source = ' / ' . array_shift($title); + $title = implode(' : ', $title); + } else { + $title = $d['title']; + $source = null; + } + + $s .= sprintf('
  • %s %s%s
  • ', + $d['link'], $title, news_date($d['date'], $locale), $source); } $s .= ''; echo $s; -- cgit v1.2.1