New social sharing buttons.
@@ -27,11 +27,6 @@ isq_load_textdomain();
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic"><!-- Ubuntu from Google Web Fonts -->
|
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic"><!-- Ubuntu from Google Web Fonts -->
|
||||||
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/style.css" /><!-- Theme CSS -->
|
<link rel="stylesheet" href="<?php echo YOURLS_SITE; ?>/public/style.css" /><!-- Theme CSS -->
|
||||||
<?php if ( ISQ::$social['plus'] ) { ?>
|
|
||||||
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
|
|
||||||
{lang: "en-GB"}
|
|
||||||
</script>
|
|
||||||
<?php } ?>
|
|
||||||
<script src='https://www.google.com/recaptcha/api.js'></script><!-- reCAPTCHA -->
|
<script src='https://www.google.com/recaptcha/api.js'></script><!-- reCAPTCHA -->
|
||||||
|
|
||||||
<!-- App icons generated using http://realfavicongenerator.net -->
|
<!-- App icons generated using http://realfavicongenerator.net -->
|
||||||
|
|||||||
@@ -30,11 +30,12 @@ ISQ::$links = array(
|
|||||||
|
|
||||||
// SOCIAL SHARING
|
// SOCIAL SHARING
|
||||||
ISQ::$social = array(
|
ISQ::$social = array(
|
||||||
'facebook' => TRUE,
|
|
||||||
'twitter' => TRUE,
|
'twitter' => TRUE,
|
||||||
'plus' => TRUE,
|
'appdotnet' => TRUE,
|
||||||
|
'facebook' => TRUE,
|
||||||
'linkedin' => TRUE,
|
'linkedin' => TRUE,
|
||||||
'tumblr' => TRUE
|
'tumblr' => TRUE,
|
||||||
|
'googleplus' => TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
// reCAPTCHA API KEYS
|
// reCAPTCHA API KEYS
|
||||||
|
|||||||
1
public/images/appdotnet.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64.1 64.1" enable-background="new 0 0 64.1 64.1"><path d="M32 7.9L0 56.2h6.6l7.3-11.4h36.4l7.3 11.4h6.6L32 7.9zM18 39.5l14-21.1 14 21.1H18z"/></svg>
|
||||||
|
After Width: | Height: | Size: 201 B |
1
public/images/facebook.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 59.4 59.4" enable-background="new 0 0 59.4 59.4"><path d="M45.1.4v9.4h-5.6c-2 0-3.4.4-4.1 1.3-.7.9-1.1 2.1-1.1 3.9v6.8h10.5l-1.4 10.6h-9.1v27.1H23.4V32.3h-9.1V21.8h9.1V14c0-4.4 1.2-7.9 3.7-10.3C29.6 1.2 32.9 0 37 0c3.5 0 6.2.1 8.1.4z"/></svg>
|
||||||
|
After Width: | Height: | Size: 295 B |
1
public/images/googleplus.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 59.4 59.4" enable-background="new 0 0 59.4 59.4"><path d="M26.6 28.4c0 .9.4 1.7 1.1 2.5s1.7 1.6 2.8 2.4 2.2 1.7 3.2 2.6c1.1 1 2 2.2 2.8 3.7.8 1.5 1.1 3.2 1.1 5.1 0 2.1-.6 4.2-1.7 6.2-1.7 2.9-4.2 5-7.5 6.4-3.3 1.4-6.9 2.1-10.6 2.1-3.1 0-6.1-.5-8.8-1.5-2.7-1-4.8-2.6-6.1-4.9-.9-1.4-1.3-3-1.3-4.7 0-1.9.5-3.7 1.6-5.4 1.1-1.6 2.5-3 4.2-4.1 3.1-2 7.9-3.1 14.4-3.6-.8-1-1.3-1.9-1.7-2.6-.4-.8-.6-1.6-.6-2.6 0-.9.2-1.9.8-3-1.1.1-1.9.1-2.4.1-3.5 0-6.5-1.1-8.9-3.4-2.4-2.3-3.6-5.2-3.6-8.7 0-2 .4-3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8v7.8z"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
1
public/images/linkedin.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 54.9 54.9" enable-background="new 0 0 54.9 54.9"><path d="M13.2 7.3c0 1.7-.6 3.2-1.8 4.4-1.2 1.2-2.8 1.8-4.8 1.8h-.1c-2 0-3.5-.6-4.7-1.8C.6 10.5 0 9.1 0 7.3c0-1.8.6-3.2 1.8-4.4C3 1.7 4.6 1.2 6.6 1.2s3.6.6 4.8 1.7c1.2 1.2 1.8 2.7 1.8 4.4zm-.7 11v35.4H.7V18.3h11.8zm42.4 15.1v20.3H43.1v-19c0-2.5-.5-4.5-1.4-5.9s-2.5-2.1-4.5-2.1c-1.5 0-2.8.4-3.8 1.2-1 .8-1.8 1.8-2.3 3.1-.3.7-.4 1.7-.4 2.9v19.8H19c0-9.5.1-17.2.1-23.1V18.3h11.7v5.1h-.1c.5-.8 1-1.4 1.5-2 .5-.6 1.2-1.2 2-1.9s1.9-1.2 3.1-1.6c1.2-.4 2.6-.6 4.1-.6 4.1 0 7.3 1.4 9.8 4.1 2.4 2.8 3.7 6.7 3.7 12z"/></svg>
|
||||||
|
After Width: | Height: | Size: 615 B |
1
public/images/tumblr.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 59.4 59.4" enable-background="new 0 0 59.4 59.4"><path d="M43.9 47.5l2.9 8.5c-.5.8-1.9 1.6-4 2.4-2.1.7-4.2 1.1-6.3 1.1-2.5 0-4.7-.3-6.8-.9-2.1-.7-3.8-1.5-5.1-2.6-1.3-1.1-2.5-2.4-3.4-3.8s-1.6-2.9-2-4.3c-.4-1.4-.6-2.8-.6-4.2V24.1h-6v-7.7c1.7-.6 3.2-1.4 4.6-2.5 1.4-1 2.4-2.1 3.2-3.2.8-1.1 1.5-2.3 2.1-3.6.6-1.3 1-2.5 1.2-3.5.2-1 .4-2.1.5-3.2 0-.1.1-.2.2-.3.2-.1.3-.1.4-.1h8.7v15.1h11.9v9h-12v18.5c0 .7.1 1.4.2 2 .2.6.4 1.2.8 1.9.4.6 1 1.1 1.8 1.5.8.4 1.8.5 2.9.5 1.9 0 3.5-.4 4.8-1z"/></svg>
|
||||||
|
After Width: | Height: | Size: 542 B |
1
public/images/twitter.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56.3 56.3" enable-background="new 0 0 56.3 56.3"><path d="M56.3 10.7c-1.6 2.3-3.5 4.3-5.8 6v1.5c0 3.1-.5 6.2-1.4 9.3-.9 3.1-2.3 6-4.1 8.9-1.8 2.8-4 5.3-6.6 7.5-2.5 2.2-5.6 3.9-9.2 5.2-3.6 1.3-7.4 1.9-11.5 1.9-6.4 0-12.3-1.7-17.7-5.2.8.1 1.8.2 2.8.2 5.4 0 10.1-1.6 14.3-4.9-2.5 0-4.7-.8-6.7-2.3-2-1.5-3.3-3.4-4.1-5.7.8.1 1.5.2 2.2.2 1 0 2-.1 3-.4-2.7-.5-4.9-1.9-6.6-4-1.8-2.1-2.6-4.6-2.6-7.3v-.1c1.6.9 3.4 1.4 5.2 1.5-1.6-1-2.8-2.4-3.8-4.1-.9-1.7-1.4-3.5-1.4-5.5 0-2.1.5-4 1.6-5.8 2.9 3.5 6.4 6.4 10.5 8.5 4.1 2.1 8.6 3.3 13.3 3.6-.2-.9-.3-1.8-.3-2.6 0-3.2 1.1-5.9 3.4-8.2s5-3.4 8.2-3.4c3.3 0 6.1 1.2 8.4 3.6 2.6-.5 5-1.4 7.3-2.8-.9 2.7-2.6 4.9-5.1 6.4 2.3-.4 4.5-1 6.7-2z"/></svg>
|
||||||
|
After Width: | Height: | Size: 733 B |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 700 B |
@@ -195,9 +195,40 @@ input[type=submit] {
|
|||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.social-sharer {
|
.social-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 2px;
|
border-color: #F0F0F0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button.twitter {
|
||||||
|
background-color: #55ACEE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button.appdotnet {
|
||||||
|
background-color: #49474B;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button.facebook {
|
||||||
|
background-color: #3B5998;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button.tumblr {
|
||||||
|
background-color: #35465C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button.linkedin {
|
||||||
|
background-color: #0976B4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button.googleplus {
|
||||||
|
background-color: #DD4B39;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-button svg {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
padding: 6px;
|
||||||
|
fill: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg#url-qr-code {
|
svg#url-qr-code {
|
||||||
|
|||||||
23
result.php
@@ -22,6 +22,9 @@ $shorturl = isset( $return['shorturl'] ) ? $return['shorturl'] : '';
|
|||||||
$message = isset( $return['message'] ) ? $return['message'] : '';
|
$message = isset( $return['message'] ) ? $return['message'] : '';
|
||||||
$title = isset( $return['title'] ) ? $return['title'] : '';
|
$title = isset( $return['title'] ) ? $return['title'] : '';
|
||||||
|
|
||||||
|
$encoded_shorturl = urlencode($shorturl);
|
||||||
|
$encoded_title = urlencode($title);
|
||||||
|
|
||||||
// QR code shenanigans
|
// QR code shenanigans
|
||||||
if ( ISQ::$general['qr'] ) {
|
if ( ISQ::$general['qr'] ) {
|
||||||
|
|
||||||
@@ -73,11 +76,21 @@ if ( ISQ::$general['qr'] ) {
|
|||||||
<!-- Social sharers -->
|
<!-- Social sharers -->
|
||||||
<h2><?php yourls_e( 'Share', 'isq_translation'); ?></h2>
|
<h2><?php yourls_e( 'Share', 'isq_translation'); ?></h2>
|
||||||
<p><?php yourls_e( 'Share your short URL', 'isq_translation'); ?></p>
|
<p><?php yourls_e( 'Share your short URL', 'isq_translation'); ?></p>
|
||||||
<?php if ( ISQ::$social['facebook'] ) { echo '<div class="social-sharer"><a href="http://facebook.com/sharer.php?u=' . $shorturl . '" class="share-button" target="_blank"><img src="public/img/facebook.png" alt="Facebook" width="55px" height="62px" /></a></div>'; } ?>
|
<div class="social-sharing">
|
||||||
<?php if ( ISQ::$social['twitter'] ) { echo '<div class="social-sharer"><a href="http://twitter.com/share" class="twitter-share-button" data-url="' . $shorturl . '" data-text="'. $title .'" data-count="vertical">Tweet</a><script src="http://platform.twitter.com/widgets.js"></script></div>'; } ?>
|
<?php
|
||||||
<?php if ( ISQ::$social['plus'] ) { echo '<div class="g-plus social-sharer" data-action="share" data-annotation="vertical-bubble" data-height="62" data-href="' . $shorturl . '"></div>'; } ?>
|
if ( ISQ::$social['twitter'] ) { echo '<span onclick="window.open(\'https://twitter.com/intent/tweet?url=' . $encoded_shorturl . '&text=' . $encoded_title . '\',\'_blank\',\'width=550,height=380\')" class="button social-button twitter" title="Share on Twitter">' . file_get_contents('public/images/twitter.svg') . '</span>'; }
|
||||||
<?php if ( ISQ::$social['linkedin'] ) { echo '<div class="social-sharer"><script src="http://platform.linkedin.com/in.js"></script><script type="IN/Share" data-url="' . $shorturl . '" data-counter="top"></script></div>'; } ?>
|
|
||||||
<?php if ( ISQ::$social['tumblr'] ) { echo '<a href="http://www.tumblr.com/share/link?url='. urlencode($shorturl) .'&name='. urlencode($title) .'" title="Share on Tumblr"><img src="public/img/tumblr.png" alt="Share on Tumblr" width="55px" height="62px" /></a>'; } ?>
|
if ( ISQ::$social['appdotnet'] ) { echo '<span onclick="window.open(\'https://account.app.net/intent/post/?text=' . $encoded_title . '&url=' . $encoded_shorturl . '\',\'_blank\',\'width=550,height=380\')" class="button social-button appdotnet" title="Share on App.net">' . file_get_contents('public/images/appdotnet.svg') . '</span>'; }
|
||||||
|
|
||||||
|
if ( ISQ::$social['facebook'] ) { echo '<span onclick="window.open(\'https://www.facebook.com/sharer/sharer.php?u=' . $shorturl . '\',\'_blank\',\'width=550,height=380\')" class="button social-button facebook" title="Share on Facebook">' . file_get_contents('public/images/facebook.svg') . '</span>'; }
|
||||||
|
|
||||||
|
if ( ISQ::$social['tumblr'] ) { echo '<span onclick="window.open(\'http://www.tumblr.com/share/link?url=' . $encoded_shorturl . '&name=' . $encoded_title . '\',\'_blank\',\'width=550,height=380\')" class="button social-button tumblr" title="Share on Tumblr">' . file_get_contents('public/images/tumblr.svg') . '</span>'; }
|
||||||
|
|
||||||
|
if ( ISQ::$social['linkedin'] ) { echo '<span onclick="window.open(\'https://www.linkedin.com/shareArticle?mini=true&url=' . $encoded_shorturl . '&title=' . $encoded_title . '\',\'_blank\',\'width=550,height=380\')" class="button social-button linkedin" title="Share on LinkedIn">' . file_get_contents('public/images/linkedin.svg') . '</span>'; }
|
||||||
|
|
||||||
|
if ( ISQ::$social['googleplus'] ) { echo '<span onclick="window.open(\'https://plus.google.com/share?url=' . $encoded_shorturl . '\',\'_blank\',\'width=550,height=380\')" class="button social-button googleplus" title="Share on LinkedIn">' . file_get_contents('public/images/googleplus.svg') . '</span>'; }
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- QR code -->
|
<!-- QR code -->
|
||||||
<?php if ( ISQ::$general['qr'] ) { echo '<h2>' . yourls__( 'QR code', 'isq-translation' ) . '</h2><p>' . yourls__( 'Share your link with external devices', 'isq-translation' ) . '</p>' . $qrCode; } ?>
|
<?php if ( ISQ::$general['qr'] ) { echo '<h2>' . yourls__( 'QR code', 'isq-translation' ) . '</h2><p>' . yourls__( 'Share your link with external devices', 'isq-translation' ) . '</p>' . $qrCode; } ?>
|
||||||
|
|||||||