Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 05, 2016, 04:21:38 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Poll

Should old threads be automatically locked to prevent spammers from posting on them?

Yes.
5 (23.8%)
No.
10 (47.6%)
Other. (Comment with a better solution.)
6 (28.6%)

Total Members Voted: 21

Voting closed: April 25, 2009, 07:11:36 PM

Last post Author Topic: Anti-Necrospamming  (Read 18892 times)

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #25 on: March 29, 2009, 07:19:01 PM »
2ewemoa

Quote from: ewemoa
As an experiment, I put together a Greasemonkey script to change the color of the reply date string if it's been more than 180 days.

Works fine even in Opera. Good job  :Thmbsup:

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: Anti-Necrospamming
« Reply #26 on: March 29, 2009, 07:52:49 PM »
As an experiment, I put together a Greasemonkey script to change the color of the reply date string if it's been more than 180 days.

Thanks to your script another necro-spammer was uncovered and his "ad" removed.  :Thmbsup:

Quote
It currently only works w/ dates that contain YYYY-MM-DD portions, but if there's interest, may be it can be appropriately modified ;)

Didn't realize that part when I first installed it and couldn't figure out why it wasn't working for me. Then I changed how the date is displayed in my forum preferences and it worked great.

J-Mac

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 2,913
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #27 on: March 29, 2009, 11:19:07 PM »
Above post (I think) caused a "Page Exception" error - I couldn't even get this page to render without creating an exception certificate. How come?

I think it may have to do with my using SSL / https to access DC when creating the post -- perhaps uploading the attachment under those conditions caused the link(s) to the image / thumbnail to be made available only via SSL / https.


Could be...  I know I had about a dozen notifications from DC and that one was somewhere in the middle. All before and after were fine - only that one kept throwing the error.

Jim

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #28 on: March 29, 2009, 11:53:27 PM »
Thanks to your script another necro-spammer was uncovered and his "ad" removed.  :Thmbsup:

Woohoo!

Quote
Didn't realize that part when I first installed it and couldn't figure out why it wasn't working for me. Then I changed how the date is displayed in my forum preferences and it worked great.

I'm happy to consider working on other date formats -- I won't promise anything, but knowing which ones specifically people use might increase the probability of quicker support within the script ;)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #29 on: March 30, 2009, 12:36:47 AM »
Above post (I think) caused a "Page Exception" error - I couldn't even get this page to render without creating an exception certificate. How come?

I think it may have to do with my using SSL / https to access DC when creating the post -- perhaps uploading the attachment under those conditions caused the link(s) to the image / thumbnail to be made available only via SSL / https.


Could be...  I know I had about a dozen notifications from DC and that one was somewhere in the middle. All before and after were fine - only that one kept throwing the error.

I tried experimenting in "My Personal Area" but didn't manage to duplicate the issue.  I don't have any good ideas of what happened for you...

I've also tested viewing the thread using another PC with the same browser version (FF 3.0.7) with no particular exceptions set for SSL without incident.

Curioser and curioser...

nosh

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,426
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #30 on: March 30, 2009, 01:10:40 AM »
Works well inside threads, ewemoa. I couldn't get it working for topic listings though.

I've modified if slightly to show different colors for
under a week
1-3 weeks
3 weeks to 2 months
over 2 months.

It'll stop me from replying without thinking to somewhat older posts. :up:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #31 on: March 30, 2009, 01:18:20 AM »
Works well inside threads, ewemoa. I couldn't get it working for topic listings though.

Ah, I hadn't thought to try to handle topic listings.  I wonder if I should consider a separate script for that...

Quote
I've modified if slightly to show different colors for
under a week
1-3 weeks
3 weeks to 2 months
over 2 months.

Beat me to it  :Thmbsup:

nosh

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,426
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #32 on: March 30, 2009, 01:29:28 AM »
Yeah, well... everything that actually required some brainpower was done by you.  ;D

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #33 on: March 30, 2009, 01:35:17 AM »
In case anyone wants to experiment, I think the following XPath expression may pick out relevant bits for topic listings:

Quote
//tr[@class='titlebg']/following-sibling::*/td[@width='22%']/span

Perhaps a bit on the fragile side...may be someone else can come up something more robust.

On a side note, I used the XPath Checker FF Extension to interactively come up w/ these XPath expressions (well, in combination with some tutorial sites ;) ).

