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.
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
0.3
* First simple yet stable release.
@gamerz @ozh I took some liberty with the API… “YOURLS widget released” http://foolrulez.org/blog/2009/09/yourls...
via Twitoaster
@woxxy way cool :) I’ve added this to the Showcase section of the readme. Also, see my comment on the blog!
via Twitoaster
@woxxy wow cool stuff! Intending to release it in the official WordPress Plugins Repo?
via Twitoaster
@gamerz Yeah, sure I will add it to the WP repo.
via Twitoaster
@woxxy yea cool thanks man =D
via Twitoaster
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 :)
Lol, the creators always know best. Updated the post =)
I AM APPROVE
Woxxy.
I love the things right below the YOURLS widget.
Apparently I’d be good watching mushishi, It looks great.
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.
Give me a few days for that, at the moment i am working on the aNi-N-gin too.
Thank you very much. :)
[...] YOURLS widget released | FoOlRulez. [...]
Works great, thank you
[...] Yourls-Widget bettet den Shortener in die Sidebar Ihres WP-Blogs ein. So können Ihre Besucher sich schnell einen [...]
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!