Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMF Customization Team on February 04, 2010, 05:41:18 PM

Title: Anti-Spam Links
Post by: SMF Customization Team on February 04, 2010, 05:41:18 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2404)

Anti-Spam Links


Original Author: JBlaze | Current Author: SMF Customization Team (https://www.simplemachines.org/community/index.php?action=profile;u=1)
Supported Languages: English
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2404) | Mod Discussion (https://www.simplemachines.org/community/index.php?topic=364169.0) | Other SMF Customization Team Mods (https://custom.simplemachines.org/mods/index.php?action=profile;u=1)


Compatibility
For SMF 2.0.x

Introduction
Adds some new settings based on post counts to help curb link spammers.

Features
Adds some new settings based on post counts to help curb link spammers.
- No links
- Links set [nonactive] and with newbielink:
- Links set [nofollow] so no pagerank
- Guest setting
EXCLUDES yoursite.com links, so only use on any part of *.yoursite.com ;)

Translations for other languages are welcome. Please post the translated language strings in the Support Topic.

Installation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.

Simply install the package to install on the SMF Default Core Theme ONLY.

Manual edits will be required for ALL themes (other than SMF Default Core Theme) which have a custom MessageIndex.template.php and/or Display.template.php

If your theme has its own versions of the language files Modifications.english.php and/or Modifications.english-utf8.php, OR if you're using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

Useful Links
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)

Support
Please use the modification thread for support with this modification.s

Changelog

Version 1.0.2 - 7/19/2020
!Fixes install on modifications.english-utf8.php

Version 1.1 - 6/12/09
  Initial Release



Copyright (c) 2020 Simple Machines, under BSD 3-Clause License.
All rights reserved.
Title: Re: Anti-Spam Links
Post by: 4Kstore on February 06, 2010, 03:27:34 AM
Nice mod, thanks!
Title: Re: Anti-Spam Links
Post by: Sabre™ on February 06, 2010, 05:04:32 AM
Sounds nice, will try it a little later.
Thanks :)
Title: Re: Anti-Spam Links
Post by: dumblonde on February 16, 2010, 04:18:14 PM
I installed this mod on my forum & it created a fatal error which would not allow any posts to be made.  When I clicked the "POST" button I was taken to a blank screen that said:

Fatal error: Only variables can be passed by reference in /home/dumbscre/public_html/alabamamotoringsociety.com/Sources/Post.php on line 524


I uninstalled the mod & everything went back to normal  is A-OK.  Hope the error can get corrected because the mod is a great one  ;D
Title: Re: Anti-Spam Links
Post by: ProfDrDenis on February 23, 2010, 12:48:54 PM
Fatal error: Only variables can be passed by reference in /home/dumbscre/public_html/alabamamotoringsociety.com/Sources/Post.php on line 524

I install SMF 2.0RC2 and this Anti Spam Links. But I have the error too. Who can help?
Title: Re: Anti-Spam Links
Post by: 1Chope on February 25, 2010, 09:24:50 AM
Can This Please work in 1.1.11, this is a very nice mode but it seems it works only on version 2.0 RC2
Title: Re: Anti-Spam Links
Post by: anakmacan on February 28, 2010, 07:44:55 PM
Fatal error: Only variables can be passed by reference

Same here, im using smf 2rc2. I hope uninstalling this mod will make everything back to normal :(
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on March 08, 2010, 08:24:07 PM
Updated for SMF 2.0 RC3
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ProfDrDenis on March 09, 2010, 04:22:42 PM
I test in 2.0RC2 and in 2.0RC3 the mistake is:

Only variables can be passed by reference

I search in the cyber and see its a mistake in the source: fatal error (http://the-stickman.com/web-development/php/php-505-fatal-error-only-variables-can-be-passed-by-reference/)

Can you help I like this
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Deaks on March 10, 2010, 01:39:17 PM
Updated for SMF 2.0 RC3

updated to RC3 and still contains fatal error well done guys ... btw do you think removing my posts is making you look good... for anyone who likes this mod the fix can be found at:

http://www.smf-friends.org/index.php?topic=1342.0

Seeing as it seems cus team wont fix it

Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: IdanC on March 22, 2010, 10:06:19 PM
looks promising, but risky bug -

setting guests to "can not post links", gives them the message

Quote
Sorry, guests are not allowed to post external links.

even when they are not posting links
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: IdanC on March 22, 2010, 10:20:08 PM
just upgraded the bug from risky to dangerous - even registered member get the error msg, even when they are NOT posting links

i think it has something to do with this line -
Code: [Select]
// Your not allowed to use links, so give them an error.
if (preg_match('~<a href="' . preg_quote($boardurl) . '(.*?)~i', parse_bbc($form_message, false)) !== false)

any tips?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on March 22, 2010, 10:47:26 PM
Uninstall the mod. Attempted to fix a previous issue but it caused more bugs.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: IdanC on March 22, 2010, 11:11:55 PM
no problem   ;D i know the feeling...

good luck!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Eclipse16V on March 23, 2010, 12:33:06 AM
Where can i download this mod?

There is a error on the download page.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on March 23, 2010, 12:34:19 AM
Removed for now till a fix is found
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: KensonPlays on March 26, 2010, 10:12:44 PM
Aw man, was JUST about to download it!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: interzis on April 03, 2010, 10:58:39 AM
any news? we are still waiting for this great mod.
thank you
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: IdanC on April 03, 2010, 06:34:05 PM
or can at least anyone point out the problem with rc3, so we can take a shot in fixing it?

it is an awesome mod...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ProfDrDenis on April 09, 2010, 04:30:17 AM
yeah, lets go.

Its a great mod. We are all waiting... but dont drink to much coffee  ;D
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on April 09, 2010, 01:38:00 PM
Attached
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: IdanC on April 09, 2010, 01:44:52 PM
goodluck
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on April 09, 2010, 02:01:32 PM
Yeah I did that before it had just simplemachines.org hardcoded in there so changed to board url thought that would do it wish I knew more about regular expressions maybe one day.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ProfDrDenis on April 09, 2010, 03:17:17 PM
Its working.

ok the install has layout problems and in the preview you see only a red field on top. When you want to post its the red field with text. More details I not know.

Thanks you so much.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on April 09, 2010, 03:40:42 PM
Anti Spam Links mod added back to modsite thanks to Arantor for the multiple fixes and testing.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ProfDrDenis on April 09, 2010, 03:46:19 PM
What language are you using?

german. But this is not the problem. Preview: no text, only red field, post: english in the red field.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ProfDrDenis on April 09, 2010, 05:09:26 PM
sorry I was to quickly its working relax and thanks for the mod
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: 1Chope on April 12, 2010, 06:08:08 AM
Please thank you Arantor, i was dying to use this mode and you came back to do it on your own way.Thanks again for the
Fixes!!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: IdanC on April 12, 2010, 06:31:51 AM
no more spam!!! yea!!!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: sevamaster on April 15, 2010, 09:23:40 AM
Will it work with signatures?
Or it only can block links in posts?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: donw9876 on April 16, 2010, 01:15:18 AM
I am trying to install this mod. I am running 2.0 RC3. I am intensely frustrated. No mod I have tried seems to install cleanly into 2.0 RC3, including this one.

Here is what I am getting:

I get this warning with "Error in Package installation" for the test installation:

1.     Execute Modification     modification.xml     Modification parse error
2.    Execute Modification    modification.xml    Modification parse error

Then when I do "install now" I get the following PHP error:

Fatal error: require() [function.require]: Failed opening required '/f5/computerconsultantsforum/public/forum/Packages/temp/./updateDatabase.php' (include_path='.:/nfsn/apps/php5/lib/php/:/nfsn/apps/php/lib/php/') in /f5/computerconsultantsforum/public/forum/Sources/Packages.php  on line 944

I realize this is server specific info. I have no idea what to do now. I checked in SSH, there are no files in the /temp path.

I also attempted to use the install-as-version feature. I used version 1.1.11. Different errors but still doesn't install.

Mods in SMF seem to be an incredibly brittle, flaky technology. Is this stuff ever reliable to apply without constant dicking around?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on April 16, 2010, 01:25:36 AM
Make sure a temp folder is created and writable in the packages folder of SMF.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: donw9876 on April 16, 2010, 01:50:14 AM
THANK YOU! It seems to have installed correctly. No errors. I got the big banner page when it installed.

Now, exactly where do I go in the admin pages to see the settings for this feature?  I looked under anti-spam and most other settings pages, I don't see it. It doesn't seem to have added anything.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on April 16, 2010, 10:15:29 AM
I would check under Features to see if it is listed or the anti spam area forget exactly where it is at.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: donw9876 on April 16, 2010, 12:01:31 PM
Wait. The damned thing DIDN'T INSTALL. The mod splats out this lengthy (useless, distracting) self promotional page of green headlines.

And at the VERY bottom of the page it wants FTP info in order to fix the file permissions.

So I do that. It logs in FTP wise. It keeps saying as an error message "You cannot download or install new packages because the Packages directory or one of the files in it are not writable!"

It's saying:

The following files need to made writable to continue installation:

    * /f5/computerconsultantsforum/public/forum/Sources/Load.php
    * /f5/computerconsultantsforum/public/forum/Sources/Post.php

It's not complaining about the path to SMF I'm giving, but I give it any path and it returns the same useless SMF error message.

Ok, so I go in manually with FTP and change the permissions to write on these files.

I STILL can't get past the !@&(!@&(!@*&!(*@&!@ FTP screen. There is no "Install" button.

The error recovery here in SMF is amateur hour, and whoever maintains this mod needs a far shorter screen of self promotion. (I mean the "Installation Readme" which is pretty well useless.)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: donw9876 on April 16, 2010, 12:14:55 PM
I just edited my post above. It really didn't install. The stupid readme distracted me and I was tired last night. I thought it installed. I did not scroll down through the page of garbage to see the error message.

Basically, the "feature" of SMF that uses FTP to automatically set the file permissions for the mod install isn't working, it's not seeing the files permissions change even when I do it manually with my own FTP, and it doesn't permit the install to happen.

Also, everything under packages which it is complaining about has a permission of 777.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: donw9876 on April 16, 2010, 11:47:08 PM
And both the folder and every file in Sources too?

I just set all files to writable by all in Sources. Every file there now has a permission of 666 or 777.

The Packages directory, same deal.

Now when I click "Install Mod" I just get this message: "You cannot download or install new packages because the Packages directory or one of the files in it are not writable!"
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: donw9876 on April 17, 2010, 01:13:40 AM
Ok, it's been quite frustrating. The "you cannot" error above is bogus. (SMF's error message is busted.)

I Googled the error string and found this guy's post on this forum:

http://www.simplemachines.org/community/index.php?topic=357788.msg2487027#msg2487027

So I created a temp folder inside Packages, chmod'd it 777. I tried an installation of a different mod I had been trying before with the same results, "Sitemap", which was also failing. It installed to completion. Same with the Anti-Spam links.

Also, for everyone's info - if this mod is installed properly, the settings are available here:

Administration Center »Modification Settings » Miscellaneous

The mod itself is fine The culprit here was SMF which seems to be pretty lacking in refinement of useful error messages for core stuff like this.

Thanks for your help.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: GohighVoltage on April 17, 2010, 10:15:42 AM
What should the settings be set at?   Like,  what do you recommend for:

Post count under which members cannot post external links

Post count under which members external links are shown [nonactive] and without http://

Post count under which members external links are set [nofollow]

Guests...


??

My guests are set not allowed to post.      I am just looking for better instructions for the settings above?

Will this mod change already posted links,  or just new ones once it is installed?


Also, will this mod effect my RSS feeds?   These have external links.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: fiver on May 14, 2010, 01:49:20 AM
SMF 2.0 RC3


For BBC "Code", instead of Select it's become

Code:  newbielink:javascript:void(0); [nonactive]

Any fix please? Thanks.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Bugo on May 21, 2010, 03:28:20 AM
Russian translation (please use BOTH files)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on May 21, 2010, 11:00:17 AM
Thanks for the translation
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ~DS~ on May 31, 2010, 02:08:32 AM
 The "Post count under which members cannot post external links" does not work for signatures.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: ~DS~ on June 06, 2010, 07:30:32 PM
Ah, ok. Thanks Arantor. Glad to see you around.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Deaks on June 07, 2010, 07:39:57 AM
you have me on msn :p
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: hitboy on June 09, 2010, 02:39:36 PM
Thanks this mod is really great
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: vbgamer45 on June 09, 2010, 02:41:59 PM
Glad you enjoy it.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: wishmaster22 on June 11, 2010, 03:00:35 PM
so whats the latest verdict on this mod, does it work and is it still deemed dangerous?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: wishmaster22 on June 11, 2010, 04:11:51 PM
Also Is this compatible with 2.0 RC3, it says it is on the download section,but in the installation it shows only 2.0 rc2 .

Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: tareko on July 04, 2010, 02:54:57 PM
This is the best mod ever. If only I could find out to do the same with the Personal Messages.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: cicka on July 04, 2010, 04:22:42 PM
This is the best mod ever. If only I could find out to do the same with the Personal Messages.

Hello. Have a look at my post at your other thread.

http://www.simplemachines.org/community/index.php?topic=389313.msg2690642#msg2690642
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Cassiel on August 09, 2010, 01:02:18 PM
I found a slight bug. There is a post in Bug Reports that has the nofollow on the links they posted, but when I went into their profile to check their other posts the same post that had the nofollow links now had full clickable URLs.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: OnlineFunCorner on August 30, 2010, 02:39:54 PM
Great Mod
--
Post count under which members cannot post external links             Not Working In Signature Field

Post count under which members external links are shown [nonactive] and without http://           Working In Post & Signature   

Post count under which members external links are set [nofollow]                    Working In Post & Signature

One Thing Please
For Nonactive
A Link As http://www.example.com
Changes To
newbielink:http://www.example.com [nonactive]
.
Instead Of Adding newbielink: before http
http changes to hxxp
And
A Link As http://www.example.com
Changes To
hxxp://www.example.com [nonactive]
.
Please Please Tell Me
What I Have To Do In modifications.english.php file
So Instead Of Adding newbielink: before http    ----- http changes to hxxp
And And
Also
Why    Post count under which members cannot post external links             Not Working In Signature Field


Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Gad. on September 01, 2010, 08:50:09 PM
This doesn't work if they just remove the www at the beginning of it...

google.com
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: coolfx350 on October 21, 2010, 08:53:35 AM
Will it be supporting 1.1.11? please please.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: GohighVoltage on November 05, 2010, 11:56:46 AM
Any Update to RC4?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: Anglis on December 08, 2010, 03:43:47 PM
Hi,

For instance if I have installed this mod, but I am using different theme and my own language. Which files I need to look for to edit the strings and be able to display this mod in my Admin CP?

Thanks in advance,
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC3
Post by: chinaren on December 24, 2010, 01:44:01 AM
Any Update to RC4?


I second this emotion! (question)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: vbgamer45 on December 24, 2010, 02:04:09 AM
Updated for SMF 2.0 RC4
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: chinaren on December 24, 2010, 02:07:17 AM
That was fast!  Bless you!   ;D
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: GohighVoltage on December 24, 2010, 07:17:56 AM
Hi, Great Mod.

Can you explain how the settings work:

    Anti-Spam-Links Mod Settings
Post count under which members cannot post external links
[Excludes any http://www.gohighvoltage.com/forum links]
(Use 0 to disable)
Post count under which members external links are shown [nonactive] and without http://
[Excludes any http://www.gohighvoltage.com/forum links]
(Use 0 to disable)
Post count under which members external links are set [nofollow]
[Excludes any http://www.gohighvoltage.com/forum links]
(Use 0 to disable)


What does 0 Disable do?    And if I put say, 5, in here,  does that allow users to post links after 5 posts?    What do you recommend for each of these settings?

Thanks!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: GohighVoltage on December 25, 2010, 03:54:12 AM
Are those number negative 1, 10, 25?   Or just 1,10,25
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Blade_Runner on December 25, 2010, 11:33:29 AM
I am getting the following error messages. How can I fix it?

http://modcarclub.com/forums/index.php?/topic,763.msg5633.html
8: Undefined index: anti_spam_links_guests
File: /home/xxx/public_html/modcarclub.com/forums/Sources/Subs.php
Line: 2689
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: MaXiForum.cz on December 30, 2010, 09:07:07 AM
Very nice modification.
Thank you!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: More-to-life on January 02, 2011, 10:18:47 AM
Great Mod Thank You

I have a few questions
The "newbielink" in front of the nofollow url is annoying can I get rid of it?

When using the search function on SMF the links are all is active is this a bug?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: More-to-life on January 03, 2011, 10:03:40 AM
OK Many Thanks

I'll take a look & if I do it I'll post here
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: More-to-life on January 06, 2011, 09:19:59 AM
Ive changed the "newbielink" its in modifications english

Is there any way of letting some URLS through like say YouTube?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: DrBermant on March 13, 2011, 03:29:31 PM
I am having a problem with a conflict between Share This Topic and Anit-Spam Links. The anti-spam tool seems to be in use on this forum and is awesome. With the no links until x posts, there is no problem. The issue comes up with nonactive or nofollow options enabled. All of the links of the social linking options are turned into a mess best described with a screen shot included. The short one is with the working links. The long image is the mess. I would prefer to be able to have social linking even on a newbee first post. I would prefer to enable options like nofollow and nonactive. The current site is a 2RC5 with only post count no linking enabled.

I am not sure where to post to fix, so I am putting this request for help in both mod's sections. Your thoughts and comments would be appreciated.

Michael Bermant, M.D.

the site I am asking about is

http://www.abodybeautiful.com/forum/index.php
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: DrBermant on March 13, 2011, 04:30:02 PM
There is no way to fix that without seriously rewriting this mod.
Too bad, both are great features. It would be nice to have access to both. I wonder if there is a post pane that the poster is putting the post in. It would be nice to have this mod in that post panel and the social links in a higher window component. Is this mod being put in a very high location that no social link mod will work or am I wrong about there being a post panel that the posts go in?

Thank you for taking the time to answer.

Michael Bermant, M.D.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: DrBermant on March 15, 2011, 12:47:45 AM
Oh... wait a minute. That's something else going on that I wasn't expecting, I misread what it was doing.

The issue is that the other mod needs to not inject the code into the post itself before parsing the content. I know why it does it, it makes it work with far fewer edits to the system.

They have posted a fix to the mod conflict here:

http://www.simplemachines.org/community/index.php?topic=334955.msg2988094#msg2988094

you need to use several posts to get the final result:

http://www.abodybeautiful.com/forum/index.php/topic,197.msg224.html#msg224

It works fine. Thank you.

Now for a second question. Is it possible to have a second or third site that it [Excludes any http://www.abodybeautiful.com/forum links]. For instance I would like to exclude the no follow or nonactive links to:

http://www.plasticsurgery4u.com

and

http://www.thesurgerystore.com

other components of this extended resource. I split up the forum from my Plastic Surgery Encyclopedia and split the Surgery store from both due to requirements of Honcode. You can see why I would like this detail in the example I posted. My student in the office posted a link to my site, and I would like such posted links to be active and followed by the search engines. My thoughts would be to permit let us say up to 2 or 3 such additional sites in the mod panel.

Manual edits would be OK, but even more awesome would be an option for the mod, in the mod panel to add other domains to be so enabled.

Sorry if this has been requested before, I did search and came up with nothing. 

Again thank you for your help. You have a great mod.

Michael Bermant, M.D.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Makar on March 20, 2011, 05:10:04 AM
how to do that would be any message with a link that required approval by a moderator ?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Blade_Runner on April 11, 2011, 02:36:09 AM
I kept getting the following error messages when I install this mod with RC5. Guests are not allowed to make posts and I have disable mod for guest.

----------------------------------------------------------
http://modcarclub.com/forums/index.php?topic=102.0;prev_next=prev
8: Undefined index: anti_spam_links_guestsFile: /home/xxx/public_html/modcarclub.com/forums/Sources/Subs.php
Line: 2490

http://modcarclub.com/forums/index.php?topic=102.0;prev_next=prev
8: Undefined index: anti_spam_links_guestsFile: /home/xxx/public_html/modcarclub.com/forums/Sources/Subs.php
Line: 2486

http://modcarclub.com/forums/index.php?topic=176.0;prev_next=prev
8: Undefined index: anti_spam_links_guestsFile: /home/xxx/public_html/modcarclub.com/forums/Sources/Subs.php
Line: 2490

http://modcarclub.com/forums/index.php?topic=176.0;prev_next=prev
8: Undefined index: anti_spam_links_guestsFile: /home/xxx/public_html/modcarclub.com/forums/Sources/Subs.php
Line: 2486

----------------------------------------------------------
Line 2486 and 2490 are the two lines for this mod.
   // Links get made non-active with newbielinks prefix
   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)
      $message = preg_replace('~<a href="(?!' . preg_quote($boardurl) . ')([^"]*?)"(?:[^>]*?)>(?:.*?)</a>~i', $txt['anti_spam_links_newbielink'] . '$1 <span class="alert smalltext" title="' . sprintf($txt['anti_spam_links_newbielinks_info'], $modSettings['anti_spam_links_newbielinks']) . '">' . $txt['anti_spam_links_nonactive'] . '</span>', $message);

   // Links get rel="nofollow" so no page rank for you.
   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)
      $message = preg_replace('~(<a)( href="(?!' . preg_quote($boardurl) . ')(?:[^"]*?)"(?:[^>]*?)\>(?:.*?)</a>)~i', '$1 rel="nofollow"$2 <span class="alert smalltext" title="' . sprintf($txt['anti_spam_links_nofollowlinks_info'], $modSettings['anti_spam_links_nofollowlinks']) . '">' . $txt['anti_spam_links_nofollow'] . '</span>', $message);

   // End of Anti-Spam-Links mod
----------------------------------------------------------

Any help is greatly appreciated.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Blade_Runner on April 16, 2011, 04:51:23 PM
Shouldn't the installation English UTF-8 language filename be "Modifications.english-utf8.php" instead of "Modifications-utf8.english.php"?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Sleezy on April 16, 2011, 05:10:12 PM
Good job! Works perfect on my forum. :)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Oldiesmann on April 21, 2011, 02:15:26 AM
I just installed this on my forum, but am having a few problems with it.

I have it set so that users who have never posted cannot post links, and users who have less than 5 posts will get the "newbielink:" treatment.

However, it's changed the links in all of my posts to "newbielink". If I edit it via the quick modify and save it again, it'll show up correctly, but only until I view the post again. I've disabled that option for now because it's not working properly, but I would like to leave that in there just in case the spamtards figure out the trick to posting links...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: DrBermant on May 16, 2011, 12:58:30 AM
I seem to have a problem with the:

Quote
EXCLUDES yoursite.com links, so only use on any part of *.yoursite.com

Check this example attachment. It uses the following test post with 3 different level posters:
Quote
http://www.plasticsurgery4u.com is a link to a site that can be listed, but does not actually work in the post.

http://www.abodybeautiful.com/plastic_surgery_forum/forum_navigation.html is a link on this site, it also does not work.

but

http://www.abodybeautiful.com/forum/index.php is a link in the forum that works just fine.

Now any link in the forum folder "http://www.abodybeautiful.com/forum/" works just fine. But pages on the same site such as:

http://www.abodybeautiful.com/plastic_surgery_forum/forum_navigation.html gets flagged as if it is coming from another site. Is there a setting that can be changed to fix this? I am not able to move the forum to a higher level in the site as it would screw up the search engine work done so far.

In addition, can the mod be adapted to permit selecting other sites to bless such as the (EXCLUDES yoursite.com links, so only use on any part of *.yoursite.com)?

This last feature would also address higher root links from the same domain if they could be added in the adm section.

Another feature that would be nice if there also could be a group selection for the mod in addition to the post count. That way a particular group could be assigned a certain linking method no matter what the post count.

Thank you for any assistance and help in this matter.

Michael Bermant, M.D.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: Enc0der on May 26, 2011, 07:30:50 AM
^^^ +1 for the "exclude any domain.com/FOLDER" issue.
The forum is almost never in the root folder of the domain, but in its own folder, e.g. "http://www.simplemachines.org/community".
You don't want to nofollow links to your own website, e.g. "http://www.simplemachines.org/"...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Apllicmz on June 01, 2011, 12:31:32 AM
Update portuguese files
thank you

Code: [Select]
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
global $boardurl;
$txt['anti_spam_links'] = 'Configura&ccedil;&otilde;es do Mod Anti-Spam-Links';
$txt['error_anti_spam_links_nolinks_guest'] = 'Desculpa, Visitantes n&atilde;o tem permiss&atilde;o para postar links externos.';
$txt['error_anti_spam_links_nolinks_member'] = 'Desculpa, voc&ecirc; n&atilde;o tem permiss&atilde;o para postar links externos.';
$txt['anti_spam_links_newbielink'] = ' newbielink:';
$txt['anti_spam_links_nonactive'] = '[nonactive]';
$txt['anti_spam_links_newbielinks_info'] = 'Para refrear as mensagens de spam, liga&ccedil;&otilde;es externas s&atilde;o [inativo] até %1$s postes';
$txt['anti_spam_links_nofollowlinks_info'] = 'Para refrear as mensagens de spam, liga&ccedil;&otilde;es externas s&atilde;o definidas [nofollow] (que significa que nenhum pagerank) até %1$s postes';
$txt['anti_spam_links_nofollow'] = '[nofollow]';
$txt['anti_spam_links_nolinks'] = 'Contagem de Postes em que os membros n&atilde;o pode postar links externos';
$txt['anti_spam_links_newbielinks'] = 'Contagem de Postes em que os membros s&atilde;o mostrados links externos [inativos] e sem http://';
$txt['anti_spam_links_nofollowlinks'] = 'Ccontagem de Postes em que os membros links externos s&atilde;o definidos [nofollow]';
$txt['anti_spam_links_zero_disable'] = '[Excluir qualquer ' . $boardurl . ' links]<br />(Use 0 para desativar)';
$txt['anti_spam_links_guests'] = 'Visitantes... ';
$txt['anti_spam_links_guests_opt0'] = '(Desativar o mod para visitantes)';
$txt['anti_spam_links_guests_opt1'] = 'n&atilde;o pode postar links';
$txt['anti_spam_links_guests_opt2'] = 'links s&atilde;o mostrados [nonactive]';
$txt['anti_spam_links_guests_opt3'] = 'links s&atilde;o definidos [nofollow]';
]]></add>
        </operation>
    </file>
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: vbgamer45 on June 01, 2011, 01:31:44 PM
Thanks for the translation!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: jekwumoore on June 16, 2011, 08:04:46 PM
I just upgraded to smf 2.0  will this mod work on it?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: ZarPrime on June 23, 2011, 10:29:42 AM
Is this Mod still being supported by anyone because, if so, I have a question.

Settings ...
Post count under which members cannot post external links - 5
Post count under which members external links are shown [nonactive] and without http:// - 5
Post count under which members external links are set [nofollow] - 5
Guests... Can not post links

The Mod seems to be working fine.  However, when a new member with no posts tries to make a post using the bbc code tags, like this ...
Code: [Select]
Code tags here, maybe something like this (just an example)...
// Configuration
 
// Set the number of posts to show..
$num_recent = 25;

// Alternatively set here a range of days passed.
// eg , 7 will get all the topics in the past 7 days.
// This will over-ride $num_recent above.  Set to 0 to disable.
$num_days = 0;

... They get the message "Sorry, you are not allowed to post external links." despite the fact that there are no links inside the code tags.

Any help here?

ZarPrime
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: helG on June 29, 2011, 04:07:00 AM
Thanks for the mod.

I works fine with my updated SMF 2.0 except one problem: my user (admin) with about 1200 posts is treated as newbie. Watch this thread for example. (http://meeresbrise.de/forum/smf/index.php/topic,348.msg2097.html) Any idea to solve this problem?

Attached you'll find my german translation of the language file.

Code: [Select]

global $boardurl;
$txt['anti_spam_links'] = 'Anti-Spam-Links Einstellungen';
$txt['error_anti_spam_links_nolinks_guest'] = 'Sorry, Gaeste duerfen keine externen Links posten.';
$txt['error_anti_spam_links_nolinks_member'] = 'Sorry, Du darfst keine externen Links posten.';
$txt['anti_spam_links_newbielink'] = 'newbielink:';
$txt['anti_spam_links_nonactive'] = '[inaktiv]';
$txt['anti_spam_links_newbielinks_info'] = 'Um Spam Posts vorzubeugen, sind externe Links [inaktiv] bis Du %1$s Posts erreicht hast';
$txt['anti_spam_links_nofollowlinks_info'] = 'Um Spam Posts vorzubeugen, sind externe Links [nofollow] (kein Pagerank) bis Du %1$s Posts erreicht hast';
$txt['anti_spam_links_nofollow'] = '[nofollow]';
$txt['anti_spam_links_nolinks'] = 'Anzahl der notwendigen Postings ab der externe Links gesetzt werden d&uuml;rfen';
$txt['anti_spam_links_newbielinks'] = 'Anzahl der Postings unter der Links [nonactive] und ohne http:// gezeigt werden';
$txt['anti_spam_links_nofollowlinks'] = 'Anzahl der Postings unter der Links von Mitgliedern [nofollow] erhalten';
$txt['anti_spam_links_zero_disable'] = '[Ausgenommen alle ' . $boardurl . ' Links]<br />(Use 0 to disable)';
$txt['anti_spam_links_guests'] = 'G&auml;ste ... ';
$txt['anti_spam_links_guests_opt0'] = '(Mod f&uuml;r G&auml;ste ausschalten)';
$txt['anti_spam_links_guests_opt1'] = 'k&ouml;nnen keine Links posten';
$txt['anti_spam_links_guests_opt2'] = 'Links werden als [nonactive] gezeigt';
$txt['anti_spam_links_guests_opt3'] = 'Links sind [nofollow]';


Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: ZarPrime on June 30, 2011, 11:33:26 AM
helG,
Unfortunately, I don't think anyone is supporting this Mod anymore, as evidenced by the fact that nobody has responded to my question above yours posted a week ago.

ZarPrime
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Bob Perry of Web Presence Consulting on September 01, 2011, 08:56:29 PM
Great Mod, so far seems to work great except for one minor oversight... I've got mine set so that newbies cannot post links until they have successfully posted 10 messages without links, HOWEVER, the mod doesn't cover profile signatures. Please correct this in the next release when there's time, should be easy enough and the effort would be worth the time spent as I'd actually pay for this one man, it's kinda comical to watch (via "Who's Online"), the spammers struggle to do their thing unsuccessfully. This mod reduces vastly the amount of time spent banishing users.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: jgkgopi on September 20, 2011, 01:04:29 PM
how to allow admin to post links
pls help me
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on September 21, 2011, 10:34:20 AM
I don't think admins have restrictions place on them from what I remember. Assuming admin is primary member group and not secondary.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: jgkgopi on September 21, 2011, 12:48:40 PM
No Admin also getting the error message

in my forum it's showing that
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on September 21, 2011, 01:08:28 PM
I don't think there is a setting, so you'll have to change your admin to have enough posts to have the mod not affect them then.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: soulgeek on October 12, 2011, 01:15:30 AM
Great Mod, so far seems to work great except for one minor oversight... I've got mine set so that newbies cannot post links until they have successfully posted 10 messages without links, HOWEVER, the mod doesn't cover profile signatures. Please correct this in the next release when there's time, should be easy enough and the effort would be worth the time spent as I'd actually pay for this one man, it's kinda comical to watch (via "Who's Online"), the spammers struggle to do their thing unsuccessfully. This mod reduces vastly the amount of time spent banishing users.


This is Exactly what we all are looking for.

This is such a wonderful Mod, why the developer has abandoned it.

Can any other developer please work on this Baby and let it grow? Please?

Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: PatrickForum on November 15, 2011, 05:36:06 PM
This is a great mod, but it doesn't nofollow the links in the member's profile. The website URL in the profile stays dofollow.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on November 16, 2011, 12:03:06 PM
Thanks for the suggestions, we'll put it on the todo list for this mod and see if we can't get an update out for profile signature links.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Bancherd on November 16, 2011, 05:47:12 PM
Thanks for the suggestions, we'll put it on the todo list for this mod and see if we can't get an update out for profile signature links.

Wonderful news!  Thanks.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: frytec on November 23, 2011, 03:01:24 PM
PLS, what are the edits i have to manually do in custom templates?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on November 25, 2011, 12:20:37 PM
PLS, what are the edits i have to manually do in custom templates?

You can click parse (http://custom.simplemachines.org/mods/index.php?action=parse;mod=2404;attach=176672;smf_version=2.0.1) for all the mods on the mod site to see what edits need to be done to the files.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: frytec on December 05, 2011, 02:14:43 PM
You can click parse (http://custom.simplemachines.org/mods/index.php?action=parse;mod=2404;attach=176672;smf_version=2.0.1) for all the mods on the mod site to see what edits need to be done to the files.

i know that, but this parse does not have any entry related to themes! All entries are for sources, and languages. Thats why i am asking.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on December 05, 2011, 04:12:08 PM
You can click parse (http://custom.simplemachines.org/mods/index.php?action=parse;mod=2404;attach=176672;smf_version=2.0.1) for all the mods on the mod site to see what edits need to be done to the files.

i know that, but this parse does not have any entry related to themes! All entries are for sources, and languages. Thats why i am asking.

Well if you looked at the parse instructions and it doesn't have any theme edits, then there is no need to edit any themes.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: hershel on January 24, 2012, 03:18:51 PM
A new forum member contacted me to say that his legitimate post (his first) was rejected due to "Sorry, you are not allowed to post external links" yet it actually had no links.

Is there a way to mark a user as trusted so he can avoid the "new user" spam checks?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on January 24, 2012, 04:33:50 PM
No way to do that I'm afraid, unless you just bump his count up to bypass your limit set.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC4
Post by: iwords on April 07, 2012, 10:53:38 AM
I kept getting the following error messages when I install this mod with RC5. Guests are not allowed to make posts and I have disable mod for guest.

----------------------------------------------------------
http://modcarclub.com/forums/index.php?topic=102.0;prev_next=prev
8: Undefined index: anti_spam_links_guestsFile: /home/xxx/public_html/modcarclub.com/forums/Sources/Subs.php
Line: 2490

Just in case anyone else experiences this problem, it's because this mod doesn't seem to have a default value for modSettings['anti_spam_links_guests'] and this causes it to generate an error if one isn't explicitly set.

To fix, go to the mod's setting page in Admin, change the value in the 'Guests...' pulldown and click Save.  Then change it back to whatever setting you want and click Save again.

Everything should work fine and you should stop receiving the error.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on April 07, 2012, 03:26:19 PM
That should be fixed in the code for sure.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: usernamenumber on May 14, 2012, 11:37:09 AM
I originally posted this in the SMF support thread because I figured it was more an SMF problem than mod-specific, but I've installed and uninstalled other mods without trouble, so it was suggested that I try here. If anyone can help, I'd *really* appreciate it. Here's the original post...

I have been having a heckuva time getting the Anti-Spam Links package to work on my forum (2.0.1).

At first I got the error others have reported about the Packages directory not being writeable. I manually created a "temp" directory and it installed successfully... except that it seems it didn't actually install.

I can't find any evidence of the Anti-Spam mod settings in the admin area, and when I grep for text it should have added (at least, if I'm reading the xml file right... it looks like it adds several comments with the phrase "Anti-Spam-Links", for example) it isn't anywhere in the forum code.

I thought to try re-installing it, but when I attempt to do that, every test fails (which, again if I'm understanding the implication of this correctly, would seem to imply that the changes the uninstaller is looking for never actually happened).

I'm not bold enough to force an uninstall without checking here first. Does anyone have any suggestions?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on August 24, 2012, 05:31:13 PM
Has anyone experienced this before? The mod has installed correctly and I have doubled checked it over and over so unless it is conflicting with a different mod I am not sure why it is not working correctly.

It blocks users from posting links under a certain post count just fine.

When it gets to nofollow or noactive it works in preview just not when you post it.

See Screen shots below.

Works in Preview

(http://www.mesquiteweather.net/wxconnection/screenshots/spam_links_preview.png)

Not when you post it

(http://www.mesquiteweather.net/wxconnection/screenshots/spam_links_topic.png)

Anyone have any ideas or suggestions of what may be happening and how to resolve it?

-Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on August 27, 2012, 01:43:05 PM
BUMP...

Anyone?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on August 28, 2012, 12:08:34 PM
Probably something to do withe mods you have installed. I'd start with the editor mod you have installed that changed the editor.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on August 30, 2012, 02:40:48 PM
Probably something to do withe mods you have installed. I'd start with the editor mod you have installed that changed the editor.

I don't see how that would conflict with it since it doesn't work with the normal posting method. It does the same way if you use the Quick Reply or normal method.

Anyone have any ideas?

I would really like to get this sorted before the board launches Saturday.

-Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: James--- on August 30, 2012, 05:19:25 PM
Hello,

We never had problems with this mod. Just an awesome mod. But now, after a forum upgrade, we have a small problem. Please help us solve it.
When trying to install the mod, a test failed (at the step when SMF is checking if every file is going to be edited well). The /sources/display.php file is not set up properly. Should we replace the wrong code with the correct code manually by editing the file?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on August 30, 2012, 06:32:02 PM
Should we replace the wrong code with the correct code manually by editing the file?

Yes, manually edit and add the code to the files it fails on. Then you can hit install and have it install the rest.

Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: James--- on August 30, 2012, 06:45:00 PM
Thanks Texan, will try it :)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on August 30, 2012, 07:23:29 PM
Has anyone experienced this before? The mod has installed correctly and I have doubled checked it over and over so unless it is conflicting with a different mod I am not sure why it is not working correctly.

It blocks users from posting links under a certain post count just fine.

When it gets to nofollow or noactive it works in preview just not when you post it.

See Screen shots below.

Works in Preview

(http://www.mesquiteweather.net/wxconnection/screenshots/spam_links_preview.png)

Not when you post it

(http://www.mesquiteweather.net/wxconnection/screenshots/spam_links_topic.png)

Anyone have any ideas or suggestions of what may be happening and how to resolve it?

-Thanks

Ok, so I have unstalled this and reinstalled it manually with no issues at or conflicts at all.

I am still having the same problems. Blocking links works fine but only in preview does it nofollow or noactive links in a certain threshold.

Any ideas or suggestions of why this might be happening?

-Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on September 04, 2012, 12:01:48 PM
Has anyone experienced this before? The mod has installed correctly and I have doubled checked it over and over so unless it is conflicting with a different mod I am not sure why it is not working correctly.

It blocks users from posting links under a certain post count just fine.

When it gets to nofollow or noactive it works in preview just not when you post it.

See Screen shots below.

Works in Preview

(http://www.mesquiteweather.net/wxconnection/screenshots/spam_links_preview.png)

Not when you post it

(http://www.mesquiteweather.net/wxconnection/screenshots/spam_links_topic.png)

Anyone have any ideas or suggestions of what may be happening and how to resolve it?

-Thanks

Still looking for suggestions or advice if anyone can offer any?

-Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Suki on September 04, 2012, 12:09:24 PM
You are using a different editor, most likely this editor is changing the urls before being inserted on the DB or this editor is skipping the edits made by this mod.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on September 04, 2012, 01:40:19 PM
You are using a different editor, most likely this editor is changing the urls before being inserted on the DB or this editor is skipping the edits made by this mod.

Yes I am but I was having the same problem before using it and to test to make sure that it wasn't conflicting I uninstalled it that mod and still was having the same problem even with the default SMF editor.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Suki on September 04, 2012, 05:17:55 PM
I just installed this mod on both local and my server and couldn't reproduce the issue yo mention.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on September 04, 2012, 07:49:28 PM
After further testing I have discovered even though the mod install with no issues. The SMFPacks SEO Pro v1.1.6 is causing the conflicts.

I have a test forum with no mods on it. I install this one and it works fine. As soon as I install the SEO mod it breaks it.

It gets as far as preview but that is it.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Chalky on September 18, 2012, 03:55:37 PM
The mod is working great, but is there any way to exclude certain members, so for example, newbies who are known to us can post links without problem?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on September 18, 2012, 11:15:49 PM
No option like that because that is what you can use groups for.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Chalky on September 19, 2012, 04:52:09 AM
No option like that because that is what you can use groups for.

How does that work?  I can't see a permission for it....
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on September 19, 2012, 12:21:40 PM
Ah was thinking of the wrong mod sorry. YEah, as you can see this is only a post count mod. If you want someone to not be included in it, then you have to bump up their posts. At least until someone has time to write the modification the way you want it. :)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Chalky on September 19, 2012, 01:36:38 PM
Thanks IchBin  :)

So, now to master the art of fudging newbies' post counts without anyone noticing.... hmmm.....  :P
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: novill on October 06, 2012, 03:52:18 PM
It seems that this mod generated errors to my error log.
http://www.simplemachines.org/community/index.php?topic=487556
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on October 07, 2012, 05:34:30 PM
Make sure your post.php has all the necessary edits. In particular this is the spot where that variable is created.

Code: [Select]
SELECT IFNULL(mem.real_name, m.poster_name) AS poster_name, m.poster_time, m.body, m.smileys_enabled, m.id_msg, IFNULL(mem.posts, 0) AS postcount, IFNULL(m.id_member, 0) AS poster_id
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: impreza on January 11, 2013, 06:14:26 AM
great mod but I have a problem with links from the code - if it does not work well because it's a text link and it changes the link points to a code
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on February 06, 2013, 04:15:38 PM
Is there any way to exclude certain members, so for example, newbies who are known to us can post links without problem?

I am needing the same thing.

Need a way to exclude certain groups.

I have the downloads mod and I have developers trying to upload scripts and they can't because this mod is blocking them. They don't post in the forums, they just upload scripts so their post count can't be raised first. They have to be added to a certain group manually in order to upload scripts so I know they are trusted members.

So anyway to exclude certain member groups or can this feature be added?

-Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Texan78 on February 06, 2013, 04:39:36 PM
Is there any way to exclude certain members, so for example, newbies who are known to us can post links without problem?

I am needing the same thing.

Need a way to exclude certain groups.

I have the downloads mod and I have developers trying to upload scripts and they can't because this mod is blocking them. They don't post in the forums, they just upload scripts so their post count can't be raised first. They have to be added to a certain group manually in order to upload scripts so I know they are trusted members.

So anyway to exclude certain member groups or can this feature be added?

-Thanks

In the meantime I have found a small work around.

Click on the users profile and then under modify profile on click on account settings.

From there you have the abaility to manual set a users post count. Just set it to where it clears the settings of your Anti-Spam Links.

Still would be nice to have a feature it exclude certain member groups as I can see this being tedious to have to manually add posts to members.

-Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: impreza on March 12, 2013, 07:04:40 AM
For BBC "Code", instead of Select it's become

Code:  newbielink:javascript:void(0); [nonactive]

Any fix please? Thanks.

This is still broken
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: ElDudo on October 30, 2013, 04:45:55 PM
This is an AWESOME plugin!

It has saved me from headaches supervising spam in our new forum. It's a shame the plugin seems to be no longer supported (last updated in 2011) because I would be willing to contribute some money for updates of this plugin. The ability to restrict the posting of links on users depending on their post count is priceless and perhaps this could be a great addition to the core in-built system of SMF for upcoming updates? Also, the making of external links nofollow is great too as it helps deter spam big time.

Anyway, I cannot post threads since I'm new, so I would like to ask here this simple question I have. Currently, I have used this plugin to set my external links posted by users to be nofollow; however, the links have a red text displaying nofollow next to the links which discourages users from clicking links in my forum; the feedback I get is that people think that the links are dangerous or contain viruses and what not since they have nofollow text next to them (my forum is not webmaster related so users don't know what nofollow means). I believe this forum also has the text nofollow (in red) next to external links so many of you will be aware of what I mean.

My question is, is there any quick way to remove the text nofollow from being displayed next to external links? I still want the links to continue being nofollow, but simply NOT have the red text nofollow next to them so that my forum members are OK with clicking the links. Surely this minor modification to the functionality of the plugin must consist of simply changing a couple of lines in the code but I have been looking for answers to no avail.

I would really appreciate any help please. I only use a couple of plugins on my site, and this one is a must have.

Thanks!!  8)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on October 30, 2013, 10:46:12 PM
You should be able to change the $txt string that is put in the Themes/default/languages/Modifications.english.php file for this. Or Modifications.english-utf8.php if you're using utf8 on your forum.
$txt['anti_spam_links_nofollow'] = '[nofollow]';

Compatibility with SMF 2.0 RC5 pretty much means it's compatible with SMF2.0.x. It just needs to be updated to reflect that. Looks like Customize team is falling behind on their mods. :o

If you need to remove the red color you'll probably have to alter the part of the code taht is put in Subs.php IIRC. It looks like it has a span with the css class associated with it to make it red. You can likely just remove that.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: ElDudo on November 03, 2013, 12:28:46 AM
Thanks so much for the help IchBin™.

I am actually getting back to SMF after leaving the project aside for 6 weeks due to work and I'm working hard to build the actual user base, so apologies if this question is obvious, but where do I find  ---> Themes/default/languages/Modifications.english.php ??

I just logged in quickly on my SMF forum as an Admin but could not find that file. Do I have to log into my webhosting root panel (Cpanel) instead to find it there? I have done all modifications so far (minor ones) just by modifying the theme from my Admin panel in SMF and by installing the few mods I have so far. I'm really wary of editing stuff on Cpanel so I would rather ask this question to ensure I go in correctly (I will of course back up before etc).

I'm using the Firox theme BTW and the forum is in English. Also I simply would like to have the actual text -- nofollow -- erased from next to all external links, not just have the fonts go back to the default postbit color. It's the actual nofollow text that puts my forum users from clicking links.

Lastly, the mod is working great on my 2.0.6 installation, FWIW to anyone being wary of this mod being behind on SMF updates.

Many thanks again, really appreciate it. I own a couple other forums with other forum software and I find SMF way easier to modify minor stuff as a webmaster. In fact, I don't see much of an extra benefit from Vbulletin when compared to SMF or Mybb and I'm finding SMF runs somewhat faster than Vbulletin  ;D ;D
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on November 03, 2013, 06:47:57 PM
You find the file Modifications.english.php on your server in your control panel (CPanel for most people). Yes you have to alter that file directly to change the link text that you want to change. The path I showed you should be the path from where ever your forum is installed.

If you want to change nofollow to just be erased, then you'll make this change to the line:
Currently the line should like this:
$txt['anti_spam_links_nofollow'] = '[nofollow]';

After you have changed it, it should look like this:
$txt['anti_spam_links_nofollow'] = '';

I think that should do what you need.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: ElDudo on November 06, 2013, 03:27:41 PM
IchBin™ thanks so much buddy! It worked, just that tiny modification.

May I ask, when I upgrade SMF or the mod (if it is updated in the future), will I have any problems since the nofollow was removed from Modifications.english.php ?? Should I put back the nofollow whenever I update to avoid any complications?

Anyway, this mod is awesome and really helps us webmasters to control spam (I've disallow links from everyone with less than 50 posts LOL no spam ever since). IMO this mod should be integrated in the core of SMF, really helpful!

I appreciate the community effort and how all of you are contributing to make SMF. I would like to give a donation to this mod and the developers, or if this mod belongs to the SMF team. Just a donation to pay for coffees and red bulls for the day  :D Please let me know an official Paypal account to send a donation or however you guys want to do it through Paypal.

Cheers
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on November 06, 2013, 04:09:35 PM
You'll notice right away after an upgrade if your change was overwritten. However, SMF should not overright that file during the normal updates between minor version like 2.0.5 to 2.0.6. If you do a major upgrade like 2.0 to 2.1 that could be possible. If you upgrade the mod, you will likely need to make the change again.

Do make a donation to SMF feel free to take a look here.
http://www.simplemachines.org/contribute/donate.php

Depending on how much you donate you may also qualify here:
http://www.simplemachines.org/charter/
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: ElDudo on November 06, 2013, 04:44:55 PM
Thanks for the reply!

I have just donated the $49.95 to contribute for developing costs etc It said that I would have a badge on my avatar or something like that? I haven't received any email to confirm, just my payment is confirmed.

Anyway, I'm happy to have contributed $49.95 even if I don't have a badge  ;D Keep up the effort folks, SMF is really up there with the top dogs! Happy to contribute in some way to this community.

Cheers

EDIT: I have the badge now  8)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: IchBin™ on November 07, 2013, 02:13:47 PM
awww look at that shiny new badge! :D
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: freestyler7 on December 02, 2013, 12:32:58 AM
So I can not hang the links until it exceeds 5 post?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on December 02, 2013, 03:31:49 PM
what?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: johnpaul2k2 on December 16, 2013, 05:11:11 AM
I just noticed something concerning this great mod

if Visitor Mask or embedded his/her link in this form

Code: [Select]

[url=Your LINK]   TOPIC [/url]



it wouldn't catch the link?

any solution?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: johnpaul2k2 on December 19, 2013, 11:25:29 AM
i need help please
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Matthew K. on March 15, 2014, 03:05:38 PM
This modification is generating undefined errors in Subs.php.

Modification XML Files:

Code: (Find) [Select]
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)
Code: (Replace) [Select]
if ((($poster_id === 0 && !empty($modSettings['anti_spam_links_guests']) && $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)
Code: (Find) [Select]
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)
Code: (Replace) [Select]
elseif ((($poster_id === 0 && !empty($modSettings['anti_spam_links_guests']) && $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)
Oh...also, the install and uninstall for ranges are 2.0 - 2.99.99 which should be 2.0 - 2.0.99 so that it isn't automatically marked as compatible with future 2.x versions like 2.1...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: supmener on July 30, 2014, 07:01:51 AM
Hi, Sorry for bad Inglish. How add nofollow for links not only for guests and for admin to? And I want noffolow only for external, not internal.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on July 30, 2014, 07:12:21 AM
that is not what this mod does.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: supmener on July 30, 2014, 07:17:45 AM
How to modify mod code?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on July 30, 2014, 07:21:51 AM
it would require significant modification to the mod to do what you are asking for....
it would also require processing...  the system would have to compare every url to your site domain and add the no follow or not on the fly (because the nofollow is added on the fly based on the user's current post count)

If you really want to add the nofollow (and I suggest that you do not, because I suspect that you think it is a good idea for search engines... and if so, you would be very wrong) but, if you do... then you would need to modify the actual URL BBC - not use this mod.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: supmener on July 30, 2014, 07:26:36 AM
Thank you for your response. I created about 1000 posts with external links on your forum and thought they were closed with nofollow, but now when I learned how to really want to correct the situation.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on July 30, 2014, 07:30:20 AM
... then you would need to modify the actual URL BBC - not use this mod.

or, in your case, you may need to modify the database

Either way, this mod is not the correct process to do what you are asking.   Please post in coding help or support.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: supmener on July 30, 2014, 07:37:19 AM
Thanks. I have PDFs and HTMLs pages in domain and want to have him without nofollow. And for externall links want nofollow.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on July 30, 2014, 08:10:54 AM
... then you would need to modify the actual URL BBC - not use this mod.

or, in your case, you may need to modify the database

Either way, this mod is not the correct process to do what you are asking.   Please post in coding help or support.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Arantor on July 30, 2014, 01:13:24 PM
it would require significant modification to the mod to do what you are asking for....
it would also require processing...  the system would have to compare every url to your site domain and add the no follow or not on the fly (because the nofollow is added on the fly based on the user's current post count)

Technically it should already be filtering out the user's site anyway just like the original version of the mod filters out *.sm.org links here. But it does it to the *forum* IIRC not the site, can't remember for sure, it's been years since I helped fix that particular bug.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BB13 on September 09, 2014, 12:37:55 PM
Is it possible to make "Anti-Spam Links" compatible with "Ad Managment"
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Arantor on September 09, 2014, 12:41:50 PM
In what way is it not compatible?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 09, 2014, 12:56:02 PM
it is...   I have had both installed and working with no issues on one of my systems
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Ramesh8248 on September 18, 2014, 08:22:15 AM
I am using Anti-Spam Links v1.0.
mod=2404

Whenever I try to add any php code in my forum, it shows an error:
Sorry, you are not allowed to post external links.


I don't know why this is happening, there is no any type of link. Please help me.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 18, 2014, 08:41:00 AM
other mods installed?   are you, perhaps using geshi or one of the other markup mods?


What are your settings for the anti-spam links fields?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Ramesh8248 on September 18, 2014, 12:22:50 PM
Anti Spam Links Settings:
Post count under which members cannot post external links 25
Post count under which members external links are shown [nonactive] and without http:// 25
Post count under which members external links are set [nofollow] 500
Guests... (disable mod for guests)

right now I am using these mods:

1.   Anti-Spam Links   1.0.1
2.   KeyCAPTCHA for SMF   2.9
3.   httpBL 2.5.1
4.   Downloads System 2.1a
5.   Restrict Posts 1.1
6.   Default Avatar 2.3
7.   WYSIWYG Quick Reply
8.   Birthday On Register
9.     Ad Managment   3.2
10.   Optimus Brave   1.8.7
11.   Additional Profile Permissions 1.0.0
12.   Pretty URLs 1.1.2
13.   Disable to send EMail with Forum-System for Users lower than Admin 1.0
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 18, 2014, 12:58:19 PM
well, you should not have two settings be the same number.

Also, really? 500 posts?   You do realize that you have gone way beyond anti-spam at that point -- and especially have moved into "bad for SEO" realm?
Settings that many links to no follow will penalize your search engine rankings.

Does this error happen for you on quick reply, normal post, or both?
Please post here (using code tags) the php that you are trying to display in the message?

Are you trying to post active php IN a message?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Ramesh8248 on September 19, 2014, 09:54:45 AM
Ok I change these settings.

It's 500 because I don't want to use members links as do-follow on my forum, but If they want it, then this will be a condition. I am using this settings for my members only and I don't think that having lots of no-follow outbound links can hurt website, but it may be hurt if you put lots of them in one page.

i got this error when I try to post following code: sorry, you are not allowed to post external links.
Code: [Select]
<?php
echo "test";
?>
Yes it happen on quick reply too...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 19, 2014, 10:05:17 AM
Actually, yes...  Having all of your outbound links be nofollow WILL hurt your search ranking. Even if they are not all on the same page.

As for your error...   You post that code....   Inside code BBC tags or in the message itself?


 I think that you installed this mod incorrectly and it is messing up the other BBC
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: margarett on September 19, 2014, 11:31:22 AM
Actually I confirm that behavior...

A post with that code under code tags brings that error message.

It's most likely an issue with the MOD itself...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Ramesh8248 on September 19, 2014, 12:05:34 PM
hey I just installed SCEditor mode and it removes that error of anti spam link...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BB13 on September 24, 2014, 11:57:04 AM
Is it possible to make "Anti-Spam Links" compatible with "Simple Audio Video Embedder" It leaves only the link followed by an [nofollow]
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 24, 2014, 12:31:15 PM
anything is possible, if you know how to code it...

in this case, it is unlikely that this mod will be further updated - So I suggest that you ask the SAVE author...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BB13 on September 24, 2014, 07:30:01 PM
Excuse my ignorance, who is the SAVE author.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Arantor on September 24, 2014, 07:31:22 PM
The thread for SAVE is the proper venue for such discussions, rather than sending the author a message; that way if he has time he can look at it.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BB13 on September 28, 2014, 08:10:26 AM
The thread for SAVE is the proper venue for such discussions, rather than sending the author a message; that way if he has time he can look at it.

Thanks for the help.


I recently discovered that some spamers can somehow bypass Anti-Spam Links.
I have found some spam posts with normal crawlable links.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 28, 2014, 08:13:44 AM
then you have misconfigured something....

there is nothing here to be bypassed - all processing is done on the server/display side -there is nothing that the user can "bypass"
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Arantor on September 28, 2014, 11:29:16 AM
There are places where it is not carried out.

action=recent comes to mind, possibly action=search and from users' profiles (on the theory that most sites wouldn't let guests view profiles)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on September 28, 2014, 11:36:19 AM
Ah, that is true...
It is not done in the list of user's posts..

I think it is done in search though..

Not sure about recent...
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Arantor on September 28, 2014, 09:06:43 PM
It is not done in action=recent, that one I know for sure.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: MrCreatoR on December 25, 2014, 06:11:39 AM
Russian translation:

$txt['anti_spam_links'] = 'Настройки Anti-Spam-Links';
$txt['error_anti_spam_links_nolinks_guest'] = 'Извините, гостям запрещено оставлять внешние ссылки.';
$txt['error_anti_spam_links_nolinks_member'] = 'Извините, вам запрещено оставлять внешние ссылки.';
$txt['anti_spam_links_newbielink'] = ' ссылка:';
$txt['anti_spam_links_nonactive'] = '[nonactive]';
$txt['anti_spam_links_newbielinks_info'] = 'Чтобы предотвратить спам сообщения, внешние ссылки обрамлены тегом [nonactive] пока не наберётся %1$s сообщений';
$txt['anti_spam_links_nofollowlinks_info'] = 'Чтобы предотвратить спам сообщения, внешние ссылки обрамлены тегом [nofollow] (без pagerank) пока не наберётся %1$s сообщений';
$txt['anti_spam_links_nofollow'] = '[nofollow]';
$txt['anti_spam_links_nolinks'] = 'Количество сообщений которое необходимо набрать чтобы оставлять сообщения с внешними ссылками';
$txt['anti_spam_links_newbielinks'] = 'Количество сообщений которое необходимо набрать чтобы оставлять сообщения без [nonactive] и http://';
$txt['anti_spam_links_nofollowlinks'] = 'Количество сообщений которое необходимо набрать чтобы оставлять сообщения без установки [nofollow]';
$txt['anti_spam_links_zero_disable'] = '[Исключает все ссылки ' . $boardurl . ']<br />(Укажите 0 для отключения)';
$txt['anti_spam_links_guests'] = 'Гости... ';
$txt['anti_spam_links_guests_opt0'] = '(отключить мод для гостей)';
$txt['anti_spam_links_guests_opt1'] = 'не могут отправлять ссылки';
$txt['anti_spam_links_guests_opt2'] = 'ссылки показываются с [nonactive]';
$txt['anti_spam_links_guests_opt3'] = 'ссылки установлены как [nofollow]';
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Christian Knudsen on June 13, 2015, 09:14:15 AM
I'm trying to install this mod on 2.0.10. I first ran into a problem with the anti_spam_links_* variables not being inserted into the mod settings database, so I had to do that manually. The mod seems to be working now, but none of the text added to the Modifications.english.php file seems to show up anywhere:

Admin panel:
(http://oi62.tinypic.com/2n8alqt.jpg)

When trying to make a post that contains a link with a zero post member:
(http://oi59.tinypic.com/xp0wh5.jpg)

I've added the mod text to all Modifications.english.php and Modifications.english-utf8.php for all installed themes, but still nothing. Help?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on June 13, 2015, 01:42:41 PM
did you refresh the cache?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Christian Knudsen on June 13, 2015, 03:51:12 PM
Jesus Christ. It seems that at some point I had accidentally dragged and dropped the entire forum folder in FileZilla, creating a duplicate forum folder. All the changes I'd been making had been in this duplicate folder. I just fired myself for being an idiot.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: dekatria on August 05, 2015, 04:35:49 PM
Thanks for a great mod.
How about restricting the link permissions of specific members who tend to spam the forum with links.
Maybe something to consider in a future version.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on August 05, 2015, 09:33:08 PM
ummm.... no.

SMF does nothing for permissions at the member level.  Everything is based on either post-count or membergroup.

Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Glasso on December 08, 2015, 01:00:15 AM
Hi,

The post limit settings for non-active and no-follow don't seem to be honored in my install. That is, any value above 1 prevents a link to be shown as a link, regardless of the user's post count. A zero in the setting makes the links active/follow.
Is anybody facing this issue?

Second, is it possible to allow links from the whole domain and not just from the forum to be active/follow? That is, all links from example.com be made active and not just example.com/forum

Thanks
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Adrek on May 04, 2016, 02:49:11 PM
I have honestly no idea how to work with reg exp :|

Could someone help me with 'whitelisting' another domain for nofollow URL? I'm using Split Forum Mod and I would like to have disabled nofollow for my 2'nd URL.
Here's part of code that makes this magic:
Code: [Select]

// Start of Anti-Spam-Links mod
global $boardurl;

// Links get made non-active with newbielinks prefix
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)
$message = preg_replace('~<a href="(?!' . preg_quote($boardurl) . ')([^"]*?)"(?:[^>]*?)>(?:.*?)</a>~i', $txt['anti_spam_links_newbielink'] . '$1 <span class="alert smalltext" title="' . sprintf($txt['anti_spam_links_newbielinks_info'], $modSettings['anti_spam_links_newbielinks']) . '">' . $txt['anti_spam_links_nonactive'] . '</span>', $message);

// Links get rel="nofollow" so no page rank for you.
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)
$message = preg_replace('~(<a)( href="(?!' . preg_quote($boardurl) . ')(?:[^"]*?)"(?:[^>]*?)\>(?:.*?)</a>)~i', '$1 rel="nofollow"$2 <span class="alert smalltext" title="' . sprintf($txt['anti_spam_links_nofollowlinks_info'], $modSettings['anti_spam_links_nofollowlinks']) . '">' . $txt['anti_spam_links_nofollow'] . '</span>', $message);

// End of Anti-Spam-Links mod

edit:

I used str_ireplace after quoted code and works for me :)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Rock Lee on May 07, 2016, 01:54:31 PM
Here I give the translation to Latin Spanish of this modification that serves more than one, I hope my translation just as you like...  :)


Modifications.spanish_latin-utf8.php

Code: [Select]
global $boardurl;
$txt['anti_spam_links'] = 'Anti-Spam-Links configuración';
$txt['error_anti_spam_links_nolinks_guest'] = 'Lo sentimos, los invitados no pueden publicar enlaces externos.';
$txt['error_anti_spam_links_nolinks_member'] = 'Lo sentimos, no se le permite publicar enlaces externos.';
$txt['anti_spam_links_newbielink'] = 'Enlace de novato:';
$txt['anti_spam_links_nonactive'] = '[Inactivo]';
$txt['anti_spam_links_newbielinks_info'] = 'Para frenar los mensajes de spam, los enlaces externos son  [Inactivo] hasta %1$s mensajes';
$txt['anti_spam_links_nofollowlinks_info'] = 'Para frenar los mensajes de spam, se establecen enlaces externos [NoSeguir] (lo que significa que no hay PageRank) hasta %1$s temas';
$txt['anti_spam_links_nofollow'] = '[NoSeguir]';
$txt['anti_spam_links_nolinks'] = 'Recuento de entradas en las que los miembros no pueden publicar enlaces externos';
$txt['anti_spam_links_newbielinks'] = 'recuento de entradas en las que se muestran los miembros de los enlaces externos están mostrando [Inactivo] y sin http://';
$txt['anti_spam_links_nofollowlinks'] = 'Recuento de entradas en las que están situados los miembros de los enlaces externos [NoSeguir]';
$txt['anti_spam_links_zero_disable'] = '[Excluye cualquier ' . $boardurl . ' links]<br />(Utilice 0 para desactivar)';
$txt['anti_spam_links_guests'] = 'Visitantes... ';
$txt['anti_spam_links_guests_opt0'] = '(Desactivar mod para los visitantes)';
$txt['anti_spam_links_guests_opt1'] = 'No puede publicar enlaces';
$txt['anti_spam_links_guests_opt2'] = 'Enlaces que están mostrando [Inactivo]';
$txt['anti_spam_links_guests_opt3'] = 'Se establecen vínculos [NoSeguir]';

 and Modifications.spanish_latin.php

Code: [Select]
global $boardurl;
$txt['anti_spam_links'] = 'Anti-Spam-Links configuraci&oacute;n';
$txt['error_anti_spam_links_nolinks_guest'] = 'Lo sentimos, los invitados no pueden publicar enlaces externos.';
$txt['error_anti_spam_links_nolinks_member'] = 'Lo sentimos, no se le permite publicar enlaces externos.';
$txt['anti_spam_links_newbielink'] = 'Enlace de novato:';
$txt['anti_spam_links_nonactive'] = '[Inactivo]';
$txt['anti_spam_links_newbielinks_info'] = 'Para frenar los mensajes de spam, los enlaces externos son [Inactivo] hasta %1$s mensajes';
$txt['anti_spam_links_nofollowlinks_info'] = 'Para frenar los mensajes de spam, se establecen enlaces externos [NoSeguir] (lo que significa que no hay PageRank) hasta %1$s temas';
$txt['anti_spam_links_nofollow'] = '[NoSeguir]';
$txt['anti_spam_links_nolinks'] = 'Recuento de entradas en las que los miembros no pueden publicar enlaces externos';
$txt['anti_spam_links_newbielinks'] = 'Recuento de entradas en las que se muestran los miembros de los enlaces externos est&aacute;n mostrando [Inactivo] y sin http://';
$txt['anti_spam_links_nofollowlinks'] = 'Recuento de entradas en las que est&aacute;n situados los miembros de los enlaces externos [NoSeguir]';
$txt['anti_spam_links_zero_disable'] = '[Excluye cualquier ' . $boardurl . ' links]<br />(Utilice 0 para desactivar)';
$txt['anti_spam_links_guests'] = 'Visitantes... ';
$txt['anti_spam_links_guests_opt0'] = '(Desactivar mod para los visitantes)';
$txt['anti_spam_links_guests_opt1'] = 'No puede publicar enlaces';
$txt['anti_spam_links_guests_opt2'] = 'Enlaces que est&aacute;n mostrando [Inactivo]';
$txt['anti_spam_links_guests_opt3'] = 'Se establecen vínculos [NoSeguir]';


Regards!
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: MobileCS on May 10, 2016, 03:19:48 PM
I'm getting a whole bunch of errors in the error log. Fresh install of 2.0.11 with only this mod enabled :

Code: [Select]
8: Undefined index: anti_spam_links_guests

File: /usr/opt/www/example.net/httpdocs/test/Sources/Subs.php
Line: 2433
Line: 2437

Line 2433 :

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)

Line 2437 :

     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)

Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: MobileCS on May 10, 2016, 03:41:53 PM
Ok, this mod needs an update to the "updateDatabase.php" file so it creates default values for the options. The current solution in the file does not do this.

Anyone know what needs to be done to make this happen? I'll attach the file in question.

Thanks.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on May 10, 2016, 06:04:45 PM
just go into the admin tool and set some values and press save
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: MobileCS on May 10, 2016, 09:03:30 PM
just go into the admin tool and set some values and press save

The problem with that is - the mod requires you to use "0" to disable certain settings - which are not getting saved to the database.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on May 10, 2016, 09:36:14 PM
Save it with a value

Then resave with 0
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: MobileCS on May 11, 2016, 12:18:51 PM
Thank you, that did the trick.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: macrob on May 19, 2016, 06:24:51 PM
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:
Code: [Select]
: 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


Code: [Select]
==>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.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BSD2000 on July 13, 2017, 08:54:57 AM
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?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: vbgamer45 on July 13, 2017, 09:13:00 AM
What would you like to happen? If a url is entered in the subject line?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BSD2000 on July 13, 2017, 09:53:33 AM
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.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: vbgamer45 on July 13, 2017, 09:59:44 AM
I can probably do a code that gives an error message if http:// or https:// is found in the subject line?
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: BSD2000 on July 13, 2017, 10:03:38 AM
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.   :)
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: vbgamer45 on July 13, 2017, 10:09:16 AM
I replied to your other post.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: nadeem34 on April 15, 2018, 01:16:35 PM
Anybody knows how can I change the default message?

"Sorry you are not allowed to post external links"
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Kindred on April 15, 2018, 01:26:26 PM
Modifications.english.ohp
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: nadeem34 on May 18, 2018, 08:02:24 AM
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
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Shambles on May 18, 2018, 08:18:56 AM
Have a look in your theme folder for Modifications.english.php - the text strings should be in that file
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: nadeem34 on May 19, 2018, 01:43:46 PM
Quote
Have 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
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: Shambles on May 19, 2018, 01:49:27 PM
It might be Modifications.your_language.php, but there will be a Modifications.xxx.php file in your theme's folder.
Title: Re: Anti-Spam Links - Updated for SMF 2.0 RC5
Post by: nadeem34 on May 19, 2018, 02:14:24 PM
Thanks i found that file in themes==>languages==modification.english.php

Title: Re: Anti-Spam Links
Post by: nadeem34 on November 11, 2018, 10:13:05 AM
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
Code: [Select]
// Run BBC interpreter on the message.
$message['body'] = parse_bbc($message['body'], $message['smileys_enabled'], $message['id_msg']);

replace with this code
Code: [Select]
// 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.
Code: [Select]
// 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
Title: Re: Anti-Spam Links
Post by: 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.
Title: Re: Anti-Spam Links
Post by: nadeem34 on November 12, 2018, 12:37:28 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
Title: Re: Anti-Spam Links
Post by: SychO on November 12, 2018, 11:13:59 AM
You can manually change it to this:

Code: [Select]
// 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.
Title: Re: Anti-Spam Links
Post by: nadeem34 on November 14, 2018, 01:25:05 AM
You can manually change it to this:

Code: [Select]
// 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.

Firstly thank you so much for your reply.
I changed the code as you said. but the problem is that this package is installed but not working I put (Post count under which members cannot post external links=20) but every member can post links even under 20 post or above 20 posts.
Title: Re: Anti-Spam Links
Post by: SychO on November 14, 2018, 11:47:21 AM
The mod probably didn't setup correctly then, are you sure there were no other errors during the installation process ? also are there any errors in your forum's error log ?
Title: Re: Anti-Spam Links
Post by: nadeem34 on November 21, 2018, 12:34:32 AM
The mod probably didn't setup correctly then, are you sure there were no other errors during the installation process ? also are there any errors in your forum's error log ?

I see no error in my forum's log. During the installation process, it shows the error. I continued the installation and changed the code manually that was not replacing with another code
Title: Re: Anti-Spam Links
Post by: Owdy on July 27, 2019, 02:52:15 PM
Code: [Select]
index.php?topic=8854.msg55329
8: Undefined index: anti_spam_links_guests
File: /var/www/vhosts/*****/Sources/Subs.php
Line: 2537
Whats that?
Title: Re: Anti-Spam Links
Post by: SychO on July 27, 2019, 02:54:00 PM
Whats that?

I believe the mod needs updating.
Title: Re: Anti-Spam Links
Post by: wylekk on January 02, 2020, 07:35:44 AM
Will there be an update for SMF 2.1 RC2?

Есть ли подобные моды?
Title: Re: Anti-Spam Links
Post by: SychO on January 02, 2020, 07:56:19 AM
Yes there will be
Title: Re: Anti-Spam Links
Post by: wylekk on January 08, 2020, 05:55:46 AM
The mod works on SMF 2.1 RC2 :)
Not compatible with SMF-Redirector mod :-\
Title: Re: Anti-Spam Links
Post by: shadav on June 06, 2020, 05:26:44 PM
 :laugh: um.....any way to ignore for the admns

starting a new project and installed this
I currently only have 1 post, and have the mod set that under 5 posts user can't make external links

bwahahahaha
Quote
Sorry, you are not allowed to post external links.

ermmmmmm.....any way to set permissions for this to allow admins and/or special groups to bypass it?
Title: Re: Anti-Spam Links
Post by: Arantor on June 06, 2020, 05:30:31 PM
Nope. Just make more posts.
Title: Re: Anti-Spam Links
Post by: shadav on June 06, 2020, 05:51:41 PM
well that kinda sucks....
but then I guess in a live instance this really wouldn't be an issue hardly at all....
it's a nice mod nontheless, just kind of funny that the admin can't post links  :laugh: :laugh:
Title: Re: Anti-Spam Links
Post by: Arantor on June 06, 2020, 05:53:43 PM
You could even just change your post count...
Title: Re: Anti-Spam Links
Post by: shadav on June 06, 2020, 06:06:58 PM
good point
Title: Re: Anti-Spam Links
Post by: kilk on June 09, 2020, 04:03:23 PM
Love this mod! Good work OP!
Title: Re: Anti-Spam Links
Post by: shadav on July 19, 2020, 03:29:00 PM
there's a typo in the install

it's looking for file
Code: [Select]
$languagedir/Modifications-utf8.english.phpinstead of
Code: [Select]
$languagedir/Modifications.english-utf8.php
I'm assuming at some point in time these files were renamed and it got overlooked in the installer
Title: Re: Anti-Spam Links
Post by: SychO on July 19, 2020, 03:47:25 PM
Thank you for the report, it should be fixed soon.
Title: Re: Anti-Spam Links
Post by: vbgamer45 on July 19, 2020, 04:28:51 PM
Version 1.0.2
!Fixes install on modifications.english-utf8.php
Title: Re: Anti-Spam Links
Post by: Kolya on August 30, 2020, 06:53:20 PM
This mod may prevent posting plain links. But it does nothing about linked text. This will always go through. (https://www.simplemachines.org/community/index.php?topic=364169.msg4066710#msg4066710)
Title: Re: Anti-Spam Links
Post by: Arantor on August 30, 2020, 07:07:54 PM
Links back to the site it's hosted on will *always* work. That's explicitly covered.

Also, the regex handling at the end looks like it matches all links, not just bare URLs as links.
Title: Re: Anti-Spam Links
Post by: Kolya on August 31, 2020, 04:47:27 AM
You're right, that was my mistake testing with a local URL. Thanks for the correction.
And thanks for this useful mod.
Title: Re: Anti-Spam Links
Post by: Ninja ZX-10RR on March 01, 2021, 10:28:40 PM
Used this mod on a lot of forums, never had an issue until now...

Expected behaviour: <5 posts curbed newbie links, other settings set to 0.

Actual behaviour: ALL posts curbed newbie links BUT (for users with 5+ posts):

No errors in browser console log either for that matter. Clues? ;D Tia!

EDIT: of course, latest version. And same for SMF.