I confess that it is really thanks to other folks sharing info and tools that makes putting something together like this feasible.  Hail sharing  :Thmbsup:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #34 on: March 30, 2009, 05:41:49 AM »
The following is a separate attempt to work with topic listings.  It's separate to simplify testing.  Probably it makes sense to merge the scripts at some point :)

Code: Javascript [Select]
  1. // ==UserScript==
  2. // @name          NemseNaa
  3. // @namespace     http://ewemoa.dcmembers.com/greasemonkey/
  4. // @description   Script to provide visual indication of topics older than some amount
  5. // @include       https://www.donationcoder.com/forum/*
  6. // @include       http://www.donationcoder.com/forum/*
  7. // ==/UserScript==
  8.  
  9. var now, then, gap, age, dateRe, xpExp, snapResults, i, elm, text, m;
  10. now = new Date();
  11. age = 30;
  12. dateRe = /(\d{4})-(\d{2})-(\d{2})/;
  13. xpExp = "//table/tbody/tr/td[7]/span";
  14. snapResults = document.evaluate(xpExp, document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  15. for (i = snapResults.snapshotLength - 1; i >= 0; i -= 1) {
  16.   elm = snapResults.snapshotItem(i);
  17.   text = elm.textContent;
  18.   m = dateRe.exec(text);
  19.   if (m === null) {
  20.     continue;
  21.   }
  22.   then = new Date(m[1], (m[2] - 1), m[3]);
  23.   gap = (now - then) / 1000 / 60 / 60 / 24;
  24.   if (gap > age) {
  25.     elm.setAttribute("style", "color: red;");
  26.   }
  27. }
  28. // XXX
  29. //alert("It is currently: " + now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate());

Ah, and as to the XPath resources I've been using:


The former was mentioned in the latter.

I don't know whether GM supports XPath 1.0 or 2.0...
« Last Edit: December 23, 2009, 04:45:47 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #35 on: March 30, 2009, 09:55:45 AM »
I've added some support for different colors (dependence on age range) and merged the two scripts.  It doesn't work everywhere (yet?).  If you find an area of the forums that you'd like supported, please let me know.

Code: Javascript [Select]
  1. // ==UserScript==
  2. // @name           Nemse
  3. // @namespace      http://ewemoa.dcmembers.com/greasemonkey/
  4. // @description    Script to provide visual indication of ages of posts and topics
  5. // @include        https://www.donationcoder.com/forum/*
  6. // @include        http://www.donationcoder.com/forum/*
  7. // ==/UserScript==
  8.  
  9. var now, then, dmsec, gap, ageTable, age, color, dateRe,
  10.     xpExpList, snapResults, i, j, k, matched,
  11.     elm, text, m;
  12. // there is only now -- really?
  13. now = new Date();
  14. // milliseconds in a day
  15. dmsec = 24 * 60 * 60 * 1000;
  16. ageTable =
  17.   [
  18.    //[7 * dmsec, "black"],
  19.    [21 * dmsec, "green"],
  20.    [60 * dmsec, "purple"],
  21.    [120 * dmsec, "orange"],
  22.    [180 * dmsec, "red"]
  23.   ];
  24. dateRe = /(\d{4})-(\d{2})-(\d{2})/;
  25. xpExpList =
  26.   [
  27.    // posts
  28.    "//div[contains(@id, 'subject')]/following-sibling::*",
  29.    // topics
  30.    "//table/tbody/tr/td[7]/span"
  31.   ];
  32. for (i = 0; i < xpExpList.length; i += 1) {
  33.   snapResults = document.evaluate(xpExpList[i], document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
  34.   for (j = snapResults.snapshotLength - 1; j >= 0; j -= 1) {
  35.     elm = snapResults.snapshotItem(j);
  36.     text = elm.textContent;
  37.     m = dateRe.exec(text);
  38.     if (m === null) {
  39.       continue;
  40.     }
  41.     matched = true;
  42.     then = new Date(m[1], (m[2] - 1), m[3]);
  43.     gap = now - then;
  44.     color = null;
  45.     for (k = 0; k < ageTable.length; k += 1) {
  46.       age = ageTable[k][0];
  47.       if (gap > age) {
  48.         color = ageTable[k][1];
  49.       } else {
  50.         break;
  51.       }
  52.     }
  53.     if (color !== null) {
  54.       elm.setAttribute("style", "color: " + color + ";");
  55.     }
  56.   }
  57.   if (matched === true) {
  58.     break;
  59.   }
  60. }
  61. // XXX
  62. //alert("It is currently: " + now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate());
« Last Edit: December 23, 2009, 04:45:31 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #36 on: March 30, 2009, 06:39:53 PM »
Works fine even in Opera. Good job  :Thmbsup:

Thanks for the testing and feedback :)

I hope the subsequent versions keep working.  I guess there is some evidence to have hopes for this.

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #37 on: March 30, 2009, 07:11:31 PM »
2ewemoa
Quote from: ewemoa
I hope the subsequent versions keep working.  I guess there is some evidence to have hopes for this.

I didn't know that link. I've simply found very old script written by me (Opera supported userscripts long before Firefox) and added two lines to yours.

Unfortunately, I don't know how should it work for topics listing. I can't see any change, neither in Opera nor Firefox.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #38 on: March 30, 2009, 08:58:11 PM »
(Opera supported userscripts long before Firefox)
Ah, I didn't know that.  Thanks for the info.

Quote
Unfortunately, I don't know how should it work for topics listing. I can't see any change, neither in Opera nor Firefox.
An example page of where it might make a difference is unreplied topics.  Do you notice any effect there (the right-most column in particular)?
« Last Edit: February 03, 2010, 06:03:00 PM by ewemoa »

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #39 on: March 31, 2009, 02:59:07 AM »
An example page of where it might make a difference is unreplied topics.  Do you notice any effect there (the right-most column in particular)?
Nope. It looks like before.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #40 on: March 31, 2009, 05:24:25 AM »
Hmm...I wonder why it isn't working for you...

FWIW, what it looks like for me in FF3 with the latest GM script is:

unreplied-topics-two-colors.pngAnti-Necrospamming
« Last Edit: February 03, 2010, 06:02:44 PM by ewemoa »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #41 on: March 31, 2009, 09:47:10 PM »
I installed OperaUSB and did some testing.

I haven't gotten to the bottom of the issue, but one thing that seems like it could be it is mentioned at:

  http://my.opera.com/.../blog/show.dml/12919

Quote
The limitation first: because we are worried about potential spyware abuse, User JavaScripts will not run on pages that are encrypted. This is a big and very annoying limitation, and we're thinking hard about what we can do about it.

fenixproductions, by any chance, does the script work when accessing DC via vanilla http and not when via https?

That seemed to make a difference during my testing.
« Last Edit: March 31, 2009, 09:48:42 PM by ewemoa »

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #42 on: April 01, 2009, 04:54:48 AM »
fenixproductions, by any chance, does the script work when accessing DC via vanilla http and not when via https?
Not working for https at all but that's not a problem because I use http mainly.

First I thought it's the problem of additional lines:
Code: Javascript [Select]
  1. opera.addEventListener('AfterEvent.load',function (e) {
  2. ...
  3. },false);

so I changed it (according to your link) to:

Code: Javascript [Select]
  1. (function () {
  2. ...
  3. })();

but it stopped working completely.

So I followed more links and changed to:

Code: Javascript [Select]
  1. opera.addEventListener('BeforeEvent.load',function (e) {
  2. ...
  3. },false);

but it only gave first state back.

I have no more ideas.

tsaint

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 451
  • Hi from the a*** end of the earth
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Anti-Necrospamming
« Reply #43 on: April 01, 2009, 06:48:08 AM »
Could someone give me simple reasons why posting to an "old" threat is inherently bad/of concern?
(Any thread can attract spam, so I can't see that's relevant)

If there are inherent problems to replying to old threads, my next obvious question is what is the number of weeks (or days or hours) when a thread in fact becomes "old"

I noted several comments/concerns that it might be ok to reply to such a thread if the reply contained additional useful information. Isn't that the expectation for all replies to posts, be they carefree, spritely young posts as well as feeble and doddery old ones?
My 2 (AU) cents


ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #44 on: April 01, 2009, 11:27:41 AM »
Not working for https at all but that's not a problem because I use http mainly.
Hmm.

FWIW, I tested with Opera without making any of the modifications you mentioned and the script seems to work for me.

Perhaps I should try those modifications to see what happens locally...

fenixproductions

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,184
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #45 on: April 01, 2009, 01:16:22 PM »
2ewemoa
It might be just my PC but without modifications it does not work at all.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,845
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #46 on: April 01, 2009, 07:52:20 PM »
One thing I noticed with Opera is that I have to wait what seems like a longer period of time than in FF to see the changes occur.  It seems to be after the fraction in the location bar (typically looks like: Elements: 44/44) is equivalent to 1 that the changes occur -- actually, it may be that it is after this fraction goes away and I see the orange feed icon.  I presume this means that the user script processing does not occur until everything in the page has been loaded (perhaps that's true for FF as well, but it happens that the DC pages in question are loading faster on my machine).
« Last Edit: April 01, 2009, 08:26:27 PM by ewemoa »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: Anti-Necrospamming
« Reply #47 on: January 05, 2011, 04:42:08 PM »
As an experiment, I put together a Greasemonkey script to change the color of the reply date string if it's been more than 180 days.

Don't forget to change the paths of the pages it is activated on, if you are using this script. (took me this long to realize it stopped working after the server move and why.  :-[)

Edvard

  • Coding Snacks Author
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 2,888
    • View Profile
    • Donate to Member
Re: Anti-Necrospamming
« Reply #48 on: January 06, 2011, 12:46:37 PM »
TOTALLY off-the-wall idea, but I'm all for leaving threads indefinitely 'revivable' whether there's a warning or not, so this is just a mental exercise:

Instead of getting all uptight about "Thread Necromancy", make it a special event so those who have the propensity can work it out of their system.
Lock old threads except for a day or a week or two for a semi-annual (or just plain once-in-a-while) "Thread Resurrection Day/Week".
It could be similar to some forum's "Zero Reply Day" (where you pick a post with zero replies and... um... reply) except instead of encouraging everybody to pick a post with no replies, go the very earliest page in your favorite channel and browse posts until you find one that you have relevant information to contribute.
Then everybody will get the entertainment of "OMG - I totally forgot about that thread; thanks for the update!", thread necros get their jollies out and maybe it will inspire others to contribute even more new info/thoughts.

As for spammers, I'm all for a SMF mod that includes a short-barrelled shotgun loaded with rock salt.
Spam is NOT a coding snack...

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 7,713
    • View Profile
    • The Blog of Deozaan
    • Read more about this member.
    • Donate to Member
Re: Anti-Necrospamming
« Reply #49 on: January 06, 2011, 03:31:38 PM »
Well, considering the original thread and last reply were posted nearly 2 years ago (until yesterday), I think this illustrates very well why something should be done about very old threads that have been inactive for some time.

It's like having a 5 hour conversation with someone over a variety of topics when suddenly the person you're speaking with makes a reply to something you said in the first 15 minutes. Where did that come from? Haven't we moved on by now? What does that have to do with anything we've been talking about for the past 4.75 hours? (Feel free to do your own mathematical conversions of years rather than hours.)

Maybe when I wrote the original topic, I was really mad about something (such as what was then a "recent" necro-spammer trend). But now, two years later, that "trend" isn't much of a trend, so the whole conversation is pointless because it no longer reflects the current reality. Or maybe I've had a change of heart since then. Maybe I'm a completely different person now than I was then.

The point is, when someone resurrects a really old thread, and it's been so long that nobody remembers it or perhaps they are a "new" member (within the past two years since the thread was last discussed) and have never seen it before, people start jumping in like it's a fresh conversation because they don't notice the date, when really it's been dead in the water for years.

To the person doing the resurrecting, it's a bit like coming up with the perfect comeback two weeks later. They really want to say it, but they know it's no longer relevant since so much time has passed, so they don't say it. Unfortunately, because the date is so easy to miss, people often don't have the perspective of time to keep themselves from realizing that though what they have to say is perhaps completely valid and would have added to the conversation at the time, the conversation is dead and not worth bringing back up again, especially in a manner as if it never ended.

In normal conversation, the way to go back to an older topic is to first remind a person that they had it (or somehow transition the person back to that subject) and then make your point. e.g. "Hey, remember when we were talking about such-and-such? Well I've been thinking about it and. . ."

I don't know if locking topics is the correct solution. At the time it seemed like a good idea. But now that I'm two years wiser (that's debatable, I'm sure) it still seems to me there ought to be some notification to people that they're reading a really old thread, or that the new post(s) by someone else were made to a really old thread. And definitely some sort of notification when people are replying to a really old thread (even if a reply has recently been posted, IMO). Kind of like that one that says "Hey, while you were typing, someone else replied to the thread." It's all an effort to help you make sure your point is "up to date" and as relevant as possible. You can still ignore it and post it exactly as you had it, or you can read the reply and make any necessary adjustments to your response.

I guess that's all I have to say about that. For now anyway. :)