SimplePortal
Support => English Support => Topic started by: DJW on August 20, 2013, 07:33:05 AM
-
Hi,
I hope someone can help I want to implement a share this egg.
<div id='shareThisShareEgg' class='shareEgg'></div>
<script type='text/javascript'>stlib.shareEgg.createEgg('shareThisShareEgg', ['facebook','twitter','linkedin','pinterest','googleplus','delicious','digg','reddit','stumbleupon','email'], {title:'ShareThis Rocks!!!',url:'http://www.sharethis.com',theme:'shareegg'});</script>
So I insert the above in a block, what do I do with the code below that needs to be at the end of the head tag?
<script type="text/javascript" src="http://w.sharethis.com/gallery/shareegg/shareegg.js"></script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "a2f9e167-d713-4dba-9cd3-9f0d7c4ddffe", doNotHash: false, doNotCopy: false, hashAddressBar: false, onhover:false});</script>
-
Welcome to SimplePortal!
Normally you'll have to edit your theme's index.template.php file to add something between the <head></head> tags. You could also add it $contex['html_headers'] index in one of the source files. However the easiest would be to put them all into a single Custom HTML block, like this:
<div id="shareThisShareEgg" class="shareEgg"></div>
<script type="text/javascript" src="http://w.sharethis.com/gallery/shareegg/shareegg.js"></script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "a2f9e167-d713-4dba-9cd3-9f0d7c4ddffe", doNotHash: false, doNotCopy: false, hashAddressBar: false, onhover:false});</script>
<script type='text/javascript'>stlib.shareEgg.createEgg('shareThisShareEgg', ['facebook','twitter','linkedin','pinterest','googleplus','delicious','digg','reddit','stumbleupon','email'], {title:'ShareThis Rocks!!!',url:'http://www.sharethis.com',theme:'shareegg'});</script>
-
Thanks for the reply, Already sorted.