Fish Eaters Traditional Catholic Forum
May 21, 2013, 07:49:PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The man still needs help!
 
   Fish Eaters    Forum Index   Forum Rules   Help Calendar Members Chat Room   Who's Chatting   Login Register  
Pages: [1] 2 3 4
 
Author Topic: Ignore Code: Don't blame me, others asked for it!  (Read 4332 times)
Rosarium
Guest
« on: June 25, 2011, 04:03:PM »

I received some requests for this and I am glad to share code.

However, I do not want to provide support individually for anyone who uses it.

This script will hide the posts of users of the forum when their user id is part of the script:

Its limitations:

* When you are posting on a thread, the last posts which are under the textarea are visible. If you do not want to see a person's words at all, this is a bug. If you want to occasionally see them when you choose, this is a way to see them.
* You can see the post area, but it is all blank. You can see the blank area, but you can't quote it or see any of the contents, including the person's information on the left.

All of these limitations could be overcome, but I never had a reason to do that. If people are interested (which I doubt), I could develop the idea further.

I only use it on a single browser, Opera, but it should work in all browsers which follow standards.

For the people who are interested, apply this custom ECMAScript to this forum. The general way of doing this is to apply this script as a custom script for the fisheaters domain (or the forum's subdomain). You can ask me how to do that, but I will just google it and then give a link to the process, so you should should read the documentation for your browser yourself.

Open a text editor and save the follow text as I wrote it (copy and paste it exactly) as "dk.js". In Windows, if you click on it, it will probably be opened with whatever it is which would execute the script.

Note, you should change the value of UID to the user id of the user you want to block. You can add more users as well to this array. Just separate the values by commas and put the value in quotes.

Code:
/*******************************************************************************
dk.js:
Copyright (C) 2011 J. F. O'Neill

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/

function hidePost(UID)
{
    var UIDString = "http://catholicforum.fisheaters.com/index.php?action=pm;sa=send;u=" + UID;
    var allLinks = document.getElementsByTagName('a');
  
    for (var i = 0; i < allLinks.length; i++)
    {
        if (allLinks[i].getAttribute('href') == UIDString)
        {
            allLinks[i].parentNode.parentNode.parentNode.parentNode.style.visibility = 'hidden';  
        }
    }
}

window.onload = function()
{
    var UID = ["998657"];

    for (var i = 0; i <= UID.length; i++)
    {
        hidePost(UID[i]); 
    }
    return true;
}




This post has been edited to include a better version after some people were overly amused by the way one could break the script by changing avatars.

Here is the original version which goes by avatar:
Code:
/*******************************************************************************
dk.js:
Copyright (C) 2011 J. F. O'Neill

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/

window.onload = function()
{
    var avatarURI = "http://catholicforum.fisheaters.com/useravatars/avatar_998657.png"
    var allImages = document.getElementsByTagName('img');

    for (var i = 0; i < allImages.length; i++)
    {
        if (allImages[i].getAttribute('src') == avatarURI)
        {
            allImages[i].parentNode.parentNode.parentNode.parentNode.style.visibility = 'hidden';
            allImages[i].onclick = function()
            {

            }
        }
    }
    return true;
}

« Last Edit: June 26, 2011, 02:48:PM by Rosarium » Logged
devotedknuckles
the causes go, true rebels remain
Member

Personality type: incorrigible buffalo
Posts: 20,680



« Reply #1 on: June 25, 2011, 04:08:PM »

Wow
my ego is bloated duebtonthis
nver has anyone ever ever wrote any code for me
sip
nore distributed free as open source
LOL

I'll try not to le it get to me head
by th way
I'm no normal
those who meet and know me would  tell u the disability  (in thw worlds eyes) I suffer from is as severe if not more so then yours
the difference is

I dont demand the world take it Ito account and change on my account
that's the ticket to empowerment
sip
« Last Edit: June 25, 2011, 04:13:PM by devotedknuckles » Logged

This is the journey
from which, for me there shall be no return
wholly drenched
is the pine tree of  tears
-Yoshida Shoin
Walty
Gold Fish
*
Gender: Male
Posts: 14,489



« Reply #2 on: June 25, 2011, 04:11:PM »

This is sort of getting ridiculous.
Logged

Quote from: Rev. Reginald Garrigou-Lagrange O.P.
The Church is intolerant in principle because she believes;
she is tolerant in practice because she loves.
The enemies of the Church are tolerant in principle because they do not believe;
 they are intolerant in practice because they do not love.

Timorem Domini docebo vos.
tmw89
"Dr. Technology"
Member

Gender: Male
Location: ? ? ?
Personality type: INTJ
Posts: 5,208


Official Contest Pollster


« Reply #3 on: June 25, 2011, 04:12:PM »

Thanks again for this, Rosarium.  If FE had annual awards, this would certainly be contribution of the year.
Logged

"Fire on the forum?"  Just BLOCK the arsonist from your reality!  See http://catholicforum.fisheaters.com/index.php/topic,3440942.msg33798417.html#msg33798417

"Don't pay any attention to anything that mentions peace, change or hope and fails to mention Christ."
--Mithrandylan


---

REMEMBER MY FISHIES:  +48/-24
Rosarium
Guest
« Reply #4 on: June 25, 2011, 04:15:PM »

Wow
my ego is bloated duebtonthis
nver has anyone ever ever wrote any code for me
sip
nore distributed free as open spices
LOL
You've seen it before...

And much code has been written for you ;)

http://aspell.net/

http://spamassassin.apache.org/

Quote
I'll try not to le it get to me head
I'll resist the "Good, because it would be lonely" quips.

Quote
by th way
I'm no normal
those who meet and know me wpuld tell u the disi ikyy I suffer from is az severe if not more so then yours
I always thought you were hearing impaired or deaf.

Quote
the difference is
I dont demand the world take it Ito account and change on my account
that's the ticket to empowerment
sip

If people completely ignored your condition and expected you to be like others, they'd be treating you like they treat me.

Disability is not the issue. Understanding them is. People are quick to accommodate the limitations of foreigners with different language and cultural backgrounds, people who are physically disabled, or people who they otherwise understand.

This thread is not about that though. Others asked me for the script and I posted it for them by request. I left it the way I use it...because it is free software and they can alter it as they please.
Logged


Rosarium
Guest
« Reply #5 on: June 25, 2011, 04:15:PM »

This is sort of getting ridiculous.

Don't blame me, others asked for it.

It has nothing to do with devotedknuckles. I am not sure who people want to block. It could be me for all I know.
Logged
devotedknuckles
the causes go, true rebels remain
Member

Personality type: incorrigible buffalo
Posts: 20,680



« Reply #6 on: June 25, 2011, 04:17:PM »

Rosie
this maybe marketible
my ex wife would pay big bucks for ansoxftawere package do to this
sip
think lad
Logged

This is the journey
from which, for me there shall be no return
wholly drenched
is the pine tree of  tears
-Yoshida Shoin
Walty
Gold Fish
*
Gender: Male
Posts: 14,489



« Reply #7 on: June 25, 2011, 04:18:PM »

This is sort of getting ridiculous.

Don't blame me, others asked for it.

It has nothing to do with devotedknuckles. I am not sure who people want to block. It could be me for all I know.

I understand that.  It just seems like this isn't the best way to go about dealing with a poster that one doesn't like.
Logged

Quote from: Rev. Reginald Garrigou-Lagrange O.P.
The Church is intolerant in principle because she believes;
she is tolerant in practice because she loves.
The enemies of the Church are tolerant in principle because they do not believe;
 they are intolerant in practice because they do not love.

Timorem Domini docebo vos.
cgraye
Gold Fish
*
Gender: Male
Location: Maryland, United States of America
Personality type: Melancholic
Posts: 7,060



« Reply #8 on: June 25, 2011, 04:24:PM »

A lot of modern forum software has this functionality built in, actually.  So it is a common enough thing to do.
Logged

Chris
Rosarium
Guest
« Reply #9 on: June 25, 2011, 04:26:PM »

A lot of modern forum software has this functionality built in, actually.  So it is a common enough thing to do.

SMF has plugins for it probably.

Logged
Pages: [1] 2 3 4
 
 
Jump to:  

Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC