As per a request I am currently looking at replacing the default share_page functionality with AddThis rendered buttons, that look like this:
 

 
I have been using a combination of code from the addthis_ajax functionality and code available via the AddThis website.
 
The code with the bug is the following:
 
<script type="text/javascript">
 
**snip**
 
XenForo.loadJs("http://s7.addthis.com/js/250/addthis_widget.js#domready=1{xen:if {$xenOptions.addThisPubId}, '&pubid={xen:jsescape $xenOptions.addThis.pubId}'}");
 
</script>
 
I have highlighted the problem in red, with the correct in green. As far as I can tell $xenOptions.addThisPubId doesn't exist, so the xen:if will always come back empty and never pull the correct variable which is $xenOptions.addThis.pubID.
 
I have implemented this in my code and whereas before View Source would look like:
 
	
	
	
		
 
It now looks like:
 
	
	
	
		
				
			
I have been using a combination of code from the addthis_ajax functionality and code available via the AddThis website.
The code with the bug is the following:
<script type="text/javascript">
**snip**
XenForo.loadJs("http://s7.addthis.com/js/250/addthis_widget.js#domready=1{xen:if {$xenOptions.addThisPubId}, '&pubid={xen:jsescape $xenOptions.addThis.pubId}'}");
</script>
I have highlighted the problem in red, with the correct in green. As far as I can tell $xenOptions.addThisPubId doesn't exist, so the xen:if will always come back empty and never pull the correct variable which is $xenOptions.addThis.pubID.
I have implemented this in my code and whereas before View Source would look like:
		Code:
	
	<script type="text/javascript">
 
var addthis_share_config = 
{
    url: "http://www.valvetime.net/forum/",
}
**snip**
 
XenForo.loadJs("http://s7.addthis.com/js/250/addthis_widget.js#domready=1");
 
</script>
	It now looks like:
		Code:
	
	<script type="text/javascript">
 
var addthis_share_config = 
{
    url: "http://www.valvetime.net/forum/",
}
**snip**
 
XenForo.loadJs("http://s7.addthis.com/js/250/addthis_widget.js#domready=1&pubid=ra-4f97c4942ed9a5b9");
 
</script>