Mobile phone image uploader module

jmr

Joined: 2004-02-26
Posts: 15
Posted: Fri, 2004-07-23 13:44

Hi
I've made a module for Gallery that implements Nokia's Image Uploader Server API. This allows users with image uploader enabled mobile phones (e.g. Nokia 3650 and 6600) to use their phone's built-in Image Uploader to upload pictures to Gallery.

You can download the module (along with the API specification if you're interested) from http://mummola.cs.tut.fi/files/gallery2/

To see it in action go to http://mummola.cs.tut.fi/gallery2/main.php You can try it with username g2 and password forum. It is currently running on todays CVS version of G2.

I'd like to hear your comments! If you have any questions about the module I'm happy to answer them (gonna be away this weekend, though). Also, I haven't written any test cases yet and would appreciate if someone could help me getting started with them.

Jerome
<jerome dot rannikko at tut dot fi>

 
volksport
volksport's picture

Joined: 2002-10-06
Posts: 239
Posted: Sun, 2004-07-25 01:44

Jerome,

Can you send a copy of the module zip'd or tar'd to

I will take a look at it when I get time, and perhaps help you get started with the test cases. I might not get to them extremely soon as most of August I will be in and out of the state, but if i have the e-mail and a hard copy at least I will remember.

Thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2004-07-25 03:11

jmr, very cool! I don't have such a phone to try it out, but this sounds like a great use of the G2 module system.

volksport, looks like all the code is already tar'd up at the link jmr provided.

 
volksport
volksport's picture

Joined: 2002-10-06
Posts: 239
Posted: Sun, 2004-07-25 10:01

Don't mind me I don't read anything. I'm going to bed now.

 
jmr

Joined: 2004-02-26
Posts: 15
Posted: Mon, 2004-07-26 13:29

Even if you don't have a phone that supports the image uploader protocol you can get an idea idea of how the module/protocol works. Set the NOKIAUPLOAD_DEBUG to true in constants.inc to make the module accept GET parameters also (normally only POST is read since that's what the specefication requires). Then you can type for example
your.gallery/main.php?g2_controller=nokiaupload:Login&Username=<your username>&Password=<your password>
in your browser's address field to login to your account.
That command returns to you a list of possible URLs you can use. To see what parameters they need have a look at the files in classes/helpers directory.

Jerome
<jerome dot rannikko at tut dot fi>

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2004-07-29 06:11

Jerome, I haven't had a chance to look at this in detail but I'd definitely like to. I created a task for it here so that we can get a developer assigned to it ASAP. If you'd like to stop by the #gallery channel on irc.freenode.net, I'd be happy to help you write unit tests and review the code as time permits.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-08-18 01:46

jmr, I have started integrating your module into the G2 codebase.
The code looks very good; I've only made a few updates due to G2 api changes and I found one place where the releaseLocks() call was missing. The only significant change I have made is to add a module configuration view so you can pick the group name, album name and where to create the upload album (rather than the fixed names and always in the gallery top level). Hope to get it into CVS soon!

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Wed, 2004-08-18 03:17

This makes me want to get new phones and try this out. Thanks for putting it together, I can't wait to see all the awsome plugins that will end up in G2 :)

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-08-19 16:38

Just committed the module to cvs.. thanks, jmr!!
fyi, I removed all the ob_start/ob_end_clean calls.. bharat prefers to leave those out and if something is causing extra output we fix it at the source.

 
jmr

Joined: 2004-02-26
Posts: 15
Posted: Fri, 2004-08-20 08:54

Hi mindless,
Thanks for the intergration work! Nice to see that you guys found my module usefull enough to include it in the CVS.

mindless wrote:
The only significant change I have made is to add a module configuration view ...

That's cool. I had that in my mind too, but left it for later as I just wanted to get it working with some sensible defaults. Probably just took you a lot less time than it would have for me to do it.

Now I just need to update my copy from the CVS and see what it looks like.

//jerome
<jerome dot rannikko at tut dot fi>

 
jmr

Joined: 2004-02-26
Posts: 15
Posted: Fri, 2004-08-20 12:45

mindless, I just got the latest (08-20-2004 03:33:39 AM) gallery2 tar ball from jmullan's web page (CVS still down :( ) and it looks good. I like the new simpler structure of the code. I agree that the original structrue was a bit heavy for that little code.

I installed the module and tried it out and noticed that you had missed one little change in the code. In RemoteStorageCapabilities.inc on line 55 it still says
$capabilities = ImageUploadApi::getRSCapabilities();
when it of course should be
$capabilities = ImageUploadHelper::getRSCapabilities();

After this little fix everything works perfectly.

Thanks again for the integration work and the nice configuration view.

//jerome
<jerome dot rannikko at tut dot fi>

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-08-20 15:25

ah, good catch.. I'll put that in right now.
yeah, you followed the Api/helpers model that the core module uses.. only core is that big so for other modules we just put all the code in a single helper class.
Bharat doesn't want modules directly accessing $_POST, so I'll put in a change today so that GalleryUtilities offers a getRequestVariables method that doesn't use the g2_ prefix.

 
desiredbard

Joined: 2006-07-05
Posts: 80
Posted: Thu, 2009-07-09 15:19

Hmm E51 should have an image uploader not?
Cant find it and the URL gadget dont work either