blog RSS feed home | technical info | demo | source-code | privacy policy

shareNice : unintrusive social sharing

Technical Information

Using shareNice on your website

To add our uninstrusive social sharing feature, see the demo, to your website all you need to do is include the following javascript code on your webpage:

<script src="http://sharenice.org/code.js" type="text/javascript"></script>    
  

and add the following div element to your page source:

<div id="shareNice"></div>
   

Configuring the shareNice lightbox

One can now reconfigure shareNice, using the following five attributes

Example config

If you want to config the text to say "shareNice this page" and only have icons for the following sites: facebook.com,digg.com,email,delicious.com,twitter.com, use the following HTML on your page:

<div id="shareNice" data-services="facebook.com,digg.com,email,delicious.com,twitter.com" 
data-share-label="shareNice this page"></div> 
   

See mmt.me.uk for an example of this configuration setup in action.

Our setup on sharenice.org

We are hosting sharenice as a virtual host on an Apache Server, using the following httpd.conf file


        DocumentRoot /var/www/vhosts/sharenice.org/httpdocs
        ServerName www.sharenice.org
        ServerAlias sharenice.org
        UseCanonicalName Off

        CustomLog /dev/null combined

        RewriteEngine on
        RewriteCond %{HTTP_HOST} ^www.sharenice.org [NC]
        RewriteRule ^(.*)$ http://sharenice.org/$1 [L,R=301]


As you can see, we are redirect ALL logs to /dev/null and as a result we are not collecting ANY information about users of sharenice.org.

You can host your own version of shareNice

If you would like to host your version of the shareNice tool, you can download and follow the provided instructions in shareNice's repository on github. shareNice is free software please see our license for more information.

Questions, Comments, and Feedback

If you have any questions regarding shareNice please either pop into #shareNice on irc.freenode.net, or email [shareNice at mmt me uk]. All comments and feedback are welcome. shareNice is an open-source project if you feel like something can be done better feel free to hack away yourself or submit a bug-report on the shareNice git repository's issue tracker.

Hand-rolled in vi 2011