November 11, 2004

SprintPhoto v0.2.2

Okay, after running into a requirement for the GD Libraries mentioned earlier, I decided to redo the image downloading part of the script to try to do away with this requirement. I think that this latest version will do that. Note that there are no new feature upgrades, so if the other versions are working for you – there is no need to upgrade. If you have had problems with the script in the past, please try out this version.

Here are the usual links and changelog.
View SprintPhoto code
Download SprintPhoto code.
Also available – a debugging version (SprintPhoto_debug v0.2.2x). Please see the warnings! View the source or download.

Still required is John Blade’s wp-mail package with the optional addition of my modified wp-mail: view, download, or see differences.

Plugin Name: SprintPhoto
Version: 0.2.2
Plugin URI: http://bekit.net/archives/category/blog-development/
Description: Allow Sprint Picture Share to be posted with email blogging.
Author: Brint E. Kriebel
Author URI: http://bekit.net

Notes: Based partially off of code from phone2blog by LaughingLizard:
To be used in addition to cool_blade’s modified wp-mail.php code.

Instructions:

  1. Install the modified wp-mail.php code from http://blade.lansmash.com/index.php?cat=5 (or my modified version of it).
  2. Copy SprintPhoto.php into the wordpress plugins directory (typically wp-content/plugins)
  3. Create the directories for photo storage specified in wp-mail.php. Downloaded images will be stored here.
  4. Activate the SprintPhoto plugin through your administrative pages.
  5. Follow the “How to Blog by eMail” guide: http://wiki.wordpress.org/How%20To%20Blog%20By%20Email
  6. Send a picture share as usual to the email adress you have created.
  7. a. Voice attachments not currently implimented.
    b. For text messages:

    • By default it will pull a text message in as the title (example: “This is my title!”)
    • You can modify the Category of the post using brackets with the category id (example: “[2] This is my title!” – this will post into the category with id #2)
    • You can add a text post that will show under the image by sepating the title with a semicolon (example: “[2] This is my title!; This is the text of the post.”)
    • If no text message is selected, the default title can be defined by the variable “$defaultTitle”.
  8. Browse to the wp-mail.php page – it will begin processing your email.
  9. Regular emails will process as normal posts.
  10. The full scale image as well as a thumbnail will be downloaded to the photos directory. A blog will be posted per your configuration of wp-mail.php with the thumbnail linking to the full image, the category, title and text of the post will be implimented as described above.

Changelog:

  • 0.2.2
    • Change to filehandling.
    • The plugin should no longer require the GD Libraries.
    • PHP => 4.3.0 is required for the new file handling.
  • 0.2.1
    • Minor bugfix
    • Fixed:
      • Special characters (such as & or ‘) would cause the script to bomb with an SQL error
  • 0.2
    • Fixed:
      • Incorrect date/time stamp.
      • Permalinks not working correctly.
    • Added:
      • Title can now be adjusted (and defaulted).
      • Now using wp-mail.php hack from http://blade.lansmash.com/index.php?cat=5 (Some modifications made).
      • Category can be adjusted (thanks to blade’s wp-mail).
      • A message can be planted in addition to the Title.
      • The downloaded images are named to the date-title.
  • 0.1
    • Initial release.
  • To-Do:
    1. Bug-fix as needed.
      • Known bugs:
        • None that i’ve found :)
    2. Add functionality for voice messages.
    3. Possibly turn this into a full Sprint Vision plugin for text messages, picturemail and videomail. (Optimism is a good thing).

Last Modified: 2004-11-10

