From db53128170e73e61a0a952cd86db0db3895dafd1 Mon Sep 17 00:00:00 2001 From: Tom Slominski Date: Wed, 30 Nov 2011 17:41:02 +0000 Subject: [PATCH] 1.2 --- index.php | 87 ++++++++++++++++++++++++++++++++++---------- public/README | 2 +- public/config.php | 63 ++++++++++++++++++++------------ public/img/plus.png | Bin 0 -> 4147 bytes public/public.css | 3 ++ 5 files changed, 111 insertions(+), 44 deletions(-) create mode 100644 public/img/plus.png diff --git a/index.php b/index.php index ac449f1..625d10c 100644 --- a/index.php +++ b/index.php @@ -1,13 +1,59 @@ + Share on Facebook"; } +if (!empty(ISQ::$social['twitter'])) { $ISQtwitter = "Tweet"; } +if (!empty(ISQ::$social['plus'])) { $ISQplus = "Share on Google+"; } +if (!empty(ISQ::$social['linkedin'])) { $ISQlinkedin = ""; } +if (!empty(ISQ::$general['qr'])) { $ISQqr = "

QR code

\n

Share your code with external devices

\nQR code"; } +$ISQtitle = ISQ::$general['name']; +$ISQname_1= ISQ::$links['name_1']; +$ISQname_1= ISQ::$links['url_1']; +$ISQname_2= ISQ::$links['name_2']; +$ISQname_2= ISQ::$links['url_2']; +$ISQname_3= ISQ::$links['name_3']; +$ISQname_3= ISQ::$links['url_3']; +$ISQname_4= ISQ::$links['name_4']; +$ISQname_4= ISQ::$links['url_4']; +$ISQname_5= ISQ::$links['name_5']; +$ISQname_5= ISQ::$links['url_5']; +$ISQname_6= ISQ::$links['name_6']; +$ISQname_6= ISQ::$links['url_6']; +$ISQname_7= ISQ::$links['name_7']; +$ISQname_7= ISQ::$links['url_7']; +$ISQname_8= ISQ::$links['name_8']; +$ISQname_8= ISQ::$links['url_8']; +$ISQname_9= ISQ::$links['name_9']; +$ISQname_9= ISQ::$links['url_9']; +$ISQname_10= ISQ::$links['name_10']; +$ISQname_10= ISQ::$links['url_10']; + +// Error definitions +if ( $message = $url. "added to database") { + $error = "

URL shortened successfully

\n

View the details of your short URL below.

"; + } elseif ( $message = $url. "already exists in database") { + $error = "

An error has occured :(

\n

This URL already exists in this database. This website does not allow a single URL to have multiple short links.

"; + } elseif ( $message = "Short URL" .$url. "already exists in database or is reserved") { + $error = "

An error has occured :(

\n

This short URL already exists in this database or is reserved. This website does not allow a single URL to have multiple short links. It could've also been reserved by the admin.

"; + } elseif ( $message = "Missing URL input") { + $error = "

An error has occured :(

\n

You did not enter the URL you want to shorten or the server lost it. Please try again.

"; + } elseif ( $message = "URL is a short URL") { + $error = "

An error has occured :(

\n

You cannot shorten a short URL!

"; + } ?> + -kwl.me +<?php echo $ISQtitle; ?> + @@ -18,8 +64,8 @@ include( dirname(__FILE__).'/public/config.php' ); @@ -27,18 +73,18 @@ $(document).ready(function()
-

+

Your URL has been shortened -

$message

+ $error

Original URL: $url

Short URL: $shorturl

Stats: $shorturl+

+ $ISQqr +

Share

Share your short URL

- - + $ISQfacebook + $ISQtwitter + $ISQplus + $ISQlinkedin RESULT; // Part to be executed when no form has been submitted diff --git a/public/README b/public/README index 08e8d53..f2c4b44 100644 --- a/public/README +++ b/public/README @@ -1,4 +1,4 @@ -Infinity Squared, a beautiful theme for YOURLS, by Tom Slominski (http://tomslominski.net/) +Infinity Squared, a beautiful theme for YOURLS, by Tom Slominski (http://tomslominski.net/infinity-squared/) See the project's Wiki pages at GitHub for the latest installation instructions https://github.com/tomslominski/infinity-squared diff --git a/public/config.php b/public/config.php index 5fc2338..faed3a6 100644 --- a/public/config.php +++ b/public/config.php @@ -1,27 +1,42 @@ 'Edit public/config.php to set up ∞²', // The name of your URL shortener + 'qr' => 1 // Do you want to display a QR code? +); -// Menu- The width of ∞² menu allows you to have about 10 links, however, -// you don't need to use all of them -define( 'ISQ_LINK1_NAME', '' ); -define( 'ISQ_LINK1_URL', '' ); -define( 'ISQ_LINK2_NAME', '' ); -define( 'ISQ_LINK2_URL', '' ); -define( 'ISQ_LINK3_NAME', '' ); -define( 'ISQ_LINK3_URL', '' ); -define( 'ISQ_LINK4_NAME', '' ); -define( 'ISQ_LINK4_URL', '' ); -define( 'ISQ_LINK5_NAME', '' ); -define( 'ISQ_LINK5_URL', '' ); -define( 'ISQ_LINK6_NAME', '' ); -define( 'ISQ_LINK6_URL', '' ); -define( 'ISQ_LINK7_NAME', '' ); -define( 'ISQ_LINK7_URL', '' ); -define( 'ISQ_LINK8_NAME', '' ); -define( 'ISQ_LINK8_URL', '' ); -define( 'ISQ_LINK9_NAME', '' ); -define( 'ISQ_LINK9_URL', '' ); -define( 'ISQ_LINK10_NAME', '' ); -define( 'ISQ_LINK10_URL', '' ); +// Menu- The width of ∞² menu allows you to have about 10 links +// Leave empty to disable +ISQ::$links = array( + 'name_1' => '', + 'url_1' => '', + 'name_2' => '', + 'url_2' => '', + 'name_3' => '', + 'url_3' => '', + 'name_4' => '', + 'url_4' => '', + 'name_5' => '', + 'url_5' => '', + 'name_6' => '', + 'url_6' => '', + 'name_7' => '', + 'url_7' => '', + 'name_8' => '', + 'url_8' => '', + 'name_9' => '', + 'url_9' => '', + 'name_10' => '', + 'url_10' => '' +); + +// Social sharing +// 1 to enable, 0 to disable +ISQ::$social = array( + 'facebook' => 1, + 'twitter' => 1, + 'plus' => 1, + 'linkedin' => 1 +); ?> diff --git a/public/img/plus.png b/public/img/plus.png new file mode 100644 index 0000000000000000000000000000000000000000..34e86eafc0351b52baef85783f92bf0bfaf1f71b GIT binary patch literal 4147 zcmV-35X|q1P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L02dMf02dMgXP?qi00007bV*G`2iprB z6)YaOUC&7X01vZCL_t(&-tC)fj2-29$A8Z|bN1%F*}J~qup^~)4W>m1!Yxv;6JjH$ zUq}hP2uKZWR9qlYOA54tO0-RgD>;B5G=LQK15JXIAi~W}Ra}xv6jDeVw-5>0fGf4W z3Gc3V&p9*C(+}_a&b)KhA>OvC_`q2m&CEG7XWsvF`9HT=_~7-y>x0+-=S$Lqx6i)h za~Qi2&IPicbA)*Jk;9pJ;Z_kiQYQ zM=pGQ3Lpn~d-KJ^hP(wVMzCJc?;r8M*LiZ5z-_>7`qGE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