1
Daethian
Adding Sharing Buttons to pages?
  • 2011/10/2 22:55

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


In v2.5 where do I need to add below code to put sharing buttons on my news articles and smartfaq articles?

I didn't see a module that easily adds this feature so I'm using the code provided by the Sharethis Site and Google +1:

Code Instructions This is your button codeit generates the buttons that you see on your pagePlace it wherever you want them to appear. <span class='st_twitter_large' ></span><span class='st_facebook_large' ></span><span class='st_yahoo_large' ></span><span class='st_gbuzz_large' ></span><span class='st_digg_large' ></span><span class='st_google_large' ></span><span class='st_instapaper_large' ></span><span class='st_reddit_large' ></span><span class='st_google_reader_large' ></span><span class='st_stumbleupon_large' ></span><span class='st_technorati_large' ></span><span class='st_friendster_large' ></span><span class='st_tumblr_large' ></span><span class='st_google_bmarks_large' ></span><span class='st_delicious_large' ></span><span class='st_wordpress_large' ></span><span class='st_google_translate_large' ></span><span class='st_email_large' ></span><span class='st_sharethis_large' ></span

This is your ShareThis script tagwithout it the buttons don't work. You can put it anywhere on your page. We recommend putting it in your header (between your <head> and </head> tags) <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'ef964a7f-ede3-4dd7-8 a6a-e79240ff33a6'});</script> 


Google +1 button: <!-- Place this tag where you want the +1 button to render --> <g:plusone></g:plusone> <!-- Place this tag after the last plusone tag --> <script type="text/javascript"> (function() { var po = document.createElement('
script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script>


http://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

2
mboyden
Re: Adding Sharing Buttons to pages?
  • 2011/10/3 18:50

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


If you want it only in those two pages, then you will need to add them to the templates for those two pages. Custom templates in 2.5.x are now kept in the theme in the modules directory.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

Login

Username:
Password:

Lost Password? Register now!

Who's Online

69 user(s) are online (52 user(s) are browsing Support Forums)


Members: 1


Guests: 68


heyula,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits