YOURLS: Short URL Widget

Description:

Creates a fully configurable widget that outputs the short URL to the current post or page. Requires the YOURLS: WordPress to Twitter plugin.

A demo can be found to the right (the text can be customized).

Download:

40 comments to YOURLS: Short URL Widget

  1. Dre Armeda says:

    Alex,

    Killer simple, and will be very effective.

    Awesome.

  2. [...] große Version angezeigt wird. Die zweite Sache war das Plugin für meine Yourls-Installation samt Widget zur Anzeige des Links unter jedem Artikel. Für den Statistikfreak in mir habe ich ausserdem noch [...]

  3. Can you add the option to show the permalink of the page with [permalink]?

  4. Grabi says:

    Hi,

    thanks for your great Plugin!

    How can i add [title] to the source-code ? So i can implement the title of the actual page with [title] like [url] ?

  5. Viper007Bond says:

    v1.1.0 adds [title] and [longurl] per Grabi and Brandon’s requests.

  6. [...] Entwickler vom Plugin Yourls Short Url Widget für WordPress hat (für mich) eine sehr wichtige Erweiterung hinzugefügt. Hier im Blog wird das [...]

  7. Amereservant says:

    I really like this plug-in, but the continuous message “Please configure YOURLS – WordPress to Twitter settings now” is a little annoying if someone isn’t wanting to use the Twitter feature of it. I just upgraded to the newest version and that suddenly appeared/persists. I know how to disable it, but i figured I’d mention it to ya and suggest making it an optional feature instead of a required one.

    Thanks again man!

  8. karthik says:

    hi alex,

    I am having a problem with wordpress URLs…. In category page urls “category” keyword is coming…. There are some plugins to remove that keyword but after using those plugins my child category pages are redirecting to 404 error page….. If u know any remedy for this please let me know….

  9. Rich says:

    Is there a simple way to get this to work on a non wordpress website?

    I want people to be able to publicly use my shortner but can’t see a way of doing it other than by using the wordpress plugin?

  10. Keith says:

    Great plugin, well done Alex.

    I’m wondering how easy it would be to call a function in your code to display the short url within single.php i.e. within the main content body rather than as a sidebar widget?

    Any advice appreciated!

    thanks

  11. Keith says:

    Thanks Alex, that function didn’t work for me, but a variation of it works perfectly:

    $short = apply_filters( 'ozh_yourls_shorturl', wp_ozh_yourls_geturl( $id ) );
    echo "$short\n";
    
  12. Ash says:

    I changed the database that I use for YOURls, but now this widget seems to have cached the old database URLs somewhere (as they are not in the YOURls admin list) and I can not find them.

    Any ideas ?

  13. Ash says:

    Thanks Alex, much appreciated. I’ve been looking everywhere. Great Plugin btw :-)

  14. [...] urls with my own domain name like the YoURLs plugin for wordpress . You can read about this here YOURLS: Short URL WordPress Plugin Basically you install YoURLs in a sub folder on your domain and use it to output a shortened url [...]

  15. [...] I’m trying to set up short urls with my own domain name like the YoURLs plugin for wordpress . You can read about this here YOURLS: Short URL WordPress Plugin [...]

  16. Great Plugin.. I got here via link from Pligg to (http://www.viper007bond.com/wordpress-plugins/yourls-shorturl-widget/) From (http://forums.pligg.com/questions-comments/23175-yourls-short-urls-your-domain.html) Seems Pliggs got it all figured out. They dont want to talk about YoURLs at all!

  17. Jason says:

    Great plugin, thanks…

  18. klynn says:

    Hi. Is there any way to make the short link a live url? Thanks..

  19. John says:

    Thanks for this great plugin! Is there anyway to integrate the short-url into the ‘Tweet’ button? Example, when a user clicks the button, the short-url is populated in the text area, instead of the page’s long url.

  20. Nathan Bunn says:

    Does this plugin also work with bbPress 2.0 forum topics (since bbPress moved from a standalone piece to a plugin for WordPress since version 2.0)? I’d ask about Yourls to Twitter, but that’s not your plugin as you’ve said, so I figure that, if this works with bbPress 2.0, so will Ozh’s plugin, since that plugin is a prerequisite to using yours.

    • My plugin merely exposes the short URLs that Ozh’s plugin fetches, assigns, and stores. In short, you’ll want to talk to Ozh to confirm that his plugin is having short URLs generated for forum topics.

      My plugin may also need massaging though as it will only display the widget if is_singular() returns true (i.e. you’re viewing a single post or page) which I doubt it does for forum threads, but I’m not familiar enough with bbPress to be sure.

      In short, you’ll need to fiddle with stuff.

      • Nathan Bunn says:

        Cheers Alex, but there’s actually no need to fiddle with anything.

        I had a look through the Options panel of Ozh’s plugin and, lo and behold, found options to create short URLs for forums, topics and replies, as well as media and posts. Yet another lesson in searching before asking for the answer :$

        Also, using Keith’s code (for some reason, the code you gave didn’t do anything), I’ve been able to call URLs for each topic and forum from in my template as normal. Since bbPress 2.0 sits in your standard WordPress template and uses the standard WordPress theme files, I assume that the widget will work. Since my theme is completely static, I can’t guarantee that, but I’d be willing to bet money they will stay, even when browsing the forums.

        This is going to make my custom share links absolutely fantastic. Thanks!!!

  21. AMYunus says:

    Hi Alex,
    Your widget displays an automatic generated short url. And then sometime I change the short url to another url. But your widget seems display the old short url.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If you wish to post code, write it like [code]blah[/code] so it will display properly.