Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
339 changes: 339 additions & 0 deletions web/sites/all/modules/contrib/service_links/LICENSE.txt

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions web/sites/all/modules/contrib/service_links/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
Service Links 2.x:
------------------
Author and mantainer: Fabio Mucciante aka TheCrow (since the 2.x branch)
Current co-mantainer: Simon Georges
Requirements: Drupal 7
License: GPL (see LICENSE.txt)

Introduction
------------
This module is the enhanced version of Service Links 1.x developed
by Fredrik Jonsson, rewritten and improved to fit the new purposes:
extend easily the number of services supported and provide APIs to
print links everywhere within any content.
At the address http://servicelinks.altervista.org/?q=service
a web interface helps to create a module including the services
not availables in the standard package.

Overview
---------
Service Links provide an amount of 70+ social networks
from around the World where submit the link of a given content,
below a short list:

* del.icio.us
* Digg
* Facebook
* Furl
* Google
* IceRocket
* LinkedIn
* MySpace
* Newsvine
* Reddit
* StumbleUpon
* Technorati
* Twitter
* Yahoo
* ...

The admin decides:
- the style to render the links: text, image, text + image
- to show links only for certain node types or some categories
- to add links within the content body, among the other links, or in a block
- what roles are allowed to see the selected links.

Within the 2.x branch has been introduced:
- modular management of services, grouped by different language area,
through external modules implementing the hook_service_links()
- sorting of services through drag'n drop
- support for buttons which make use of Javascript without break the
XHTML specifies to keep the module more 'accessible' as possible
- improved the use with not node pages
- support for other Drupal modules: Display Suite, Forward, Views, Short Url
- support for sprites to render the service images
- support for browser bookmarking (Chrome, Firefox, IE, Opera)
- two APIs to print easily the whole set of services or a customs subset of them
- configurable list of pages to show/hide on also through PHP code

A more detailed list of options and related explaining is available at the page:
http://servicelinks.altervista.org/?q=about

Installation and configuration
-------------------------------
1) Copy the whole 'service_links' folder under your 'modules' directory and then

2) Point your browser to administer >> modules', enable 'Service Links' and one
of the 'XXX Services' provided, 'General Services' contain the most know social
networks, and 'Widgets Services' the most used buttons

3) Go to 'administer >> access control' for allow users to watch the links.

4) At 'administer >> settings >> service links' select for what type of content
enable Service Links and in 'Services' tab select the services to show.

More information
----------------

The file 'template.php' contains some examples about phptemplate variables

The file 'service_links.api.php' contains info about the hooks implemented

More info regarding installation and first configuration, set up of the available
options, either extension of the number of services and theming output are available
on the online documentation at the address:
http://servicelinks.altervista.org/?q=about

