Post by Rai Chiller on Feb 21, 2009 1:15:38 GMT -6
<script type="text/Javascript">
// View Posts Since Last Visit by Chris
// This script may not be redistributed outside of Studio Zero, ProBoards Support, SoCal, or ProVision
var imageUrl = "http://img232.imageshack.us/img232/994/buttonch6.png";
// Don't edit
var pslv = {
image: imageUrl,
lastTime: 0, // Last login time
genRand: function(){
return Math.floor(Math.random()*500)+500;
},
genLink: function(){
var sstring = "?action=search2&search=&match=1&whattosearch=1&user=";
sstring += "&maxresults="+this.genRand()+"&viewtype=1&subject=1&message=1";
// Check into search string
// Check into match type
// Add the date here
var x = (new Date()).getTime()-this.lastTime;
x = Math.ceil(((x/1000)/60)/60); // Milliseconds to seconds to minutes to hours
sstring += "&hours="+x;
// Load board data
var f = document.getElementById("forumjump").options;
for(a=6;a<f.length;a++){
if(f.value.match(/board=/i)){
sstring += "-"+f.value.split(/board=/i)[1]+"=1";
}
}
location.href = sstring;
},
addInfo: function(){
var aTD = document.getElementsByTagName("td");
for(a=0;a<aTD.length;a++){
if(aTD.colSpan == 5 && aTD.getElementsByTagName("img")[0]){
var v = aTD.firstChild;
v.appendChild(document.createTextNode(" "));
var ah = v.appendChild(document.createElement("a"));
ah.href = "javascript:void(0);"
ah.onclick = function(){ pslv.genLink(); };
ah.appendChild(new Image()).src = this.image;
ah.firstChild.alt = ah.firstChild.title = "Posts Since Last Visit";
ah.firstChild.border = 0;
break;
}
}
},
init: function(){
if(pb_username == "Guest")
return false;
if(!(location.href.match(/action=home/i) || !location.href.match(/(action|board)=/i)))
return false;
this.addInfo();
this.lastTime = this.c.get("session_visit") || this.c.get("last_visit") || 1;
this.c.set("session_visit", this.lastTime);
this.c.set("last_visit", (new Date()).getTime(), true);
},
c: {
get: function(n){
if(document.cookie.match(new RegExp("pslv_"+n+"=(.+?)(;|$)", "gi"))){
return RegExp.$1;
}
return 0;
},
set: function(n, v, e){
document.cookie = "pslv_"+n+"="+v+";"+(e?"expires="+(new Date( )).toGMTString().replace(/\d{4}/, "2050"):"");
}
}
};
pslv.init();
</script>[/code]
// View Posts Since Last Visit by Chris
// This script may not be redistributed outside of Studio Zero, ProBoards Support, SoCal, or ProVision
var imageUrl = "http://img232.imageshack.us/img232/994/buttonch6.png";
// Don't edit
var pslv = {
image: imageUrl,
lastTime: 0, // Last login time
genRand: function(){
return Math.floor(Math.random()*500)+500;
},
genLink: function(){
var sstring = "?action=search2&search=&match=1&whattosearch=1&user=";
sstring += "&maxresults="+this.genRand()+"&viewtype=1&subject=1&message=1";
// Check into search string
// Check into match type
// Add the date here
var x = (new Date()).getTime()-this.lastTime;
x = Math.ceil(((x/1000)/60)/60); // Milliseconds to seconds to minutes to hours
sstring += "&hours="+x;
// Load board data
var f = document.getElementById("forumjump").options;
for(a=6;a<f.length;a++){
if(f.value.match(/board=/i)){
sstring += "-"+f.value.split(/board=/i)[1]+"=1";
}
}
location.href = sstring;
},
addInfo: function(){
var aTD = document.getElementsByTagName("td");
for(a=0;a<aTD.length;a++){
if(aTD.colSpan == 5 && aTD.getElementsByTagName("img")[0]){
var v = aTD.firstChild;
v.appendChild(document.createTextNode(" "));
var ah = v.appendChild(document.createElement("a"));
ah.href = "javascript:void(0);"
ah.onclick = function(){ pslv.genLink(); };
ah.appendChild(new Image()).src = this.image;
ah.firstChild.alt = ah.firstChild.title = "Posts Since Last Visit";
ah.firstChild.border = 0;
break;
}
}
},
init: function(){
if(pb_username == "Guest")
return false;
if(!(location.href.match(/action=home/i) || !location.href.match(/(action|board)=/i)))
return false;
this.addInfo();
this.lastTime = this.c.get("session_visit") || this.c.get("last_visit") || 1;
this.c.set("session_visit", this.lastTime);
this.c.set("last_visit", (new Date()).getTime(), true);
},
c: {
get: function(n){
if(document.cookie.match(new RegExp("pslv_"+n+"=(.+?)(;|$)", "gi"))){
return RegExp.$1;
}
return 0;
},
set: function(n, v, e){
document.cookie = "pslv_"+n+"="+v+";"+(e?"expires="+(new Date( )).toGMTString().replace(/\d{4}/, "2050"):"");
}
}
};
pslv.init();
</script>[/code]