Upload plugins
This commit is contained in:
5
Dockerfile
Normal file
5
Dockerfile
Normal file
@@ -0,0 +1,5 @@
|
||||
FROM yourls
|
||||
ADD plugins/404-if-not-found /var/www/html/user/plugins/404-if-not-found
|
||||
ADD plugins/preview /var/www/html/user/plugins/preview
|
||||
ADD plugins/sleeky-frontend/. /var/www/html/
|
||||
ADD plugins/sleeky-backend /var/www/html/user/plugins/sleeky-backend
|
89
README.md
89
README.md
@@ -1,92 +1,3 @@
|
||||
# yourls-plugins
|
||||
|
||||
Plugins for YOURLS in a Dockerizable repo.
|
||||
|
||||
## Getting started
|
||||
|
||||
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
|
||||
|
||||
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
||||
|
||||
## Add your files
|
||||
|
||||
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
||||
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
|
||||
|
||||
```
|
||||
cd existing_repo
|
||||
git remote add origin https://git.karaolidis.com/Nikas36/yourls-plugins.git
|
||||
git branch -M main
|
||||
git push -uf origin main
|
||||
```
|
||||
|
||||
## Integrate with your tools
|
||||
|
||||
- [ ] [Set up project integrations](https://git.karaolidis.com/Nikas36/yourls-plugins/-/settings/integrations)
|
||||
|
||||
## Collaborate with your team
|
||||
|
||||
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
||||
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
||||
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
||||
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
||||
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
|
||||
|
||||
## Test and Deploy
|
||||
|
||||
Use the built-in continuous integration in GitLab.
|
||||
|
||||
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
|
||||
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
||||
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
||||
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
||||
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
||||
|
||||
***
|
||||
|
||||
# Editing this README
|
||||
|
||||
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
|
||||
|
||||
## Suggestions for a good README
|
||||
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
|
||||
|
||||
## Name
|
||||
Choose a self-explaining name for your project.
|
||||
|
||||
## Description
|
||||
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
||||
|
||||
## Badges
|
||||
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
||||
|
||||
## Visuals
|
||||
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
||||
|
||||
## Installation
|
||||
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
||||
|
||||
## Usage
|
||||
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
||||
|
||||
## Support
|
||||
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
||||
|
||||
## Roadmap
|
||||
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
||||
|
||||
## Contributing
|
||||
State if you are open to contributions and what your requirements are for accepting them.
|
||||
|
||||
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
||||
|
||||
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
||||
|
||||
## Authors and acknowledgment
|
||||
Show your appreciation to those who have contributed to the project.
|
||||
|
||||
## License
|
||||
For open source projects, say how it is licensed.
|
||||
|
||||
## Project status
|
||||
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
|
||||
|
47
plugins/404-if-not-found/plugin.php
Normal file
47
plugins/404-if-not-found/plugin.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: 404 if not found
|
||||
Plugin URI: https://github.com/YOURLS/404-if-not-found/
|
||||
Description: Send a 404 (instead of a 302) when short URL is not found
|
||||
Version: 1.1
|
||||
Author: Ozh
|
||||
Author URI: https://yourls.org/
|
||||
*/
|
||||
|
||||
// No direct call
|
||||
if( !defined( 'YOURLS_ABSPATH' ) ) die();
|
||||
|
||||
// 'keyword' provided ('abc' in 'http://sho.rt/abc') but not found
|
||||
yourls_add_action('redirect_keyword_not_found', 'ozh_404_if_not_found');
|
||||
|
||||
// 'keyword+' provided but this isnt an existing stat page
|
||||
yourls_add_action('infos_keyword_not_found', 'ozh_404_if_not_found');
|
||||
|
||||
// 'keyword' not provided: direct attempt at http://sho.rt/yourls-go.php or -infos.php
|
||||
yourls_add_action('redirect_no_keyword', 'ozh_404_if_not_found');
|
||||
yourls_add_action('infos_no_keyword', 'ozh_404_if_not_found');
|
||||
|
||||
// Display a default 404 not found page
|
||||
function ozh_404_if_not_found() {
|
||||
yourls_status_header(404);
|
||||
$notfound = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
|
||||
. '<html><head>'
|
||||
. '<title>404 Not Found</title>'
|
||||
. '</head><body>'
|
||||
. '<h1>Not Found</h1>'
|
||||
. '<p>The requested URL was not found on this server.</p>'
|
||||
. '</body></html>';
|
||||
die($notfound);
|
||||
}
|
||||
|
||||
/**
|
||||
* if you want to display a custom 404 page instead, replace the above function with
|
||||
* the following :
|
||||
*
|
||||
* function ozh_404_if_not_found() {
|
||||
* yourls_status_header(404);
|
||||
* include_once('/full/path/to/your/404.html'); // full path to your error document
|
||||
* die();
|
||||
* }
|
||||
*
|
||||
*/
|
59
plugins/preview/plugin.php
Normal file
59
plugins/preview/plugin.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Preview URL with QR Code
|
||||
Plugin URI: https://github.com/dennydai
|
||||
Description: Preview URLs before you're redirected there
|
||||
Version: 1.0
|
||||
Author: Denny Dai
|
||||
Author URI: https://dennydai.github.io
|
||||
*/
|
||||
|
||||
// EDIT THIS
|
||||
|
||||
// Character to add to a short URL to trigger the preview interruption
|
||||
define( 'DD_PREVIEW_CHAR', '~' );
|
||||
|
||||
// DO NO EDIT FURTHER
|
||||
|
||||
// Handle failed loader request and check if there's a ~
|
||||
yourls_add_action( 'loader_failed', 'dd_preview_loader_failed' );
|
||||
function dd_preview_loader_failed( $args ) {
|
||||
$request = $args[0];
|
||||
$pattern = yourls_make_regexp_pattern( yourls_get_shorturl_charset() );
|
||||
if( preg_match( "@^([$pattern]+)".DD_PREVIEW_CHAR."$@", $request, $matches ) ) {
|
||||
$keyword = isset( $matches[1] ) ? $matches[1] : '';
|
||||
$keyword = yourls_sanitize_keyword( $keyword );
|
||||
dd_preview_show( $keyword );
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
// Show the preview screen for a short URL
|
||||
function dd_preview_show( $keyword ) {
|
||||
require_once( YOURLS_INC.'/functions-html.php' );
|
||||
|
||||
yourls_html_head( 'preview', 'Short URL preview' );
|
||||
yourls_html_logo();
|
||||
|
||||
$title = yourls_get_keyword_title( $keyword );
|
||||
$url = yourls_get_keyword_longurl( $keyword );
|
||||
$base = YOURLS_SITE;
|
||||
$char = DD_PREVIEW_CHAR;
|
||||
$qrcode = 'data:image/png;base64,'.base64_encode(file_get_contents('http://chart.apis.google.com/chart?chs=200x200&cht=qr&chld=M&chl='.YOURLS_SITE.'/'.$keyword));
|
||||
|
||||
echo <<<HTML
|
||||
<h2>Link Preview</h2>
|
||||
<p>You requested the short URL <strong><a href="$base/$keyword">$base/$keyword</a></strong></p>
|
||||
<p>This short URL points to:</p>
|
||||
<ul>
|
||||
<li>Long URL: <strong><a href="$base/$keyword">$url</a></strong></li>
|
||||
<li>Page title: <strong>$title</strong></li>
|
||||
<li>QR Code: <br><img src="$qrcode"></li>
|
||||
</ul>
|
||||
<p>If you still want to visit this link, please <strong><a href="$base/$keyword">click here</a></strong>.</p>
|
||||
|
||||
<p>Thank you for using our shortening service.</p>
|
||||
HTML;
|
||||
|
||||
yourls_html_footer();
|
||||
}
|
1293
plugins/sleeky-backend/package-lock.json
generated
Normal file
1293
plugins/sleeky-backend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
plugins/sleeky-backend/package.json
Normal file
15
plugins/sleeky-backend/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "sleeky-admin",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node-sass --watch assets/css/themes -o assets/css --output-style compressed"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"node-sass": "^4.12.0"
|
||||
}
|
||||
}
|
147
plugins/sleeky-backend/plugin.php
Normal file
147
plugins/sleeky-backend/plugin.php
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Sleeky Backend
|
||||
Plugin URI: https://sleeky.flynntes.com
|
||||
Description: UI overhaul of the YOURLS backend
|
||||
Version: 2.4.1
|
||||
Author: Flynn Tesoriero
|
||||
Author URI: https://flynntes.com
|
||||
*/
|
||||
|
||||
// No direct call
|
||||
if( !defined( 'YOURLS_ABSPATH' ) ) die();
|
||||
|
||||
// Plugin location URL
|
||||
$url = yourls_plugin_url( __DIR__ );
|
||||
|
||||
yourls_add_action( 'html_head', 'init' );
|
||||
|
||||
function init()
|
||||
{
|
||||
echo <<<HEAD
|
||||
<style>body {background: unset;}</style>
|
||||
HEAD;
|
||||
}
|
||||
|
||||
// Inject Sleeky files
|
||||
yourls_add_action( 'html_head', 'sleeky_head_scripts' );
|
||||
|
||||
function sleeky_head_scripts() {
|
||||
|
||||
// This is so the user doesn't have to reload page twice in settings screen
|
||||
if (isset( $_POST['theme_choice'] )) {
|
||||
// User has just changed theme
|
||||
if ($_POST['theme_choice'] == "light") {
|
||||
setTheme("light");
|
||||
} else {
|
||||
setTheme("dark");
|
||||
}
|
||||
} else {
|
||||
// User has not just changed theme
|
||||
if (yourls_get_option( 'theme_choice' ) == "light") {
|
||||
setTheme("light");
|
||||
} else {
|
||||
setTheme("dark");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Inject Sleeky files
|
||||
|
||||
function setTheme($theme) {
|
||||
$url = yourls_plugin_url( __DIR__ );
|
||||
if ($theme == "light") {
|
||||
echo <<<HEAD
|
||||
<link rel="stylesheet" href="$url/assets/css/light.css">
|
||||
<link rel="stylesheet" href="$url/assets/css/animate.min.css">
|
||||
<script src="$url/assets/js/theme.js"></script>
|
||||
<meta name="sleeky_theme" content="light">
|
||||
HEAD;
|
||||
} else if ($theme == "dark") {
|
||||
echo <<<HEAD
|
||||
<link rel="stylesheet" href="$url/assets/css/dark.css">
|
||||
<link rel="stylesheet" href="$url/assets/css/animate.min.css">
|
||||
<script src="$url/assets/js/theme.js"></script>
|
||||
<meta name="sleeky_theme" content="dark">
|
||||
HEAD;
|
||||
}
|
||||
}
|
||||
|
||||
// Inject information and options into the frontend
|
||||
yourls_add_action( 'html_head', 'addOptions' );
|
||||
|
||||
function addOptions()
|
||||
{
|
||||
$url = yourls_plugin_url( __DIR__ );
|
||||
echo <<<HEAD
|
||||
<meta name="pluginURL" content="$url">
|
||||
HEAD;
|
||||
}
|
||||
|
||||
// Register our plugin admin page
|
||||
yourls_add_action( 'plugins_loaded', 'sleeky_add_settings' );
|
||||
function sleeky_add_settings() {
|
||||
yourls_register_plugin_page( 'sleeky_settings', 'Sleeky Settings', 'sleeky_do_settings_page' );
|
||||
// parameters: page slug, page title, and function that will display the page itself
|
||||
}
|
||||
|
||||
// Display admin page
|
||||
function sleeky_do_settings_page() {
|
||||
|
||||
// Check if a form was submitted
|
||||
if( isset( $_POST['theme_choice'] ) ) {
|
||||
// Check nonce
|
||||
yourls_verify_nonce( 'sleeky_settings' );
|
||||
|
||||
// Process form
|
||||
sleeky_settings_update();
|
||||
}
|
||||
|
||||
// Get value from database
|
||||
$theme_choice = yourls_get_option( 'theme_choice' );
|
||||
|
||||
// Create nonce
|
||||
$nonce = yourls_create_nonce( 'sleeky_settings' );
|
||||
|
||||
echo <<<HTML
|
||||
<main>
|
||||
<h2>Sleeky Settings</h2>
|
||||
<form method="post">
|
||||
<input type="hidden" name="nonce" value="$nonce" />
|
||||
<p>
|
||||
<label>Theme</label>
|
||||
<select name="theme_choice" size="1" value="$theme_choice" id="ui_selector">
|
||||
<option value="dark">Dark</option>
|
||||
<option value="light">Light</option>
|
||||
</select>
|
||||
</p>
|
||||
<p><input type="submit" value="Save" class="button" /></p>
|
||||
</form>
|
||||
</main>
|
||||
HTML;
|
||||
}
|
||||
|
||||
// Update option in database
|
||||
function sleeky_settings_update() {
|
||||
$in = $_POST['theme_choice'];
|
||||
|
||||
if( $in ) {
|
||||
// Validate theme_choice. ALWAYS validate and sanitize user input.
|
||||
// Here, we want an integer
|
||||
// $in = intval( $in);
|
||||
if ($in == "light" or $in == "dark") {
|
||||
// Update value in database
|
||||
yourls_update_option( 'theme_choice', $in );
|
||||
} else {
|
||||
echo "Error";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Hide admin links for non-authenticated users
|
||||
if (yourls_is_valid_user() != 1) {
|
||||
echo <<<HEAD
|
||||
<style>ul#admin_menu li:not(.frontend_link) {display: none}</style>
|
||||
HEAD;
|
||||
}
|
148
plugins/sleeky-frontend/index.php
Normal file
148
plugins/sleeky-frontend/index.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php include 'frontend/header.php'; ?>
|
||||
|
||||
<body>
|
||||
|
||||
<?php
|
||||
// Start YOURLS engine
|
||||
require_once( dirname(__FILE__).'/includes/load-yourls.php' );
|
||||
|
||||
// URL of the public interface
|
||||
$page = YOURLS_SITE . '/index.php' ;
|
||||
|
||||
// Make variables visible to function & UI
|
||||
$shorturl = $message = $title = $status = '';
|
||||
|
||||
// Part to be executed if FORM has been submitted
|
||||
if ( isset( $_REQUEST['url'] ) && $_REQUEST['url'] != 'http://' ) {
|
||||
if (enableRecaptcha) {
|
||||
// Use reCAPTCHA
|
||||
$token = $_POST['token'];
|
||||
$action = $_POST['action'];
|
||||
|
||||
// call curl to POST request
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL,"https://www.google.com/recaptcha/api/siteverify");
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('secret' => recaptchaV3SecretKey, 'response' => $token)));
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
$response = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
$arrResponse = json_decode($response, true);
|
||||
|
||||
// verify the response
|
||||
if($arrResponse["success"] == '1' && $arrResponse["action"] == $action && $arrResponse["score"] >= 0.5) {
|
||||
// reCAPTCHA succeeded
|
||||
shorten();
|
||||
} else {
|
||||
// reCAPTCHA failed
|
||||
$message = "reCAPTCHA failed";
|
||||
}
|
||||
} else {
|
||||
// Don't use reCAPTCHA
|
||||
shorten();
|
||||
}
|
||||
}
|
||||
|
||||
function shorten() {
|
||||
// Get parameters -- they will all be sanitized in yourls_add_new_link()
|
||||
$url = $_REQUEST['url'];
|
||||
$keyword = isset( $_REQUEST['keyword'] ) ? $_REQUEST['keyword'] : '' ;
|
||||
$title = isset( $_REQUEST['title'] ) ? $_REQUEST['title'] : '' ;
|
||||
$text = isset( $_REQUEST['text'] ) ? $_REQUEST['text'] : '' ;
|
||||
|
||||
// Create short URL, receive array $return with various information
|
||||
$return = yourls_add_new_link( $url, $keyword, $title );
|
||||
|
||||
// Make visible to UI
|
||||
global $shorturl, $message, $status, $title;
|
||||
|
||||
$shorturl = isset( $return['shorturl'] ) ? $return['shorturl'] : '';
|
||||
$message = isset( $return['message'] ) ? $return['message'] : '';
|
||||
$title = isset( $return['title'] ) ? $return['title'] : '';
|
||||
$status = isset( $return['status'] ) ? $return['status'] : '';
|
||||
|
||||
// Stop here if bookmarklet with a JSON callback function ("instant" bookmarklets)
|
||||
if( isset( $_GET['jsonp'] ) && $_GET['jsonp'] == 'yourls' ) {
|
||||
$short = $return['shorturl'] ? $return['shorturl'] : '';
|
||||
$message = "Short URL (Ctrl+C to copy)";
|
||||
header('Content-type: application/json');
|
||||
echo yourls_apply_filter( 'bookmarklet_jsonp', "yourls_callback({'short_url':'$short','message':'$message'});" );
|
||||
die();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php if( isset($status) && $status == 'success' ): ?>
|
||||
|
||||
<?php $url = preg_replace("(^https?://)", "", $shorturl ); ?>
|
||||
|
||||
<section class="success-screen">
|
||||
<div class="container verticle-center">
|
||||
<div class="main-content">
|
||||
<div class="close noselect">
|
||||
<a href="javascript:window.location.href=window.location.href;"><i class="material-icons">close</i></a>
|
||||
</div>
|
||||
<section class="head">
|
||||
<h2>YOUR SHORTENED LINK:</h2>
|
||||
</section>
|
||||
<section class="link-section">
|
||||
<input type="text" class="short-url" disabled style="text-transform:none;" value="<?php echo $shorturl; ?>">
|
||||
<button class="short-url-button noselect" data-clipboard-text="<?php echo $shorturl; ?>">Copy</button>
|
||||
<span class="info">View info & stats at <a href="<?php echo $shorturl; ?>+"><?php echo $url; ?>+</a></span>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
var clipboard = new ClipboardJS('.short-url-button');
|
||||
</script>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<?php $site = YOURLS_SITE; ?>
|
||||
|
||||
<div class="container verticle-center main">
|
||||
<div class="main-content">
|
||||
<div class="above">
|
||||
<img class="noselect" src="<?php echo siteURL ?><?php echo logo ?>" alt="Logo" width="95px">
|
||||
</div>
|
||||
<section class="head">
|
||||
<p><?php echo description ?></p>
|
||||
</section>
|
||||
<section class="field-section">
|
||||
<?php if ( isset( $_REQUEST['url'] ) && $_REQUEST['url'] != 'http://' ): ?>
|
||||
<?php if (strpos($message,'added') === false): ?>
|
||||
<div id="error" class="alert alert-warning error" role="alert">
|
||||
<h5>Oh no, <?php echo $message; ?>!</h5>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<form id="shortenlink" method="post" action="">
|
||||
<input type="url" name="url" class="url" id="url" placeholder="PASTE URL, SHORTEN & SHARE" required>
|
||||
<input type="submit" value="Shorten">
|
||||
<?php if (enableCustomURL): ?>
|
||||
<span class="customise-button noselect" id="customise-toggle"><img src="<?php echo siteURL ?>/frontend/assets/svg/custom-url.svg" alt="Options"> Customise Link</span>
|
||||
<div class="customise-container" id="customise-link" style="display:none;">
|
||||
<span><?php echo preg_replace("(^https?://)", "", siteURL ); ?>/</span>
|
||||
<input type="text" name="keyword" class="custom" placeholder="CUSTOM URL">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</section>
|
||||
<section class="footer">
|
||||
<div>
|
||||
<span class="light">© <?php echo date("Y"); ?> <?php echo shortTitle ?></span>
|
||||
<div class="footer-links">
|
||||
<?php foreach ($footerLinks as $key => $val): ?>
|
||||
<a href="<?php echo $val ?>"><span><?php echo $key ?></span></a>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php include 'frontend/footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user