Position of the flags

This forum is dedicated to the Joom!Fish 2.2.x core release. This release is dedicated to Joomla 1.5 code base and therefore we will not answer any questions related Joomla 2.5+ here.

Position of the flags

Postby rogy on Tue May 08, 2012 12:18 pm

I have 4 language on my website. I like to place 2 flags (DE / EN) on the left and two flags (IT / FR) on the right site in my template. It is not possible with CSS. Have somebody a solution where can i do this in mod_jflanguageselection? I tried to copy the module but then i have 4 flags on the right end 4 flags on the left.
rogy
Silver Member
 
Posts: 3
Joined: Thu Nov 25, 2010 3:01 pm

Re: Position of the flags

Postby quodo on Tue May 08, 2012 12:34 pm

I haven't tried this myself, and I hope that there will be an easy/easier answer out there... but this is what I would try, which does require you to do some PHP programming:
The flags are shown when using the "rawimages" setting. This uses the file /JOOMLAROOT/modules/mod_jflanguageselection/tmpl/rawimages.php. I can imagine that you might an extra div around the span that is displaying the flag, that would be within the div with id jflanguageselection, or apply a class to the span. Since there is a "for each" loop in that file you could do something with the class name, give it a number that increases per language and then style the classes with numbers 1 and 2 to the left and 3 and 4 to the right. If you don't understand the coding in lines 36-64 in the file mentioned, I wouldn't try this though.
quodo
Contributor
 
Posts: 556
Joined: Wed Feb 03, 2010 3:08 pm

Re: Position of the flags

Postby rogy on Tue May 08, 2012 1:56 pm

Thanks for your.
in the file rawimages.php i have this code:

Code: Select all
$outString = '<div id="jflanguageselection"><div class="rawimages">';

foreach( $langActive as $language )

{

   $langActive = '';

   if( $language->get('id') == $curLanguage->get('id') ) {

      if( !$show_active ) {

         continue;      // Not showing the active language

      } else {

         $langActive = ' id="active_language"';

      }

   }



   $href = JFModuleHTML::_createHRef ($language, $params);

   $langImg = JFModuleHTML::getLanguageImageSource($language);

   

   if (isset($language->disabled) && $language->disabled){

      if( file_exists( JPATH_ROOT . $langImg ) ) {

         $outString .= '<span' .$langActive. ' style="opacity:0.5" class="opaque"><img src="' .JURI::base(true) . $langImg. '" alt="' .$language->title_native. '" title="' .$language->title_native. '" /></span>';

      } else {

         $outString .= '<span' .$langActive. ' style="opacity:0.5" class="opaque">' .$language->title_native. '</span>';

      }

   }

   else {

      if( file_exists( JPATH_ROOT . $langImg ) ) {

         $outString .= '<span' .$langActive. '><a href="' .$href. '"><img src="' .JURI::base(true) . $langImg. '" alt="' .$language->title_native. '" title="' .$language->title_native. '" /></a></span>';

      } else {

         $outString .= '<span' .$langActive. '><a href="' .$href. '">' .$language->title_native. '</a></span>';

      }

   }

}

$outString .= '</div></div>';


im not shure were is the loop and were i cant insert the class name for the css
rogy
Silver Member
 
Posts: 3
Joined: Thu Nov 25, 2010 3:01 pm


Return to Joom!Fish 2.2.x Core Extension

Who is online

Users browsing this forum: No registered users and 3 guests