Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2020, 07:36 AM
multiuser multiuser is offline
 
Join Date: Oct 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 09-11-2020, 03:51 PM
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Location: CT
Posts: 843
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 09-12-2020, 04:36 AM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>";
Reply With Quote
Благодарность от:
Hostboard
  #4  
Old 09-12-2020, 09:37 AM
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Location: CT
Posts: 843
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 09-12-2020, 04:26 PM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hostboard View Post
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.
Reply With Quote
  #6  
Old 09-13-2020, 07:38 PM
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Location: CT
Posts: 843
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #7  
Old 09-14-2020, 08:20 AM
multiuser multiuser is offline
 
Join Date: Oct 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 09-14-2020, 09:36 AM
z3r0's Avatar
z3r0 z3r0 is offline
 
Join Date: Apr 2005
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All mine updated for old links, I'm not sure why yours didn't.
Reply With Quote
  #9  
Old 09-14-2020, 09:50 AM
Hostboard's Avatar
Hostboard Hostboard is offline
 
Join Date: May 2002
Location: CT
Posts: 843
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by multiuser View Post
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?
Reply With Quote
  #10  
Old 09-14-2020, 12:59 PM
multiuser multiuser is offline
 
Join Date: Oct 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hostboard View Post
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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04418 seconds
  • Memory Usage 2,263KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete