vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   Mini Mods - Global rel canonical for vbulletin as vBSEO v1.1 final, remove duplicate content (https://vborg.vbsupport.ru/showthread.php?t=225117)

abdobasha2004 10-12-2009 10:00 PM

Global rel canonical for vbulletin as vBSEO v1.1 final, remove duplicate content
 
1 Attachment(s)
This is a simple mod. to apply rel="canonical" to vbulletin pages.
Presented from : http://www.nmisr.com/vb/

this is applied for : showthread, forumdisplay and forumhome.
Template Edits : 3
Value : SEO value :
1 - Prevent duplicate content
2 - Better page rank assignment to your page as a result

3 steps :
Open vbulletin admin pannel ---> Edit style templates ---> {choose your used style}
then :

1- Find Showthread template, then you have 2 options :
i) include thread pages (if the thread have multiple pages) then Find </head> and before it add :
HTML Code:

<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
<!-- /100fm6.com canonical -->

ii) Include only the first page of threads then Find </head> and before it add :
HTML Code:

<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/showthread.php?t=$threadinfo[threadid]" />
<!-- /100fm6.com canonical -->

2- Find Forumhome template, then Find </head> and before it add :
HTML Code:

<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]" />
<!-- /100fm6.com canonical -->

3- Find Forumdisplay, then you have 2 options :
i) include forumdisplay pages (Recommended) then Find </head> and before it add :
HTML Code:

<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/forumdisplay.php?f=$foruminfo[forumid]<if condition="$pagenumber>1">&page=$pagenumber</if>" />
<!-- /100fm6.com canonical -->

ii) Include only the first page of forums then Find </head> and before it add :
HTML Code:

<!-- 100fm6.com canonical -->
<link rel="canonical" href="$vboptions[bburl]/forumdisplay?f=$foruminfo[forumid]" />
<!-- /100fm6.com canonical -->

for better SEO try to make this compatible with sitemap options

For any suggestion, I will be glad to here from you ...
Thanks to FRDS who have made this as a product

ChopSuey 10-12-2009 10:52 PM

This is duplicate content already.
https://vborg.vbsupport.ru/showthread.php?t=225080

abdobasha2004 10-12-2009 11:00 PM

nope
it is version 1.1
it is now for all pages : threads, forum main and forums

MagicThemeParks 10-13-2009 12:43 AM

So, is this one the best option or the other one?

goxy63 10-13-2009 02:05 AM

Obviously this one, it even says on previous version "better" one (on a link to this one)

What are bad(if there are any) and what are good sides of this mod, please elaborate a bit
I mean this code looks pretty much simple even for me as a noob here, why vb wouldnt have such a thing by default?

Thanks

thincom2000 10-13-2009 05:37 AM

The "include pages" variants don't validate as XHTML 1.0 Transitional.

This can be fixed using &amp; instead of &

erel34 10-13-2009 05:37 AM

Thanks

abdobasha2004 10-13-2009 01:55 PM

Quote:

So, is this one the best option or the other one?
of course this one version 1.1

Quote:

why vb wouldnt have such a thing by default
the latest version of vbulletin was made before rel canonical ever existed ! also it is an optional SEO task that may not be found even in vBulletin 4.


Quote:

The "include pages" variants don't validate as XHTML 1.0 Transitional.

This can be fixed using &amp; instead of &
thanks I do not know how I missed this...
Code changed ....

Lustikus 10-13-2009 03:43 PM

does this mod work for TFseo as well as for vbseo?

abdobasha2004 10-13-2009 03:57 PM

Quote:

does this mod work for TFseo as well as for vbseo?
yea
and vbseo has it already in the latest version


All times are GMT. The time now is 10:30 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.01141 seconds
  • Memory Usage 1,739KB
  • 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
  • (5)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete