Skip to content

Commit

Permalink
0.1.8 - image sprites + bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ura soul committed Jan 24, 2014
1 parent acc881a commit 127c547
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 64 deletions.
Binary file added graphics/social-sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added graphics/social-sprites.xcf
Binary file not shown.
10 changes: 5 additions & 5 deletions lib/interconnected.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function get_sharing_data_for_current_page()
$url = $site_url . $handler . '/view/' . $url_array['guid']; // set the shared url to be the view mode url and not edit or another mode which is unsuitable for sharing
}

if (isset($tags)) //if the current item has tags
if ($tags) //if the current item has tags
{
if (is_array($tags)) //if the current item has more than 1 tag
{
Expand Down Expand Up @@ -382,13 +382,13 @@ function get_sharing_data_for_current_page()

if ($author)
$content['author'] = $author;
else
$content['author'] = $sitename;
else
$content['author'] = $sitename;

if ($type)
$content['type'] = $type;
else
$content['type'] = 'website';
else
$content['type'] = 'website';

$content['keywords'] = $tags;
$content['url'] = $url;
Expand Down
2 changes: 1 addition & 1 deletion manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin_manifest xmlns="http://www.elgg.org/plugin_manifest/1.8">
<name>interconnected</name>
<author>ura soul</author>
<version>0.1.7</version>
<version>0.1.8</version>
<description>for social sharing and seo without bloatage</description>
<website>https://www.infiniteeureka.com</website>
<license>GNU Public License version 2</license>
Expand Down
117 changes: 66 additions & 51 deletions views/default/interconnected/css.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,22 @@
.elgg-button-share{
background-size: contain!important;
color: #000;
background-color: #eee;
font-size: 15px!important;
transition: 0.25s ease-in-out;
line-height:22px;
}

.elgg-button-share:hover {
transition: 0s ease-in-out;
}

.elgg-sharing-logo{
width:22px;
height:22px;
display:inline-block;
background-size:cover!important;
}

.elgg-my-profiles{
float: left;
width: 200px;
Expand All @@ -45,71 +52,79 @@
display: inline-block;
}

.elgg-button-twitter{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/twitter.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(231, 221, 221) 4%,rgb(150, 150, 150) 100%);
padding-left: 25px!important;
.elgg-sharing-logo{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/social-sprites.png';?>')no-repeat;
}

.elgg-button-twitter, .elgg-button-email,.elgg-button-pinterest,
.elgg-button-stumbleupon,.elgg-button-googleplus {
padding: 0 4px 0px 0px!important;
}

.elgg-button-linkedin{
padding: 0 0px 0px 4px!important;
}

.elgg-button-twitter, .elgg-button-linkedin, .elgg-button-email,.elgg-button-pinterest,
.elgg-button-stumbleupon{
background: linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(231, 221, 221) 4%,rgb(150, 150, 150) 100%);
border: 1px solid rgb(123, 123, 123);
}
.elgg-button-twitter:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/twitter.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(248, 248, 248) 4%,rgb(192, 191, 191) 100%);

.elgg-button-twitter:hover, .elgg-button-linkedin:hover,.elgg-button-email:hover,.elgg-button-pinterest:hover,.elgg-button-stumbleupon:hover{
border: 1px solid rgb(201,201,201);
background:linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(248, 248, 248) 4%,rgb(192, 191, 191) 100%);
}

.elgg-button-twitter .elgg-sharing-logo, .elgg-button-facebook .elgg-sharing-logo, .elgg-button-email .elgg-sharing-logo, .elgg-button-googleplus .elgg-sharing-logo,.elgg-button-stumbleupon .elgg-sharing-logo,.elgg-button-pinterest .elgg-sharing-logo {
float:left;
margin-right:3px;
}

.elgg-button-linkedin .elgg-sharing-logo{
float:right;
margin-left:3px;
background-position: -132px!important;
}

.elgg-button-twitter .elgg-sharing-logo{
background-position: -66px!important;
}

.elgg-button-googleplus .elgg-sharing-logo{
background-position: -44px!important;
}

.elgg-button-pinterest .elgg-sharing-logo{
background-position: -87px!important;
}

.elgg-button-stumbleupon .elgg-sharing-logo{
background-position: -109px!important;
}

.elgg-button-facebook{
color: rgb(238, 238, 238);
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/facebook.png';?>') no-repeat, linear-gradient(to bottom, rgb(47, 48, 65) 0%,rgb(42, 96, 198) 4%,rgb(48, 80, 141) 100%);
background: linear-gradient(to bottom, rgb(47, 48, 65) 0%,rgb(42, 96, 198) 4%,rgb(48, 80, 141) 100%);
border: 1px solid rgb(61, 94, 158);
padding-left: 25px!important;
padding: 0 4px 0px 0px!important;
}