20 Responses to “SprintPhoto v0.2.2”

  1. John Says:

    Everything is working fine for me except that the category is not being displayed properly

    I am getting the error

    1/1/2005
    testing moblog
    Filed under:
    Warning: Invalid argument supplied for foreach() in /home/johnlitt/public_html/blog/wp-includes/template-functions-category.php on line 65

    I also posted this message here
    http://wordpress.org/support/topic.php?id=9270#post-112445

    update: when I go in to edit the post and manually select a category, the error disappears from the post.

  2. John Says:

    trying to duplicate the error.. i think its happening only when I just enter text instead of title; text

  3. John Says:

    Also my pics are really pixelated (sp?) oncee they are posted on the blog.. I have compared the enlarged photo on sprintpcs site to the enlarged photo on my blog and the sprintpcs photo is much higher quality.. any ideas? Im using your v.0.2.2

  4. Brint Says:

    Sorry it took me a bit to get back to you. Life is hectic now-a-days. As for the error – this comes from not letting the script fully complete it’s task. I am betting that it is taking too long do to a default pingback setting that causes wp-mail to try to ping the TON of addresses that appear in the sprint emails. This can be fixed by turning off the “Attempt to notify any Weblogs linked to from the article” in the Options – Discussion area of the admin pages. When I have some time, I will try to find a way to make this the default with the script, however I believe it will take some tweaking of the wp-mail code.

    As for the pixilation – I’ve never encountered this. Could you give me some examples – maybe email me a copy from the sprint site, and point me to it’s counterpart on the web site. Personally, the pics have always turned out the same for me.

    I’ll copy this in an email to you – let me know if it helps!

  5. John Says:

    Thanks Brint.. I have had the “Attempt to notify any Weblogs linked to from the article” in the Options – Discussion area turned off. I’ll try to pay more attention in the future to what I exactly did during the Picture Share and see if I can figure out how to duplicate the error.

    For the photo comparison, take a look at these two bitmaps in side by side browsers
    http://www.johnlittle.com/sprintpcs/testphoto01_bloggedversion.bmp
    http://www.johnlittle.com/sprintpcs/testphoto01_sprintpcsversion.bmp

    Can you see the difference?

    It looks like enlarged version of a couple of your photos may have the same kind of pixelation:
    http://bekit.net/wp-content/moblog/2005-01-03-210213-at-the-cafe.jpg
    http://bekit.net/wp-content/moblog/2004-12-31-202812-happy-new-year.jpg
    but to confirm, you’d have to log into your http://www.sprintpcs.com account to view the enlarged version of the sprintpcs pics side-by side.

  6. John Says:

    just wrote a long post and didn’t copy it. i think it got caught by your comment spam stopper because it had several links. will rewrite if its not in your queue. -JL

  7. Brint Says:

    I got it as an approval request. If the spam blocker kills it completely, it notifies the user.

    I’ll look into the issues and let you know.

  8. Elwing's Weblog Says:

    New Treo 650
    As some of you may have figured out, I’m attempting to set up a moblog on my wordpress log. Unfortunately, the way my phone sends pictures (Sprint PictureMail) is a little unique. I found SprintPhoto. It uses a hacked version of wp-mail.php to rea…

  9. chrisgresham.com » Email Posts Says:

    [...] int PCS Phone. I used a PHP script and plugin from these two sites: Pug’s Place and bekit.net It took both of these sites to get the job done. I had to follow bekit.net&#821 [...]

  10. Tony Says:

    Hi,

    I’ve been using SprintPhoto, and it’s been working well, except: it won’t automatically change the category. No matter what I put in brackets (ex: “[23] This is my post” should post to category 23), all posts show up as “uncategorized”. I have to manually edit the post to select the proper category.

    I’m using SprintPhoto 0.2.2, and WP 1.5

    Thanks…

  11. Brint Says:

    Tony, are you also useing the modified wp-mail.php file?

    I noticed that that has recently been updated. Unfortunatly I have not had time to run through the changes or make my plugin a little more 1.5 friendly.

  12. Dan Says:

    Something strange is happening with SprintPhoto 0.2.2 on my site. Suddenly moblogging with this plugin was completely dead. When I investigated, it appeared that Sprint had changed the “from” address on the email. No problem–updating the user I’m posting under fixed that.

    Problem now is, SprintPhoto no longer correctly parses the picture share email. It dumps the whole source HTML of the message into a post.

    Has Sprint changed the format? Has something broken on my end?

  13. There Is No Easter Bunny » Blog Archive » SprintPhoto Plugin Issues Says:

    [...] Posting this just in case anyone else runs into the same issues. If you’re using Brent’s excellent SprintPhoto plugin for WordPress you may want to disable the WordPress should correct invalidly nested XHTML automatically option. When turned on it annoyingly adds a trailing / to the end of the img src thumbnail link after you edit a post. When turned off it doesn’t. [...]

  14. There Is No Easter Bunny » Blog Archive » SprintPhoto and WP-Print Says:

    [...] As anyone can see by the amount of picture only posts here lately I really dig Brint’s SprintPhoto plugin for WordPress. It is, as the kids say, the bee’s knees. To finally have a reason to use the camera built-in to my cellphone is pure gold. [...]

  15. Ed Says:

    This plugin is now useless since it requires John Blade’s wp-mail script. wp-mail is no longer available. He refuses to fix the link on his site. That is too bad since I really would like to use the Sprint photo plugin.

    Cheers.

  16. Brint Says:

    I will see what I can do about getting a copy posted. Give me some time though, things are pretty swamped right now.

  17. Ed Says:

    Still hoping to use your plugin. Any luck on getting a copy of wp-mail posted to your site?

    Cheers.

  18. web|log of Ross Gerbasi » Blog Archive » Sprint Picture Blog Says:

    [...] I was working with SprintPhotoin an attempt to get my little sprint phone to blog to my wordpress site. It failed horribly as sprint must have changed all sortsa stuff since this plugin was written. [...]

  19. Phosphers Says:

    Any chance of updating sprintphoto to work with wordpress 2.3 and beyond? With the new taxonomy stuff sprintphoto is unable to post to the right category/term.

  20. Brint Says:

    Sorry, I am no longer supporting it. I have just been using flickr’s built in functionality lately.

Leave a Reply