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)
Arghh!!
I wanted to answer sooner, but I left it open on the other computer... :-[
It shouldn't be that difficult, just a search&replace of the current url bbcode implementation.
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?
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
You'd need to get the permissions of the author. You'd want to do that before parse_bbc() to do a single query / cache request. A lot of work for something like this. Not sure anyone would want to make their site slower for nofollow on links.
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
Just because I'm very unfamiliar with XF: does that mean the group can be made allowed to
post "follow" links?
you can find all info here https://goo.gl/41cYkI
from default in XF only admins and moderators can post links bypassing the nofollow attribute, with that addon other membergroups may bypass the nofollow attribute. No "dofollow" attribute is added, only nofollow attribute is removed
Screenshot from this addon:
(http://i.imgur.com/X4nCQPB.png)
Why I am asking this?
I sell a couple of banners and a couple of promotional article into my forum, not a big ammount but it covers a good part of my vps costs. Last year I received a good price even if my forum was less visited than it is now, this year the forum is almost 3 times bigger (users, topics, and number of visits in analytics). The offer I had this year is half than the precedent one because I have lots of external links. Here is the answer I received:
Since a similar addon will make me gain something I think this addon should be asked as paid.
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).
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.
I didn't test it much, it should work, but I'd test it on a test site, not live. O:-)
ETA: attachment removed.
Since I see one download I'll post it there so that its an "update". :P
The one attached here includes the replacement of the editor code, so that the new schema is recognized by the editor as well. :)
ETA: forgot to mention, it has also the permission.
ETA2: I forgot to mention another important thing, any old link is set as "nofollow", so if you have old links that should not be "nofollow", you have to edit the message and restore the "normal" url bbcode.
ETA: attach removed.
Sorry for the delay and thanks for watching into this. I tested the addon in localhost, but it was an imported smf so I choosed to start from a clean install.
http://sharkracingclub.it/elktest/index.php?topic=1
Here is what I did:
- created 2 users,
- user "biguser" is in the group "nofollow" where I set the permission to post nofollow links
- "user" is a regular user with ElkArte default permission
I tried to edit as admin my post and look the result http://sharkracingclub.it/elktest/index.php?topic=1.msg2#msg2
The text I wanted to insert is:
copy/pasted link:
www.google.com
link inserted with url:
[url=http://www.google.com]Google[/url]
As I can see all links are nofollow and it breaks link for the special group and also for the admin.
if you want to test, both users are using the pass 123456
I know part of that one! :D
I changed the code for a reason, but now I don't remember exactly what was the reason any more... :-[
So... let's just assume I was not in the right state of mind the other day and the one attached here is the correct package. O:-)
ETA: attachment removed.
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
And now that I wake up completely, I see what I was aiming at with my previous code. xD
Ok, 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.
is getting better :D
it works for the urls inserted with URL bbcode, but not with direct links
Which part is not working? O:-)
the first 3 links http://sharkracingclub.it/elktest/index.php?topic=1.msg8#msg8
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. ;)
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?
sorry
@derived but I don't understand
This has nothing in common with attachments ;)
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. :P
@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?
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...
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. ;)
What is it mirc url catcher? :-[
Don't worry about that, if I work on something it's because I want to, otherwise I just let it slip through. :P
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. :P
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. O:-)
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. :P
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
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 O:-)
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
sorry to bump this again, are there any news? O:-)
Something I just found on internet
A video by Matt Cutts
https://youtu.be/x4UJS-LFRTU
Read more : https://support.google.com/webmasters/answer/96569?hl=en&ref_topic=4617741
I was looking into a simplified version of this, but I'm having a "design" doubt and I'd like to gather opinions.
What I'm trying to achieve:
1) nofollow at the board level,
2) optional nofollow for signatures.
So, give the possibility to create boards in which the nofollow attribute is applied and others where the nofollow attribute is not applied. This, in conjunction with an optional setting to add the nofollow to all the signatures would allow a rather fine grained control.
Now, the doubt is this one: the setting is one that goes into the create/edit board, but does it deserve a column in the boards table?
I'm a bit wary about it, because despite being a "board-level" setting, to me is something that would better served with just an entry in the settings table. On the other hand, a simple entry doesn't "sound" nice, but I'm not sure.
Opinions?
I think it could be best handled as a board permission ... easy to set up a no-follow permission profile and apply as needed.
No problem for me to use board permission, but bbcode will change for nofollow links? Thanks Emanuele for not forgetting about this
Sorry to bump this again O:-)
Ouch... sorry, I completely lost that one... :-[
Looks like I'm missing topics in the last period, my reading pattern is changing for the worse. I have to find a new pattern. nods
Moved addon to its own addon thread .. http://www.elkarte.net/community/index.php?topic=4682.0