The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Web submission for omnifocus (http://forums.omnigroup.com/showthread.php?t=11063)

MattLococo 2009-01-14 01:51 PM

Web submission for omnifocus
 
Hi all!

Before you attempt this you need an FTP program, your own website and a way of working with your website's files.

Just thought I'd pass on this little addition I did with Rapidweaver to the concept of emailing tasks to your omnifocus. Well I had the idea of creating in rapidweaver one of those feedback submission pages that emails the details to you. I can never remember the little codes that are used to delineate the action, time, project in omnifocus emails and don't have those readily available when writing the email.

So I thought to bring the two together with a web submission form.

In rapidweaver create a web submission form (I think it is called Contact in Rapidweaver) for your website and include the fields as you need. Action, Project, Context, Due Date, Time Estimate and Note. Make the first 5 text fields and the last one text area. I also put a list of my projects and contexts into the top of the web form. Make sure to include the email address this is going to in Rapidweaver setup. For details on that consult Rapidweaver's manual.

Once you are ready with the page and have entered the email address you want the web form to go to you can publish your site.

Once published you need to go into your sites files and do a little tinkering with the mailer.php file in the folder of your web submissions directory.

So if you title the web submission directory omnifocus then in that you will find two files omnifocus.php and a sub directory called files. In the subdirectory called files there is a file called mailer.php.

You will need an FTP program or way of getting to this file and editing it.

There is one specific line that needs to be changed in order to format the email that is generated to be recognized by omnifocus

Line 28 of the php normally reads:

$from = stripslashes($form_element0)." <".stripslashes($form_element0).">";$subject= $form_element0;$message = "\n-- $form_element0\n\n> $form_element1\n\n@ $form_element2\n\n# $form_element3\n\n$ $form_element4\n\n// $form_element5\n";

You need to change it to:

$from = "Omnimailer";$subject= "New Actions";$message = "--$form_element0 >$form_element1 @$form_element2 #$form_element3 $$form_element4 // $form_element5";

This line will change the from address to "Omnimailer" also remember to put that as an authorized address in omnifocus. It changes the subject line of the email to "New Actions". I elected not to use the subject line for actions but you can also put actions here. The last part puts the entries from the the webform into the body of the email.

Upload your new mailer.php to replace the old one and it should work. Remember that whenever you republish your website Rapidweaver will likely overwrite your edited mailer.php with the original. Keep a copy so you can restore your mailer.php after republishing.

The drawback to this is that each field on the submission form needs an entry or they don't arrive at OF properly.

The only other problem I encountered when putting this in was my spam filter kept grabbing the emails first.

If you have any questions on this or there is something I missed let me know! :)

Cheers,
Matt


All times are GMT -8. The time now is 08:18 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.