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)

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>



All times are GMT. The time now is 01:44 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.01109 seconds
  • Memory Usage 1,751KB
  • 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_code_printable
  • (5)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