<?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>SEOserpent &#187; plugin</title>
	<atom:link href="http://seoserpent.com/tag/plugin/feed" rel="self" type="application/rss+xml" />
	<link>http://seoserpent.com</link>
	<description>A search marketing company.</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:08:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Gravity Forms – 5 Digit Zip Codes &amp; State Abbreviations</title>
		<link>http://seoserpent.com/news/gravity-forms-zip-codes-state-abbreviations</link>
		<comments>http://seoserpent.com/news/gravity-forms-zip-codes-state-abbreviations#comments</comments>
		<pubDate>Mon, 21 Mar 2011 17:02:44 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Gravity Forms]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=424</guid>
		<description><![CDATA[Originally based on the code by Matthew Connerton on the Gravity Forms support site, I have modified his original code to also trim the zip code into the first 5 digits. Currently with Gravity Forms, there is no (easy) way to change the input fields to only accept 5 digits (or any other number) and/or [...]]]></description>
			<content:encoded><![CDATA[<p>Originally based on <a href="http://www.gravityhelp.com/forums/topic/abbreviate-city-fields#post-4368" rel="nofollow" target="_blank">the code</a> by <a href="http://www.webbusinessfreedom.com/" target="_blank">Matthew Connerton</a> on the <a href="http://mear.is/gravity">Gravity Forms</a> support site, I have modified his original code to also trim the zip code into the first 5 digits. </p>
<p>Currently with Gravity Forms, there is no (easy) way to change the input fields to only accept 5 digits (or any other number) and/or change the submitted state selection to their USPS equivalents.  If you&#8217;re trying to use your data to generate mailing labels or anything similar, the way it is setup can be messy and/or problematic.</p>
<p>Hence, the solution Mr. Connerton, and now myself, have developed.  It is written as a plugin so all you have to do is download the file below, unzip it and put it in your WordPress plugins folder.  It will then modify the submitted entry prior to it being saved to your database, and BAM!  You&#8217;re a happy camper.</p>
<p>So what does this plugin do in short? &#8211; </p>
<ul>
<li>Trim submitted zip codes to 5 digits</li>
<li>Convert full state names to their USPS state abbreviations</li>
</ul>
<p>Enjoy! > <a class="downloadlink" href="http://seoserpent.com/downloads/State+and+Zip+Code+Modifier+for+Gravity+Forms" title="Version1.1 downloaded 633 times" >State and Zip Code Modifier for Gravity Forms (633)</a></p>
<p><small>Note: the link to Gravity Forms only works if you&#8217;re logged in to their support forums.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/news/gravity-forms-zip-codes-state-abbreviations/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Events Manager Plugin &#8211; Hack to display events by categories</title>
		<link>http://seoserpent.com/wordpress/events-manager-plugin</link>
		<comments>http://seoserpent.com/wordpress/events-manager-plugin#comments</comments>
		<pubDate>Mon, 15 Feb 2010 21:37:14 +0000</pubDate>
		<dc:creator>Marty Martin</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[event manager]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://seoserpent.com/?p=113</guid>
		<description><![CDATA[I have a client who uses the Events Manager plugin by Davide Benini and Marcus Skyes to manage events on their site. Unfortunately, the plug-in doesn&#8217;t let you display events by category (which is weird, otherwise, why have the categories?) but anyway, I wrote/hacked together a custom function and WordPress shortcode today to display the [...]]]></description>
			<content:encoded><![CDATA[<p>I have a client who uses the <a href="http://davidebenini.it/wordpress-plugins/events-manager/">Events Manager plugin</a> by Davide Benini and Marcus Skyes to <a href="http://wordpress.org/extend/plugins/events-manager/">manage events</a> on their site.</p>
<p>Unfortunately, the plug-in doesn&#8217;t let you display events by category (which is weird, otherwise, why have the categories?) but anyway, I wrote/hacked together a custom function and WordPress shortcode today to display the events by category.</p>
<p>Now, I know there are going to be the naysayers who say &#8220;This code isn&#8217;t very pretty&#8221;.  Yeah, well maybe not but it works.  And if you can improve on it, DO!  I&#8217;m totally open to it.  For instance, the edit I did makes more than one query to the DB which isn&#8217;t optimal.</p>
<p>Okay, so without further ado, here it is.  Open up the file in your events-manager/ folder called &#8216;marcus-extras.php&#8217;.  Around line 264 you&#8217;ll find a function called dbem_get_category().  I added my custom function and shortcode right below it :</p>
<pre class="brush: php; title: ; notranslate">
define('DBEM_EVENTS_TBNAME', 'dbem_events');
</pre>
<p>And then:</p>
<pre class="brush: php; title: ; notranslate">
function dbem_display_categories() {
	global $wpdb;
	$categories_table = $wpdb-&gt;prefix.DBEM_CATEGORIES_TBNAME;
	$events_table = $wpdb-&gt;prefix.DBEM_EVENTS_TBNAME;
	$sql_categories = mysql_query(&quot;SELECT * FROM $categories_table ORDER BY category_id&quot;);
	while($category = mysql_fetch_assoc($sql_categories)) {
		extract($category);
		$events = mysql_query(&quot;SELECT * FROM $events_table WHERE event_category_id = '&quot;.mysql_real_escape_string($category_id).&quot;' ORDER BY event_start_date ASC&quot;);
		$category_list .= &quot;&lt;div class=\&quot;event\&quot;&gt;&quot;;
		$category_list .= &quot;&lt;h2&gt;$category_name&lt;/h2&gt;&quot;;
		while($event = mysql_fetch_assoc($events)) {
			extract($event);
			$start_date = date('m/d/Y',strtotime($event_start_date));
			$end_date = date('m/d/Y',strtotime($event_end_date));
			$category_list .= &quot;&lt;li&gt;Event: &lt;strong&gt;&lt;a href=\&quot;http://www.wilderness-adventure.com/camp-dates/?event_id=$event_id\&quot; title=\&quot;$event_name\&quot;&gt;$event_name&lt;/a&gt;&lt;/strong&gt;
					&lt;ul&gt;
						&lt;li&gt;Dates: $start_date - $end_date&lt;/li&gt;
					&lt;/ul&gt;&lt;/li&gt;&quot;;
		}
		$category_list .= &quot;&lt;/div&gt;&quot;;
	}
	echo $category_list;
}
add_shortcode('dbem_events_by_category', 'dbem_display_categories');
</pre>
<p>The shortcode is &#8211; [dbem_events_by_category] and you can just insert it into your post or page whereever you want it to go.</p>
<p>By default it outputs ALL events under ALL categories but you could hack it up pretty easily to only display one category, etc.  I may do that later if enough people ask for it but it&#8217;s not what I needed so, didn&#8217;t get done.  :)</p>
<p>Hope this helps some folks.  Let me know if you have any questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://seoserpent.com/wordpress/events-manager-plugin/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