More services can be included and packed within an external module customizable
through a web interface available at the address:
http://servicelinks.altervista.org/?q=service
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.fisheye{
text-align: center;
height: 50px;
position: relative;
}
.fisheyeContainer {
position: absolute;
height: 50px;
/*background: url(bg.gif);*/
padding-left: 20px;
}
a.fisheyeItem:hover {text-decoration: none}
a.fisheyeItem {
text-align: center;
color: #000;
font-weight: bold;
text-decoration: none;
width: 16px;
position: absolute;
display: block;
top: 0;
}
.fisheyeItem img {
border: none;
margin: 5px 10px 0px;
width: 100%;
}
.fisheyeContainer span {
display: none;
padding-left: 20px;
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions web/sites/all/modules/contrib/service_links/js/facebook_like.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(function ($) {
Drupal.behaviors.ws_fl = {
attach: function (context, settings) {
$('a.service-links-facebook-like', context).each(function(){
var iframe = document.createElement('iframe');

iframe.src = $(this).attr('href').replace('http://', '//').replace(/http[s]*\%3A\/\//, '');
iframe.setAttribute('scrolling', 'no');
iframe.setAttribute('frameborder', 0);
iframe.setAttribute('allowTransparency', 'true');

$(iframe).css({
'border': 'none',
'overflow': 'hidden',
'width': Drupal.settings.ws_fl.width + 'px',
'height': Drupal.settings.ws_fl.height + 'px',
});

$(iframe).addClass($(this).attr('class'));

$(this).replaceWith(iframe);
});
}
}
})(jQuery);
42 changes: 42 additions & 0 deletions web/sites/all/modules/contrib/service_links/js/facebook_share.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
(function ($) {
Drupal.behaviors.ws_fs = {
scriptadded: false,

attach: function (context, settings) {
if (!this.scriptadded) {
var fdiv_root, js, div_root ;
var fjs = document.getElementsByTagName('script')[0];

if (!document.getElementById('fb-root')) {
div_root = document.createElement('div');
div_root.id = 'fb-root';
document.body.appendChild(div_root);
}

if (!document.getElementById('facebook-jssdk')) {
js = document.createElement('script');
js.id = 'facebook-jssdk';
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=" + Drupal.settings.ws_fs.app_id;
fjs.parentNode.insertBefore(js, fjs);
this.scriptadded = true;
}
}

$('a.service-links-facebook-share', context).once(function(){
var f_text = document.createElement('fb:share-button');
var css = Drupal.settings.ws_fs.css.split(';');
var key_value = new Array();

f_text.setAttribute('type', Drupal.settings.ws_fs.type);
f_text.setAttribute('href', $(this).attr('rel'));

for (i = 0; i < css.length; i++){
key_value = css[i].split(':');
$(f_text).css(key_value[0], key_value[1]);
}

$(this).replaceWith(f_text);
});
}
}
})(jQuery);
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
(function ($) {
Drupal.behaviors.sl_fs = {
attach: function(context, settings) {
var $favorites = $("a.service-links-favorite", context).once('service-links-favorite');
var message = '';

$favorites.show();
if (window.chrome) {
message= Drupal.t('Use CTRL + D to add this to your bookmarks');
} else if (window.opera && window.print) {
$favorites.each(function(){
var url = $(this).attr('href').split('&favtitle=');
var title = decodeURI(url[1]);
url = url[0];
$(this).attr('rel', 'sidebar').attr('href', url).attr('title', title);
});
} else if (window.sidebar || window.external) {
$favorites.click(function(event){
event.preventDefault();
var url = $(this).attr('href').split('&favtitle=');
var title = decodeURI(url[1]);
url = url[0];
if (window.sidebar) {
window.sidebar.addPanel(title, url, '');
} else if (window.external) {
window.external.AddFavorite(url, title);
}
});
} else {
message = Drupal.t('Please use your browser to bookmark this page.');
}
if (message) {
$favorites.click(function(event){
event.preventDefault();
alert(message);
});
}
}
}
})(jQuery);
48 changes: 48 additions & 0 deletions web/sites/all/modules/contrib/service_links/js/google_plus_one.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
(function ($) {
Drupal.behaviors.ws_gpo = {
scriptadded: false,

attach: function (context, settings) {
$('a.service-links-google-plus-one', context).once(function(){
var g_text = document.createElement('g:plusone');

g_text.setAttribute('href', $(this).attr('href'));
g_text.setAttribute('width', Drupal.settings.ws_gpo.width);

if (Drupal.settings.ws_gpo.size != '') {
g_text.setAttribute('size', Drupal.settings.ws_gpo.size);
}
if (Drupal.settings.ws_gpo.annotation != '') {
g_text.setAttribute('annotation', Drupal.settings.ws_gpo.annotation);
}
if (Drupal.settings.ws_gpo.callback) {
g_text.setAttribute('callback', Drupal.settings.ws_gpo.callback);
}

$(this).replaceWith(g_text);
});

if (this.scriptadded) {
gapi.plusone.go();
} else {
var params = { parsetags: "explicit" };

if (Drupal.settings.ws_gpo.lang != '') {
params.lang = Drupal.settings.ws_gpo.lang;
}

window.___gcfg = params

$.ajax({
url: "https://apis.google.com/js/plusone.js",
dataType: "script",
cache: true,
success: function () {
this.scriptadded = true;
gapi.plusone.go();
}
});
}
}
}
})(jQuery);
12 changes: 12 additions & 0 deletions web/sites/all/modules/contrib/service_links/js/interface.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
(function ($) {
Drupal.behaviors.ws_lsb = {
attach: function (context, settings) {
$('a.service-links-linkedin-share-button', context).each(function(){
var script_obj = document.createElement('script');
script_obj.type = 'IN/Share';
script_obj.setAttribute("data-url", $(this).attr('href'));
if (Drupal.settings.ws_lsb.countmode != '') {
script_obj.setAttribute("data-counter", Drupal.settings.ws_lsb.countmode);
}
$(this).replaceWith(script_obj);
});

try {
IN.init({
onLoad: "Drupal.behaviors.ws_lsb.parse"
});
}
catch(e) {
if (window.console && window.console.log) {
console.log(e);
}
}
},

parse: function(context) {
try {
IN.parse(context);
}
catch(e) {
if (window.console && window.console.log) {
console.log(e);
}
}
}
}
})(jQuery);
11 changes: 11 additions & 0 deletions web/sites/all/modules/contrib/service_links/js/pinterest_button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(function ($) {
Drupal.behaviors.ws_pb = {
attach: function(context, settings) {
var $buttons = $('a.service-links-pinterest-button', context).once('service-links-pinterest-button');
$buttons.each(function(){
$(this).attr('count-layout', Drupal.settings.ws_pb.countlayout);
});
$.getScript( '//assets.pinterest.com/js/pinit.js' );
}
}
})(jQuery);
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(function ($) {
Drupal.behaviors.ws_fisheye = {
attach: function (context, settings) {
var $fisheyes = $('.fisheye', context).once('fisheye');
$fisheyes.Fisheye({
maxWidth: 32,
items: 'a',
itemsText: 'span',
container: '.fisheyeContainer',
itemWidth: 16,
proximity: 60,
halign : 'center'
});
}
}
})(jQuery);
18 changes: 18 additions & 0 deletions web/sites/all/modules/contrib/service_links/js/twitter_button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(function ($) {
Drupal.behaviors.ws_tb ={
scriptadded: false,

attach: function(context, settings) {
if (this.scriptadded) {
twttr.widgets.load();
} else {
$('a.service-links-twitter-widget', context).each(function(){
$(this).attr('href', $(this).attr('href').replace(/((?:counturl\=|^))http[s]*\%3A\/\//g, "$1"));
});
$.getScript('http://platform.twitter.com/widgets.js', function () {
this.scriptadded = true;
});
}
}
}
})(jQuery);
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = Service Links Displays
description = Provide the integration between Service Links and Node Displays (Display Suite)
core = 7.x
package = Service Links
dependencies[] = service_links
dependencies[] = ds

; Information added by drupal.org packaging script on 2013-06-10
version = "7.x-2.2"
core = "7.x"
project = "service_links"
datestamp = "1370849155"

Loading