Fixed  Google+ / Google +1 button issues

Kier

XenForo developer
Staff member
Here it is, but I really suggest you wait for 1.0.4 to be released, as it could be quite soon.
HTML:
<xen:require css="breadcrumb.css" />

<nav>
	<xen:if is="!{$quickNavSelected} AND {$navigation}">
		<xen:foreach loop="$navigation" value="$breadcrumb">
			<xen:if is="{$breadcrumb.node_id}">
				<xen:set var="$quickNavSelected">node-{$breadcrumb.node_id}</xen:set>
			</xen:if>
		</xen:foreach>
	</xen:if>

	<fieldset class="breadcrumb">
		<a href="{xen:link misc/quick-navigation-menu, '', 'selected={$quickNavSelected}'}" class="OverlayTrigger jumpMenuTrigger" data-cacheOverlay="true" title="{xen:phrase open_quick_navigation}"><!--{xen:phrase jump_to}...--></a>
			
		<div class="boardTitle"><strong>{$xenOptions.boardTitle}</strong></div>
		
		<span class="crumbs">
			<xen:if is="{$showHomeLink}">
				<span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
					<a href="{$homeLink}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{xen:phrase home}</span></a>
					<span class="arrow"><span></span></span>
				</span>
			<xen:elseif is="{$selectedTabId} != {$homeTabId}" />
				<span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
					<a href="{$homeTab.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}"><span{xen:if $microdata, ' itemprop="title"'}>{$homeTab.title}</span></a>
					<span class="arrow"><span></span></span>
				</span>
			</xen:if>
			
			<xen:if is="{$selectedTab}">
				<span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
					<a href="{$selectedTab.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{$selectedTab.title}</span></a>
					<span class="arrow"><span>&gt;</span></span>
				</span>
			</xen:if>
			
			<xen:if is="{$navigation}">
				<xen:foreach loop="$navigation" value="$breadcrumb" i="$i" count="$count">
					<span class="crust"{xen:if $microdata, ' itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"'}>
						<a href="{xen:raw $breadcrumb.href}" class="crumb"{xen:if $microdata, ' rel="up" itemprop="url"'}><span{xen:if $microdata, ' itemprop="title"'}>{xen:raw $breadcrumb.value}</span></a>
						<span class="arrow"><span>&gt;</span></span>
					</span>
				</xen:foreach>
			</xen:if>
		</span>
	</fieldset>
</nav>
 

Chromaniac

Well-known member
the first line was causing problems replacing the template. changed the rest of the code. not sure what i broke. seems to accept +1 just fine.
 

Mikey

Well-known member
Hmmm. Something with my theme possibly, but upon upgrade to 1.0.4 and reverting my breadcrumb template (which I added this change to in 1.0.3) - I now can't +1 again :/
 

Kier

XenForo developer
Staff member
Hmmm. Something with my theme possibly, but upon upgrade to 1.0.4 and reverting my breadcrumb template (which I added this change to in 1.0.3) - I now can't +1 again :/
Check your PAGE_CONTAINER template has the $microdata xen:set call on the top breadcrumb only.
 

Mikey

Well-known member
Check your PAGE_CONTAINER template has the $microdata xen:set call on the top breadcrumb only.
I have this:

Code:
<div class="breadBoxTop">
                            <xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                            <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
                        </div>
 
F

Floris

Guest
make sure the other templates in regards to this (see announcement) that also had an update, are also updated on your customized theme
 

anhbo102

New member
I found this code in css

PHP:
</div>
            </xen:if>
            <xen:if is="{$xenOptions.plusone}">
                <div class="plusone shareControl">
                    <div class="g-plusone" data-size="medium" data-count="true" data-href="{$url}"></div>
                </div>
How can I change it to fix this google plus error ?
 

android-schweiz

New member
Hello, all!

I have updated my Xenforo to 1.1.4 and my Google Plus Button doesn't work any more.
I tried to set microdata to false for breadcrumb, even remove breadcrumb at all. No results. Also I tried to load Google Plus One via script in <head>, but without any results too.

Example:
http://forum.android-schweiz.ch/index.php?threads/hitze-beim-galaxy-s4.4940/
or
http://forum.android-schweiz.ch/index.php

When I click on G+ button (in Share This Page block), it loads G+ popup, but after that popup is hidden and js error is thrown in console. And G+ functionality doesn't work.

Can you help me, please?
 

Pereira

Well-known member
Hello, all!

I have updated my Xenforo to 1.1.4 and my Google Plus Button doesn't work any more.
I tried to set microdata to false for breadcrumb, even remove breadcrumb at all. No results. Also I tried to load Google Plus One via script in <head>, but without any results too.

Example:
http://forum.android-schweiz.ch/index.php?threads/hitze-beim-galaxy-s4.4940/
or
http://forum.android-schweiz.ch/index.php

When I click on G+ button (in Share This Page block), it loads G+ popup, but after that popup is hidden and js error is thrown in console. And G+ functionality doesn't work.

Can you help me, please?

Since this is an old thread that's marked as "Fixed", you probably aren't going to get an answer. It's probably better to open a new thread in this forum - http://xenforo.com/community/forums/troubleshooting-and-problems.24/.
 
Top