New module: bit.ly URL shortening
thumb
Joined: 2004-05-26
Posts: 238 |
Posted: Tue, 2011-02-15 20:08 |
New module to shorten Gallery's album and item links using bit.ly's URL shortening service. By itself, it's not terribly useful, but it integrates with the Twitter module to shorten Gallery URLs in tweets. Documentation, download link, and configuration instructions: -- |
|
Posts: 16
You can make the link when you create an album?
Posts: 238
Probably. This should probably be enabled as a module option so that admins can choose the default link creation behavior. I've added this to the module's Roadmap for the next version.
--
2tbsp.com
github.com
Posts: 44
I got his error after trying to save my API key .
Host name: dug
Operating system: Linux 2.6.39
Apache: Apache/2.2.19 (Debian)
PHP: 5.3.6-12
MySQL: 5.1.57-3-log
Server load: 0.14 0.05 0.06
Graphics toolkit: graphicsmagick
remove Gallery stats
Version: 3.0.2 (Coollanta)
Albums: 32
Photos: 3698
Exception [ 0 ]:
@todo CONNECTION TO URL SHORTENING SERVICE FAILED
MODPATH/bitly/helpers/bitly.php[ 161 ]
156 $headers = explode("\r\n", $headers);
157 $body = explode("\r\n", $body);
158 $response = new ArrayObject(
159 array("headers" => $headers, "body" => $body), ArrayObject::ARRAY_AS_PROPS);
160 } else {
161 throw new Exception("@todo CONNECTION TO URL SHORTENING SERVICE FAILED");
162 }
163 Kohana_Log::add("debug", "Received response\n" . print_r($response, 1));
164
165 return $response;
166 }
MODPATH/bitly/helpers/bitly.php[ 77 ] » bitly_Core::_http_post( arguments )
MODPATH/bitly/helpers/bitly.php[ 105 ] » bitly_Core::validate_config( arguments )
MODPATH/bitly/controllers/admin_bitly.php[ 44 ] » bitly_Core::check_config()
{PHP internal call} » Admin_Bitly_Controller->index()
MODPATH/gallery/controllers/admin.php[ 62 ] » call_user_func_array( arguments )
{PHP internal call} » Admin_Controller->__call( arguments )
SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )
{PHP internal call} » Kohana_Core::instance( arguments )
SYSPATH/core/Event.php[ 208 ] » call_user_func_array( arguments )
APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )
DOCROOT/index.php[ 102 ] » require( arguments )
Environment
Posts: 238
Did you also enter your bit.ly username? I only ask because you did not mention saving it along with the bit.ly API key.
The fsockopen() call on 149 is failing. Are you running any other modules which use fsockopen to communicate with external servers, perhaps Akismet or reCaptcha? Do they work?
--
2tbsp.com
github.com
Posts: 44
Tried it again today. It worked. My Box just rebooted recently . Must have been it.
Posts: 238
Glad it's working
--
2tbsp.com
github.com
Posts: 241
If you want a more automated kind of deal, I just use Twitterfeed to read my gallery's RSS Feed and then it tweets out new photos I put up and I've got Twitterfeed configured to use my Bit.ly information to create the short links. I do upload my photos to a hidden test album first where I can get the description, tags, and all that squared away first. I then move it to the album where it belongs so Twitterfeed can pick it up.
Anyway, food for thought.
I may look at this bit.ly module though as I've been considering working on a Twitter app for my gallery so that it says the tweets are coming from my gallery and not Twitterfeed... which I see is what the Twitter module does. LOL. Will have to check them both out then.
Update: Installed both the Twitter Module and this one and it all works great. Thanks for the module!
Regards,
Mark H.
Using Gallery 3.0.2 - gallery.markheadrick.com
Posts: 238
Twitterfeed + G3 RSS looks like a great way to Tweet everything uploaded to Gallery. The bit.ly + Twitter module allows you to selectively Tweet your Gallery items.
--
2tbsp.com
github.com
Posts: 27300
Thumb,
Please see: http://galleryproject.org/node/112303
Dave