diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6277bc3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Ignore everything +* + +# Except Infinity Squared +!public/ +!index.php +!.gitignore diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/index.php b/index.php index 1685691..f6b5dbb 100755 --- a/index.php +++ b/index.php @@ -1,3 +1,268 @@ +<<<<<<< HEAD + +' . yourls__( 'An error has occured :(', 'isq_translation') . ''; + +if ( $message = $url. yourls__( 'added to database', 'isq_translation') ) { + $error = '
' . yourls__( 'View the details of your short URL below.', 'isq_translation') . '
'; + } elseif ( $message = $url. yourls__( 'already exists in database', 'isq_translation') ) { + $error = $genericerror . '' . yourls__( 'This URL already exists in this database. This website does not allow a single URL to have multiple short links.', 'isq_translation') . '
'; + } elseif ( $message = yourls__( 'Short URL', 'isq_translation') . $url . yourls__( 'already exists in database or is reserved', 'isq_translation') ) { + $error = $genericerror . '' . yourls__( '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.', 'isq_translation') . '
'; + } elseif ( $message = yourls__( 'Missing URL input', 'isq_translation') ) { + $error = $genericerror . '' . yourls__( 'You did not enter the URL you want to shorten or the server lost it. Please try again.', 'isq_translation') . '
'; + } elseif ( $message = yourls__( 'This URL is a short URL', 'isq_translation') ) { + $error = $genericerror . '' . yourls__( 'You cannot shorten a short URL!', 'isq_translation') . '
'; + } +?> + + + +
'; }
+ if (!empty(ISQ::$social['twitter'])) { $ISQtwitter = 'Tweet'; }
+ if (!empty(ISQ::$social['plus'])) { $ISQplus = ''; }
+ if (!empty(ISQ::$social['linkedin'])) { $ISQlinkedin = ''; }
+ if (!empty(ISQ::$general['qr'])) { $ISQqr = '' . yourls__( 'Share your code with external devices', 'isq-translation' ) . '
$ISQlongcopy
+$ISQshortcopy
+$ISQstatscopy
+$output_copy
+$output_share_p
+ $ISQfacebook + $ISQtwitter + $ISQplus + $ISQlinkedin +RESULT; + + // Part to be executed when no form has been submitted + } else { + + $site = YOURLS_SITE; + + $site_enter = yourls__( 'Enter a new URL to shorten', 'isq_translation'); + $site_hover = yourls__( 'Hover over the labels to see more information', 'isq_translation'); + $site_long = yourls__( 'Long URL (required):', 'isq_translation'); + $site_long_hover = yourls__( 'Paste the long URL here', 'isq_translation'); + $site_keyword = yourls__( 'Custom keyword:', 'isq_translation'); + $site_keyword_hover = yourls__( 'A keyword replaces the default short string', 'isq_translation'); + $site_title = yourls__( 'Optional title:', 'isq_translation'); + $site_title_hover = yourls__( 'Optional title used when sharing a link from YOURLS', 'isq_translation'); + $site_submit = yourls__( 'Shorten', 'isq_translation'); + + echo <<$site_enter +