Changeset 12104


Ignore:
Timestamp:
09/08/11 12:50:05 (8 years ago)
Author:
plg
Message:

back merge r12103 on LanguageSwitch, this should be another commit, this coding is not finished yet

Location:
trunk/plugins/language_switch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/language_switch/flags.tpl

    r12103 r12104  
    2020{foreach from=$lang_switch.flags key=code item=flag name=f} 
    2121          <li> 
    22             <a rel="nofollow" href="{$flag.url}"> 
     22            <a rel="nofollow" href="{$SCRIPT_NAME}{$flag.url}"> 
    2323              <img class="flags" src="{$flag.img}" alt="{$flag.alt}" title="{$flag.alt}"/> {$flag.title} 
    2424            </a> 
  • trunk/plugins/language_switch/language_switch.inc.php

    r12103 r12104  
    101101     
    102102    $url_starting = get_query_string_diff(array('lang')); 
    103  
    104     echo htmlspecialchars($url_starting).'<br>'; 
    105103     
    106104    foreach ($available_lang as $code => $displayname) 
    107105    { 
    108       $qlc = array ( 
    109         // 'url' => duplicate_index_url().'&amp;lang='.$code, 
    110         'url' => add_url_params(duplicate_index_url(), array('lang'=> $code)), 
    111         // 'url' => str_replace( 
    112         //   array('=&amp;','?&amp;'), 
    113         //   array('&amp;','?'), 
    114         //   add_url_params($url_starting, array('lang'=> $code)) 
    115         //   ), 
     106      $qlc = array (  
     107        'url' => str_replace( 
     108          array('=&amp;','?&amp;'), 
     109          array('&amp;','?'), 
     110          add_url_params($url_starting, array('lang'=> $code)) 
     111          ), 
    116112        'alt' => ucwords($displayname), 
    117113        'title' => substr($displayname, 0, -4), // remove [FR] or [RU] 
Note: See TracChangeset for help on using the changeset viewer.