Request - Nofollow attribute for external links
February 26, 2016, 04:59:29 am
Hello, I would like to set all my external links with "nofollow" attribute and the possibility to set which membergroups can add links without nofollow attribute. Is this difficult to code? There is nothing similar for SMF In other forums nofollow to external links is enabled from default (wbb and XF)
Re: Request - Nofollow attribute for external links
Reply #2 – March 02, 2016, 08:58:17 am
I know we talked about doing this at least to signature / profile links by default. Not sure about having it permission based so that some members links have nofollow and others don't ... could be done in parse bbc based on the post author id ... does XF do that?
Re: Request - Nofollow attribute for external links
Reply #3 – March 02, 2016, 11:53:35 am
In Xenforo and WBB all external links are nofollow, messages and signatures. In xf you can use an addon to remove the nofollow attribute for some groups, don't know in WBB or other forums
Re: Request - Nofollow attribute for external links
Reply #5 – March 06, 2016, 08:15:14 am
I understand it's not an easy task, but is possible to set all external links as nofollow and those I want to set without nofollow to insert manually using html code? I know is not the best solution, but I only need to set a few links without nofollow attribute
Re: Request - Nofollow attribute for external links
Reply #8 – March 06, 2016, 01:09:53 pm
XF's BBC parser is very different (and better in most ways). It saves the post as a tree and then parses that. This allows it to do a lot of things that we can't a lot easier. I think it's slightly slower but not by much. Though, looking at what you posted, it seems it's not concerned with when viewing but only when posting. So, a user could post without the permission and then later have it but the links don't change. Same with vice versa. I think this is pretty easy to do in the preparser even before 1.1's updated parser. Are you saying you're willing to pay for it? If so, I can try to find some time to do it. I am looking for a job right now and moving so taking time to do something without getting paid is not really possible right now (also why I stopped developing recently).
Re: Request - Nofollow attribute for external links
Reply #9 – March 06, 2016, 02:23:29 pm
emanuele
Global Moderator
Well, what I have in mind to do about that is (ab)use preparse code as usual: if you are allowed, you go, otherwise the nofollow is added as a parameter to url and that's all. This approach has a couple of drawbacks of course: 1) removing or disabling the addon will destroy the links (restoring will need a maintenance task), 2) the editor bbc will require some adjustment because otherwise it may not recognize properly the new url.
Re: Request - Nofollow attribute for external links
Reply #14 – March 08, 2016, 03:04:16 am
I confirm that links are not broken with this release, but I still see all links as nofollow, no matter if is a post from admin or from a user in the special group