Implemented nofollow links evolve to ugc

This suggestion has been implemented. Votes are no longer accepted.
There’s no rush to change this. This is a new standard, and only supported by Google for now. It will maybe start to matter in 6 months, when Google will change how they treat nofollow (“signal” not “directive”). Intention of my post is to signal that URLs inserted by our users should have rel=“ugc nofollow” according to a document released by Google yesterday. There’s nothing immediate about it all, and in a timeframe of months nothing will break...
 
Wordpress is making the change for comment links
Dokuwiku is too! I had the pleasure of getting to make my first pull request for changing "nofollow" to "ugc nofollow" and it got approved :)
 
@dethfire @StarArmy
Where we can modify this code ourselves?

If you're still interested, here's how you can do it.

Go to Xenforo-Install/src/XF/BbCode/Renderer/Html.php

find

PHP:
        if (!$linkInfo['trusted'] && !empty($options['noFollowUrl']))
        {
            $rels[] = 'nofollow';
        }

You obviously know what to do next. As in, change

$rels[] = 'nofollow';
to
$rels[] = 'nofollow ugc';

Next up, go to

Xenforo-Install/src/XF/Template/Templater.php

find
PHP:
        if (!$linkInfo['trusted'] && $options['noFollowUrl'])
        {
            $rels[] = 'nofollow';
        }

Do the same as above.

Profit!! :D

Now i wish i knew how to find out if the user is a guest or member so i could completely hide links from guests.
 
@dethfire @StarArmy


If you're still interested, here's how you can do it.

Go to Xenforo-Install/src/XF/BbCode/Renderer/Html.php

find

PHP:
        if (!$linkInfo['trusted'] && !empty($options['noFollowUrl']))
        {
            $rels[] = 'nofollow';
        }

You obviously know what to do next. As in, change

$rels[] = 'nofollow';
to
$rels[] = 'nofollow ugc';

Next up, go to

Xenforo-Install/src/XF/Template/Templater.php

find
PHP:
        if (!$linkInfo['trusted'] && $options['noFollowUrl'])
        {
            $rels[] = 'nofollow';
        }

Do the same as above.

Profit!! :D

Now i wish i knew how to find out if the user is a guest or member so i could completely hide links from guests.
But upgrading will overwrite
 
Apparently not. I just upgraded to 2.10 and the code is still there. So it will only be removed when these files are changed which should be rare
Is this posting still up to date?

 
This is implemented in XF 2.2 and was announced here:

There's very little benefit in modifying code now to account for this but at least the wait for official support isn't too far away.
 
Top Bottom