PDA

View Full Version : Killing Spam in VB5 - need sql help


JWC
05-11-2017, 02:07 AM
Hey guys,

So I've been working on a tool that analyzes posts, urls in posts, sources etc and determines which posts are spam. So far it does a fantastic job of separating the spam from the ham, but I've run into a block.

I don't want to delete the post, I just want to make it invisible. In the DB (I'm doing this entirely outside of the VB codebase) I mark the post as "invisible = 2" which from other posts leads me to believe it would be invisible. When I return to the page - post is still there.

So - what am I missing? Is there another table I need to update? Is there an ajax call I can hit ti make the post invisible on it's own? This forum has hundreds of thousands of members and the spam, while not terrible, is dispersed throughout - so it's hard to clean it by hand.

Thanks!
-John

Paul M
05-11-2017, 09:55 AM
Are you sure you are talking about vB5 ?

There is no "invisible" field in the node table, so I'm not sure what you are setting.

JWC
05-11-2017, 11:24 AM
Are you sure you are talking about vB5 ?

There is no "invisible" field in the node table, so I'm not sure what you are setting.

Yes VB5 - specifically 5.0.5 (we have some breaking issues when attempting an upgrade). The invisible field is in the post table - am I barking up the wrong tree entirely? How do I make the connection between the node / thread / post tables?

Also, in the process of trying to hunt this down I changed some data in the post table and didn't see any changes to the post itself. Is that cached in another table somewhere?

Paul M
05-11-2017, 02:34 PM
vB5 does not use the post table at all.

All the data for posts (& threads) is stored in the node & text tables.

noypiscripter
05-13-2017, 08:02 AM
Paul is right.

But to answer your question granted you are really using vB5. You can "soft delete" a post by calling the deleteNodesAsSpam($nodeid, $hard) node API passing the node id of the post and false to the $hard parameter.