FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » any good way to hide individual topics (trying to kill SPAM in nntp linked forum!)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
any good way to hide individual topics [message #36068] Fri, 02 March 2007 05:45 Go to next message
rdthoms is currently offline  rdthoms   United States
Messages: 12
Registered: January 2007
Karma: 0
Junior Member
I have a FUDforum linked to a few nntp newsgroups. These are high quality newsgroups but still the occasional SPAM message comes through. I'm trying to moderate my forum by hiding the SPAM so the forum readers don't have to see it.

The problem is that I can delete the original SPAM message but then when others respond to the newsgroup with messages like "don't spam here" or worse flame wars erupt, then all of those responses come in as new topics and also have to be deleted.

I searched around and it seems that you cannot hide individual posts but you can move posts to a hidden board. So that is what I'm doing. I was hoping that I could move the offending topic to a hidden "Trash" board and then future nntp syncs would automatically put any responses to the SPAM topic also into the trash board but it seems that the nntp sync does not do that.

Am I missing something or do I need to go in and start hacking? If hacking is required - any suggestions?

I'm thinking I'd never have to "lock" a topic on a nntp forum so I could just "lock" the SPAM and then put in a hack to hide "locked" topics.

Thanks,
Richard
Re: any good way to hide individual topics [message #36098 is a reply to message #36068] Sun, 04 March 2007 17:47 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can set the apr field of those messages to 0, in which case they will remain in the forum but will not be visible.

FUDforum Core Developer
Re: any good way to hide individual topics [message #36126 is a reply to message #36098] Tue, 06 March 2007 03:58 Go to previous messageGo to next message
rdthoms is currently offline  rdthoms   United States
Messages: 12
Registered: January 2007
Karma: 0
Junior Member
Ilia wrote on Sun, 04 March 2007 12:47

You can set the apr field of those messages to 0, in which case they will remain in the forum but will not be visible.


Still not quite what I'm looking for. I want to be able to just tag the SPAM thread and be done with it.

Keeping in mind this is nntp linked board (I don't guess you would have this problem on a wholly local board).

For example a new thread is started somewhere on the usenet "HERE IS SPAM". I can quickly move that thread to the hidden "Trash" board and nobody coming into my forum will ever see it. The problem is the topic is out there in the usenet and it doesn't take too long before someone (somewhere on the usenet) responds with "don't spam this group". Then I get a new thread "Re: HERE IS SPAM" and again I have to move that to the hidden trash board.

Your idea to "disapprove" the message is OK but I would need to disapprove every message as it comes in. I really want to "disapprove" the thread and thus hide all subsequent replies to that thread. So I'm all for setting something in the fud26_thread table to accomplish this task with one operation per SPAM thread.

Actually the "move topic" option would do the trick but it looks like the nntp parse will not "follow" the move. i.e., I can move a thread to the hidden trash board but when a reply to that thread comes in it does not follow the move, instead creates a new thread in the main nntp linked board.

I don't mind developing a hack and would appreciate your input on a good way to do it such that it could be contributed back to FUD (if you think it's worthy).

-Richard
Re: any good way to hide individual topics [message #36132 is a reply to message #36126] Wed, 07 March 2007 00:04 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The ideal choice is to create a hidden forum called SPAM and move all topics where the "root" message (the 1st message) is considered to be spam into it. To move a topic you simply need to adjust the forum_id value in the threads table.

FUDforum Core Developer
Re: any good way to hide individual topics [message #36141 is a reply to message #36132] Wed, 07 March 2007 04:15 Go to previous messageGo to next message
rdthoms is currently offline  rdthoms   United States
Messages: 12
Registered: January 2007
Karma: 0
Junior Member
That was the advice I found searching the boards here. However that does not seem to work for nntp linked boards.

I have four forums linked to four newsgroups. I am currently moving the entire "SPAM" threads to a hidden "Trash" forum. That works fine and now the thread is hidden from the users.

However, it seems that when the nntp sync runs that it will never try to match a new message up to a thread in the hidden forum (i.e., it only attempts to match messages to threads in the newsgroup forum). So any later newsgroup replies to the spam end up as NEW threads in the newsgroup forum.

I can understand why this would be - you don't want to search through ALL of the forums just to try to find a match.

I like your earlier idea of disapproving a message. I'm thinking of modifying the end of the parse_msg function in nntp.inc

if (!($nntp_adm->nntp_opt & 1)) {
  fud_msg_edit::approve($msg_post->id);
}


to

psuedo code:
$reply_to_msg_id = message id that this message is a reply to
$reply_to_msg_is_approved = 1 if $reply_to_msg_id has apr=1

if ( !($nntp_adm->nntp_opt & 1) && ($reply_to_msg_is_approved)) {
  fud_msg_edit::approve($msg_post->id);
}


Then I hope that any nntp replies to disapproved messages are automatically disapproved.

Does that sound like a good way to tackle this?

I don't have any experience with oop. I can hack up some sql queries to find $reply_to_msg_id and $reply_to_msg_is_approved but if you have any suggestions on the most efficient way to get that info I'd be glad to take it.

Thanks,
Richard

Re: any good way to hide individual topics [message #36195 is a reply to message #36141] Wed, 07 March 2007 23:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Your idea sounds like a good plan.
As far as code goes you really just need one line

$msg_approved = q_singleval("SELECT apr FROM fud26_msg WHERE id=".$id);


FUDforum Core Developer
Re: any good way to hide individual topics [message #36207 is a reply to message #36195] Thu, 08 March 2007 06:36 Go to previous messageGo to next message
rdthoms is currently offline  rdthoms   United States
Messages: 12
Registered: January 2007
Karma: 0
Junior Member
Thanks. It's that kind of tip I'm looking for. A single line of code is about 10x less likely to have a bug than 10 lines of code!
Re: any good way to hide individual topics [message #36250 is a reply to message #36195] Sat, 10 March 2007 06:50 Go to previous messageGo to next message
rdthoms is currently offline  rdthoms   United States
Messages: 12
Registered: January 2007
Karma: 0
Junior Member
Ok I'm getting closer but need a little help. I'm now setting apr=0 for ALL the messages in the SPAM thread but the thread still shows up in the thread listing! If you click on the topic title you'll see no messages but obviously I want to remove the SPAM thread title from the board listing.

Is there something else I need to do to "disapprove" a thread topic?

Thanks,
Richard
Re: any good way to hide individual topics [message #36258 is a reply to message #36250] Sun, 11 March 2007 15:00 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You need to rebuild the thread view or run the consistency checker.

FUDforum Core Developer
Re: any good way to hide individual topics [message #36268 is a reply to message #36068] Mon, 12 March 2007 03:51 Go to previous messageGo to next message
rdthoms is currently offline  rdthoms   United States
Messages: 12
Registered: January 2007
Karma: 0
Junior Member
Actually running the consistency check *reapproves* the messages.

I think you can see this. If you set apr=0 for all messages in a single thread then they will no longer be visible. Then when you run the consistency checker all those messages end up with apr=1 again.

You also mentioned rebuilding the thread index. How would I do that? Or what can I set in which table to make things consistent?

Thanks for all the help. Getting closer...

-Richard
Re: any good way to hide individual topics [message #36276 is a reply to message #36268] Mon, 12 March 2007 22:56 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Rebuilding of the thread index can be done by executing the rebuild_forum_view_ttl() with the forum id as the only parameter. The function can be found inside the th_adm.inc file.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Integrate with DokuWiki
Next Topic: [How To?] Move Fud to a New Server
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 18:01:36 GMT 2024

Total time taken to generate the page: 0.02317 seconds