ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

SAEF without being logged in or initially connected to internet (for arctic explorer)

March 12, 2008 7:16pm

Subscribe [6]
  • #1 / Mar 12, 2008 7:16pm

    Erskine

    46 posts

    Hello everyone.

    I have an almighty conundrum here.

    Our client is making a new solo North Pole Speed Record, and from March 21st he will be on the ice making for the North Pole. Each day he will send one blog post for automatic publishing, assuming he doesn’t get eaten by any polar bears (he has a gun though). Amazingly, the whole of the arctic has (fairly dodgy) network coverage, so blogging from a mobile browser is doable.

    We’d built a perfectly mobile-friendly Stand Alone Entry Form, inviting him to login, it would then refresh to show the hard-coded SAEF. All works fine, as you’d expect.

    But. Owing to incredibly expensive roaming charges and drain on battery for the internet connection, we need to do this another way.

    He would like to simply drag a static, hard-coded HTML/PHP file into his mobile browser and fill in all the fields in his own time without connecting to the internet. Then, once he is happy and has added all the day’s information, he would then like to connect to the internet, and then press “Submit”.

    This would be fine if he was already logged in. The major problem is that the hard-coded SAEF will not send the data to the EE database if he has not logged in first of course. We cannot rely on his browser “remembering him” via cookies or whatever. Ultimately, if he risks frostbite to write a long post on the form, then tries to send it and it fails, he is gonna be mighty upset, all alone… with a gun.

    So, we need a solution. How can we somehow send the data to EE without him first connecting to the internet and logging in? Is there some way to send the member login info with the hard-coded SAEF? Is there perhaps a way to send the info direct to the weblog database tables by bypassing the whole login process (perhaps akin to the way Freeform works)? is it possible to borrow some back-end code to create a process script to handle the data after submission and add the blog post?

    I admit that I’m only just sitting down to contemplate this problem, and there might be an obvious if kludgy method, but knowing how dependent SAEFs are on being logged in, I’m worried.

    I know that ben c posted a plugin to bypass the login via a guest account, but remember that we need to make this happen without a web connection right up until he presses “Submit”.

    Many thanks for any ideas or help,

    Colly

  • #2 / Mar 12, 2008 7:31pm

    Erskine

    46 posts

    By the way, a friend just reminded me about using moblogging to post via email, but we’d like to avoid that route as sending emails from the North Pole is apparently a terribly slow and problematic process. Web is more robust. Plus, he will use so many custom fields for complex data with each post that a lovely HTML form is a major desire.

  • #3 / Mar 12, 2008 7:33pm

    Pål Degerstrøm

    28 posts

    Colly,

    Now *that’s* a niche project… I have some PHP code that I use to insert content straight into the EE database from a custom form. It doesn’t use any of the authentication mechanisms from EE, so you would have to secure it in other ways (either by obscurity or something else).

    Let me know if you’re interested, preferably by e-mail (.(JavaScript must be enabled to view this email address)).


    Best regards,
    Pål Degerstrøm

  • #4 / Mar 12, 2008 8:02pm

    Simon Rudkin

    51 posts

    Col - it’s late and I’ve been enjoying a few glasses of Laphroaig tonight, but you could try the Log Me In plugin. Don’t know if it’s polar bear proof though.

  • #5 / Mar 12, 2008 8:06pm

    Mark Bowen

    12637 posts

    Wow that sounds like a real amazing job! Do let us know when it all goes public, that is if it is?

    Just as an aside, the person who created the plugin was actually Ben and not myself 😉 I just posted in there saying how good it is! 😊

    You could just get him to post via Freeform and have it send to a moblog e-mail address so that the post goes straight into a weblog entry. I have done that on a recent project and it works just fine.

    Hope that helps the thought process a bit 😉

    Best wishes,

    Mark

  • #6 / Mar 12, 2008 8:19pm

    Erskine

    46 posts

    @Simon: How nice to hear from you Sir. That plugin is similar or the same as the one I linked to I think. Unless I am being dim, it needs the user to be online to first bluff the login, and also needs to allow EE code in the flat file (although maybe raw source would work. I’ll give it a go though. Regardless, I’m looking forward to your wedding.

    @Mark: I’ll certainly announce it when its done, definitely. Kept thinking about Freeform too, but haven’t used that since EE 1.3 or something, and using it as a crazy bridge to make weblog entries is probably beyond me personally. EDIT: OH, I see what you mean about going via an email. Yeah, smart idea!

    Anyhow, Pål is sending me some code (thanks kind chap) and if that doesn’t work I’ll get our code man on it. Still, massive thanks for all suggested ideas and help.

  • #7 / Mar 12, 2008 8:24pm

    Mark Bowen

    12637 posts

    Hiya,

    Well really using Freeform to do this is an absolute synch. Literally you would have a form on a page where your explorer (gun and all 😊 ) would go to it and fill it out. He would then connect to the internet (hopefully 😉 ) and submit the form. This would then go straight to a moblog e-mail address and would also need to go to someone you trust your end. The admin at your end would then just either log into the EE system and retrieve the moblog entry and it would be automatically published or you could set up a page that a person, maybe even your explorer could go to once the submission has been made and this would check the moblog placing the entry into the system for you.

    Alternatively you could just write a PHP mail form which inserts the required data into the weblog tables which shouldn’t be too hard to do. If you know the time when the explorer is going to be posting though then you can have someone at hand who would check the moblog when he has submitted the information.

    Hope that helps.

    Best wishes,

    Mark

  • #8 / Mar 12, 2008 8:24pm

    Simon Rudkin

    51 posts

    I really should have read your first post where you mention my ingenious solution! Damn. What about trying one of the desktop blogging tools > metaweblog api?

  • #9 / Mar 12, 2008 8:31pm

    Mark Bowen

    12637 posts

    And I too the post that mentions your wedding Simon. Many congratulations! Take it from me that it is one of, if not the best thing that you can do with your life. I’ve been married for nearly 8 years now and it is the best feeling ever 😉

    Sorry for going off topic but just wanted to wish you the best.

    Hope you get it all sorted. Please do let me know what you decide upon in the end. Might be an idea also to get in touch with one of the Development team as they might be able to get something clever sorted out for you as this would be a really good advert for them too!

    Best wishes,

    Mark

  • #10 / Mar 12, 2008 8:33pm

    Pål Degerstrøm

    28 posts

    Alternatively you could just write a PHP mail form which inserts the required data into the weblog tables which shouldn’t be too hard to do.

    That’s what I’m doing for a project, and sent to Colly for him to take a look at. It seems he has a lot of custom fields, so a form that inserts straight into the database would probably work.

    Another idea I had was to write some JavaScript that runs on the client that actually submits the data without clearing the form. That way, the form fields won’t be lost in case of an interrupted net connection or other problems. You know, in case you have some extra time on your hands…

  • #11 / Mar 12, 2008 8:39pm

    Mark Bowen

    12637 posts

    Yep AJAX would be the way I would handle it if doing it in this way. A bit like the Facebook kind of functionality as that site is always running slowly. You would post the form values via AJAX and if they go through successfully then you can update a span text block on the page to say so. If not you can show an error message instead and then they can try again.

    Best wishes,

    Mark

  • #12 / Mar 12, 2008 8:55pm

    Erskine

    46 posts

    Great to spark some interest and get a few ideas here. Thanks all. Pål has sent some promising files to work from, and hopefully one of the Erskine chaps will crack it tomorrow. Rest assured the final solution will be declared here when the site launches, or sooner. I’ll link up the site too.

    I’m going offline as I’m traveling for a day or two, but I’ll check back here when I can.

  • #13 / May 05, 2008 10:12am

    Luke Stevens

    80 posts

    Just out of curiosity, did you ever crack this one, Mr Collison? 😊

  • #14 / May 06, 2008 7:35am

    Erskine

    46 posts

    Yep, we cracked it using some crazy PHP, and our explorer happily blogged from the North Pole until the expedition was called off. http://north.bensaunders.com

    I’m frighteningly busy at the moment, but I will write about how we did a few things for that project when I get a chance.

  • #15 / Jul 07, 2008 5:50pm

    stef25

    268 posts

    could you not use google gears & offline browsing for this? not sure exactly how it works but ive read many articles about “browsing offline” and then submitting everything when the internet connection is restored.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases