我想知道如何自动清理我的IPB论坛上的cookie
我有语言转换器和库存我希望它正确使用
ipb.Cookie.set('ips_lang_c',1,1);
答案 0 :(得分: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']}&k={$this->member->form_hash}&setlanguage=1&langurlbits={$this->settings['query_string_safe']}&cal_id={$this->request['cal_id']}&langid={$lang['id']}" base="public"}" title='{$lang['title']}'>{$lang['title']}</a>
</li>
</foreach>
</if>
</ul>
</div>
脚本看起来像这样