PDA

View Full Version : Converting rel="nofollow" to rel="ugc"


multiuser
09-10-2020, 07:36 AM
Hello,

since March 2020, google have applied the rel=ugc, whith is the appropriate rel for user generated content, like it;s in forums, blog comments etc.

In vb4, in admin panel, there is only the option for rel="nofollow".
How can we convert it to rel="ugc" ?
Probably the modification should take part directly in file, since there is no option in admin panel.
Can someone guide through this?

Thanks in advance for any help!

Hostboard
09-11-2020, 03:51 PM
Normally to add ( rel="nofollow" ) to all external links you would open
Admin CP -> vBulletin Options -> BB Code Settings
and change Add nofollow attribute to URL BB Code to yes

I would assume that where ever this variable is being set, is where it would need to be changed.

z3r0
09-12-2020, 04:36 AM
It looks like line 2673 in includes\class_bbcode.php

Change
return "<a href=\"$rightlink\" target=\"_blank\"" . ($is_external ? ' rel="nofollow"' : '') . ">$text</a>";


to
return "<a href=\"$rightlink\" target=\"_blank\"" . ($is_external ? ' rel="ugc"' : '') . ">$text</a>";

Hostboard
09-12-2020, 09:37 AM
I have modified mine as:


return "<a href=\"$rightlink\" target=\"_blank\"" . ($is_external ? ' rel="nofollow UGC"' : '') . ">$text</a>";


And update the ACP wording accordingly.

z3r0
09-12-2020, 04:26 PM
I have modified mine as:


return "<a href=\"$rightlink\" target=\"_blank\"" . ($is_external ? ' rel="nofollow UGC"' : '') . ">$text</a>";


And update the ACP wording accordingly.

I used "noopener ugc" in mine.

Hostboard
09-13-2020, 07:38 PM
to expand for others following this therad:

rel=”noopener” is an HTML attribute that’s added to all links that are selected to open in a new browser tab

Now my next question is there a pluggin that will put up a warning page that the link they clicked on is an external link and verifying they want to follow?

multiuser
09-14-2020, 08:20 AM
Hello,

thank you for your answers.

I did the above modification, but then, after testing it with an inspect on chrome in an external link, it still shows : rel=nofolow.

I m wondering what could be wrong.

--------------- Added 1600079175 at 1600079175 ---------------

Update: I just noticed that newly created links, get the above -correct- rel.
Older ones, dont get it.
Anyone know how can this be fixed?

z3r0
09-14-2020, 09:36 AM
All mine updated for old links, I'm not sure why yours didn't.

Hostboard
09-14-2020, 09:50 AM
Hello,

thank you for your answers.

I did the above modification, but then, after testing it with an inspect on chrome in an external link, it still shows : rel=nofolow.

I m wondering what could be wrong.

--------------- Added 1600079175 at 1600079175 ---------------

Update: I just noticed that newly created links, get the above -correct- rel.
Older ones, dont get it.
Anyone know how can this be fixed?

Do you use a caching service such as CloudFlare?

multiuser
09-14-2020, 12:59 PM
Do you use a caching service such as CloudFlare?

Nope! But in server we use litespeed which provides a really strong caching system. I ll check it.
Also. could it be some kind of vbulletin caching?

z3r0
09-14-2020, 01:56 PM
Yeah, maybe check if nocache headers are on or off in your vbulletin settings.