GithubHelp home page GithubHelp logo

aleksen / sharenice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sharenice-org/sharenice

1.0 0.0 0.0 254 KB

An ethical way of adding social sharing features to your website, without compromising your users' privacy by dropping tracking cookies on them.

Home Page: http://shareNice.org/

License: MIT License

Perl 41.54% PHP 41.02% CSS 17.43%

sharenice's Introduction

Updated README file 20110514. 

shareNice can now be found on http://sharenice.org/. 

The software is written in order to provide social sharing features to web developers and website administrators who wish to maintain and protect their users' privacy. 

The current version of the system does not rely on anything but the user having JavaScript enabled. 

There are two ways which you can use shareNice on your website: 

1. 	You can include the following div in your HTML '<div id="shareNice"></div>', and include the following JavaScript in your HTML header : http://sharenice.org/code.js 
	'<script src="http://sharenice.org/code.js" type="text/javascript"></script>'

2. 	You can download the software from http://github.com/mischat/shareNice and you can host it on your own domain.  


The demo file supplied with this repository shows how easy it is to include this XHTML-STRICT friends HTML+JS fragment to have a social sharing feature on your website. 

The code you need to add to your HTML document is as simple as : 
<html>
<head>
      <script src="http://sharenice.org/code.js" type="text/javascript"></script>
      <link type="text/css" rel="stylesheet" href="http://sharenice.org/main.css" />   
      <!--[if IE 6]>
        <link type="text/css" rel="stylesheet" href="http://sharenice.org/ie6.css" >  
      <![endif]-->      
   </head>
   <body onLoad="shareNiceLoad()">
   <!-- This is the shareNice div you need to include in your HTML -->
   <div id="shareNice" style="float:left"></div>
   <!-- The rest of the magic is injected via .js -->

   </body>
</html>

Configuring the shareNice lightbox

One can now reconfigure shareNice, using the following five attributes

services: Takes a comma separate list of domain's which you are interested in including in your shareNice lightbox.
share-label: Allows a website owner to config the text "Share" as they please.
color-scheme: You can choose one of "black", "blue", "green", "orange", "pink", "red" to customise.
icon-size: either "16" or "32", this defines the size of the shareNice icon.
panel-bottom: either "default" or "plain". Where: "plain" gives a non-branded lightbox.

An example of a customised shareNice lightbox could be like so : 

<div id="shareNice" color-scheme="black" icon-size="32" share-label="Share this demo" panel-bottom="plain"></div>

The .png files have been generated from the domain's favicon files, and converted using the grab-icons/snarf-icon.pl script. If you want to refresh/add more domain, you can run the perl script supplied in this repo. If you want to grab more icons, add the domain of the service to grab-icons/icon-domains.txt

In order to generate the main "code.js" file in the root directory of the repository, please the gen-config/gen-sharenice-config.pl script.

sharenice's People

Contributors

mischat avatar animko avatar graingert avatar t-ashula avatar

Stargazers

Alexander Stevenson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.