.elgg-button-facebook .elgg-sharing-logo{
background-position: -22px!important;
}
.elgg-button-facebook:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/facebook.png';?>') no-repeat, linear-gradient(to bottom, rgb(151, 152, 165) 0%,rgb(65, 121, 225) 4%,rgb(54, 98, 181) 100%);
border: 1px solid rgb(78, 117, 192);
background: linear-gradient(to bottom, rgb(151, 152, 165) 0%,rgb(65, 121, 225) 4%,rgb(54, 98, 181) 100%);
}

.elgg-button-googleplus{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/googleplus.png';?>') no-repeat, linear-gradient(to bottom, rgb(101, 73, 73) 0%,rgb(193, 47, 47) 4%,rgb(137, 52, 52) 100%);
background: linear-gradient(to bottom, rgb(101, 73, 73) 0%,rgb(193, 47, 47) 4%,rgb(137, 52, 52) 100%);
border: 1px solid rgb(131, 53, 53);
color: rgb(238, 238, 238);
padding-left: 25px!important;
}

.elgg-button-googleplus:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/googleplus.png';?>') no-repeat, linear-gradient(to bottom, rgb(135, 100, 100) 0%,rgb(225, 65, 65) 4%,rgb(204, 30, 30) 100%);
background: linear-gradient(to bottom, rgb(135, 100, 100) 0%,rgb(225, 65, 65) 4%,rgb(204, 30, 30) 100%);
border: 1px solid rgb(194, 76, 76);
}
.elgg-button-linkedin{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/linkedin.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(231, 221, 221) 4%,rgb(150, 150, 150) 100%);
background-position: right top;
padding-right: 25px!important;
border: 1px solid rgb(123, 123, 123);
}
.elgg-button-linkedin:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/linkedin.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(248, 248, 248) 4%,rgb(192, 191, 191) 100%);
background-position: right top;
border: 1px solid rgb(201,201,201);
}
.elgg-button-pinterest{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/pinterest.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(231, 221, 221) 4%,rgb(150, 150, 150) 100%);
color:rgb(187, 5, 5);
padding-left: 25px!important;
border: 1px solid rgb(123, 123, 123);
}
.elgg-button-pinterest:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/pinterest.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(248, 248, 248) 4%,rgb(192, 191, 191) 100%);
border: 1px solid rgb(201,201,201);
}
.elgg-button-stumbleupon{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/stumble.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(231, 221, 221) 4%,rgb(150, 150, 150) 100%);
padding-left: 25px!important;
border: 1px solid rgb(123, 123, 123);
}
.elgg-button-stumbleupon:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/stumble.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(248, 248, 248) 4%,rgb(192, 191, 191) 100%);
border: 1px solid rgb(201,201,201);
}
.elgg-button-email{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/email.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(231, 221, 221) 4%,rgb(150, 150, 150) 100%);
padding-left: 25px!important;
border: 1px solid rgb(123, 123, 123);
}
.elgg-button-email:hover{
background: url('<?php echo elgg_get_site_url() . 'mod/interconnected/graphics/email.png';?>')no-repeat, linear-gradient(to bottom, rgb(255, 255, 255) 0%,rgb(248, 248, 248) 4%,rgb(192, 191, 191) 100%);
border: 1px solid rgb(201,201,201);
}
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if ($vars['description'])
$vars['description'] = $vars['description'] . NEW_LINE;

$vars['button'] = '<a target="_blank" href="mailto:?subject=' . $vars['item_title'] . '&body=' . elgg_echo('interconnected:emailbody', array($vars['subtext'],$vars['description'],$vars['url'])) . '"><div class="elgg-button-share elgg-button elgg-button-email">' . elgg_echo('interconnected:email') . '</div></a>';
$vars['button'] = '<a target="_blank" href="mailto:?subject=' . $vars['item_title'] . '&body=' . elgg_echo('interconnected:emailbody', array($vars['subtext'],$vars['description'],$vars['url'])) . '"><div class="elgg-button-share elgg-button elgg-button-email">' . elgg_echo ('interconnected:email') . '<div class="elgg-sharing-logo"></div></div></a>';

