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

mobile4persian 05-30-2013 12:30 PM

does it work on 4.2.1?

smirkley 05-30-2013 06:29 PM

Never tried it on 4.2.1, dont see why it wouldnt.

NOTE: I just noticed that if you are using Sections in CMS in the Suite, that the url isnt constructed properly.

I just used a vb:if/else statement and removed the bburl from vbcms entries.

ramesh_umk3 05-31-2013 08:26 AM

Quote:

Originally Posted by mobile4persian (Post 2424935)
does it work on 4.2.1?

it will work on any 4.x.x

mobile4persian 06-03-2013 04:25 PM

i changed it about 3-4 days ago but it doesn't seem to work:
https://www.google.com/search?q=site...l=np&source=hp

GamerPerfection 06-03-2013 05:39 PM

You'll have to wait a lot longer than 4 days for it to update on google.

humb 06-10-2013 08:52 PM

I make this change, I hope the results...

ramesh_umk3 06-11-2013 12:01 PM

you can check your results instantly mate, just place thread url and hit preview
http://www.google.com/webmasters/tools/richsnippets

jmorton 06-11-2013 12:26 PM

just installed on 4.2.1 and it is working.
utilizing microdata will pull more traffic!

gsmlover4u 11-09-2013 02:19 AM

1 Attachment(s)
Quote:

Originally Posted by smirkley (Post 2415847)
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.

i did as you said in post
but showing some error in http://validator.w3.org/
will you plz correct it

SPEEDKILLZ 11-09-2013 05:46 AM

gonna read later

SPEEDKILLZ 11-11-2013 03:50 AM

Quote:

Originally Posted by smirkley (Post 2415847)
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.

So should id use this code or the code from the op?

insidegames 01-31-2014 07:01 AM

Any idea for stars in serps with vbulletin?

ramesh_umk3 01-31-2014 11:32 AM

Quote:

Originally Posted by SPEEDKILLZ (Post 2459863)
So should id use this code or the code from the op?

Google Updated so OP code will not work refer 40th post
https://vborg.vbsupport.ru/showpost....5&postcount=40

Quote:

Originally Posted by insidegames (Post 2478157)
Any idea for stars in serps with vbulletin?

possible but it has some errors
Example link
Here

dethfire 05-02-2014 02:21 AM

I think for 3.8 it will be

Code:

<if condition="$show['breadcrumb']">
<div itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
        <span class="navbar" itemprop="title">&gt; <a href="$nav_url" itemprop="url">$nav_title</a></span></div>
<else />
        $nav_title
</if>


furnival 05-22-2014 03:36 PM

This works great with @Smirkley's code. Many thanks!

fxdigi-cash 11-05-2014 01:05 PM

I tried it on my vb4, but it didn't work even with the test tool by google. I guess we need a fix for this. Thanks

stevieb 11-11-2014 02:30 PM

does this work in vB 4.2?

stevieb 11-11-2014 06:38 PM

Quote:

Originally Posted by smirkley (Post 2415847)
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.

Testing on our site - looks good so far - thanks.

For reference, the original code that belongs in -> Navbar_Link is as follows (in case anyone needs to revert back) - for vB4.2.2 pl.1

Code:

<vb:if condition="$show['breadcrumb']">
        <li class="navbit"><a href="{vb:raw nav_url}">{vb:raw nav_title}</a></li>
<vb:else />
        <li class="navbit lastnavbit"><span>{vb:raw nav_title}</span></li>
</vb:if>


insidegames 11-29-2014 08:59 PM

Quote:

Originally Posted by ramesh_umk3 (Post 2478181)
Google Updated so OP code will not work refer 40th post
https://vborg.vbsupport.ru/showpost....5&postcount=40



possible but it has some errors
Example link
Here

do you have a code for this?

ramesh_umk3 11-30-2014 01:22 PM

its already provided in my previous comments any how below is the code

Code:

<vb:if condition="$show['breadcrumb']">
<span itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit"><a href="{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>


insidegames 12-02-2014 04:26 PM

Quote:

Originally Posted by ramesh_umk3 (Post 2524971)
its already provided in my previous comments any how below is the code

Code:

<vb:if condition="$show['breadcrumb']">
<span itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit"><a href="{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>


i'm looking for a star rating in serps.

[IMG]http://i.imgur.com/tUXihWM.png[/IMG]

ramesh_umk3 12-03-2014 11:39 AM

Nope due to some reason they are not showing up when links are indexed

Alan_SP 12-16-2014 12:33 PM

Just in case that someone wants to use lower breadcrumb (mod made by Lynne), this would cause problem with this template modification, as there would be two breadcrumbs and thus double information.

So I hide lower breadcrumb from guests (and Google and other search engines). All members can see and benefit from lower breadcrumb and they use site more actively.

Anyway, if someone want to use this two together, here's the link to modified Lynne's mod: https://vborg.vbsupport.ru/showpost....&postcount=234

yjmalmsteen 12-27-2014 09:38 PM

smirkley's code works like charm! Thanks so much mate :)

davidg 01-26-2015 10:53 PM

Someone can make smirkley's code working with vb 3.8 ?
Thank You

m7sen 05-04-2015 03:53 AM

Quote:

Originally Posted by davidg (Post 2534735)
Someone can make smirkley's code working with vb 3.8 ?
Thank You

yes plese

we want it working with vb 3.8

marysnow786 03-12-2016 07:14 PM

modules available for vb 3.8.x

GHRake 05-16-2016 12:45 PM

Not sure if one of my plugins/mods is screwing this up but when I use either the OP's code or the code that was suggested in this post

Using either code I get an error in google markup validator:
https://vborg.vbsupport.ru/external/2016/05/17.png

Obviously this is because the last breadcrumb is not a link. Not wanting any scary google errors I just shortened up navbar_link to make each breadcrumb a link and now no more errors.
Code:

<div itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit"><a href="{vb:raw nav_url}" itemprop="url"><span itemprop="title">{vb:raw nav_title}</span></a></li>
</div>

If someone thinks this is a bad idea, let me know

ramesh_umk3 07-27-2016 03:31 PM

or you can use my code which is still working fine with latest google updates ..

https://vborg.vbsupport.ru/showpost....1&postcount=70

Tested on google structured data analysis with 0 errors :)

https://vborg.vbsupport.ru/external/2016/07/2.png

ezak 07-28-2016 03:59 AM

Quote:

Originally Posted by ramesh_umk3 (Post 2574029)
or you can use my code which is still working fine with latest google updates ..

https://vborg.vbsupport.ru/showpost....1&postcount=70

Tested on google structured data analysis with 0 errors :)

https://vborg.vbsupport.ru/external/2016/07/2.png

I use your code, and its show me 1 error
https://vborg.vbsupport.ru/external/2016/07/3.png


All times are GMT. The time now is 10:25 AM.

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.02596 seconds
  • Memory Usage 1,850KB
  • 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
  • (10)bbcode_code_printable
  • (11)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
  • (40)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