Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
[SEO] Add Microdata Breadcrumbs Details »»
[SEO] Add Microdata Breadcrumbs
Version: 1.00, by tafreeh tafreeh is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Category: Board Optimization - Version: 4.x.x Rating:
Released: 01-25-2012 Last Update: 01-25-2012 Installs: 167
Template Edits
 
No support by the author.

Hello.
Before you find out what this mod does, you need to have some knowledge of Microdata.

Now its time to take advantage of this wonderful feature; and we will label our breadcrumbs to describe it's type to Google for better understanding and to presenting your site better in Google search result.

In order add microdata tags in our breadcrumb here is what we need to do:

(please take backup of your template before performing following steps)

Step 1:

Find and Replace everything in navbar_link template with the following code:
Code:
<vb:if condition="$show['breadcrumb']">
<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>
<vb:else />
<div itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
    <li class="navbit lastnavbit"><span><span itemprop="title">{vb:raw nav_title}</span></span></li>
</div>
</vb:if>
Step 2:
Code:
Hit Save button !!
And That's it you are done. Now you just have to wait until Google show your website in search result like this:


Also check following articles for better understanding:

http://support.google.com/webmasters...8472&ctx=topic
http://support.google.com/webmasters...8472&ctx=topic
http://support.google.com/webmasters...8472&ctx=topic


Thank You

Download Now

File Type: txt Microdata_Breadcrumb.txt (460 Bytes, 504 views)

Screenshots

File Type: png Untitled.png (103.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 10-20-2018, 09:00 PM
NeshteR054 NeshteR054 is offline
 
Join Date: Sep 2014
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by m7sen View Post
any help please for vb3.8 ?
Find your theme => navbar_link
replace
Code:
<if condition="$show['breadcrumb']">
<div itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span class="navbar"><a href="$nav_url" itemprop="url"><span itemprop="title">$nav_title</span></a></span></div>
<else />
<div itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
<span itemprop="title">$nav_title</span></div>
</if>
Reply With Quote
  #93  
Old 01-22-2020, 10:35 PM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So Google has depreacted data-vocabulary.org and some of us are getting warnings from Google. To that end; any Schema.org microdata experts care pick out problems with this code before I implement same?

In navbar_link

PHP 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>

<
script type="application/ld+json">
{
 
"@context""http://schema.org",
 
"@type""BreadcrumbList",
 
"itemListElement":
    [
    {
   
"@type""ListItem",
   
"position""{vb:raw breadcounter}",
   
"item":
    {
     
"url""https://www.yourforumurl.com/{vb:raw nav_url}",
     
"name""{vb:raw vboptions.bbtitle} | {vb:raw nav_title}"
    
}
    }
    ]
}
</
script
As you can see I am leaving the default VB code in there as the styling is fine for me and Google prefers json for this application anyway.

*Edit: Added this plugin https://vborg.vbsupport.ru/showthread.php?t=323652 to take care of the static counter.

Hook Location: navbits
Plugin PHP Code:
PHP Code:
$breadcounter $counter;
vB_Template::preRegister('navbar_link', array('breadcounter' => $breadcounter)); 
Then add {vb:raw breadcounter} into the navbar_link template.
Reply With Quote
4 благодарности(ей) от:
final kaoss, RichieBoy67, rushabh, z3r0
  #94  
Old 01-23-2020, 03:06 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

only question I have is how is the position being updated if you have 1 static'd in?
Reply With Quote
  #95  
Old 01-29-2020, 12:29 AM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

testing to this URL from the google search console --> https://www.sportscardforum.com/thre...t-Fat-Pack-Box

Got the following on a live test
Quote:
6 items detected: Some are invalid
Invalid items are not eligible for Google Search's rich results. Learn more
the last element is throwing the following

Quote:
Unnamed item
2 errors
type
BreadcrumbList
itemListElement
Missing field "position"
Either "name" or "item.name" should be specified
type
ListItem
item
id
https://www.sportscardforum.com/
type
Thing
title
Sports Card Forum
Reply With Quote
  #96  
Old 01-29-2020, 05:17 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this

https://vborg.vbsupport.ru/showthread.php?t=323652
Reply With Quote
3 благодарности(ей) от:
Kane@airrifle, scottkoz20, z3r0
  #97  
Old 01-29-2020, 08:12 PM
scottkoz20 scottkoz20 is offline
 
Join Date: Dec 2015
Location: Lewiston, NY
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks gents!
Reply With Quote
  #98  
Old 01-31-2020, 11:06 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This still needs some work on it. Breadcrumbs show a error in google webmaster tools.

It complains about

Error Missing field "position"

Inspection of an example url shows.
Attached Images
File Type: jpg missing-field.jpg (49.1 KB, 0 views)
Reply With Quote
  #99  
Old 02-01-2020, 12:12 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting zero errors with https://vbulletin.org/forum/showpost...8&postcount=92
Reply With Quote
  #100  
Old 02-01-2020, 12:15 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's what I was talking about. Detected it today with the fix implemented yesterday.
Attached Images
File Type: jpg breadcrumb2.jpg (48.9 KB, 0 views)
Reply With Quote
  #101  
Old 02-01-2020, 12:24 AM
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Location: ZA
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have noticed it can take about 3 days for the fix validation to come through. Do a live url test and it should show zero errors.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05562 seconds
  • Memory Usage 2,366KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (20)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete