2015-01-21 45 views

回答

0
<script type="text/javascript" charset="utf-8"> 
document.observe('dom:loaded', function(e) { 
    var lang_choosed = ipb.Cookie.get('ips_lang_c'); 
    if(!lang_choosed) { 
     new ipb.Popup('lang_popup', { 
      type: 'pane', 
      modal: true, 
      initial: $('lang_dialog').innerHTML, 
      hideAtStart: false, 
      w: '500px', 
      h: '42px' 
     }); 
     ipb.Cookie.set('ips_lang_c',1,1); 
    } 
}); 
</script> 

<div id="lang_dialog" style='display:none;'> 
    <h2>Выберите язык:</h2> 
    <ul> 
    <if test="langchooser:|: ! $this->member->is_not_human && count($footer_items['lang_chooser']['options']) > 1"> 
     <foreach loop="$footer_items['lang_chooser']['options'] as $lang"> 
      <li> 
       <a href="{parse url="{$this->settings['query_string_formatted']}&amp;k={$this->member->form_hash}&amp;setlanguage=1&amp;langurlbits={$this->settings['query_string_safe']}&amp;cal_id={$this->request['cal_id']}&amp;langid={$lang['id']}" base="public"}" title='{$lang['title']}'>{$lang['title']}</a> 
      </li> 
     </foreach> 
    </if> 
    </ul> 
</div> 

腳本看起來像這樣