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)

NeshteR054 10-20-2018 09:00 PM

Quote:

Originally Posted by m7sen (Post 2596028)
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>


Kane@airrifle 01-22-2020 10:35 PM

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.

scottkoz20 01-23-2020 03:06 PM

only question I have is how is the position being updated if you have 1 static'd in?

scottkoz20 01-29-2020 12:29 AM

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

final kaoss 01-29-2020 05:17 PM

try this

https://vborg.vbsupport.ru/showthread.php?t=323652

scottkoz20 01-29-2020 08:12 PM

thanks gents!

final kaoss 01-31-2020 11:06 PM

1 Attachment(s)
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.

Kane@airrifle 02-01-2020 12:12 AM

Getting zero errors with https://vbulletin.org/forum/showpost...8&postcount=92

final kaoss 02-01-2020 12:15 AM

1 Attachment(s)
Here's what I was talking about. Detected it today with the fix implemented yesterday.

Kane@airrifle 02-01-2020 12:24 AM

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.


All times are GMT. The time now is 08:04 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.02615 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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