Generates a short url to the current page using a url shortening service.
Compatible with DokuWiki
Binky,
This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.
This plugin automatically generates a Short_URL link to the current page.
Currently Shorty supports the following url shortening services:
Download the plugin using the plugin manager or manually from the download link above.
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Important
It is mandatory that you have installed the cURL Extension for PHP.
You can check if the extension is installed using the following code:
if ( function_exists('curl_init') ) { echo 'cURL is installed'; } else { echo 'cURL is NOT installed'; }
The plugin provides different url shortening services:
Select the default service in the config manager.
Shorty supports a few authorization protocols on services providing such functionality. Depending on the service you plan to use, it may be necessary to register and get an access token.
service | Authorization | more info |
---|---|---|
Bit.ly bitly.com j.mp | OAuth token | https://bitly.com/a/oauth_apps |
tinyURL | none | |
yourls | Signature token | https://github.com/YOURLS/YOURLS/wiki/PasswordlessAPI |
Basic syntax usage:
~~shorty [service]~~
where [service]
can be one of the following options:
option | service | output example |
---|---|---|
| uses the default service | http://bit.ly/17dfkP5 |
default | uses the default service | http://bit.ly/17dfkP5 |
bit.ly | uses the bit.ly service | http://bit.ly/17dfkP5 |
bitly.com | uses the bitly.com service | http://bitly.com/17dfkP5 |
j.mp | uses the j.mp service | http://j.mp/17dfkP5 |
tinyurl | uses the tinyurl.com service | http://tinyurl.com/9xp3n8h |
yourls | uses the yourls self hosted service | http://yourls.org/d1 |
Using the default service:
The short link to this page is: ~~shorty~~.
Result: The short link to this page is: http://tinyurl.com/qalfp2p.
Using a specific service:
The short link to this page is: ~~shorty bit.ly~~.
Result: The short link to this page is: http://bit.ly/Okr3Vi.