YOURLS widget released

at
YOURLS widget released

This widget lets you embed your YOURLS installation (or someone else’s through API) to have a short URL service into your sidebar.
It’s pretty simple as for now and it does its work.

You can see an example right in the sidebar.

I will implement more options as inserting the password directly into the widget options menu (instead of via text-editor) in a few days. If you are using a passworded admin menu you have to edit yourls-widget-config.php. Further info in FAQ section.

Installation

  1. Upload the folder `yourls-widget` (keep the name intact) to the `/wp-content/plugins/` directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Add the widget to your sidebar via the `Appearance/Widgets` menu.
  4. Insert the URL to the API into the widget options. Example: http://yourdomain.com/yourls-api.php
  5. If the YOURLS installation is in “private” configuration (with password to access admin) you have to enter the username and password in the yourls-widget-config.php file. Further info in FAQ section.

Frequently Asked Questions

The widget gives an “Invalid username or password” notice/ I have a private configuration of YOURLS (admin access needs password).

This happens because your YOURLS installation is private configuration.
To fix this you have to edit the yourls-widget-config.php and add user and password in the fields.

Example with username “user and password “password:
< ?php $username = 'insert_your_user'; $password = 'Insert_your_password';?>
becomes:
< ?php $username = 'user'; $password = 'password';?>

Let any website use my API even if I have password protected admin

To do this you have to edit your YOURLS API (yourls-api.php) and remove these lines:

if ( defined(’YOURLS_PRIVATE’) && YOURLS_PRIVATE == true )
require_once( dirname(__FILE__).’/includes/auth.php’ );

This will disable the password protection on the API, but will keep your admin menu passworded. (thanks

Changelog:

0.3
* First simple yet stable release.

http://wordpress.org/extend/plugins/yourls-widget/

This blogpost is part of Plugins. You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

30 Responses to “YOURLS widget released”

  1. Ozh says:

    Hey this is cool :)

    To make the API publicly available while keeping the admin area protected, simply remove the two following lines:

    if ( defined(‘YOURLS_PRIVATE’) && YOURLS_PRIVATE == true )
    require_once( dirname(__FILE__).’/includes/auth.php’ );

    (simply including auth.php triggers the login/pwd requirement)

    Very cool stuff! I’m adding it to the readme again :)

  2. scizzer12 says:

    Woxxy.
    I love the things right below the YOURLS widget.
    Apparently I’d be good watching mushishi, It looks great.

  3. Marcos says:

    Congratulations for the excelent plugin. :)

    Is there any way to insert the form on a page or post, instead the sidebar?

    Have a great day, and thank you in advance for your help.

  4. Rob Parker says:

    Hi, I’ve just downloaded the most recent version of Yourls, but the lines above to open the API don’t seem to appear anymore in the yourls-api.php file. Do you know what can be done to make it open?
    Thank you very much!

  5. Asshu says:

    I have installed your plugin and looks great and working fine on WordPress version 3.1. But an option to customize more and run a full URL shortening service would be great

    Do you have any plan to release an update for 3.1 version?

    Thanks!

  6. Rodrigo Ap. says:

    Olá, gostaria de saber como usar este script ou api, para que seja possivel colocalo em outro site que quelquer outra plataforma não não exclusivamente WordPress WordPress…

    Google Translate
    Hello, I know how to use this script or api, it is possible to putting them on another site that no other platform quelque not exclusively WordPress WordPress …

    thanks

  7. Rodrigo Ap. says:

    Desculpe o flood e para carrigir

    Olá, gostaria de saber como usar este script ou api, para que seja possivel colocalo em outro site que qualquer outra plataforma não não exclusivamente WordPress WordPress…

    Obrigado

  8. ScoDal says:

    I deleted the area where widgets are displayed in my theme. How can I just ‘include’ the yourls widget anywhere in my page?