From db0023f755ca5cf471ed1149278ce137c6b991b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2009 20:44:36 +0000 Subject: [PATCH] New: Enhance help center --- htdocs/support/online.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/htdocs/support/online.php b/htdocs/support/online.php index 283058aee8c..b5d41a82052 100644 --- a/htdocs/support/online.php +++ b/htdocs/support/online.php @@ -56,8 +56,8 @@ print $langs->trans("ToGetHelpGoOnSparkAngels2",$titlesparkangels).'
'; $arrayofwidgets=array( // Widget for Laurent Destailleur array('name'=>'Laurent Destailleur', - 'id'=>'4255', - 'lang'=>'fr,en'), // Put always english at end + 'id'=>'4256,4255', // Put of list of sparkangels widget id (for each language) + 'lang'=>'fr,en'), // Put list of language code of widgets (always english at end) // Widget for Regis Houssin array('name'=>'Régis Houssin', 'id'=>'4611', @@ -71,21 +71,29 @@ print '* '.$langs->trans("LinkToGoldMember",$langs->defaultlang).'

'; print ''; foreach ($arrayofwidgets as $arraywidget) // Loop on each user { + $listofwidgets=split(',',$arraywidget['id']); $listoflangs=split(',',$arraywidget['lang']); - foreach($listoflangs as $langcode) // Loop on each lang + $pos=0; + foreach($listoflangs as $langcode) // Loop on each lang of user { - if (eregi($langcode,$langs->defaultlang) || $langcode == 'en') + $pos++; + if (eregi($langcode,$langs->defaultlang) || $langcode == 'en') // If lang qualified { print ''; $found=1; break;
'; print $arraywidget['name'].'
'; print $langs->trans("PossibleLanguages").': '; + // All languages of user are shown foreach ($listoflangs as $langcode2) { + if (empty($widgetid)) $widgetid=$listoflangs[$pos-1]; if (! eregi($langcode,$langs->defaultlang) && $langcode2 != 'en') continue; // Show only english print $langcode2.' '; } print '
'; - print ''; + // But only first language found is used for widget + $widgetid=$listofwidgets[$pos-1]; + //print 'xx lang qualified='.$langcode.' id='.$widgetid; + print ''; print '