Guest Posted May 9, 2007 Share Posted May 9, 2007 Hi all, I would like to have 2 flags for each langauge. A highlighted if selected flag and an opaque deslected flag. So if I have 4 languages, its easy to see which one is highlighted. here is my code so far, <?php /* $Id: languages.php,v 1.15 2003/06/09 22:10:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- languages //--> <tr> <td> <?php if (!isset($lng) || (isset($lng) && !is_object($lng))) { include(DIR_WS_CLASSES . 'language.php'); $lng = new language; } $languages_string = ''; reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) { [b][color="#FF0000"]if ( $language == $key ) {[/color][/b] $languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array ('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value ['directory'] . '/images/' . $value[[b][color="#FF0000"]'image_on'[/color][/b]], $value['name']) . '</a>'; } else { $languages_string .= '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array ('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value ['directory'] . '/images/' . $value[[b][color="#FF0000"]'image_off'[/color][/b]], $value['name']) . '</a>'; } } $info_box_contents = array(); $info_box_contents[] = array('align' => '', 'text' => $languages_string); new infoBox($info_box_contents); ?> </td> </tr> <!-- languages_eof //--> The error obviously lies with this call, but unsure what it should read. if ( $language == $key ) { I have editted the database and clases to reflect the image_on and image_off function, but it always shows all 4 highlighted. Link to comment Share on other sites More sharing options...
Guest Posted May 9, 2007 Share Posted May 9, 2007 I am willing to put my hands in my pockets and dig deep to resolve this problem. Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2007 Share Posted May 14, 2007 anyone Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.