vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   SpamBuster v1.0.0 (Stable): Identify, log and remove spam posts on your forum (https://vborg.vbsupport.ru/showthread.php?t=109258)

Kungfu 10-11-2006 04:53 PM

finally got around to working on this, this should update the latest posts and counters in the forum you dump the spam reports in.

PHP Code:

// creates a thread - should uses phrases perhaps
function sb_post_thread(&$post,&$hits,$table=null) {

require_once(
'./global.php');
require_once(
'./includes/class_dm.php');
require_once(
'./includes/class_dm_threadpost.php'); 
global 
$vbulletin;

    
//$threaddm = new vB_DataManager_Thread_FirstPost($GLOBALS['vbulletin'], ERRTYPE_STANDARD);
    
$threaddm =& datamanager_init('Thread_FirstPost'$vbulletinERRTYPE_ARRAY'threadpost');

    
$title 'SpamBuster report';

    if( 
$spam_threadtitle $post->fetch_field('title',$table) ) {
        
$title .= ": $spam_threadtitle";
    }

    
// to keep things tidy
    
$spam_user $post->registry->userinfo['username'];
    
$spam_post $post->fetch_field('pagetext',$table);
    
$spam_postid $post->fetch_field($post->table == 'post' 'postid' 'firstpostid');
    
$spam_url $post->registry->options['bburl'] .'/showthread.php?p='$spam_postid;
    foreach(
$hits as $k => $v) {
        if(
$k == 'total') {
            
$spam_hit_total $v;
        } else {
            
$spam_hits[] = "$k=$v";
        }
    }
    
$spam_hit_text implode(','$spam_hits);

    
$pagetext = <<<EOT
This is an automatic post from SpamBuster. The following spam post has been detected:

[quote=
${spam_user}]${spam_post}[/quote]

To view this post please visit:
[url]
${spam_url}[/url]

Rules matched: 
${spam_hit_text}
Total score: 
${spam_hit_total}
EOT;


$foruminfo['forumid'] = $post->registry->options['spambusterforumid'];
$foruminfo fetch_foruminfo($foruminfo['forumid']);
$threadinfo = array();


$forumid $foruminfo['forumid'];
$byusername $post->registry->options['spambusterusername'];
$postuserid $post->registry->options['spambusteruser'];
$userid $post->registry->options['spambusteruser'];
$allowsmilie '1';
$visible '1';


$threaddm->setr('forumid'$forumid);
$threaddm->setr('userid'$userid);
$threaddm->setr('pagetext'$pagetext);
$threaddm->setr('title'$title);

$threaddm->set('allowsmilie'$allowsmilie);
$threaddm->set('visible'$visible);
$threaddm->set_info('forum'$foruminfo);

$threaddm->pre_save();
if(
count($threaddm->errors) < 1)
{
    
$threadid $threaddm->save();
    unset(
$threaddm);
    
build_thread_counters($threaddm);
}

build_forum_counters($foruminfo['forumid']);  
        
        
        



if you want to update this, go to the Plugin Manager
Scroll down to Hook Location : global_start
and find SpamBuster Libraries SpamBuster

Edit that, replace the very last function with this one. function sb_post_thread is what you will need to replace.

d360 10-25-2006 01:36 AM

I'm trying to add a rule for sex and using one that currently works:

#Phones
regexp:a_sidekick:3:any:"/sidekick/i"

I've tried pasting all sorts of variations of this and none catch as spam and place it in the spam forum directory.

Here's my tests:

#Sex
regexp:a_badword:10:any:"/.com/i"
regexp:a_badword:10:any:"/i"
regexp:a_badword:10:any:"//i"

none of these work. any help would be appreciated.

webghey 10-25-2006 05:39 PM

Fatal error: Call to undefined function: sb_test() in /public_html/forums/includes/class_dm_threadpost.php(728) : eval()'d code on line 1

vb 3.54
I believe it's related to this mod. If I attempt to moderate the posts in the admin cp - ignore/delete work. If I "validate" it throws that error above. Yet - if I look at the post - it's then live on the forum. It still remains in the admin cp though showing it's under moderation - yet it's live on the site working.

Someone else mentioned moderating from the thread itself, but not in the admin cp - Can anyone explain how this works, or how you do it?
- lost

webghey 10-27-2006 05:51 AM

anyone on this?

I get an error if I try to run this rss feed with this hack as well.

https://vborg.vbsupport.ru/showthread.php?t=94510

any programming help here would be great.

criscokid 10-27-2006 06:23 PM

Hi UK Jimbo - do you have any idea on when you'll have a vb3.6.x version available?

webghey 10-28-2006 02:19 AM

I'm not php programmer - so I can't really diagnose the issue, but it seems to be with this mod from looking online. No one has a solution for this?

I want to turn it back on - it caught a ton of spam, but it's throwing the same - sb_test error if I have it and the rss feed running. ANY help would be nice

webghey 10-30-2006 03:19 PM

Am I here?

webghey 10-30-2006 05:58 PM

Quote:

Originally Posted by Kings
I've just installed this plugin, and it seems to have broken my 'Post Moderation' tools. When I try to approve some posts, I get this:



Seems to me that the global_start didn't run, probably because I'm working in the admin CP. Anyway to fix this? I'm using version 1.0.0 on vB 3.5.4.


then below it a few posts you had this :
https://vborg.vbsupport.ru/showpost....3&postcount=74

I'm not getting any help in this thread, and I'm not sure where you placed that code. I'm getting the same error that you posted and it looks as though you've fixed it on your site?

I get that error if I try to validate in the admincp, AND I get almost the same error if I try to run the RSS posting hack. It throws an SB_Test error which I mentioned on page 9 of that thread about spambuster.

Any help would be great.

webghey 10-31-2006 03:09 AM

am I just on ignore? I've bumped the post like 4 times now, PMed a few members for answers, nothing.

I've verified globals is on, I have no other mods on the site besides google sitemap, miserable users, iTrader, welcome headers, and vbadvaced. I'm not a retard when it comes to this and I've read every post in the stupid thread 4300 times. I'm not the other users who read 1 post and then ask how to do something. That's why my post count is so low. I read and figure it out - but with this I cannot I'm afraid.

I don't know how to fix the error with the admin area - validating messages without it throwing an error, or getting the rss feeds to post without it throwing the same sb_test error.

All of my other mods work fine without spambuster. Rss works fine without spambuster. I turn spambuster on - it errors.

I'd appreciate not being ignored - and even verified that' I'm alive.
:ermm:

Kungfu 11-01-2006 01:40 AM

Quote:

Originally Posted by webghey
am I just on ignore? I've bumped the post like 4 times now, PMed a few members for answers, nothing.

I've verified globals is on, I have no other mods on the site besides google sitemap, miserable users, iTrader, welcome headers, and vbadvaced. I'm not a retard when it comes to this and I've read every post in the stupid thread 4300 times. I'm not the other users who read 1 post and then ask how to do something. That's why my post count is so low. I read and figure it out - but with this I cannot I'm afraid.

I don't know how to fix the error with the admin area - validating messages without it throwing an error, or getting the rss feeds to post without it throwing the same sb_test error.

All of my other mods work fine without spambuster. Rss works fine without spambuster. I turn spambuster on - it errors.

I'd appreciate not being ignored - and even verified that' I'm alive.
:ermm:

first this product is not supported, you can use if you want but you dont have two.

Second the same thing happens for me. Basically on that line its calling

($hook = vBulletinHook::fetch_hook('postdata_presave')) ? eval($hook) : false;

There is a function in that hook from spambuster. Basically spambuster does this
$GLOBALS['sbhits'] = sb_test($this);

So when you call on that hook its not only going to do its thing and what not but its going to call on the function sb_test. But sb_test doesnt exist in class_dm_threadpost.php. To fix this i just did a check to see if i am in admin or modcp

Go to Plugin Manager, find Hook Location : postdata_presave

Then click SpamBuster: Normal posts check

Change
PHP Code:

$GLOBALS['sbhits'] = sb_test($this); 

PHP Code:

if ((strstr($_SERVER['REQUEST_URI'],'admincp') !== FALSE) && (strstr($_SERVER['REQUEST_URI'],'modcp') !== FALSE)) 
{
$GLOBALS['sbhits'] = sb_test($this);


Worked for me, should work for you.


All times are GMT. The time now is 06:39 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01241 seconds
  • Memory Usage 1,786KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete