News:

Wondering if this will always be free?  See why free is better.

Main Menu

Anti-Spam Links

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

Previous topic - Next topic

BB13

Excuse my ignorance, who is the SAVE author.

Arantor

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.

BB13

Quote from: 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.

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.

Kindred

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"
Слaва
Украинi

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

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

Arantor

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)

Kindred

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...
Слaва
Украинi

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

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

Arantor

It is not done in action=recent, that one I know for sure.

MrCreatoR

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]';

Christian Knudsen

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:


When trying to make a post that contains a link with a zero post member:


I've added the mod text to all Modifications.english.php and Modifications.english-utf8.php for all installed themes, but still nothing. Help?

Kindred

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

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

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

Christian Knudsen

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.

dekatria

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.

Kindred

ummm.... no.

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

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

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

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

Glasso

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

Adrek

#174
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:


// 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 :)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

-Rock Lee-

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

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

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!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

MobileCS

I'm getting a whole bunch of errors in the error log. Fresh install of 2.0.11 with only this mod enabled :

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)



MobileCS

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.

Kindred

just go into the admin tool and set some values and press save
Слaва
Украинi

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

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

MobileCS

Quote from: Kindred on May 10, 2016, 06:04:45 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.

Advertisement: