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

abdobasha2004 03-27-2010 09:01 AM

CODE UPDATED..... please remove "amp:" from code of multiple page indexing ...

Dorgham 10-22-2012 03:56 AM

Thank You AbdoBasha :)

yahsuah 11-20-2012 10:26 AM

Thank you!

I had been researching for this...

dethfire 05-04-2013 01:01 PM

I've been using this and Bing Webmaster tools gives me a warning

"Large number of pages pointing to the same canonical URL for domain"

"Canonical tags can be used to help de-dupe URLs for pages with the same or very similar content. Bing has detected that your site is using what appears to be the same canonical URL for a large number of pages that are not the same. This may be indicative of a problem with your HTML template, content publishing system, or site code. You should review the source of your pages and check if the URLs used inside the <link rel="canonical" href="<url>" /> are not accidentally pointing to the same location for all (or too many) pages."

dethfire 05-04-2013 01:27 PM

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

This is not working. I go to say page 4 and it doesn't add the pagenumber to the url

matrex722 05-29-2013 08:33 AM

i hope it work good
thanks for sharing it

yahsuah 08-15-2014 04:49 PM

Thanks!

blackberry 08-27-2014 06:27 PM

does it work for vb 4.x?

ozzy47 08-27-2014 06:34 PM

No as this was written for vB3 so it would not work in vB4

blackberry 08-30-2014 10:14 AM

Quote:

Originally Posted by ozzy47 (Post 2512906)
No as this was written for vB3 so it would not work in vB4

thanks Any way to get rid off bing canonical error :-s

RELAX13 10-29-2014 12:14 PM

Good Id :D


All times are GMT. The time now is 05:22 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.01222 seconds
  • Memory Usage 1,763KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)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