Skip to main content
[ADDON] Nofollow attribute for external links Started by emanuele · · Read 58999 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic - Topic derived from Request - Nofollow attribute ...

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

er1.png

a different error appears click "back" button;

er2.png



sorry for my bad english