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)
-   -   Auto-Moderation by Keywords (https://vborg.vbsupport.ru/showthread.php?t=93934)

Andreas 08-09-2005 06:45 PM

@Boofo
You can give this a try:

Hook: postbit_display_start
PHP Code:

if (!$post['visible'])
{
    if (!
$this->cache['automodkeywords'])
    {
        
$this->cache['automodkeywords'] = explode(','$this->registry->options['automodkeywords']);
    }
    if (
str_replace($this->cache['automodkeywords'], ''strtolower($post['pagetext'])) != strtolower($post['pagetext']))
    {
        
$this->highlight =& $this->cache['automodkeywords'];
        
$post['title'] = 'Automatically put under Moderation due to highlighted Keywords';
    }


This should change the Post Title and highlight the Words.
To make it stand out further, you could overwrite the CSS Class here too, or set a $show Flag to check in postbit, or ...

@Martin
Brining Postcount into play is easy, just change the condition in the _presave Hooks to check $vbulletin->userinfo['posts']

Boofo 08-09-2005 06:57 PM

Works like a charm! See the attached pic. ;)

What wouod you suggest to make it stand out further? I have no idea how to do what you suggested about the flag or css. ;)

Martin 08-09-2005 07:06 PM

Quote:

Originally Posted by Boofo
I never thought to use it as a spam filter. Great idea! ;)

What would tying it to the post count do? And what words would you suggest for filtering spam?

Well, most people who spam with crap like Free iPod, etc, register for that sole purpose.

If you added a check on post count, say less than 10 posts, it would auto-moderate the spammer's posts while allowing your real members to use words that might otherwise be filtered, like "free".

Just a thought.

Boofo 08-09-2005 07:56 PM

Quote:

Originally Posted by Martin
Well, most people who spam with crap like Free iPod, etc, register for that sole purpose.

If you added a check on post count, say less than 10 posts, it would auto-moderate the spammer's posts while allowing your real members to use words that might otherwise be filtered, like "free".

Just a thought.

But if you have newer members that don't post alot, wouldn't that catch them, too?

It sounds like an interesting idea. I'd like to see what you come up with and try it, if you don't mind. It would come in handy on my new site and I will be dealing with a controverial issue and I don't need any spammers messing things up. ;)

Did you incorporate the post count code that Kirby gave you?

Boofo 08-09-2005 07:57 PM

Kirby, how would I go about changing the css or whatever to make the post stand out?

And is there a way to make the icon different than the default for this (like the warning sign)?

Andreas 08-09-2005 08:09 PM

$bgclass='classname';

But I guess this only works for postbit_legacy.
You can show any Icon or whatever you want, just set a Flag and check this in Template postbit *rolleyes*

Boofo 08-09-2005 08:15 PM

Quote:

Originally Posted by KirbyDE
$bgclass='classname';

But I guess this only works for postbit_legacy.
You can show any Icon or whatever you want, just set a Flag and check this in Template postbit *rolleyes*

You and your "Flags". ;)

Yes, I suppose I can do a conditional for the post icon.

I just thought of something, when Xenon does his Hide post except for staff Mod, he also check for post[visble]. Is there an AND we can use for this as not to interfere with that when it happens? And wouldn't an error message to the poster that his post is being moderated due to a word (or whatever) maybe keep him from reposting the message because he doesn't know why it isn't showing? ;)

Andreas 08-09-2005 08:28 PM

Then he might just try to trick the Filter ... but of course this would be possible.
You'd have to make the check in build_new_post()

I did it in the Datamanager to also cover editing.

Martin 08-09-2005 08:32 PM

Haven't tried it yet, I'm too busy with support stuff right now. Hell, my test board are still on RC1.

Thanks Kirby. I will play with it tonight when I have time :)

Boofo 08-09-2005 08:36 PM

Quote:

Originally Posted by KirbyDE
Then he might just try to trick the Filter ... but of course this would be possible.
You'd have to make the check in build_new_post()

I did it in the Datamanager to also cover editing.

Ok, I'll take your word for it. If you think it is fine as is, I'm good to go. ;)

Are you gonna add the code you posted for me to try to your Mod? There are others I'm sure that could use it. ;)


All times are GMT. The time now is 09:29 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.01115 seconds
  • Memory Usage 1,749KB
  • 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
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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