Elxis CMS Forum
Support => General => Topic started by: pachinko on June 27, 2007, 16:54:52
-
Hi everybody!
I am new to Elxis and hope it is just as intuitive and flexible as it looks! :D My congratulations to the developers!
Until now, I haven't encountered any real problems, and therefore just have one question: As I have been using Joomla for a while now, I have gotten used to presenting users language flags instead of inputboxes for their choice of language. This of course is no major obstacle for using Elxis, but actually it doesn't look so good on my site. Might there be any chance to get rid of it (As you might have noticed, I am no php expert ;D) ? Mod_language looks so short and simple, there must be a way to make that change...!
Hoping for help, pachinko
-
Hi and welcome,
You could replace mod_language.php code with something like that.
Please, ALWAYS KEEP A BACKUP OF THE ORIGINAL FILE.
<?php
/**
* @ Version: $Id$
* @ Copyright: Copyright (C) 2006 GoUp Inc. All rights reserved.
* @ Package: Elxis
* @ Subpackage: Module Language
* @ License: http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Elxis CMS is a Free Software
*/
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$lng_indicator = intval($params->get( 'indicator' ));
$lng_flag = intval($params->get( 'flag' ));
global $mosConfig_pub_langs, $lang;
switch ($lng_indicator) {
case '1':
echo _E_LANGUAGE.': <br>';
break;
case '2':
break;
case '0':
default:
echo _E_LANGUAGE.': ';
break;
}
$frLangs = explode(',', $mosConfig_pub_langs);
foreach ($frLangs as $langx) {
if (file_exists($mosConfig_absolute_path.'/language/'.$langx.'/'.$langx.'.gif')) {
echo "<a href=\"index.php?mylang=". $langx ."\">";
echo "<img src=\"".$mosConfig_live_site."/language/".$langx."/".$langx.".gif\" border=\"". ($langx===$lang?1:0) ."\" style=\"vertical-align:middle\">";
echo "</a> ";
}
}
?>
It will give you all available languages, as flags in a row, plus you can select if the "Language" label will be visible or not.
This is a very simple modification, but it will do the job.
-
Juhuhu! You have really made my day, eliasan! :D
That was quick, that was straight, that was just plain awesome!! Got it up and running and looking good, thank you very much!
Greets, pachinko
.........................................
ELXIS fan from today...! ;)
-
You are welcome!