GalleryTweet - Twitter module

kblake

Joined: 2005-06-26
Posts: 19
Posted: Sat, 2009-04-25 17:45

I've been working on a really simple module for Gallery2 to allow users to tweet photos onto Twitter... I'd appreciate any comments / suggestions:

http://www.kevinblake.co.uk/gallerytweet-twitter-for-your-gallery2/530/

Thanks for your time! :)

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sun, 2009-04-26 04:50

Great stuff. I don't tweet but think this might appeal to quite a few people.

You can develop http://codex.gallery2.org/Gallery2:Modules:GalleryTweet to document the module

Perhaps you might want to take a look at implementing it for G3 as well.

--
dakanji.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-04-26 05:44

kblake, thanks for the contribution!

I think the module.inc file is missing some code:

	    return array(null, $links);
    }
    /**
     * @see GalleryModule::getSiteAdminViews
     */
    function getSiteAdminViews() {
	return array(null, array(array('name' => $this->translate('Gallery tweet'),
				       'view' => 'gallerytweet.TwitterAccount')));
    }
}
?>

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kblake

Joined: 2005-06-26
Posts: 19
Posted: Sun, 2009-04-26 09:05

Thanks Dayo - I'll get that page updated later today. I haven't taken a look at G3, yet ... But I'll certainly look into it if people find my module useful on G2.

Dave - Brill, I've added that code for inclusion in the next version. I notice your test tweet didn't have the URL in it - was that intentional, or did something go wrong?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-04-26 17:51

I am looking into why the url did not show. Seems that file_get_contents might not work for this host.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-04-26 18:15

kblake, URL file-access is disabled in the server so I will see if curl will work. You might be better at this than me so post back if you find a solution.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kblake

Joined: 2005-06-26
Posts: 19
Posted: Sun, 2009-04-26 19:42

Thanks Dave, I've just uploaded 1.0.1 which uses curl for the TinyURL part instead of URL file-access. If nothing else, it makes sense not to mix my URL get methods, I'm only making more trouble for myself :)

http://www.kevinblake.co.uk/wp-content/uploads/2009/04/gallerytweet.zip

Perhaps that will work a bit better...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2009-04-26 21:36

Great! works better now.
Thanks for the codex page as well :-)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Mon, 2009-07-13 14:38
kblake wrote:
I've been working on a really simple module for Gallery2 to allow users to tweet photos onto Twitter...

Can you add the feature to tweet a album onto Twitter? Is it possible?

 
kblake

Joined: 2005-06-26
Posts: 19
Posted: Mon, 2009-07-13 20:39

Hi Astor,

Thanks for the comment, yes - I keep finding myself wanting to do the same thing.

You can download the latest version (1.0.2) with album support from the usual project page:
http://codex.gallery2.org/Gallery2:Modules:gallerytweet

What do people think...
Would it be useful to setup different tweet formats for albums via the admin page?
Or would it be more useful to be able to edit tweets before they're sent? (it would involve an extra click, of course).
Or both / don't really care?

 
Astor

Joined: 2005-12-15
Posts: 154
Posted: Tue, 2009-07-14 06:38

Tnx for upgrade

kblake wrote:
Or would it be more useful to be able to edit tweets before they're sent? (it would involve an extra click, of course).

For me this is the right way.

 
kjholla

Joined: 2009-03-31
Posts: 44
Posted: Sun, 2009-08-23 09:45

Hello kblake,

I haven't tried this yet. But wanted to know if this module provides for using a URL shortener of our choice such as bit.ly or does it use tinyurl.com by default?

Regards,
KH

 
kblake

Joined: 2005-06-26
Posts: 19
Posted: Sun, 2009-08-23 10:10

Hi kjholla,

It only supports tinyurl.com at the moment ... Do post here if you swap that around, though :)

Thanks,
Kev.