vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Stop Spam Links 1.2 Gold (https://vborg.vbsupport.ru/showthread.php?t=134778)

kawzaki 01-31-2007 07:11 AM

hello
I was interested in filtering links in PMs. so i modified the code (deleted the rest and kept the pm section) and replaced the search criteria to this:

PHP Code:

i just thought u might make use of it:
            <
phpcode><![CDATA[$spamgroups explode(','$vbulletin->options['no_pm_links_usergroups']);

if (
is_member_of($vbulletin->userinfo$spamgroups) || $vbulletin->userinfo['posts'] < $vbulletin->options['no_pm_links_postcount'])
{

    
$re "/(www\.)?(\w*[^\.])(\.[a-z]{2,3})/";

    
$bState  preg_match_all$re $vbulletin->GPC['message'], $m );
    if ( 
$bState ) {
        foreach( 
$m[0] as $v ){
            
$vbulletin->GPC['message'] = ereg_replace$v$vbulletin->options['no_pm_links_message'], $vbulletin->GPC['message']);
        }

    }
}]]></
phpcode

the original post will be updated ( links replacements ) if found matching :

domain.com
or
any other format (e.g, http://www.domain.com ) that includes the above link as part of it. Indeed, it will capture (.ae, .ca, and all country specific domains ).

The next step,
is to allow using the forum URL in posts (or PMs).
( u know members usually tell each other about their posts)


Sorry for my 3-in-a-row posts.

Cheers

SkyCatcher 01-31-2007 11:21 AM

Quote:

Originally Posted by kawzaki (Post 1171141)
hello
I was interested in filtering links in PMs. so i modified the code (deleted the rest and kept the pm section) and replaced the search criteria to this:

PHP Code:

i just thought u might make use of it:
            <
phpcode><![CDATA[$spamgroups explode(','$vbulletin->options['no_pm_links_usergroups']);

if (
is_member_of($vbulletin->userinfo$spamgroups) || $vbulletin->userinfo['posts'] < $vbulletin->options['no_pm_links_postcount'])
{

    
$re "/(www\.)?(\w*[^\.])(\.[a-z]{2,3})/";

    
$bState  preg_match_all$re $vbulletin->GPC['message'], $m );
    if ( 
$bState ) {
        foreach( 
$m[0] as $v ){
            
$vbulletin->GPC['message'] = ereg_replace$v$vbulletin->options['no_pm_links_message'], $vbulletin->GPC['message']);
        }

    }
}]]></
phpcode

the original post will be updated ( links replacements ) if found matching :

domain.com
or
any other format (e.g, http://www.domain.com ) that includes the above link as part of it. Indeed, it will capture (.ae, .ca, and all country specific domains ).

The next step,
is to allow using the forum URL in posts (or PMs).
( u know members usually tell each other about their posts)


Sorry for my 3-in-a-row posts.

Cheers

I'm a total preg_match noob. Everytime I look at those it makes my head hurt.

What exactly is it looking for here. I don't see what the criteria are.
PHP Code:

$re "/(www\.)?(\w*[^\.])(\.[a-z]{2,3})/"

From what I can guess it's searching for "www", and then any combination of 2 letters after a " . " ?

Invalid ID 02-12-2007 12:56 AM

Nice and Handy :)

Is there a possiblity that it can check only the links posted in the posts and exclude the photos that the members upload?

Smoothie 02-23-2007 02:05 PM

Just wanted to let people know, if you have problems with spammers who register on your site and they try to post links to sell crap, this mod stops 'em dead in their tracks. I get at least 2-3 live humans a month, they register on my site just to post links to sell stuff. This has worked each and every time.

Now if I could just find a way to physically reach out and grab these a-holes by the neck, now that would make my day.

daddygrim 02-28-2007 01:03 PM

i put the usergroup in..all registred are 2 and i set it max 10 post...and members with 1000 post still get that message..any ideas?

SkyCatcher 02-28-2007 07:21 PM

Quote:

Originally Posted by daddygrim (Post 1192612)
i put the usergroup in..all registred are 2 and i set it max 10 post...and members with 1000 post still get that message..any ideas?

Try overwriting the product with this one and get back to me please.

https://vborg.vbsupport.ru/showpost....8&postcount=45

daddygrim 02-28-2007 07:36 PM

no good..even without adding any users ids i use a test account and has no post and set it to 0..and tried to post a a link and it gives me the spam message. when i take the userids out and try to post a link again..I still get the message.

SkyCatcher 02-28-2007 09:55 PM

Quote:

Originally Posted by daddygrim (Post 1192846)
no good..even without adding any users ids i use a test account and has no post and set it to 0..and tried to post a a link and it gives me the spam message. when i take the userids out and try to post a link again..I still get the message.

Ok just to make sure that we're on the same page:

When you enter a usergroupid (like 2 for registered members) all registered members will not be able to post links. They will get the spam message.

The postcount is for all usergroups that you didn't add to the usergroupid field above it.


So if you put in usergroupid: 2

Post count: 10

That means everyone in usergroup 2 cannot post links - ever.

If the member is not a member of usergroup 2 then he must have 10 posts before he can post any links.

daddygrim 03-01-2007 12:36 AM

maybe you can check it out for me?

SkyCatcher 03-01-2007 07:49 AM

Quote:

Originally Posted by daddygrim (Post 1192987)
maybe you can check it out for me?

Sure, I'll take a look. PM sent.


All times are GMT. The time now is 12:02 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.01157 seconds
  • Memory Usage 1,762KB
  • 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
  • (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