Skip to main content
Topic: [ADDON] Nofollow attribute for external links (Read 3049 times) previous topic - next topic - Topic derived from Request - Nofollow at...
0 Members and 1 Guest are viewing this topic.

Re: [ADDON] Nofollow attribute for external links

Reply #30
I found some errors in Elkarte log, all of them are related to this topic http://www.skodaclub.it/index.php?topic=4799.0
I am using php 5.6

8: Undefined index: host
File: /sources/subs/NoFollow.integrate.php
Line: 177

The strange thing is there is no link on that page, only a youtube video. Could be this?
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #31
Another stupid error. :-\

In NoFollow.integrate.php, change:
Code: [Select]
$message = preg_replace_callback('~<a href="(.*?)" class="bbc_link" rel="nofollow"(?: target=".*?")?>~', array(self::$instance, 'replace_callback'), $message);
to:
Code: [Select]
$message = preg_replace_callback('~<a href="([^>]*?)" class="bbc_link" rel="nofollow"(?: target="_?\w+")?>~', array(self::$instance, 'replace_callback'), $message);
that should do.
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Nofollow attribute for external links

Reply #32
thank you, no more errors from that topic  ;)
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #33
I just installed this on 1.1 RC2, it installs without errors, but it's not working. If I publish a link like
Code: [Select]
[url=https://www.google.it]google.it[/url]
becames:
Code: [Select]
[url url=https://www.google.it nofollow=dofollow]google.it[/url]
but there is no link visible, only text.
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #34
@emanuele‍ do you have any plans to update this addon for elkarte 1.1? Thank you
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #35
is there any improvement?

I installed in version 1.1.6 does not add nofolow
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #36
the add-on is not compatible with elkarte 1.1
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #37
Hi,

@emanuele

can you give information about working with code editing?

a detailed revision is required
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #38
hmm... BBC parser.
From @radu81 comment I'd say the problem is in the parsing, though right not I'm not entirely sure why it should not work (apart from the fact it still uses create_function and messes with http/https).
This evening I'll try to have a look.
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Nofollow attribute for external links

Reply #39
I tried, honestly I didn't test it at all. From this to time this happens to work out well, not always. xD
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Nofollow attribute for external links

Reply #40
Thanks @emanuele   works, there is a problem  but also affects main site links


Code: [Select]
<a href="https://MAIN-SITE.com" class="bbc_link" rel="noopener noreferrer nofollow" target="_blank">"https://MAIN-SITE.com</a>


<a href="https://EXTERNAL-SITE.com" class="bbc_link" rel="noopener noreferrer nofollow" target="_blank">https://EXTERNAL-SITE.com</a>


                  
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #41
I guess I don't like to do assumptions, that's likely why there is a "white list" setting in the admin panel.
Bugs creator.
Features destroyer.
Template killer.

 

Re: [ADDON] Nofollow attribute for external links

Reply #42
Thanks.  I found the settings but after saving it gave error

click check box (internal site)  and add one site link white link area  (https://www.site.com)  save setting

error setting page appears;

Code: [Select]
implode(): Invalid arguments passed

and the setting page always gives the same error

I can access the settings page when I uninstall the plugin

it again error page appears when installing the plugin again
sorry for my bad english

Re: [ADDON] Nofollow attribute for external links

Reply #43
There should be also something else along with the error, like the file and the row number.
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Nofollow attribute for external links

Reply #44
Hi,

 File: /sources/subs/NoFollow.integrate.php
 Line: 142

X

a different error appears click "back" button;

X



sorry for my bad english