Post by Ron White on Mar 31, 2006 1:02:06 GMT -5
Goes in the Global Footer
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, another 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. Edit the code where it specifies.
-+-Win32##Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (VAUSSU03)##1280 × 768##1-+-
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, another 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. Edit the code where it specifies.
<script>
//Ignore Members v1.0 [CB]
//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://www.proboards.com/v4images/cheesy.gif";
unignoreIconUrl="http://www.proboards.com/v4images/lipsrsealed.gif";
if(location.href.match(/action=(display|goto|viewprofile|pmview|recent|calendarview)/))
{
usersToIgnore="";
if(document.cookie.match(/ignore\=/))
{
usersToIgnore=","+unescape(document.cookie.split('ignore=')[1].split(';')[0])+",";
}
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\=/)?0:1;
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(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="+user+","+usersToIgnore.replace(/(^,)|(,$)|(,+)/g,"")+"; expires=Monday, 04-Apr-2025 05:00:00 GMT";
location.reload(true);
}
function unignore(user)
{
document.cookie="ignore="+(","+usersToIgnore+",").replace(","+user+",",",").replace(/(^,)|(,$)|(,+)/g,"")+"; expires=Monday, 04-Apr-2025 05:00:00 GMT";
location.reload(true);
}
</script>
-+-Win32##Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (VAUSSU03)##1280 × 768##1-+-