Adding Google+1 to News Articles

Follow

Comments

7 comments

  • Avatar
    Excelle

    Hi Scott, How about adding other social links - Like, FB, Twitter etc? 

  • Avatar
    jcbarreau

    Thanks. Do you have something similar for Facebook?

  • Avatar
    Leo K

    Could we have the relevant details for the 'tweet' and 'like' buttons that we can see in this page as well?

    thanks

  • Avatar
    Scott McCulloch

    Here is the facebook version:

    http://support.ventrian.com/entries/22192828-adding-facebook-like-button-to-news-articles

  • Avatar
    glenn_goodwin8

    Hello all, thought I'd give something back.

    I've gone a little further and added (Facebook, Twitter, Pintrest, and Google+, ... you can add lots more) buttons using AddThis (www.addthis.com).  The code below loads async, so your site should render quickly waiting for AddThis to catch up.  Below is the solution :-

    Get some Social Media icons (I used free ones here) and place on your DNN site.  e.g. /portals/0/Images/SocialMedia_32x32/

    http://www.position-relative.com/2012/graphics/free-social-media-icon-set-1/

    Within listing.footer.html add the following (replace <yourpubid> with the ID you get from addthis)

    <!-- AddThis Button BEGIN -->
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=<yourpubid>#async=1"></script>
    <script type="text/javascript">  
    // Set the variables  
    if (typeof addthis_config !== "undefined")
    {
       addthis_config.data_track_clickback = false;   // Stop the Twitter links having # on the end.    
       addthis_config.data_track_addressbar = false;  // Stop the Address Bar having # on the end.  
    }
    else  
    {    
       var addthis_config = {     
              data_track_clickback:false    
              ,data_track_addressbar:false    
        };  
    }    
    // Initialise addThis after the Document is ready  
    $(document).ready(function() {    
         addthis.init();  
    });
    </script>
    <!-- AddThis Button END -->

     

    add the below to the spot where you want the icons in listing.item.html

     <div class="addthis_toolbox" style="float:right !important" addthis:url="[ARTICLELINK]" addthis:title="[TITLE]">
      <div class="custom_images">
       <a class="addthis_button_facebook"><img src="/portals/0/Images/SocialMedia_32x32/32x32-facebook.png" width="32" height="32" border="0" alt="Share to Facebook" /></a>
       <a class="addthis_button_twitter"><img src="/portals/0/Images/SocialMedia_32x32/32x32-twitter.png" width="32" height="32" border="0" alt="Tweet me!" /></a>
       <a class="addthis_button_pinterest_share"><img src="/portals/0/Images/SocialMedia_32x32/32x32-pinterest.png" width="32" height="32" border="0" alt="Pin to Pintrest" /></a>
       <a class="addthis_button_google_plusone_share"><img src="/portals/0/Images/SocialMedia_32x32/32x32-gplus.png" width="32" height="32" border="0" alt="Share on Google Plus" /></a>
       <a class="addthis_counter addthis_bubble_style addthis_32x32_style"></a>
      </div>
     </div>   

     Enjoy.

  • Avatar
    Excelle

    Glenn, I can't thank you enough. It works very well. God bless you.

  • Avatar
    Cziv

    Glenn many thanks. Works great.

    Can that be used also in Viewitems page (the actual article) and how ?

     

    c.

Please sign in to leave a comment.

Powered by Zendesk