Custom BBCode to Force Link as Nofollow

XenForo Custom BBCode to Force Link as Nofollow 2.2

Register & Get access to index
Compatible XF Versions
2.2
9154025e711c3.png

In Xenforo 2.2.1, all external links for all usergroups are nofollow by default.

For specific groups, this can be overridden at AdminCP >> Groups & permissions >> User group permissions >> General permissions >> {selected usergroup} >> Bypass "nofollow" in submitted content links

On certain forums, I have used this so that links posted by specified usergroups like admins are set to dofollow (this was the default in older versions of Xenforo).

But there may still be occasions, for example links in paid promoted posts, where it is desirable to force links in the post to be nofollow even for groups which bypass that setting.

This custom BBCode allows you to do that.

Create Custom nofollow BBcode​

I have attached the exported XML file for this BBcode. However, to do this manually, in case you want to customize your local version, first go to AdminCP >> Content >> BB code >> Custom BB codes

Click on Add BB code and set it up as follows:

Usage​


Click on nofollow icon shown above. This inserts the following into the text editor:

[NOFOLLOW=][/NOFOLLOW]

Now add the URL after the = sign (no single or double quote marks needed) and the anchor text after the first closing bracket:

[NOFOLLOW=https://website.com]Anchor text or page title[/NOFOLLOW]

to get this (since this is not implemented on this site, the BBcode isn't parsed here)

[NOFOLLOW=https://website.com]Anchor text or page title[/NOFOLLOW]

If you check page source, you will see this:

<a href="https://website.com/" rel="nofollow">Anchor text or page title</a>

Suggestions for improvements to this are welcomed. :)

14e30d4ba8734.png

ec1f564eb37c5.png

0ca40c3de0926.png
Author
XenForo
Views
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from XenForo

Back
Top Bottom