Post by ⓦ৹₪deⓡ on Jan 2, 2006 2:56:25 GMT -8
This code will put a button in each user's profile, that, when clicked, will cause you to ignore that user's post/pm/calendar entry. If you are ignoring someone, anoter button is put in their mini-profile which, when clicked, unignores them. You can set it up so admins, gmods, mods, and custom groups are not ignored by entering their group number in the cannotIgnore variable. All ignore info is stored in the cookie so if you delete your cookies or use a different computer, your ignore list will not be available. Do NOT PM me for support or requests, that's what the coding boards are for. Edit where indicated. Enjoy.
~Wonder
Global Footer
~modified October 31st, 2008 at 6:59pm to fix error
~Wonder
Global Footer
<script>
//Ignore Members v1.0 [CB]
//Revised for Proboards 4.5 - Eton
//Copyright 01-02-2006 ~Wonder
//May be reposted anywhere as long as this header remains in tact
//Place in Global Footer
//Enter the group number of member groups people cannot ignore separated with a comma. 1=admin, 2=gmod, 3=mod, 4+=custom. To find this number, in the member group pulldown menu in their profile, starting from the dotted line, count down until you hit their member group.
cannotIgnore="1,2,3";
//Enter the URLs to the images you want for the ignore/unignore icons
ignoreIconUrl="http://images.proboards.com/lipsrsealed.gif";
unignoreIconUrl="http://images.proboards.com/cheesy.gif";
if(location.href.match(/action=(display|goto|viewprofile|pmview|(user)?recent|calendarview)/))
{
usersToIgnore=((document.cookie.match(/\bignore\=([^;]+)/))?RegExp.$1:"");
td=document.getElementsByTagName("td");
for(i=0;i<td.length;i++)
{
if(td[i].width=="20%" && td[i].className.match(/windowbg/))
{
a=td[i].getElementsByTagName("a");
if(a.length>1)
{
temp=a[0].href.match(/user\=/)?1:2;
user=(a[temp].href.match(/user\=\w+/))[0].split("=")[1];
group=0;
if(a[temp].className.match(/group(\d+)/))
group=parseInt(RegExp.$1,10);
if(!(","+cannotIgnore+",").match(","+group+","))
{
if(String(","+usersToIgnore+",").match(","+user+","))
{
td[i].getElementsByTagName("center")[0].innerHTML+='<a href=javascript:unignore("'+user+'")><img src="'+unignoreIconUrl+'" border=0 alt="[Ignored: Click to unignore]"></a>';
if(!location.href.match(/action\=viewprofile/ ))
{
td[i].nextSibling.firstChild.style.display="none";
td[i].nextSibling.vAlign="middle";
c=document.createElement("center" );
c.innerHTML="You have chosen to ignore "+a[temp].innerHTML+".";
td[i].nextSibling.insertBefore(c,td[i].nextSibling.firstChild);
}
}
else
{
td[i].getElementsByTagName("center")[0].innerHTML+='<a href=javascript:ignore("'+user+'")><img src="'+ignoreIconUrl+'" border=0 alt="[Click to ignore]"></a>';
}
}
}
}
}
}
function ignore(user)
{
document.cookie="ignore="+String(user+","+usersToIgnore).replace(/(^,)|(,$)|(,{2,})/g,"")+"; expires=Monday, 04-Apr-2025 05:00:00 GMT";
location.reload(true);
}
function unignore(user)
{
document.cookie="ignore="+(","+usersToIgnore+",").replace(","+user+",", ",").replace(/(^,+)|(,+$)|(,{2,})/g,"")+"; expires=Monday, 04-Apr-2025 05:00:00 GMT";
location.reload(true);
}
</script>
~modified Jan 7th, 2006 at 2:14am to fix error~modified October 31st, 2008 at 6:59pm to fix error