vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Converting rel="nofollow" to rel="ugc" (https://vborg.vbsupport.ru/showthread.php?t=328222)

multiuser 09-10-2020 07:36 AM

Converting rel="nofollow" to rel="ugc"
 
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
Code:

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

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

Hostboard 09-12-2020 09:37 AM

I have modified mine as:

Code:

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

Quote:

Originally Posted by Hostboard (Post 2603946)
I have modified mine as:

Code:

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 [DATE]1600079175[/DATE] at [TIME]1600079175[/TIME] ---------------

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

Quote:

Originally Posted by multiuser (Post 2603959)
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 [DATE]1600079175[/DATE] at [TIME]1600079175[/TIME] ---------------

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

Quote:

Originally Posted by Hostboard (Post 2603962)
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.


All times are GMT. The time now is 08:42 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01213 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete