Post by Mithras on Aug 16, 2007 19:19:04 GMT -8
People have said that this code is not working. It worked when I created it, so it's probably conflicting codes. I'll fix it when I have the time, which is not now. Please do not PM me.
This code puts a either a small green check mark or red x in front of each thread title, depending on whether you've posted in the thread or not.
If anyone can think of a catchier/shorter title, please PM me. I'm not one for naming codes, but this is one of the worst
Edit the green with the link for the icon to be shown if the person has posted in the thread, and the red is the link to the icon to be shown if they didn't. The default images are and
Global or Board Footer
January 11, 2009: Fixed bug due to Proboards update that changed cell widths. ~ Triad
This code puts a either a small green check mark or red x in front of each thread title, depending on whether you've posted in the thread or not.
If anyone can think of a catchier/shorter title, please PM me. I'm not one for naming codes, but this is one of the worst
Edit the green with the link for the icon to be shown if the person has posted in the thread, and the red is the link to the icon to be shown if they didn't. The default images are and
Global or Board Footer
<script type="text/javascript">January 20, 2009: Fixed location check in set_posted() function. ~ Triad
// Post Status by Mithras
// Do not redistribute without permission
// Global or Board Footer
// Edit these variables:
// Default icons copyright famfamfam.com
var posted_icon = 'http://img245.imageshack.us/img245/6330/checkee8.gif';
var not_posted_icon = 'http://img245.imageshack.us/img245/7255/94269559gc0.gif';
// Do not edit below this line
if(location.href.match(/board=/) && !location.href.match(/action=(display|post)/)) {
var tds = document.getElementsByTagName('td');
for(var a = 0; a < tds.length; a++) {
if(tds[a].className.match(/^windowbg2?$/) && tds[a].width == '48%' && tds[a].style.cursor == 'pointer') {
tds[a].innerHTML.match(/thread=(\d+)"/);
var threadID = RegExp.$1;
var icon_to_show = (getCookie(threadID)) ? posted_icon : not_posted_icon;
if(icon_to_show == not_posted_icon) {
if(tds[a+1].innerHTML.match(pb_username))
icon_to_show = posted_icon;
}
tds[a].innerHTML = '<img src="' + icon_to_show + '" height="16" width="16" /> ' + tds[a].innerHTML;
}
}
} else if(location.href.match(/action=(display|post)&thread=(\d+)/)) {
var forms = document.getElementsByTagName('form');
var isIE = (document.all) ? true : false;
for(var a = 0; a < forms.length; a++) {
if(forms[a].method == 'post') {
if(isIE)
forms[a].onsubmit = set_posted;
else
forms[a].setAttribute('onSubmit','set_posted()');
}
}
}
function set_posted() {
location.href.match(/&thread=(\d+)($|&)/);
var result = RegExp.$1;
setCookie(result,'posted');
}
// Cookie functions by Chris of Studio Zero (http://sz-ex.com)
function setCookie(_name,_value){
document.cookie = _name+"="+escape(_value)+";expires="+(new Date()).toGMTString().replace(/\d{4}/,"2050");
}
function getCookie(_name){
if(document.cookie.match(new RegExp(_name+"=(.+?)($|;)","gi")))
return unescape(RegExp.$1);
return null;
}
</script>
January 11, 2009: Fixed bug due to Proboards update that changed cell widths. ~ Triad