Anti-Spam Links

Started by SMF Customization Team, February 04, 2010, 05:41:18 PM

Previous topic - Next topic

Kindred

Save it with a value

Then resave with 0
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MobileCS


macrob

Great mod :)
Unfortunately i have a small  problem with it.  My error log i full of:

8: Undefined variable: poster_id
File: /forum/Sources/Subs.php
Line: 2454

Which is:
: elseif ((($poster_id === 0 && $modSettings['anti_spam_links_guests'] == 3) || (!empty($poster_id) && !empty($modSettings['anti_spam_links_nofollowlinks']) && $posts != '' && $posts < $modSettings['anti_spam_links_nofollowlinks'])) && strpos($message, '<a href') !== false)   

and:

8: Undefined variable: poster_id
File: /forum/Sources/Subs.php
Line: 2450


==>2450: if ((($poster_id === 0 && $modSettings['anti_spam_links_guests'] == 2) || (!empty($poster_id) && !empty($modSettings['anti_spam_links_newbielinks']) && $posts != '' && $posts < $modSettings['anti_spam_links_newbielinks'])) && strpos($message, '<a href') !== false)

Thanks for your help.

BSD2000

I realize this is an old post and so far, this mod is working great on my site, but I was wondering - could this be easily modified to prevent spammers from using URL's in the subject of a post?

vbgamer45

What would you like to happen? If a url is entered in the subject line?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

BSD2000

Maybe an error message when they click post stating that URL's in the subject are not allowed, much like the error message that appears if you click post with an empty subject and/or message body.

vbgamer45

I can probably do a code that gives an error message if http:// or https:// is found in the subject line?
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

BSD2000

Yep, that's it - maybe use an expression match to find the http:// or https:// anywhere in the subject text, just in case they try to pad the beginning of the subject with spaces. The Anti-Spam Links mod works great at discouraging spammers posting links in the body of the message, but they get around that by putting the URL as the subject.

I think if they see no way of posting their URL, they will most likely give up and move on to an easier website.

If there isn't a mod already for something like this, I think it would make a nice addition to the arsenal of spam prevention mods, or maybe an added feature to the Anti-Spam Links mod.   :)

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

nadeem34

Anybody knows how can I change the default message?

"Sorry you are not allowed to post external links"
Creative ways to make money fast
https://gotryus.com/

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

nadeem34

I am using Anti-spam links mod and i have set it up to a member can post link after making 20 posts.

Now i want to display a message to newbie member when he/she try to post links like this
" You must make 20 post to insert an external link"

Although the default message is else.

How can i change the default message to my own above text
Creative ways to make money fast
https://gotryus.com/

Shambles

Have a look in your theme folder for Modifications.english.php - the text strings should be in that file

nadeem34

QuoteHave a look in your theme folder for Modifications.english.php - the text strings should be in that file

i can't locate that file in my theme folder. I did try from packages==>anti spam links==>modification.xml here i changed the default message but it's not working even if changed the same text appears when a user post external link
Creative ways to make money fast
https://gotryus.com/

Shambles

It might be Modifications.your_language.php, but there will be a Modifications.xxx.php file in your theme's folder.

nadeem34

Thanks i found that file in themes==>languages==modification.english.php

Creative ways to make money fast
https://gotryus.com/

nadeem34

Hi
I want to install anti-spam link mod but I got an error during installation. It wants to replace this code in ./Sources/Display.php
// Run BBC interpreter on the message.
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg']);


replace with this code
// Start of Anti-Spam-Links mod

$posts = $memberContext[$message['id_member']]['is_guest'] ? 0 : $memberContext[$message['id_member']]['posts'];

// End of Anti-Spam-Links mod

// Run BBC interpreter on the message.
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts);




But the problem is in my ./Sources/Display.php it can't find the exact code to replace with. in My ./Sources/Display.php i have this code available which is a little bit different from the code it wants to replace with.
// Run BBC interpreter on the message.
$message['body'] = '<!-- google_ad_section_start -->' . parse_bbc(parse_acronyms($message['body']), $message['smileys_enabled'], $message['id_msg']) . '<!-- google_ad_section_end -->';



Can anyone help how to change it manually the above codes
Creative ways to make money fast
https://gotryus.com/

SychO

It seems some Ads mod you installed has already changed that part of the code, can you attach the file here ? just to see the whole part it has changed.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

nadeem34

Quote from: SychO on November 11, 2018, 10:27:00 AM
It seems some Ads mod you installed has already changed that part of the code, can you attach the file here ? just to see the whole part it has changed.

HI
I have attached the file display.php

And thanks for your reply
Creative ways to make money fast
https://gotryus.com/

SychO

You can manually change it to this:

// Start of Anti-Spam-Links mod

$posts = $memberContext[$message['id_member']]['is_guest'] ? 0 : $memberContext[$message['id_member']]['posts'];

// End of Anti-Spam-Links mod

// Run BBC interpreter on the message.
$message['body'] = '<!-- google_ad_section_start -->' . parse_bbc(parse_acronyms($message['body']), $message['smileys_enabled'], $message['id_msg'], NULL, (int) $message['id_member'], $posts) . '<!-- google_ad_section_end -->';


But in the future, both this mod and the ads mod you have will have errors in the un-installation process, so take backups and remember the manual change you're making here.
Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Advertisement: