Download the PHP package formula21/yourls-qr-thumbnail-plugin-with-preview-redirect without Composer

On this page you can find all versions of the php package formula21/yourls-qr-thumbnail-plugin-with-preview-redirect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yourls-qr-thumbnail-plugin-with-preview-redirect

Preview and Redirect Plugin - Yourls

Description

When you use short-link like https://sho.rt/mylink and it redirects to https://www.example.com/redirect-with-shortlink/long-link/my-link, the user never knows where this redirect. To add a trusty layer over your user, I introduce you to the Preview and Redirect Plugin (with QR Code, Thumbnail Generation, Pre-Preview & Forced-Preview [Complementary]).

Features (A Lot!!)

Enabling and Disabling

  1. If you want to enable the QR (.qr) generation, then you need to modify in users/config.php, by adding:

By default: The plugin is disabled.

  1. If you want to enable the thumbnail (.i) generation plugin, then you need to modify in users/config.php, by adding:

By default: The plugin is disabled.

  1. If you choose to customize the preview before redirect, the following should be noted:

    • Auto Preview before redirect by default is DISABLED. To enable use the code below in users/config.php.

    • You can also alter the wait time to show the preview page, before automatically redirecting.

    The constant F21_PREVIEW_TIME is only effective if F21_PREVIEW_REDIRECT is true.

    Default: The constant of time has a value 0, which means infinite waiting time. If we do not find a valid integer. Then we consider the same to be 0 by default.

    Range: The valid range of the time is between [0, 60] both inclusive.

    Unit of Measurement: The time here is measured in seconds.

Other features:

If you like to redirect without seeing the preview page at the same time also keeping the Preview Before Redirect Plugin active, regardless of time (as defined or not defined by F21_PREVIEW_TIME), we can use ?utm_redirect=auto&utm_preview=1, to auto redirect without the preview page.

Expected Enhanced:

Admin Area Add-On:

Installation:

Steps

  1. Download the code by either by git clone or by downloading as ZIP.
  2. Extract and place it in user/plugins folder.
  3. Go to the Administration Page -> Manage Plugins. Click to activate plugin.

Google PageSpeed Insights

We use Google PageSpeed Insights API to get you a thumbnail of the page you are requesting. This API works without an API_KEY. However if you have too much traffic, you may exceed the quota. This will give you a 429 Quota exceeded for quota metric 'Queries' and limit 'Queries per minute. To avoid such we request you acquire an API Key. Before you do so you may want to see the docs at https://developers.google.com/speed/docs/insights/v5/get-started. You can create an API Key from the docs too. If you are willing to use an existing API Key, you may do so. Please do not forget to enable PageSpeed Insights API. For security Google (and also myself) recommend you restrict the use of your API key to a subset of websites.

Caution: If you are limiting your keys to certain referrers only, please do not forget to add the exact domain (and path if any), to the list of exceptions as defined by the constant YOURLS_SITE in users/config.php.

If you are willing to use with an API Key, please use the following code to associate it correctly:

Note: Please avoid disclosing your API_KEY to anyone. If you see any unwanted traffic, consider regenerating your key.

Composer stuff:

If you want to you can always run the composer statement.

OR,

For more information about composer, visit Composer Documentation.

To know how to install composer.phar, please see Installation Guidelines.

Word of caution!!

Introduction

I have been testing this on localhost as well as https://stp.rf.gd. I myself use the renowned Plugin Name: Sean's QR Code Short URLs with 404 If Not Found ☑️. However somehow if I go to the URL https://sho.rt/link.qr it immediately shows me a HTTP 404 - Not Found Error. I understood that the action loader_failed was being fired after one of the following actions:

Investigation & Faulty Code

On investigation I found these actions at https://yourls.org/hooklist.php. From there I searched each action being called. If you notice both redirect_keyword_not_found and loader_failed are being fired on the page yourls_loader.php. On inspecting I found:

Please note --> is not part of the code. It here denotes the faulty piece of code.

If you closely notice redirect_keyword_not_found was fired befire loader_failed. So link.qr was being flagged by redirect_keyword_not_found action (as it does not exist in the database) and hence a 404 Not Found.

How to get rescued?

There are actually two ways.

  1. The simple way is to swap the faulty piece of code with each other, i.e.,

However it is not encouraged as if you change the code, you need to do the same for every update, and it is discouraged to directly modify the core.

  1. Find and comment each plugin(s) which use the action redirect_keyword_not_found such as the 404 Plugin by ozh.

Note: callback_function can be action or filter present here in the hooklist.

Translating

This plugin already translated to English and Russian, simply uses whatever language YOURLS uses, as described here.

If you want to translate this plugin into your own language, this blog post from YOURLS describes how to do it. You can find the latest .pot file in the languages folder of the plugin directory. Please follow the contributing guidelines below to add your translation to plugin.

Demo:

  1. For QR Preview: https://stp.rf.gd/f21.qr
  2. For Thumbnail Preview: https://stp.rf.gd/f21.i
  3. For Preview: https://stp.rf.gd/f21~
  4. For Pre-Redirect Preview: https://stp.rf.gd/f21

Testing:

This plugin has been tested on YOURLS 1.5 through 1.8.1, both on localhost and on a live server at https://stp.rf.gd.

License:

The code is licensed under MIT License. A copy of the license should be included in every export of this plugin. However if the same has not been exported, the terms are as below.

Contact Me

Website

👉 Website of @formula21

Scan

Scan

4. Social Media

@anweshanrc151 anweshan.roychowdhury anweshan_roy_chowdhury


All versions of yourls-qr-thumbnail-plugin-with-preview-redirect with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package formula21/yourls-qr-thumbnail-plugin-with-preview-redirect contains the following files

Loading the files please wait ....