bmorebiostats
Forum Replies Created
-
Forum: Plugins
In reply to: [Smart Layers by AddThis] Bit.ly links not workingThank you @srijith.v Using both plugins worked perfectly like you said!
Forum: Plugins
In reply to: [Smart Layers by AddThis] Bit.ly links not workingI finally looked at the source code (once deployed) of bmorebiostat.com and got the bit.ly connection working via a minor tweak.
Basically I noticed that the code you write in the WordPress admin becomes
<script type="text/javascript">var addthis_product = 'wpp'; </script><script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-527c1a6d32e98eb8"></script><script type="text/javascript">addthis.layers( CODE YOU WRITE );</script><style type="text/css">.addthis_toolbox {float:left;width:100%;margin:0 0 15px 0;} .addthis_button_tweet {min-width: 83px;float:left;}</style><script type='text/javascript' src='http://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201345'></script>Meaning that the ); at the end was creating incorrect javascript code when I naively inserted the code @waffenss showed (which comes from the AddThis documentation).
So using in WordPress the following code:
{ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 }, 'follow' : { 'services' : [ {'service': 'facebook', 'id': 'bmore.biostats'}, {'service': 'twitter', 'id': 'bmorebiostats'}, {'service': 'linkedin', 'id': 'bmorebiostats'}, {'service': 'rss', 'id': 'http://feeds.feedburner.com/BmoreBiostats'} ], 'offset' : {'top':'10px'} } } ); var addthis_share = { // ... other options url_transforms : { shorten: { twitter: 'bitly' } }, shorteners : { bitly : {} } }; var myfunc = function(testparam) { return true; }; var mynothing = myfunc(trueI end up with:
<script type="text/javascript">var addthis_product = 'wpp'; </script><script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-527c1a6d32e98eb8"></script><script type="text/javascript">addthis.layers({ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 }, 'follow' : { 'services' : [ {'service': 'facebook', 'id': 'bmore.biostats'}, {'service': 'twitter', 'id': 'bmorebiostats'}, {'service': 'linkedin', 'id': 'bmorebiostats'}, {'service': 'rss', 'id': 'http://feeds.feedburner.com/BmoreBiostats'} ], 'offset' : {'top':'10px'} } } ); var addthis_share = { // ... other options url_transforms : { shorten: { twitter: 'bitly' } }, shorteners : { bitly : {} } }; var myfunc = function(testparam) { return true; }; var mynothing = myfunc(true);</script><style type="text/css">.addthis_toolbox {float:left;width:100%;margin:0 0 15px 0;} .addthis_button_tweet {min-width: 83px;float:left;}</style><script type='text/javascript' src='http://s0.wp.com/wp-content/js/devicepx-jetpack.js?ver=201345'></script>which works.
Do you suggest another solution? I guess that it would be nice to avoid creating the myfunc function and mynothing variable.
Anyhow, it would be nice to have this documented somewhere.
Thank you for the help!
Forum: Plugins
In reply to: [Smart Layers by AddThis] Bit.ly links not workingHello, I am also trying to get this to work and have not been able to. In the AddThis Smart Layers configuration panel at my WordPress.org site, I chose the option to enter the code myself instead of using the WYSIWIG.
The following works, except for the bit.ly part:
{ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 }, 'follow' : { 'services' : [ {'service': 'facebook', 'id': 'bmore.biostats'}, {'service': 'twitter', 'id': 'bmorebiostats'}, {'service': 'linkedin', 'id': 'bmorebiostats'}, {'service': 'rss', 'id': 'http://feeds.feedburner.com/BmoreBiostats'} ], 'offset' : {'top':'50px'} } }However adding the code shown by waffenss above does not work. So basically, how do you have to set it up?
Site is http://bmorebiostat.com/
Thank you for the help!