Changing the default URL Shortner Woes

edited January 2011 in Plugins
I'm using my own url shortenrt script Yourl which has a plugin for StatusNet. I've installed it and added the following to config.php

addPlugin('Yourls', array('shortenerName'=>'YOURLS','freeService'=>false,'serviceUrl'=>'http://xxx.yyy/yourls-api.php?signature=8ff64807a1&action=shorturl&url=%1$s&format=json'));

It works fine if you goto Account->Others->Shorten With->YOURL you type in a post longer than 140 chars with a url and it shortens it as it should. The problem comes when I want to access the API from a DOS window on Windows XP.

If I issue this command

c:\$\curl\curl.exe -u user:passwor -d status="This is coing to be quite a long message so that it to shorten the url a big biy lol I hope it does it OK http://www.avery.verylongurl.tomakesure.itbreaksthe140 chars.com" http://xxx.yyy.info/api/statuses/update.xml

It shortens the URL but does it with the default url.ca not YOURL which is set for that user!

I've tried adding this to config.php

unset($config['plugins']['default']['LilUrl']);
unset($config['plugins']['default']['SimpleUrl']);
unset($config['plugins']['default']['2tu.us']);
unset($config['plugins']['default']['PtitUrl']);
unset($config['plugins']['default']['TightUrl']);

Which leaves only YOURLS as an option in other settings but when the status command is run from DOS it returns an error saying the line is more than 140 chars!

Before I pull the rest of my hair out could someone please tell me how to

1) Change the default url shortener for the entire system so it will use only YOURL for all url shortening including command line status updates (I know about the user table field but as pointed out above it ignores the default set for that user)
or
2) Disable all the other shorteners ensuring YOURL is the only one left and that it'll work through the API
or
3) Anything as long as it works.

Thank you in advance any help you give is appreciated.

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID