<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anthony DiSpezio</title>
	<atom:link href="http://anthonydispezio.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://anthonydispezio.com</link>
	<description>Web &#38; New Media Director</description>
	<lastBuildDate>Mon, 19 Mar 2012 19:54:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Front End Submission with Gravity Forms + Events Calendar Pro</title>
		<link>http://anthonydispezio.com/blog/gf-ecp-frontend-submission/</link>
		<comments>http://anthonydispezio.com/blog/gf-ecp-frontend-submission/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 10:11:10 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=924</guid>
		<description><![CDATA[The Modern Tribe team has done a great job developing a robust calendar plugin for WordPress. This tutorial will show you how to create a front-end event submission form using Gravity Forms (while we all eagerly await the Community Events plugin). Last tested 3-19-2012 using: Gravity Forms 1.6.3.2.1 Gravity Forms &#38; Custom Post Types 3.0.1 [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://tri.be/" target="_blank">Modern Tribe</a> team has done a great job developing a robust calendar plugin for WordPress. This tutorial will show you how to create a front-end event submission form using Gravity Forms (while we all eagerly await the Community Events plugin).<span id="more-924"></span></p>
<p>Last tested <strong>3-19-2012</strong> using:</p>
<p>Gravity Forms 1.6.3.2.1<br />
Gravity Forms &amp; Custom Post Types 3.0.1<br />
The Events Calendar 2.0.4<br />
Events Calendar Pro 2.0.4<br />
Wordpress 3.3.1</p>
<p><a href="http://capecodlife.com/events/submit/" target="_blank">Click here for an example</a>  - please do not submit tests, this is a live form.</p>
<p>&nbsp;</p>
<h2>Step 1: Install the Plugins</h2>
<p>In order to pull this off, you&#8217;re going to need a few things:</p>
<ul>
<li><a title="Gravity Forms" href="http://www.gravityforms.com/" target="_blank">Gravity Forms WordPress plugin</a> ($39 Personal License &#8211; well worth it)</li>
<li><a title="Gravity Forms + Custom Post Types" href="http://wordpress.org/extend/plugins/gravity-forms-custom-post-types/" target="_blank">Gravity Forms + Custom Post Types WordPress plugin</a> (Free &#8211; WP Plugin Directory)</li>
<li><a title="Events Calendar Pro" href="http://tri.be/wordpress-events-calendar-pro/" target="_blank">Events Calendar Pro</a> ($50 Personal License &#8211; absolutely worth it)</li>
<li><a title="The Events Calendar" href="http://wordpress.org/extend/plugins/the-events-calendar/" target="_blank">The Events Calendar</a> (Free &#8211; WP Plugin Directory)</li>
</ul>
<div>Install all of the plugins listed above before continuing.</div>
<h2>Step 2: Download the boilerplate form</h2>
<p>Tim Bowen at Creative Slice wrote <a title="Gravity Forms + Events Calendar Submissions" href="http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/" target="_blank">a great tutorial</a> explaining the setup of the form fields in Gravity Forms.</p>
<p>Using Tim&#8217;s tutorial as a starting point, I&#8217;ve created a boilerplate GF form that can be imported into your copy of Gravity Forms. <strong>All of the required plugins must be installed and up-to-date for this part to work.</strong></p>
<p><a class="button" title="GF+ECP frontend form" href="https://github.com/adispezio/gf_ecp_frontend_submission/blob/master/gf-ecp_frontend_form.xml" target="_blank"><strong>Download GF+ECP boilerplate form</strong></a></p>
<p>Download and install this GF form through the Import/Export option in the Gravity Forms settings.</p>
<h2>Step 3: Copy the code</h2>
<p>The following code handles the formatting and saving of Gravity Forms data for Events Calendar Pro metadata.</p>
<p><a title="GF+ECP Frontend Submission" href="https://github.com/adispezio/gf_ecp_frontend_submission/blob/master/functions.php" target="_blank"><strong>View the complete code</strong></a></p>
<p>Copy this code into your functions.php file (don&#8217;t include the starting and ending PHP tags).</p>
<p>Change &#8221;gform_pre_submission_1&#8243; from &#8220;1&#8243; to the value of your GF form ID. If you already had existing forms before importing this one, then the form ID will be higher than 1. <em>Example: If GF form ID is 15, then &#8220;gform_pre_submission_15&#8243;</em></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>13
14
15
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//  Add the action hook to format the GF form data into ECP event meta</span>
<span style="color: #666666; font-style: italic;">//  The GF form id is added to the &quot;gform_pre_submission&quot; hook so it only fires when that form is submitted</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;gform_pre_submission_1&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;format_tec_event_meta_from_gravity&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Put the form on a page and test it out. If you want to disable a field, remove it from the form (or change the form type to &#8220;Hidden&#8221;).</p>
<h2>Step 4: The Code Explained</h2>
<p><strong>Please use the complete code above &#8211; the explanation below doesn&#8217;t contain the full code.</strong></p>
<p>Contributors: <a href="http://creativeslice.com/tutorials/gravity-forms-events-calendar-submissions/" target="_blank">Tim Bowen</a>, <a href="http://blog.samdevore.com/" target="_blank">Sam Devore</a>, <a title="jgvisual" href="http://support.makedesignnotwar.com/discussion/comment/5387/#Comment_5387" target="_blank">jqvisual</a>, <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/2/#post-10267" target="_blank">john</a>, <a href="http://tri.be/event-submissions-using-gravity-forms-in-2-0/" target="_blank">Rob La Gatta</a>, <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/2/#post-10629" target="_blank">Jamie</a>, <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/3/#post-11340" target="_blank">Christina</a>, and <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/4/#post-13194">Anthony DiSpezio</a> (myself)</p>
<h3>Setting the Gravity Form variables</h3>
<p>The variables must be set to match their corresponding Gravity Forms field IDs. Most of the form fields are just passing values &#8211; Events Calendar Pro does the heavy lifting by interpreting those values through its API.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">/*  VARIABLES - The following variables should correspond to their respective GF form elements IDs */</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// All day event</span>
	<span style="color: #000088;">$eventAllDay</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Start and end dates (and times if the event is not all day)</span>
	<span style="color: #000088;">$startDateFormId</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$startTimeFormId</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$endDateFormId</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$endTimeFormId</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Event recurrence type</span>
	<span style="color: #000088;">$recType</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Recurrence ends &quot;On&quot; a speceific date or &quot;After&quot; a certain number of occurrences</span>
	<span style="color: #000088;">$recEndType</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">9</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// End date for event recurrence (if &quot;On&quot; is selected)</span>
	<span style="color: #000088;">$recEnd</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// A different &quot;After&quot; multiplier exists for each possible recurrence type (if &quot;After&quot; is selected)</span>
	<span style="color: #000088;">$recEndCounts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #0000ff;">'Every Day'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">11</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'Every Week'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">12</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'Every Month'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">13</span><span style="color: #339933;">,</span>
		<span style="color: #0000ff;">'Every Year'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">14</span><span style="color: #339933;">,</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Venue details</span>
	<span style="color: #000088;">$venueName</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">18</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$venueAddress</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">19</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$venueCity</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$venueCountry</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">21</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// for neither US or Canada, use province text field</span>
	<span style="color: #000088;">$venueProvince</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">22</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// for US, use state dropdown (two letter values have been added to match ECP meta)</span>
	<span style="color: #000088;">$venueState</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">23</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// for Canada, use province/territory dropdown</span>
	<span style="color: #000088;">$venueCaProvince</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">24</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$venueZip</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">25</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$venuePhone</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">36</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Google Maps</span>
	<span style="color: #000088;">$showGoogleMapLink</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">26</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$showGoogleMap</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">27</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Organizer details</span>
	<span style="color: #000088;">$organizerName</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">29</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$organizerPhone</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$organizerWebsite</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">31</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$organizerEmail</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">32</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Format the Dates and Times</h3>
<p>The dates and times are formatted to match the ECP metadata (now that Gravity Forms has an advanced date field with the correct formatting, I&#8217;m not sure if it is needed).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>45
46
47
48
49
50
51
52
53
54
55
56
57
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">/*  DATE &amp; TIME FORMATTING - Format the date and time from GF to match ECP meta */</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// break the dates into arrays</span>
	<span style="color: #000088;">$startDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date_parse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$startDateFormId</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$endDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date_parse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$endDateFormId</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// sql format the result</span>
	<span style="color: #000088;">$startDateString</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$startDate</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'year'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'-'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$startDate</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'month'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'-'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$startDate</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'day'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$endDateString</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$endDate</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'year'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'-'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$endDate</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'month'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'-'</span> <span style="color: #339933;">.</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$endDate</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'day'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// get the start/end times</span>
	<span style="color: #000088;">$startTime</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$startTimeFormId</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$endTime</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$endTimeFormId</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Set the ECP form values for saving</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">/* SET ECP FORM VALUES - Set the ECP form values to match their respective GF fields */</span>
&nbsp;
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventAllDay'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$eventAllDay</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>	
&nbsp;
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventStartDate'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$startDateString</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventStartHour'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$startTime</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventStartMinute'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$startTime</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventStartMeridian'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$startTime</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventEndDate'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$endDateString</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventEndHour'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$endTime</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventEndMinute'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_pad</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$endTime</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;0&quot;</span><span style="color: #339933;">,</span> STR_PAD_LEFT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventEndMeridian'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$endTime</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'recurrence'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$recType</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'recurrence'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'end-type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$recEndType</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'recurrence'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'end'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$recEnd</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Match the correct recurrence multiplier with the correct recurrence type</span>
	<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$recEndCounts</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$recTypeName</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$recEndCount</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$recType</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$recTypeName</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'recurrence'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'end-count'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$recEndCount</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Check if venue and organizer already exist</h3>
<p>The missing venue fix <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/4/#post-13194" target="_blank">discussed here</a> kept creating new venues and organizers with the same title (instead of using the existing venues/organizers). The following code checks for the existence of a venue/organizer based on its tile. This method will force ECP to use the information of the venue already stored with the same name.</p>
<p>For those who want users to be able to select from a dropdown of venues, <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/3/#post-11210" target="_blank">read through Jamie&#8217;s posts</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">// Check for the existence of the submitted venue and organization by title</span>
	<span style="color: #000088;">$savedVenue</span> <span style="color: #339933;">=</span> get_page_by_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'OBJECT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'tribe_venue'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$savedOrganizer</span> <span style="color: #339933;">=</span> get_page_by_title<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$organizerName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'OBJECT'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'tribe_organizer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// If the venue already exists, pass along the exising venue ID</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$savedVenue</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'VenueID'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$savedVenue</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">// If the venue doesn't exist, pass the venue meta needed to create a new venue</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Required for venue info to be stored</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'EventVenue'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'post_title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// Pass remaining venue meta</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Venue'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Address'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueAddress</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'City'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueCity</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Country'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueCountry</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">// Ensure that the correct state or province field is populated</span>
		<span style="color: #b1b100;">switch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueCountry</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'United States'</span><span style="color: #339933;">:</span>
				<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'State'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueState</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'Canada'</span><span style="color: #339933;">:</span>
				<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Province'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueCaProvince</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
				<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Province'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueProvince</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Zip'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venueZip</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Phone'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$venuePhone</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>152
153
154
155
156
157
158
159
160
161
162
163
164
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">// If the organizer already exists, pass along the exising organizer ID</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$savedOrganizer</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'OrganizerID'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$savedOrganizer</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// If the venue doesn't exist, pass the venue meta needed to create a new venue</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Organizer'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$organizerName</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Phone'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$organizerPhone</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//If the user doesn't put in a web address we want to make the website '' instead of 'http://' since that's what Gravity Forms adds by default</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Website'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$organizerWebsite</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'http://'</span> ? <span style="color: #0000ff;">''</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$organizerWebsite</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Email'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'input_'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$organizerEmail</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h3>Save ECP meta from GF form values</h3>
<p>The last bit of code allows for use with Gravity Forms with Events Calendar Pro 2.0. This fix <a href="http://tri.be/event-submissions-using-gravity-forms-in-2-0/" target="_blank">comes from the ECP team, Modern Tribe</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Store the new form values as ECP metadata when saving</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'save_post'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'save_ecp_event_meta_from_gravity'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">11</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> save_ecp_event_meta_from_gravity<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postId</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TribeEvents'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// only continue if it's an event post</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_type</span> <span style="color: #339933;">!=</span> TribeEvents<span style="color: #339933;">::</span><span style="color: #004000;">POSTTYPE</span> <span style="color: #339933;">||</span> <span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'DOING_AJAX'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// don't do anything on autosave or auto-draft either or massupdates</span>
	<span style="color: #666666; font-style: italic;">//if ( wp_is_post_autosave( $postId ) || isset($_GET['bulk_edit']) )</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> wp_is_post_autosave<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$postId</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post_status</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'auto-draft'</span> <span style="color: #339933;">||</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bulk_edit'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'action'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'inline-save'</span> <span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'TribeEventsAPI'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Organizer'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> stripslashes_deep<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Venue'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> stripslashes_deep<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Recurrence'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> stripslashes_deep<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'recurrence'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'VenueID'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Venue'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'VenueID'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Venue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'VenueID'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'OrganizerID'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Organizer'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'OrganizerID'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Organizer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'OrganizerID'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		TribeEventsAPI<span style="color: #339933;">::</span><span style="color: #004000;">saveEventMeta</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$postId</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_POST</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<h2>Known Issues</h2>
<ul>
<li>No &#8220;custom&#8221; recurrence capabilities (yet)</li>
<li>New venues/organizers with an existing title will use the information of the existing venue/organizer &#8211; this is not really an &#8220;issue&#8221; and can be addressed with two alternatives:</li>
<ul>
<li>Comment out the conditionals that check for an existing venue/organizer so that a new venue/organizer is create every time regardless of duplicate venue names</li>
<li>Use <a href="http://tri.be/support/forums/topic/integration-with-gravity-forms/page/3/#post-11210" target="_blank">Jamie&#8217;s suggestion</a> to create post relationship fields that allow the user to select existing venues/organizers from dropdown menus</li>
</ul>
<li>Submitted events will not display the recurrence units (ie: days, weeks, etc) &#8211; appears to be cosmetic only</li>
</ul>
<div>
<h2>Suggestions</h2>
<ul>
<li>Recurrence can be a dangerous thing in the hands of the general public. Be careful that someone doesn&#8217;t accidentally fill your db with 1,000+ pending events when using this field (if at all).</li>
<li>Try to add your defaults through gravity forms instead of hardcoding them in the function (your future self will thank you)</li>
<li>New events are added as &#8220;Pending.&#8221; This can be changed to another post status from the event description (post body) GF form field.</li>
<li>Adding a ReCaptcha object to the form during testing allows you to refresh the browser without submitting the form (the reCaptcha must be filled in each time). This is useful for updating the form (or code) without losing all your submission values.</li>
<li>Testing the recurrence can be a bit weird &#8211; recurrence for an event will change to match the current recurrence (ie: the last event in an occurrence will have a recurrence of &#8220;none&#8221; when it is saved &#8211; because there are none after it).</li>
</ul>
<p>&nbsp;</p>
<p>Please leave a comment if you discover any new ideas or suggestions (or feel like wrapping this in a plugin).</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/blog/gf-ecp-frontend-submission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Query by one custom field and order by another &#8211; WordPress</title>
		<link>http://anthonydispezio.com/blog/filter-by-one-custom-field-and-sort-using-another/</link>
		<comments>http://anthonydispezio.com/blog/filter-by-one-custom-field-and-sort-using-another/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 20:25:42 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=906</guid>
		<description><![CDATA[This is more of an affirmation than a hack. Since the introduction of meta_query in WordPress 3.1, filtering posts by metadata has become significantly less painful. An added benefit is the ability to use meta_key to sort your results without having to filter by meta_value. The trick is to let meta_query handle the actual filtering and [...]]]></description>
			<content:encoded><![CDATA[<p>This is more of an affirmation than a hack. Since the introduction of meta_query in WordPress 3.1, filtering posts by metadata has become significantly less painful. An added benefit is the ability to use meta_key to sort your results without having to filter by meta_value.</p>
<p>The trick is to let meta_query handle the actual filtering and include meta_key to pass a different meta field to the orderby argument.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">'post_type'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'put_post_type_here'</span><span style="color: #339933;">,</span>
	<span style="color: #666666; font-style: italic;">/* use the new meta_query in WP 3.1 for filtering */</span>
	<span style="color: #0000ff;">'meta_query'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
		<span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'key'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'put_filter_meta_key_here'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'value'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'put_filter_meta_value_here'</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'compare'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'='</span>
		<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
	<span style="color: #666666; font-style: italic;">/* use meta_key for sorting - but don't specify a meta value */</span>
	<span style="color: #0000ff;">'meta_key'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'put_sorting_meta_value_here'</span><span style="color: #339933;">,</span>
	<span style="color: #666666; font-style: italic;">/* then order by the meta_key above - use meta_value_num for numbers */</span>
	<span style="color: #0000ff;">'orderby'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'meta_value'</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">'order'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'ASC'</span><span style="color: #339933;">,</span>
 <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
query_posts<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$args</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Keep in mind:</h3>
<ul>
<li>This query only works for sorting by <strong>one</strong> meta value. Nested sorting will require a SQL query.</li>
<li>Dates and times should be in a <a href="http://php.net/manual/en/function.time.php">valid format for chronological sorting</a> (you don&#8217;t want the system to misinterpret AM/PM</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/blog/filter-by-one-custom-field-and-sort-using-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cape Cod Signals</title>
		<link>http://anthonydispezio.com/portfolio/cape-cod-signals/</link>
		<comments>http://anthonydispezio.com/portfolio/cape-cod-signals/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 18:15:33 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=888</guid>
		<description><![CDATA[This is a web app designed for Cape Cod Life Publications to promote the magazines through social media. The app contains a &#8220;Twitter game&#8221; in which users can encode secret messages in maritime flag signals. The messages can then be shared on Twitter with the change for other users to solve the puzzle. There are [...]]]></description>
			<content:encoded><![CDATA[<p>This is a web app designed for Cape Cod Life Publications to promote the magazines through social media. The app contains a &#8220;Twitter game&#8221; in which users can encode secret messages in maritime flag signals. The messages can then be shared on Twitter with the change for other users to solve the puzzle. There are subscription prizes for correct answers.</p>
<p>The app core was designed using jQuery and the UI is handled by jQuery UI.</p>
<p><a title="Cape Cod Signals" href="http://capecodlife.com/cape-cod-signals/" target="_blank">Try out the app here!</a></p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-1.jpg"><img class="alignnone size-large wp-image-889" title="Cape Cod Signals app - entry screen" src="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-1-600x483.jpg" alt="" width="600" height="483" /></a><br />
<span id="more-888"></span><br />
<div id="attachment_890" class="wp-caption alignnone" style="width: 610px"><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-2.jpg"><img src="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-2-600x483.jpg" alt="" title="Cape Cod Signals app - semaphore signals" width="600" height="483" class="size-large wp-image-890" /></a><p class="wp-caption-text">Users can switch between flag hoisted signals and semaphore flags.</p></div></p>
<div id="attachment_891" class="wp-caption alignnone" style="width: 610px"><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-3.jpg"><img src="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-3-600x483.jpg" alt="" title="Cape Cod Signals app - wiki learn more" width="600" height="483" class="size-large wp-image-891" /></a><p class="wp-caption-text">The app provides useful learning links for understanding semaphores.</p></div>
<div id="attachment_894" class="wp-caption alignnone" style="width: 610px"><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-6.jpg"><img src="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-6-600x483.jpg" alt="" title="Cape Cod Signals app - tweet screen" width="600" height="483" class="size-large wp-image-894" /></a><p class="wp-caption-text">The app sends the users encoded message url to Twitter for posting.</p></div>
<div id="attachment_892" class="wp-caption alignnone" style="width: 610px"><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-4.jpg"><img src="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-4-600x483.jpg" alt="" title="Cape Cod Signals app - solve screen" width="600" height="483" class="size-large wp-image-892" /></a><p class="wp-caption-text">The generated puzzle can then be solved by other users with the link.</p></div>
<div id="attachment_893" class="wp-caption alignnone" style="width: 610px"><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-5.jpg"><img src="http://anthonydispezio.com/wp-content/uploads/2011/11/capecodsignals-5-600x483.jpg" alt="" title="Cape Cod Signals app - flag legend" width="600" height="483" class="size-large wp-image-893" /></a><p class="wp-caption-text">Users can bring up a legend to help with decryption.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/portfolio/cape-cod-signals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blueprint =&gt; Susy</title>
		<link>http://anthonydispezio.com/uncategorized/blueprint-susy/</link>
		<comments>http://anthonydispezio.com/uncategorized/blueprint-susy/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 22:16:07 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=790</guid>
		<description><![CDATA[I&#8217;m switching from Blueprint to Susy &#8211; a step along the trail to semantic DOM markup. Susy seems to play more nicely with Compass, plus there&#8217;s some useful tools (css only &#8220;grid display&#8221;) built in. Check it out!!]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m switching from Blueprint to Susy &#8211; a step along the trail to semantic DOM markup. Susy seems to play more nicely with Compass, plus there&#8217;s some useful tools (css only &#8220;grid display&#8221;) built in. <a href="http://susy.oddbird.net" class="">Check it out!!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/uncategorized/blueprint-susy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Holy Geocaching!</title>
		<link>http://anthonydispezio.com/uncategorized/holy-geocaching/</link>
		<comments>http://anthonydispezio.com/uncategorized/holy-geocaching/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 01:14:11 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=784</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-large wp-image-785" title="geocaching!" src="http://anthonydispezio.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-25-at-8.28.34-PM-600x404.png" alt="" width="600" height="404" /></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/uncategorized/holy-geocaching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best of Cape Cod iPhone App</title>
		<link>http://anthonydispezio.com/portfolio/best-of-cape-cod-iphone-app/</link>
		<comments>http://anthonydispezio.com/portfolio/best-of-cape-cod-iphone-app/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 04:41:32 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[New Media Publishing]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=874</guid>
		<description><![CDATA[This app was released to compliment the launch of Cape Cod Life&#8217;s 2011 June issues featuring the Best of Cape Cod &#38; the Islands. The app contains the winners of the 2011 contest, the photo contest winners, the capecodlife.com news feed and a picture/message uploader. The interactivity was built using the jQuery Mobile framework and [...]]]></description>
			<content:encoded><![CDATA[<p>This app was released to compliment the launch of Cape Cod Life&#8217;s 2011 June issues featuring the Best of Cape Cod &amp; the Islands. The app contains the winners of the 2011 contest, the photo contest winners, the capecodlife.com news feed and a picture/message uploader.</p>
<p>The interactivity was built using the jQuery Mobile framework and ported with the AppMakr kit.</p>
<p><a href="http://itunes.apple.com/us/app/best-of-cape-cod/id448706575?mt=8">View in the app store!</a></p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/iphone4.jpg"><img class="alignnone size-large wp-image-875" title="Best of Cape Cod iPhone App" src="http://anthonydispezio.com/wp-content/uploads/2011/11/iphone4-600x801.jpg" alt="" width="420" height="561" /></a></p>
<p><span id="more-874"></span><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/mzl.rvazseli.320x480-75.jpg"><img class="alignnone size-full wp-image-878" title="Best of Cape Cod" src="http://anthonydispezio.com/wp-content/uploads/2011/11/mzl.rvazseli.320x480-75.jpg" alt="" width="320" height="480" /></a></p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/mzl.jblwsque.320x480-75.jpg"><img class="alignnone size-full wp-image-877" title="Cape Cod Life News Feed" src="http://anthonydispezio.com/wp-content/uploads/2011/11/mzl.jblwsque.320x480-75.jpg" alt="" width="320" height="480" /></a></p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/mzl.fxhknncv.320x480-75.jpg"><img class="alignnone size-full wp-image-876" title="Photo Contest Winners" src="http://anthonydispezio.com/wp-content/uploads/2011/11/mzl.fxhknncv.320x480-75.jpg" alt="" width="320" height="480" /></a></p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/11/Screen-Shot-2011-11-06-at-11.20.09-PM.png"><img class="alignnone size-large wp-image-879" title="Best of Cape Cod - iTunes Store" src="http://anthonydispezio.com/wp-content/uploads/2011/11/Screen-Shot-2011-11-06-at-11.20.09-PM-600x517.png" alt="" width="600" height="517" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/portfolio/best-of-cape-cod-iphone-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cape Cod Life ONLINE</title>
		<link>http://anthonydispezio.com/portfolio/cape-cod-life-online/</link>
		<comments>http://anthonydispezio.com/portfolio/cape-cod-life-online/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 05:50:01 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[digital publishing]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=533</guid>
		<description><![CDATA[This is the redesign for Cape Cod Life Publication&#8217;s flagship website. The redesign includes completely overhauling the CMS, GUI, VPS, CSS, PHP, SQL and other TLAs. This is one of the web analytics reports designed for sales, press, and internal use. These reports are made from different projections of our substantial reporting data. &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>This is the redesign for Cape Cod Life Publication&#8217;s flagship website. The redesign includes completely overhauling the <a title="wtf?" href="http://en.wikipedia.org/wiki/Content_management_system" target="_blank">CMS</a>, <a title="wtf?" href="http://en.wikipedia.org/wiki/Graphical_user_interface" target="_blank">GUI</a>, <a title="wtf?" href="http://en.wikipedia.org/wiki/Virtual_private_server" target="_blank">VPS</a>, <a title="wtf?" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank">CSS</a>, <a title="wtf?" href="http://en.wikipedia.org/wiki/PHP" target="_blank">PHP</a>, <a title="wtf?" href="http://en.wikipedia.org/wiki/SQL" target="_blank">SQL</a> and other <a title="wtf?" href="http://en.wikipedia.org/wiki/Three-letter_acronym" target="_blank">TLAs</a>.</p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-1.png"><img class="alignnone size-large wp-image-534" title="capecodlife.com - home page" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-1-600x825.png" alt="" width="600" height="825" /><span id="more-533"></span></a></p>
<p>This is one of the web analytics reports designed for sales, press, and internal use. These reports are made from different projections of our substantial reporting data.</p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-11.jpg"><img class="alignnone size-large wp-image-549" title="capecodlife.com - analytics report" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-11-600x772.jpg" alt="" width="600" height="772" /></a></p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-2.png"><img class="alignnone size-large wp-image-535" title="capecodlife.com - town profile" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-2-600x725.png" alt="" width="600" height="725" /></a><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-8.png"><img class="alignnone size-large wp-image-544" title="capecodlife.com - digital edition" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-8-600x286.png" alt="" width="600" height="286" /></a></p>
<p>&nbsp;</p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-3.png"><img class="alignnone size-large wp-image-536" title="capecodlife.com - story page" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-3-600x1004.png" alt="" width="600" height="1004" /></a></p>
<p>&nbsp;</p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-4.png"><img class="alignnone size-large wp-image-537" title="capecodlife.com - tide chart" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-4-600x717.png" alt="" width="600" height="717" /></a></p>
<p>&nbsp;</p>
<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-5.png"><img class="alignnone size-large wp-image-541" title="capecodlife.com - event page" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-5-600x717.png" alt="" width="600" height="717" /></a><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-7.png"><img class="alignnone size-large wp-image-543" title="capecodlife.com - dining &amp; lodging page" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlifeonline-7-600x717.png" alt="" width="600" height="717" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/portfolio/cape-cod-life-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cape Cod Life iPad App</title>
		<link>http://anthonydispezio.com/portfolio/new-media-publishing/cape-cod-life-ipad-app/</link>
		<comments>http://anthonydispezio.com/portfolio/new-media-publishing/cape-cod-life-ipad-app/#comments</comments>
		<pubDate>Sun, 24 Apr 2011 21:27:12 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[New Media Publishing]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[digital publishing]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=408</guid>
		<description><![CDATA[On April 12th the Cape Cod Life app was launched on the Apple App Store. We have received great enthusiasm surrounding our push to bring niche-publishing magazines into the next generation of content delivery and interactive capabilities. PRESS View Cape Cod LIFE in the App Store App review on AOL&#8217;s patch.com iPad App &#8211; Cape [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://anthonydispezio.com/wp-content/uploads/2011/04/ccl-primary-72.jpg"><img class="alignnone size-large wp-image-414" title="iPad App - Cape Cod LIFE" src="http://anthonydispezio.com/wp-content/uploads/2011/04/ccl-primary-72-600x504.jpg" alt="" width="600" height="504" /></a></p>
<p>On April 12th the Cape Cod Life app was launched on the Apple App Store. We have received great enthusiasm surrounding our push to bring niche-publishing magazines into the next generation of content delivery and interactive capabilities.</p>
<p><strong>PRESS</strong></p>
<ul>
<li><a title="Cape Cod LIFE in the App Store" href="http://itunes.apple.com/us/app/cape-cod-life/id425429505?mt=8" target="_blank">View Cape Cod LIFE in the App Store</a></li>
<li><a title="App review on AOL’s patch.com" href="http://anthonydispezio.com/blog/press/app-review-on-aols-patch-com/" target="_blank">App review on AOL&#8217;s patch.com</a></li>
<li><a title="iPad App debut press release" href="http://anthonydispezio.com/blog/press/ipad-app-debut-press-release/" target="_blank">iPad App &#8211; Cape Cod LIFE debut</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/portfolio/new-media-publishing/cape-cod-life-ipad-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad App review on AOL&#8217;s patch.com</title>
		<link>http://anthonydispezio.com/press/app-review-on-aols-patch-com/</link>
		<comments>http://anthonydispezio.com/press/app-review-on-aols-patch-com/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 21:04:22 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Press]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=397</guid>
		<description><![CDATA[Here&#8217;s a review from the debut of the Cape Cod LIFE iPad app I&#8217;ve been working on. Snip: Cape Cod Life? There’s an App for That! A Cape Cod tradition dives headfirst into the future of publishing. In the Wild West environment of the early years of the World Wide Web, up and coming, tech-savvy [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a review from the debut of the Cape Cod LIFE iPad app I&#8217;ve been working on. Snip:</p>
<h3>Cape Cod Life? There’s an App for That!</h3>
<p><strong><em>A Cape Cod tradition dives headfirst into the future of publishing.</em></strong></p>
<p><em><a id="single_image" href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlife_ipad-1.jpg"><img class="size-medium wp-image-418 alignright" title="iPad App - Cape Cod LIFE, covers" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlife_ipad-1-300x263.jpg" alt="" width="300" height="263" /></a></em>In the Wild West environment of the early years of the World Wide Web, up and coming, tech-savvy 20 &#8211; and 30 &#8211; somethings became accustomed to getting their content online, anywhere, anytime, for free.</p>
<p>As a result, many print magazines went out of business, not so much because subscription bases went down, but because advertisers jumped ship, in search of eyeballs on the Internet.</p>
<p>Then came e-readers and pay walls, indicating people were ready to pay for quality content (or rather that quality content providers could not survive without subscriber revenue).</p>
<p>Then the iPad was born. Our very own Cape Cod Life magazine may just be among the very few forward-thinking beacons that see the promise of this new medium. (Despite the raging popularity of the iPad, it’s still ahead of its time; Google “iPad, what’s the point” and you get 3,120,000 page hits linking to skeptics).</p>
<p>At the beginning of this month, Cape Cod Life became the first Cape and Islands lifestyle magazine with an iPad app and the first Cape and Islands publication with a magazine app to deliver content. Cape Cod Life and Cape Cod Home apps are now live on the Apple app store.<span id="more-397"></span></p>
<h2>Cape Cod Life’s Expansion into the Ether</h2>
<p>Fans of Cape Cod Life can now access the magazines in four ways: the more traditional, glossy magazine, via the web site, as a downloadable digital edition and with the iPad app.</p>
<p>“We hear a lot of stories about how people have saved every issue we’ve ever published,” says Susan Dewey, Associate Publisher of Cape Cod Life Publications, illustrating that people still like to hold, and hold on to, the magazine.</p>
<p>Readers can also access content via the web site, which after its redesign in November 2010 saw a dramatic growth in visitors. “There has been a humongous increase in readership” according to Anthony DiSpezio, Cape Cod Life’s Web &amp; IT guru. “This was so telling on how people are engaging.”</p>
<p>Indeed, after creating a strictly online-based voting process for this year&#8217;s highly anticipated “Best of the Cape &amp; Islands Readers Choice” issue, voting numbers tripled.</p>
<p>While accessing web content is as interactive as the design team wants to make it, the web site content doesn’t mirror the design and layout of the print copy. Readers bothered by full-page print ads would do well on the web site.</p>
<p><a class="fancybox" href="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlife_ipad-2.jpg"><img class="size-large wp-image-419 alignnone" title="iPad App - Cape Cod LIFE, page spread" src="http://anthonydispezio.com/wp-content/uploads/2011/04/capecodlife_ipad-2-650x420.jpg" alt="" width="585" height="378" /></a>That’s where the digital version comes in. Downloadable via the web site, the digital edition uses Adobe Flash to allow readers to view an identical – including advertisements &#8211; version of the print magazine. The digital edition offers an experience mimicking reading print (page turning) while providing the convenience of a web site (access to additional information, details, merchandise).As a bonus, at $15 annually, the digital edition costs less than the newsstand subscription price of $25.</p>
<p>The iPad, which does not support Adobe Flash, offers a whole new interactive environment offering “shortcuts” that open doors to both the consumer and the advertiser. Advertisers may one day choose to optimize their content by embedding video into an advertisement, by linking directly to their web sites or by providing links that allow the viewer to purchase an item with one tap.</p>
<blockquote><p>“We are enlightening our advertisers as to what they can do, and we can make it happen,” says DiSpezio enthusiastically.</p></blockquote>
<p>For consumers, information on that garden trestle, recipe, art gallery or restaurant is just one tap away. “We are at such a level of convenience &#8211; the fact that you can just tap it and you’re there is huge,” states Dewey. “It enhances what we offer with the magazine by offering opportunities that weren’t available with other mediums.”</p>
<p>In short, consumers now have increasing options of personalizing the way they receive content, while advertisers have new tools that help them draw eyeballs to their products. It’s a win-win situation, not least of all for the publishing industry.</p>
<p><strong>“</strong>We’re not here to replace our print content; we understand we have all of these new frontiers,” says DiSpezio. “Who knows where we’ll be going with this in a year from now.”</p>
<address><em>By Lynn Levine | Published on Barnstable-Hyannis Patch.com on April 15<sup>th</sup>, 2011</em></address>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/press/app-review-on-aols-patch-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPad App debut press release</title>
		<link>http://anthonydispezio.com/press/ipad-app-debut-press-release/</link>
		<comments>http://anthonydispezio.com/press/ipad-app-debut-press-release/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 21:16:28 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Press]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[digital publishing]]></category>
		<category><![CDATA[interactive]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[press]]></category>

		<guid isPermaLink="false">http://anthonydispezio.com/?p=405</guid>
		<description><![CDATA[This is another press release that went out in New England for the release of the Cape Cod Life iPad App I recently launched. Snip: Cape Cod Life Publications debuts iPad app Cape Cod Life becomes first Cape and Islands lifestyle magazine to introduce app  Mashpee, Mass. (April 7, 2011) –  Cape Cod LIFE, the [...]]]></description>
			<content:encoded><![CDATA[<p>This is another press release that went out in New England for the release of the Cape Cod Life iPad App I recently launched. Snip:</p>
<h3>Cape Cod Life Publications debuts iPad app<strong><em> </em></strong></h3>
<p><strong>Cape Cod Life becomes first Cape and Islands lifestyle magazine to introduce app </strong></p>
<p><span class="Apple-style-span" style="font-size: 13px; font-weight: normal;">Mashpee, Mass. (April 7, 2011) –  Cape Cod LIFE, the well-known, 32 year-old Cape and Islands lifestyle magazine, introduced its first iPad app this month.  The app will bring each issue of the magazine to life on the iPad, along with additional interactive content.  Cape Cod LIFE, which is distributed nationwide, becomes the first lifestyle publication on Cape Cod and the Islands to roll out an app for the iPad.</span></p>
<p>&nbsp;</p>
<p><img class="alignnone size-large wp-image-415" title="iPad App - Cape Cod LIFE" src="http://anthonydispezio.com/wp-content/uploads/2011/04/ccl-secondary-72-650x377.jpg" alt="" width="600" height="348" /></p>
<p>The app is available for free on the iTunes App Store; for more information on the app, visit <a href="http://www.capecodlife.com/ipad">www.capecodlife.com/ipad</a>. It will allow iPad users complete access to each issue of Cape Cod LIFE and its special editions, including Cape Cod GARDENS and Cape Cod ART.  The first issue available for download is the Cape Cod LIFE 2010 Annual Guide, which is accessible for free. Cape Cod LIFE’s sister publication – Cape Cod HOME &#8211; will have its own iPad app, which will be launched in late April.<span id="more-405"></span></p>
<p>In addition to all of the content from the magazines, the app will provide bonus features such as videos, audio clips, additional photography, recipes and the ability to click through to advertisers and other sites of interest.  Each issue will be optimized for easy reading and intuitive scrolling on the iPad screen.</p>
<p>“The app enhances the depth of our diverse offerings and will provide even greater resources for anyone living on or visiting the Cape and Islands, particularly those who don’t have access to newsstands where they would traditionally pick up one of our printed magazines,” says Cape Cod Life Associate Publisher and Editor Susan Dewey. “As the industry evolves and people change the way they find information, we want to be at the forefront.  The advent of these new media platforms allows us to deliver even more content and gives our readers more ways to find what they need.&#8221;</p>
<p>The new app is just one part of Cape Cod Life’s overall new media strategy.  Digital editions, which are online versions of the entire print magazines, are now available on the completely redesigned web site with additional bonus content.  Videos featuring cooking demos, gardening how-to’s and interviews will soon be a mainstay on the web site.</p>
<div>
<p>In other exciting developments both to Cape Cod Life subscribers and advertisers, an <strong>iPhone</strong> app featuring the winners from Cape Cod LIFE’s highly anticipated annual “Best of the Cape &amp; Islands” Readers Poll is slated for launch in June 2011.</p>
<p>“We’re constantly designing new mobile-based content and looking to provide information to readers across all platforms,” said Anthony DiSpezio, Cape Cod Life’s Web and New Media Director. “Whether it’s online, on a mobile device, or on Facebook or Twitter, readers will be able to utilize Cape Cod LIFE as a resource for all things Cape Cod and the Islands.”</p>
<p><em>Cape Cod LIFE</em> is a regional lifestyle magazine that has long captured the historic charm and panoramic beauty of Cape Cod, Martha’s Vineyard, and Nantucket.   In addition to the seven issues of Cape Cod LIFE published each year, Cape Cod Life Publications publishes the annual LIFE special editions of Cape Cod GARDENS and Cape Cod ART. Cape Cod HOME is published six times a year.</p>
<p><em>Cape Cod Life Publications is located in Mashpee Commons in Mashpee, Massachusetts.  For more information, visit </em><a href="http://www.capecodlife.com/"><em>www.capecodlife.com</em></a><em>, like them on Facebook at facebook.com/capecodlife, follow them on Twitter @capecodlife, or download the Cape Cod Life iPad app on iTunes App Store.</em></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://anthonydispezio.com/press/ipad-app-debut-press-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

