Re: Request - Nofollow attribute for external links Reply #15 – March 08, 2016, 04:03:35 am And now that I wake up completely, I see what I was aiming at with my previous code. xDOk, now I even wrote some unit testing to be sure what comes out is the expected behaviour (hoping not to have messed up the tests themselves LOL). So, the attached one should work as expected... I hope.
Re: Request - Nofollow attribute for external links Reply #16 – March 08, 2016, 04:39:28 am is getting better it works for the urls inserted with URL bbcode, but not with direct links
Re: Request - Nofollow attribute for external links Reply #17 – March 08, 2016, 04:51:16 am Which part is not working?
Re: Request - Nofollow attribute for external links Reply #18 – March 08, 2016, 05:01:39 am the first 3 links http://sharkracingclub.it/elktest/index.php?topic=1.msg8#msg8
Re: Request - Nofollow attribute for external links Reply #19 – March 08, 2016, 05:58:44 am Ahh okay, so even if the user is allowed, auto-linking doesn't get the "follow".Yep, this is a limitation and there is no good way to fix it, so I let it pass.There is no good way because the auto-linking happens at parse_bbc-time, so it cannot be checked without wasting "time" fetching all the users groups and permissions (quite a bit of work) on each and every parse_bbc (that by chance is not even that easy if we want to let it work in the future as well). Do the auto-linking at posting-time, on the other hand, is not easy either because it may breaks other stuff (e.g. video auto-embedding).And since it's just a matter of wrap the url into and url tag I considered it not worth fixing.
Re: Request - Nofollow attribute for external links Reply #20 – March 10, 2016, 04:51:25 am Thank you Emanuele for all your help! Even if direct links (without url) from admins and special group has the nofollow attribute this is not a big problem, if I really want to obtain a link without nofollow I have to use the url tag which is fine for me Just one question, is it possible to not apply this addon for the links to my domain?p.s. I saw a similar addon to other forum script which does the same thing but in a different way, no membergroups permission but only a whitelist of domains. So if a domain is in the whitelist, no matter who is posting the link, it will not have the nofollow attribute. Is this approach easier to implement into elkarte?
Re: Request - Nofollow attribute for external links Reply #21 – March 10, 2016, 07:45:33 am sorry @derived but I don't understand
Re: Request - Nofollow attribute for external links Reply #22 – March 10, 2016, 08:21:00 am This has nothing in common with attachments
Re: Request - Nofollow attribute for external links Reply #23 – March 10, 2016, 12:12:22 pm Quote from: radu81 – March 10, 2016, 04:51:25 amJust one question, is it possible to not apply this addon for the links to my domain?p.s. I saw a similar addon to other forum script which does the same thing but in a different way, no membergroups permission but only a whitelist of domains. So if a domain is in the whitelist, no matter who is posting the link, it will not have the nofollow attribute. Is this approach easier to implement into ElkArte?A white-list should be generally less of a problem and should be applicable at parse_bbc-time instead of preparsecode. That said, mix the two approaches could be less straightforward, but doable.The only thing pending is that to be completely honest, I'm not sure it is worth the hassle.
Re: Request - Nofollow attribute for external links Reply #24 – March 10, 2016, 12:17:38 pm @derived if I understood what you are proposing, I think it's not really related and probably it should be discussed more in details.Let me try to recap: instead of an "hard" selection of allowed attachment extension (i.e. "this set of extensions is allowed, anything else is rejected"), you would like a kind of "soft" list (along the lines "this set of extensions is allowed, the rest are uploaded, but not downloadable directly, but via some kind of copy&paste thingy like google does for potentially dangerous websites").Did I get it right?
Re: Request - Nofollow attribute for external links Reply #25 – March 10, 2016, 02:28:20 pm Well I don't want to make you loose time on this, but probably there is another simpler way : set all links as no follow and remove the nofollow attribute only for links inserted with iurl bbcode. I know it doesn't have much sense , but nobody is using the iurl code on my forum, I might say it's a hidden bbcode, not every script has this bbcode. That could be made with just a few edits, I understand I have to controll every update but is the quickest way. What do you think? P. S. I'm not an expert in seo and I don't know if this will bring me any vantage, but if most forums are having nofollow links into core from default (xf, wbb, kunena, vanilla, bbpress) maybe worth some time to invest into this for the next releases 1.1.x or 2.0...
Re: Request - Nofollow attribute for external links Reply #26 – March 10, 2016, 03:12:23 pm Quote from: derived – March 10, 2016, 02:48:18 pmthe attachment system is already designed to look at certain location, for certain identifierscopy and split off that "system" so it works separately, Attachments and bbcode are two different beasts entirely, the attachments check on extensions is just a "pick the last three chars of the string and compare". Easy.URLs are 1) mixed in the text (so the first thing is to actually find the URL), 2) the domain is mixed in the string (there could be http, https, no http at all and only www, could be mail, ftp, several other variants.The two problems are different enough not to be easily mixed.
Re: Request - Nofollow attribute for external links Reply #27 – March 10, 2016, 03:44:34 pm What is it mirc url catcher?
Re: Request - Nofollow attribute for external links Reply #28 – March 10, 2016, 03:48:13 pm Quote from: radu81 – March 10, 2016, 02:28:20 pmWell I don't want to make you loose time on this, Don't worry about that, if I work on something it's because I want to, otherwise I just let it slip through. Quote from: radu81 – March 10, 2016, 02:28:20 pmbut probably there is another simpler way : set all links as no follow and remove the nofollow attribute only for links inserted with iurl bbcode. I know it doesn't have much sense , but nobody is using the iurl code on my forum, I might say it's a hidden bbcode, not every script has this bbcode. That could be made with just a few edits, I understand I have to controll every update but is the quickest way. What do you think? It's not that I don't know how to solve the problem even with the code at hand, it's just that now I'm not sure what you exactly want, so I'm wary at coding it in a way that is good to solve the problem in a certain way just to discover tomorrow, that the real goal was another and could have been implemented in a totally different way. And it's not so hypothetical, because it's what happened just now: nofollow based on permissions require an approach, nofollow based on a white-list can be achieved much better in another way. You first asked for permissions, now for white-list. So, should I now mix the two approaches and have the worst possible scenario of complexity or should I just give up one of the two? And if the latter which one should I drop? iurl is another matter altogether. Quote from: radu81 – March 10, 2016, 02:28:20 pmP. S. I'm not an expert in seo and I don't know if this will bring me any vantage, but if most forums are having nofollow links into core from default (xf, wbb, kunena, vanilla, bbpress) maybe worth some time to invest into this for the next releases 1.1.x or 2.0...Well, if we want to nitpick:1) some of the most famous forums of the world (reddit, stackoverflow) don't even open new windows on each and every link,2) another one (whose glory is actually in the past, 4chan) is not even creating clickable links out of URLs.There is variety, I tend to dislike the nofollow, simply because if I link something, it means it's relevant somehow, and if something is relevant it should just get the recognition it deserves (and I tend to expect others do the same with my sites, but I'm pretty sure it's not the case... sigh).Following the current (and last 5 years) trend, I guess in a couple of years nofollow will not be a problem because search engines google will not give a sh**t about links and just care about what it thinks it's important and all these discussions will be mood. TL;DR: tell me what you want and let's make it a deal. Don't worry about what I posted, it's not against you, it's just that this evening I'm in a ranting mood. LOL
Re: Request - Nofollow attribute for external links Reply #29 – March 14, 2016, 06:08:28 am I have to admit I did a mess in this topic and I escuse for that, was not my intention. As you can see lots of ideas and all confused What I am trying to obtain is to set all external links as nofollow and and allow links without nofollow atribute only for some domains. The "membergroup permission" is not really needed and in my case probably a whitelist could work better. Could this be simplier than the previous addon with membergroup permission?thank you in advance