echo $vars['button'];
return true;
Expand Down
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/facebook.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$vars['button'] = '<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?s=100&p[title]=' . $vars['item_title'] . '&p[summary]=' . $vars['description'] . '&p[url]=' . $vars['url'] . '&p[images][0]=' . $vars['icon_url'] . '"><div class="elgg-button-share elgg-button elgg-button-facebook">' . elgg_echo('interconnected:facebook') . '</div></a>';
$vars['button'] = '<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?s=100&p[title]=' . $vars['item_title'] . '&p[summary]=' . $vars['description'] . '&p[url]=' . $vars['url'] . '&p[images][0]=' . $vars['icon_url'] . '"><div class="elgg-button-share elgg-button elgg-button-facebook">' . elgg_echo('interconnected:facebook') . '<div class="elgg-sharing-logo"></div></div></a>';
echo $vars['button'];
return true;
?>
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/googleplus.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$vars['button'] = '<a target="_blank" href="https://plus.google.com/share?url=' . $vars['url'] . '"><div class="elgg-button-share elgg-button elgg-button-googleplus">' . elgg_echo('interconnected:googleplus') . '</div></a>';
$vars['button'] = '<a target="_blank" href="https://plus.google.com/share?url=' . $vars['url'] . '"><div class="elgg-button-share elgg-button elgg-button-googleplus">' . elgg_echo('interconnected:googleplus') . '<div class="elgg-sharing-logo"></div></div></a>';

echo $vars['button'];
return true;
Expand Down
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/linkedin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$vars['button'] = '<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=' . $vars['url'] . '&title='. $vars['item_title'] . '&summary=' . $vars['subtext'] . $vars['description'] . '&source=' . $vars['url'] . '"><div class="elgg-button-share elgg-button elgg-button-linkedin">' . elgg_echo('interconnected:linkedin-button') . '</div></a>';
$vars['button'] = '<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=' . $vars['url'] . '&title='. $vars['item_title'] . '&summary=' . $vars['subtext'] . $vars['description'] . '&source=' . $vars['url'] . '"><div class="elgg-button-share elgg-button elgg-button-linkedin">' . elgg_echo('interconnected:linkedin-button') . '<div class="elgg-sharing-logo"></div></div></a>';

echo $vars['button'];
return true;
Expand Down
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/pinterest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$description = substr($vars['item_title'] . $vars['subtext'] . $vars['description'],0,500);

$vars['button'] = '<a target="_blank" href="https://pinterest.com/pin/create/button/?url=' . $vars['url'] . '&description='. $description . '&media=' . $vars['icon_url'] . '"><div class="elgg-button-share elgg-button elgg-button-pinterest">' . elgg_echo('interconnected:pinterest') . '</div></a>';
$vars['button'] = '<a target="_blank" href="https://pinterest.com/pin/create/button/?url=' . $vars['url'] . '&description='. $description . '&media=' . $vars['icon_url'] . '"><div class="elgg-button-share elgg-button elgg-button-pinterest">' . elgg_echo('interconnected:pinterest') . '<div class="elgg-sharing-logo"></div></div></a>';

echo $vars['button'];
return true;
Expand Down
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/stumbleupon.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$vars['button'] = '<a target="_blank" href="https://www.stumbleupon.com/submit?url=' . $vars['url'] . '"><div class="elgg-button-share elgg-button elgg-button-stumbleupon">' . elgg_echo('interconnected:stumbleupon') . '</div></a>';
$vars['button'] = '<a target="_blank" href="https://www.stumbleupon.com/submit?url=' . $vars['url'] . '"><div class="elgg-button-share elgg-button elgg-button-stumbleupon">' . elgg_echo('interconnected:stumbleupon') . '<div class="elgg-sharing-logo"></div></div></a>';

echo $vars['button'];
return true;
Expand Down
2 changes: 1 addition & 1 deletion views/default/social-sites/share-to/twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
$vars['button'] = '<a target="_blank" href="https://twitter.com/intent/tweet?text=' . $vars['item_title'] . $vars['subtext'] . '&url=' . $vars['url'];
if ($vars['twitter_handle'])
$vars['button'].= '&via=' . $vars['twitter_handle'];
$vars['button'] .= '"><div class="elgg-button-share elgg-button elgg-button-twitter">' . elgg_echo('interconnected:twitter') . '</div></a>';
$vars['button'] .= '"><div class="elgg-button-share elgg-button elgg-button-twitter">' . elgg_echo('interconnected:twitter') . '<div class="elgg-sharing-logo"></div></div></a>';

echo $vars['button'];
return true;
Expand Down

0 comments on commit 127c547

Please sign in to comment.