Addthis script interferes with Concrete5
Permalink
I have set up a site for a colleague using my own themes. The site ishttp://www.intervac.pl. In default.php I placed the following script from Addthis.com which places Facebook, Share and Tweet buttons on the home page. This script, however, results in the page ceasing to be editable. If I disable the script it works fine.
Can anyone suggest alternatives?
Can anyone suggest alternatives?
<!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style "> <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_counter addthis_pill_style"></a> </div> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e3a9644107913cd"></script> <!--AddThis Button END -->
Maybe something like this?
Edit: sorry I'm asleep today.
<!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style "> <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_counter addthis_pill_style"></a> </div> <?php global $c; ?> <?php if(!$c->isEditMode()): ?> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e3a9644107913cd"></script> <?php endif; ?> <!--AddThis Button END -->
Edit: sorry I'm asleep today.
Thanks for this. Unfortunately it did not work. It suppressed the buttons in edit mode but I stll could not edit without disabling the whole script.
Problem is now solved. I changed the script to
Many thanks
<!-- AddThis Button BEGIN --> <?php global $c; ?> <?php if(!$c->isEditMode()): ?> <div class="addthis_toolbox addthis_default_style "> <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> <a class="addthis_button_tweet"></a> <a class="addthis_counter addthis_pill_style"></a> </div> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4e3a9644107913cd"></script> <?php endif; ?> <!--AddThis Button END -->
Many thanks
http://www.concrete5.org/marketplace/addons/social-share-privacy/...
It says- "If you open a web page that contains buttons from services like Facebook, your visit can be tracked by them even if you don't click the button. If you are logged in at Facebook, that information could even be linked to your real identity.
This add-on protects your privacy by only loading these buttons after a first initial click. Before that a dummy image will be displayed. If users want to activate a specific button permanently they can do so through a checkbox."
http://www.concrete5.org/marketplace/addons/addthis/...
"Makes it easy for your visitors to bookmark and share your content with others."
http://www.concrete5.org/marketplace/addons/like-button/...
"This Add-on adds a like button to your homepage.
The only thing you need to do is to get an API key from facebook
You can like the whole page or just the current page.
If you use this Add-on and have any feature requests, bugs or enhancements I would appreciate if you send me a mail."
http://www.concrete5.org/marketplace/addons/facebook-like-button/...
"Add this add on to any page and it will allow your visitors to promote your pages on their Facebook profile.
Add it to your site header or footer and any page of your site will have their custom Like Button.
A great way to promote your site simply.
You can set up the following option on every page:
Show or not faces of people who like it.
Define the width of the Like Me area.
This add-on uses the Facebook Javascript SDK model and not the simple Iframe version.
Very easy to set up. Just get your application id from the link provided in the add-on and drag the module to any page or header/footer and your site gets social.
The button is wrapped around a div with id="nalberto_fblike". This could be usefull if you want to add extra css to display it differently (ex: margin, padding, etc)
Current Version
1.1 Download Archive
"