Author: soumik
Modification Description::
Adds canonical URLs to index, viewtopic and viewforum pages as specified by Google (Specify your canonical - Official Google Webmaster Central Blog).
Modification Version:: 0.1.2
Features:
A <link> tag is added to the <head> section of the page.
- For the index page :
Code: Select all
<link rel="canonical" href="https://www.example.com/" />
- For forum pages :
Code: Select all
<link rel="canonical" href="https://www.example.com/viewforum.php?f=X" />
- For threads :
Code: Select all
<link rel="canonical" href="https://www.example.com/viewtopic.php?f=X&t=Y" />
- For global threads* :
Code: Select all
<link rel="canonical" href="https://www.example.com/viewtopic.php?t=Y" />
Compatibility:
- Works with 3.0.+ Including 3.0.6
- Prosilver Compatible
- subSilver2 Compatible
Demo URL: https://animorphsfanforum.com
Modification Download: Latest Version
Note:
Normally, global threads will have canonical URLs like this :
Code: Select all
https://www.example.com/viewtopic.php?t=X
Find :
Code: Select all
'U_CANONICAL' => generate_board_url() . "/viewtopic.$phpEx?" . (($topic_data['topic_type'] == POST_GLOBAL) ? '' : "f=$forum_id&") . "t=$topic_id" . (($start) ? "&start=$start" : ''),
Code: Select all
''
Code: Select all
"f=Y&"