vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Board Optimization - [SEO] Add Microdata Breadcrumbs (https://vborg.vbsupport.ru/showthread.php?t=277570)

smirkley 03-22-2013 03:22 PM

That seemed to do the trick.

Verified and proven.

Thanks given ramesh_umk3 !

smirkley 03-22-2013 05:01 PM

Since it is now displaying properly, I started to analyze the links themselves.

my example of how the microdata is displaying for me....

w ww.xxxxxx.com › ... › Main Category › Forum

1 - The main url is not hyperlinked

2 - the category link points to ht tp://www.xxxxxx.com/threads/forums/forum name

3 - the forum link points to ht tp://www.xxxxxx.com/threads/forums/forum name

(spaces added in urls to prevent auto-linking here)

Note the latter two are just completely incorrect as the "/threads" should not be in there at all in order to be a correct link on my site. Clicked on vB just returns "no thread specified" error.

Note that my real breadcrumb links on my website are correct, in that the phrase "/threads" is not in the url.
So somewhere between my site, and google, it is picking up and adding that phrase to the url.

Any help would be severely appreciated.

edit to add - I am testing a change with my root url hard coded into line 3
h ttp://www.xxx.com/{vb:raw nav_url}

as I noticed in my page source example the urls do not contain the root domain in them, and I suspect that this is where the extra text is being injected into the microdata url, as the root url would be domain.com/thread in reference to where the breadcrumb exists to google. The change does reflect full url properly in my source now. This may fix problem 1,2, and 3 together.

I will report back when I can see a change on google, good or bad.

smirkley 04-12-2013 01:33 AM

OK, yup,... I am an idiot. lol

1 - I decided I was smart and changed the http://data-vocabulary.org references to use my domain url. Wrong, dont do it, leave it as is, it works and is not just someone elses domain.

2 - a href="{vb:raw nav_url}" does not work as described, the microdata url only appends the actual page spidered url to the url also in the address bar.

IE: your threads and catagory links will look like this in microdata,...
/threads/thread....
/forum/forums....

Dead 404's, not good.

instead use this,... href="{vb:raw vboptions.bburl}/{vb:raw nav_url}"


To make this mod work out of the box, use this code replacement which requires no editing to work on your forum no matter the url or sub directory location...

Code:

<vb:if condition="$show['breadcrumb']">
<span itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit"><a href="{vb:raw vboptions.bburl}/{vb:raw nav_url}" itemprop="url"><span itemprop="title">{vb:raw nav_title}</span></a></li>
</span>
<vb:else />
<span itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit lastnavbit"><span><span itemprop="title">{vb:raw nav_title}</span></span></li>
</span>
</vb:if>

This is tested on my site and Google microdata test site.
Includes any necessary changes needed through this thread.

John Lester 04-12-2013 08:38 AM

Quote:

Originally Posted by smirkley (Post 2415847)
To make this mod work out of the box, use this code replacement which requires no editing to work on your forum no matter the url or sub directory location...

Code:

<vb:if condition="$show['breadcrumb']">
<span itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit"><a href="{vb:raw vboptions.bburl}/{vb:raw nav_url}" itemprop="url"><span itemprop="title">{vb:raw nav_title}</span></a></li>
</span>
<vb:else />
<span itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit lastnavbit"><span><span itemprop="title">{vb:raw nav_title}</span></span></li>
</span>
</vb:if>

This is tested on my site and Google microdata test site.
Includes any necessary changes needed through this thread.

Just implemented this change on all of my styles. Will report back when I see the results :)

smirkley 04-12-2013 11:50 AM

John,... you can test it out here and now using this tool if you dont want to wait.

http://www.google.com/webmasters/tools/richsnippets

Just enter the url to one of your threads.

smirkley 04-14-2013 04:12 AM

I have just validated actual google results are correct with my modified version works as desired.

Now I just have to wait for the other thousands of other links of mine on google to get corrected from the original code attempt.

John Lester 04-15-2013 11:20 PM

Yup using smirkley's modified code brings excellent results :cool:

smirkley 05-13-2013 02:25 AM

I am just surprised this mod isnt being used more.
It works, period. (modified of course)

Yes I think people should bring their forums back in to the 21st century in the eyes of google.
(etc)

GamerPerfection 05-24-2013 06:52 PM

Just installed this. Using the richsnippets it seems to be working.

freak46 05-25-2013 05:53 PM

just installed now waits until google update my listing


All times are GMT. The time now is 10:37 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.01070 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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