BRotondi
11-05-2010, 01:30 PM
Hello
If I use set_cookie('name','value'), the value will expire after closing the session.
How can I set expire to 'never' or a day in the future? Tried around a while, but don't get it, even it seems to be simple.
vbulletin-core.js:
function set_cookie(name, value, expires)
{
console.log("Set Cookie :: %s = '%s'", name, value);
document.cookie = name + '=' + escape(value) + '; path=/' + (typeof expires != 'undefined' ? '; expires=' + expires.toGMTString() : '');
}Thanks!
Bruno
--------------- Added 1288968572 at 1288968572 ---------------
Got it! - finally :)
vbulletin-sidebar.js
vBSidebar.prototype.save_collapsed = function(status)
{
expires = new Date();
expires.setTime(expires.getTime() + (1000 * 86400 * 365));
set_cookie('vbulletin_sidebar_collapse', status, expires);
}
If I use set_cookie('name','value'), the value will expire after closing the session.
How can I set expire to 'never' or a day in the future? Tried around a while, but don't get it, even it seems to be simple.
vbulletin-core.js:
function set_cookie(name, value, expires)
{
console.log("Set Cookie :: %s = '%s'", name, value);
document.cookie = name + '=' + escape(value) + '; path=/' + (typeof expires != 'undefined' ? '; expires=' + expires.toGMTString() : '');
}Thanks!
Bruno
--------------- Added 1288968572 at 1288968572 ---------------
Got it! - finally :)
vbulletin-sidebar.js
vBSidebar.prototype.save_collapsed = function(status)
{
expires = new Date();
expires.setTime(expires.getTime() + (1000 * 86400 * 365));
set_cookie('vbulletin_sidebar_collapse', status, expires);
}