<?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>Atlantic BT &#187; Web Programming</title>
	<atom:link href="http://www.atlanticbt.com/blog/category/web-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.atlanticbt.com/blog</link>
	<description>Internet Marketing and Web Development in Raleigh</description>
	<lastBuildDate>Wed, 08 Feb 2012 02:40:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress Plugin &#8211; Featured Heroes Slideshow</title>
		<link>http://www.atlanticbt.com/blog/wordpress-plugin-featured-heroes-slideshow/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-plugin-featured-heroes-slideshow/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 13:00:03 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[cycle]]></category>
		<category><![CDATA[heroes]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4748</guid>
		<description><![CDATA[Here's a WordPress plugin that will allow you to create a slideshow from posts - using either the provided "Heroes" content type or any other post type.  Added bonus - you can place the slideshow anywhere with a shortcode.  Uses jQuery Cycle.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a WordPress plugin that will allow you to create a slideshow from posts &#8211; using either the provided &#8220;Heroes&#8221; content type or any other post type.  Added bonus &#8211; you can place the slideshow anywhere with a shortcode.</p>
<p><del><a href="http://d1rvlzmuzboe2s.cloudfront.net/blog/wp-content/uploads/2012/02/abt-featured-heroes.zip">Download ABT Featured Heroes</a></del>  <a title="Get the plugin!" href="http://wordpress.org/extend/plugins/abt-featured-heroes">Download from WordPress</a></p>
<p>As taken from the <code>readme</code> file:</p>
<hr />
<h3>Description</h3>
<p>Provides a new content type &#8220;Heroes&#8221; to manage your featured slides. You can then add a slideshow to any page using the shortcode <code>abt_slider_hero</code>. The slideshow is automatically configured using <a title="Cycle Homepage with option reference" href="http://jquery.malsup.com/cycle/">jQuery Cycle</a> and the options you specify in the shortcode.</p>
<p>One of the options <code>postType</code> allows you to use other content than the provided &#8220;Heroes&#8221;, effectively allowing a slideshow of almost anything in WordPress.</p>
<hr />
<h3>Installation</h3>
<ol>
<li>Unzip, upload plugin folder to your plugins directory (<code>/wp-content/plugins/</code>)</li>
<li>Activate plugin</li>
<li>Add slideshow shortcode anywhere you need it.</li>
<li>If you want to put the widget (shortcode) in a Widget, you&#8217;ll need to allow shortcodes in widgets</li>
<li>You can call the slideshow in code using <code>abt_featured_heroes::embed( array $atts )</code></li>
</ol>
<hr />
<h3>Frequently Asked Questions</h3>
<h4>What is the shortcode?</h4>
<p>Use the following format (defaults indicated here):</p>
<pre><code>[abt_slider_hero fx="fade" width="100%" height="400px" order="asc" orderby="menu_order" speed="600" timeout="7000" classes="" postType="heroes" style="photo"] </code></pre>
<p>where</p>
<ul>
<li><em>fx</em> = the cycle transition effect (fade, scrollUp, shuffle, etc) &#8211; see <a title="Cycle Homepage with option reference" href="http://jquery.malsup.com/cycle/">jQuery Cycle</a> homepage for more information</li>
<li><em>width</em> = width of the slide</li>
<li><em>height</em> = height of the slide</li>
<li><em>order</em> = sorting order (asc/desc) for the fetched items</li>
<li><em>orderby</em> = how to sort the fetched items</li>
<li><em>speed</em> = transition speed from one slide to the next</li>
<li><em>timeout</em> = delay between slide changes</li>
<li><em>classes</em> = optional classes to apply to the slideshow</li>
<li><em>postType</em> = you can retrieve other content types than &#8220;heroes&#8221; if desired</li>
<li><em>style</em> = normally the thumbnail navigation just reuses the full-size image, but if you want to &#8220;control&#8221; the quality of the shrunken thumb specify an alternate image size (like &#8220;thumbnail&#8221;)</li>
</ul>
<p>Pretty much all of the attributes are optional, so all you need is:</p>
<pre><code>[abt_slider_hero] </code></pre>
<h4>How do I put a slideshow in code?</h4>
<p>You can call the slideshow in code using <code>abt_featured_heroes::embed( array $atts )</code>, where <code>$atts</code> is an array matching the shortcode attribute list.</p>
<h4>Can I change the defaults?</h4>
<p>Only one simple hook available:</p>
<ul>
<li><code>add_filter('abt_featured_heroes_localize', YOURFN);</code>change the base javascript variables used by the flipwall init script:
<ul>
<li><code>stylesheet</code>: replace the default stylesheet with your own to change the default appearance of slides</li>
<li><code>speed</code>: change the transition speed (from 600 ms)</li>
<li><code>timeout</code>: change the slide delay (from 7000 ms)</li>
<li><code>fx</code>: change the slide transition (from &#8216;fade&#8217;)</li>
<li><code>style</code>: optionally use actual thumbnail photos for navigation, instead of reusing full-size images (default &#8216;photo&#8217;, alt &#8216;thumbnail&#8217;)</li>
<li><code>width</code>: default width (from 100%)</li>
<li><code>height</code>: default height (from 400px)</li>
</ul>
</li>
</ul>
<h4>How to put shortcode in widget?</h4>
<p>Use a filter to apply shortcode processing to widgets.</p>
<p><a href="http://digwp.com/2010/03/shortcodes-in-widgets/">Filter</a>: <code>&lt;?php add_filter('widget_text', 'do_shortcode'); ?&gt;</code></p>
<hr />
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-plugin-featured-heroes-slideshow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin &#8211; Sponsor Flipwall Shortcode</title>
		<link>http://www.atlanticbt.com/blog/wordpress-plugin-sponsor-flipwall-shortcode/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-plugin-sponsor-flipwall-shortcode/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 02:58:27 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4629</guid>
		<description><![CDATA[Here's a Wordpress plugin that lets you create a cool sponsor wall with flip effect; instead of complicated post management, embed tiles anywhere with shortcodes!]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a WordPress plugin that will allow you to create a cool sponsor wall with flip effect; instead of complicated post management, embed tiles anywhere with shortcodes!</p>
<p><del><a href="http://d1rvlzmuzboe2s.cloudfront.net/blog/wp-content/uploads/2012/02/abt-sponsor-flipwall.zip">Download Sponsor Flipwall Shortcode</a> </del> <a title="Get the plugin!" href="http://wordpress.org/extend/plugins/sponsor-flipwall-shortcode">Download from WordPress</a></p>
<p>As taken from the <code>readme</code> file:</p>
<hr />
<h3>Description</h3>
<p>Creates a cool sponsor wall with flip effect; instead of complicated post management, embed tiles anywhere with shortcodes!</p>
<p>Creates a two-sided square with a &#8220;logo side&#8221; and a &#8220;detail side&#8221;. Logo side will display a scaled image, while the detail side will show a name, description, and website link.</p>
<p>Based on awesome script <a title="Original Inspiration" href="http://tutorialzine.com/2010/03/sponsor-wall-flip-jquery-css/">Sponsor Flip Wall with jQuery &amp; CSS</a> by Martin Angelov. Not related to plugin <a title="You're going down!" href="http://wordpress.org/extend/plugins/wp-sponsor-flip-wall/">WP Sponsor Flip Wall</a>, which creates a content type in order to display tiles.</p>
<hr />
<h3>Installation</h3>
<ol>
<li>Unzip, upload plugin folder to your plugins directory (<code>/wp-content/plugins/</code>)</li>
<li>Activate plugin</li>
<li>Add flipwall tile shortcode anywhere you need it.</li>
</ol>
<hr />
<h3>Frequently Asked Questions</h3>
<h4>How do I make a flipwall tile?</h4>
<p>Use the shortcode!</p>
<h4>What is the shortcode?</h4>
<p>Use the following format:</p>
<pre><code>[flipwall id="image-name" title="Sponsor Name" url="http://whatever.com" linktext="Instead of whatever.com" image="url to image" text="description if singleline" ] Description with &lt;em&gt;HTML&lt;/em&gt; [/flipwall] </code></pre>
<p>where</p>
<ul>
<li><em>id</em> = a unique identifier; if not provided just increments <code>flipwall-#</code></li>
<li><em>title</em> = the name to display at the top of the &#8220;detail side&#8221;</li>
<li><em>url</em> = external link on &#8220;detail side&#8221;</li>
<li><em>linktext</em> = if provided, the text of the external link (instead of just showing the URL)</li>
<li><em>image</em> = url of the image for the &#8220;logo side&#8221;; if not provided will just display text &#8220;More about $title&#8221;</li>
<li><em>text</em> = optional &#8211; you can use this for a simpler shortcode if the description is just one line</li>
<li><em>class</em> = optional class to apply to the tile</li>
</ul>
<p>Pretty much all of the attributes are optional:</p>
<pre><code>[flipwall]This tile has no attributes, just a description[/flipwall] [flipwall text="This is just a one-liner"] </code></pre>
<p>But your resulting tiles wouldn&#8217;t be very useful.</p>
<p><em>Please note:</em> if using the single-line version with <code>text</code>, you must either list all of them as such or list them at the end (due to the way shortcodes are closed in WP)</p>
<p>Also, if you want to use the default container, just wrap everything inside</p>
<pre><code>[flipwall-group] ... [/flipwall-group] </code></pre>
<p>which will automatically clearfix the tiles.</p>
<h4>Can I change the defaults?</h4>
<p>Only one simple hook available:</p>
<ul>
<li><code>add_filter('abtSponsorFlipwall_localize', YOURFN);</code>change the base javascript variables used by the flipwall init script:
<ul>
<li><code>stylesheet</code>: replace the default stylesheet with your own to change the default appearance of tiles</li>
<li><code>speed</code>: change the flip speed (from 350 ms)</li>
<li><code>direction</code>: change the flip direction (from &#8216;lr&#8217;)</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-plugin-sponsor-flipwall-shortcode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Submit forms to 3rd-party services with Contact Form 7</title>
		<link>http://www.atlanticbt.com/blog/wordpress-submit-forms-to-3rd-party-services-with-contact-form-7/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-submit-forms-to-3rd-party-services-with-contact-form-7/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 15:44:25 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Email Marketing]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[contact form]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4614</guid>
		<description><![CDATA[Here's a WordPress plugin that will allow you to send Contact Form 7 submissions to a 3rd-party Service like a CRM.  Multiple configurable services, custom field mapping, pre/post processing.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a WordPress plugin that will allow you to send Contact Form 7 submissions to a 3rd-party Service like a CRM.  Multiple configurable services, custom field mapping, pre/post processing.</p>
<p><del><a title="Download the plugin" href="http://d1rvlzmuzboe2s.cloudfront.net/blog/wp-content/uploads/2012/02/cf7-int-3rdparty.zip">Download Contact-Form-7: 3rd-Party Integration</a></del>  <a title="Get the plugin!" href="http://wordpress.org/extend/plugins/contact-form-7-3rd-party-integration/">Download from WordPress</a></p>
<p>As taken from the <code>readme</code> file:</p>
<hr />
<h3>Description</h3>
<p>Send <a title="Contact Form 7" href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a> Submissions to a 3rd-party Service, like a CRM. Multiple configurable services, custom field mapping. Provides hooks and filters for pre/post processing of results. Allows you to send separate emails, or attach additional results to existing emails. Comes with a couple examples of hooks for common CRMs (listrak, mailchimp, salesforce).</p>
<p>The plugin essentially makes a remote request (POST) to a service URL, passing along remapped form submission values.</p>
<p>Includes hidden field plugin from <a title="Hidden Fields from CF7 Modules" href="http://wordpress.org/extend/plugins/contact-form-7-modules/">Contact Form 7 Modules: Hidden Fields</a>. Based on idea by Alex Hager &#8220;<a title="Original Inspiration" href="http://www.alexhager.at/how-to-integrate-salesforce-in-contact-form-7/">How to Integrate Salesforce in Contact Form 7</a>&#8221;</p>
<hr />
<h3>Installation</h3>
<ol>
<li>Unzip, upload plugin folder to your plugins directory (<code>/wp-content/plugins/</code>)</li>
<li>Make sure <a title="Contact Form 7" href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a> is installed</li>
<li>Activate plugin</li>
<li>Go to new admin subpage <em>&#8220;3rdparty Services&#8221;</em> under the CF7 &#8220;Contact&#8221; menu and configure services + field mapping.</li>
</ol>
<p>Please note that this includes an instance of <code>hidden.php</code>, which is part of the &#8220;Contact Form 7 Modules&#8221; plugin &#8212; this will show up on the Plugin administration page, but is included automatically, so you don&#8217;t need to enable it. This file will only be included if you don&#8217;t already have the module installed.</p>
<hr />
<h3>Frequently Asked Questions</h3>
<h4>How do I add / configure a service?</h4>
<p>See <a href="http://wordpress.org/extend/plugins/cf7-int-3rdparty/screenshots">Screenshots</a> for visual examples.</p>
<p>Essentially,</p>
<ol>
<li>Name your service</li>
<li>Enter the submission URL &#8212; if your &#8220;service&#8221; provides an HTML form, you would use the form action here</li>
<li>Choose which forms will submit to this service (&#8220;Attach to Forms&#8221;)</li>
<li>Set the default &#8220;success condition&#8221;, or leave blank to ignore (or if using post processing, see <a href="http://wordpress.org/extend/plugins/cf7-int-3rdparty/hooks">Hooks</a> &#8211; this just looks for the provided text in the service response, and if present assumes &#8220;success&#8221;</li>
<li>Allow hooks for further processing &#8211; unchecking it just saves minimal processing power, as it won&#8217;t try to execute filters</li>
<li>Map your form submission values (from the CF7 field tags) to expected fields for your service. 1:1 mapping given as the name of the CF7 field and the name of the 3rdparty field; you can also provide static values by checking the &#8220;Is Value?&#8221; checkbox and providing the value in the &#8220;CF7 Field&#8221; column.</li>
<li>Add, remove, and rearrange mapping &#8211; basically just for visual clarity.</li>
<li>Use the provided hooks (as given in the bottom of the service block)</li>
<li>Add new services as needed</li>
</ol>
<h4>How can I pre/post process the request/results?</h4>
<p>See section <a href="http://wordpress.org/extend/plugins/cf7-int-3rdparty/hooks">Hooks</a>. See plugin folder <code>/3rd-parties</code> for example code for some common CRMs, which you can either directly include or copy to your code.</p>
<hr />
<h3>Screenshots</h3>
<ol>
<li>Admin page &#8211; create multiple services, set up debugging/notice emails, example code</li>
<li>Sample service &#8211; mailchimp integration, with static and mapped values</li>
<li>Customized thank-you page</li>
</ol>
<hr />
<h3>Hooks</h3>
<ol>
<li><code>add_action('Cf73rdPartyIntegration_service_a#',...</code>
<ul>
<li>hook for each service, indicated by the <code>#</code> &#8211; <em>this is given in the &#8216;Hooks&#8217; section of each service</em></li>
<li>provide a function which takes <code>$response, &amp;$results</code> as arguments</li>
<li>allows you to perform further processing on the service response, and directly alter the processing results, provided as <code>array('success'=&gt;false, 'errors'=&gt;false, 'attach'=&gt;'', 'message' =&gt; '');</code>, where
<ul>
<li><em>success</em> = <code>true</code> or <code>false</code> &#8211; change whether the service request is treated as &#8220;correct&#8221; or not</li>
<li><em>errors</em> = an array of error messages to return to the form</li>
<li><em>attach</em> = text to attach to the end of the email body</li>
<li><em>message</em> = the message notification shown (from CF7 ajax response) below the form</li>
</ul>
</li>
<li>note that the basic &#8220;success condition&#8221; may be augmented here by post processing</li>
</ul>
</li>
<li><code>add_filter('Cf73rdPartyIntegration_service_filter_post_#, ...</code>
<ul>
<li>hook for each service, indicated by the <code>#</code> &#8211; <em>this is given in the &#8216;Hooks&#8217; section of each service</em></li>
<li>allows you to programmatically alter the request parameters sent to the service</li>
</ul>
</li>
</ol>
<p>Basic examples provided directly on plugin Admin page (collapsed box &#8220;Examples of callback hooks&#8221;). Code samples for common CRMS included in the <code>/3rd-parties</code> plugin folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-submit-forms-to-3rd-party-services-with-contact-form-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Promote a Post in a Widget</title>
		<link>http://www.atlanticbt.com/blog/wordpress-promote-a-post-in-a-widget/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-promote-a-post-in-a-widget/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 22:38:47 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4517</guid>
		<description><![CDATA[Here's a Wordpress plugin that will allow you to feature a single item in a widget, until you tell it to automatically expire. Provides a list of from all public post types to choose an entry to promote until a specified date. When this "promotion" expires, you can either display a static message or use another post/page instead.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a WordPress plugin that will allow you to feature a single item in a widget, until you tell it to automatically expire.</p>
<p><del><a title="Download the plugin" href="http://www.atlanticbt.com/blog/wordpress-promote-a-post-in-a-widget/abt-promo-post_0-2/" rel="attachment wp-att-4519">Download Promoted Posts Widget v0.2</a></del>  <a title="Get the plugin!" href="http://wordpress.org/extend/plugins/promoted-post-widget/">Download from WordPress</a></p>
<p>As taken from the <code>readme</code> file:</p>
<hr />
<h3>Description</h3>
<p>Simple widget to display (promote) a specific post/page. Provides a list of from all public post types to choose an entry to promote until a specified date. When this &#8220;promotion&#8221; expires, you can either display a static message or use another post/page instead.</p>
<hr />
<h3>Installation</h3>
<ol>
<li>Upload the plugin folder to your plugins directory <code>/wp-content/plugins/</code> directory</li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress</li>
<li>Add the Widget &#8220;Promoted Content&#8221; to a sidebar</li>
</ol>
<hr />
<h3>Frequently Asked Questions</h3>
<h4>What are the options?</h4>
<ul>
<li><strong>Title:</strong> The displayed widget title &#8211; leaving it blank will use the post title (if you override the default, see Hooks)</li>
<li><strong>Feature Expires:</strong> until what date (YYYY-MM-DD) to show the promoted post; after which fall back to the default</li>
<li><strong>Feature Post:</strong> choose from the dropdown of public post types to promote</li>
<li><strong>Default:</strong> display this entry instead after the expiration</li>
<li><strong>Trim summary to:</strong> if no excerpt is provided, shorten the post content to this number of words</li>
</ul>
<p>Note that you can select the most recent post from the dropdown options.</p>
<h4>How can I change the defaults?</h4>
<p>If you don&#8217;t specify certain options, the widget will use builtin defaults. Override these with the following hook: </p>
<pre class="brush: php; title: ; notranslate">
add_filter('abt_promo_post_defaults', 'YOUR_HOOK');
</pre>
<p>where <code>YOUR_HOOK</code> is a function that takes an array and returns the following settings:</p>
<pre class="brush: php; title: ; notranslate">
function promo_widget_defaults($settings){
    return array(
            #'title'        =&gt; 'Latest From MY SITE',    // disable to use post title
            'display'   =&gt; 'Check out our new video! Credit goes to ... &lt;p&gt;&lt;a class=&quot;archive&quot; href=&quot;/category/news&quot;&gt;News Archive&lt;/a&gt;&lt;/p&gt;',
            'url'       =&gt; '#',
            'image'     =&gt; '&lt;img src=&quot;' . get_stylesheet_directory_uri() . '/images/g_video.jpg&quot; alt=&quot;Latest from MY SITE&quot;&gt;',
    );
}
</pre>
<h4>What else can I use?</h4>
<p>Two static methods are available for &#8220;embedding&#8221; the widget in code &#8211; basically just the internal processing used by the widget function.</p>
<pre><code>abtcore_feature_widget::display_promo($args, $before_title, $after_title) </code></pre>
<p>which uses the following</p>
<pre><code>abtcore_feature_widget::get_promo($args) </code></pre>
<p>to get either the promoted post or the default. <code>$args</code> will contain an array of the widget options (<code>title</code>, <code>expire</code>, <code>promo</code>, <code>default</code>, <code>trim</code>).</p>
<p>Function <code>get_promo</code> will return an array of (<code>title</code>, <code>display</code>, <code>url</code>, and <code>image</code>) to <code>display_promo</code> where it gets combined with the defaults from the hook to output the widget HTML.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-promote-a-post-in-a-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal &#8211; How to Get a List of your Active Modules</title>
		<link>http://www.atlanticbt.com/blog/drupal-how-to-get-a-list-of-your-active-modules/</link>
		<comments>http://www.atlanticbt.com/blog/drupal-how-to-get-a-list-of-your-active-modules/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 20:11:06 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Drupal 7]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4493</guid>
		<description><![CDATA[How to get a list of active Drupal modules - all from within your browser!  Use this jQuery snippet to render a table complete with links to each module's project page.]]></description>
			<content:encoded><![CDATA[<p>Has a client ever asked you &#8220;So what Drupal modules are we using?&#8221;  Now you can give them a nice table!  With links to each module page.</p>
<p>It will look like this:<br />
<a href="http://www.atlanticbt.com/blog/drupal-how-to-get-a-list-of-your-active-modules/drupal-active-module-js-hack/" rel="attachment wp-att-4496"><img src="http://d1rvlzmuzboe2s.cloudfront.net/blog/wp-content/uploads/2012/01/Drupal-Active-Module-JS-Hack-300x213.png" alt="" title="Drupal - Active Module JS Hack" width="300" height="213" class="alignnone size-medium wp-image-4496" /></a></p>
<ol>
<li>Go to <a href="//yoursite.com/admin/modules">http://yoursite.com/admin/modules</a></li>
<li>Run the following javascript in your Console (Firebug, Developer Tools, etc &#8211; <code>F12</code>)</li>
</ol>
<pre class="brush: jscript; title: ; notranslate">
(function($, D, boxid){ /*--start--*/var $checkboxes = $(':checkbox')
    , $checked = $checkboxes.filter(':checked')
	, $dom_render_to_div = false
	;
    console.log($checked.length, 'enabled modules');

// clear old version
$('#'+boxid).remove();

var render = function(o, renderfn){
	renderfn(o);
};
var render_to_console = function(o){
	console.log(o.i, 'Section:' + o.s, 'Module:' + o.l, o.v);
};
var render_to_div = function(r){
	if( false === $dom_render_to_div ){
		var $container = $('&lt;div id=&quot;' + boxid + '&quot; class=&quot;debug&quot;&gt;&lt;h3&gt;Active Modules&lt;/h3&gt;&lt;/div&gt;');
		$container.append('&lt;table&gt;&lt;/table&gt;').append('&lt;div class=&quot;clearfix&quot;&gt;Copy Above&lt;/div&gt;');
		$container.css({
			'background-color': '#FFFFFF'
			, 'left': '20%'
			, 'padding': '5%'
			, 'position': 'absolute'
			, 'top': '20%'
		});

		$('body').append($container);
		$dom_render_to_div = $container.find('table');
		$dom_render_to_div.append('&lt;tr&gt;&lt;th&gt;i&lt;/th&gt;&lt;th&gt;Section&lt;/th&gt;&lt;th&gt;Label&lt;/th&gt;&lt;th&gt;Version&lt;/th&gt;&lt;/tr&gt;');
	}
	$dom_render_to_div.append('&lt;tr&gt;&lt;td&gt;' + r.i + '&lt;/td&gt;&lt;td&gt;' + r.s + '&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://drupal.org/project/' + r.id + '&quot;&gt;' + r.l + '&lt;/a&gt;&lt;/td&gt;&lt;td&gt;' + r.v + '&lt;/td&gt;&lt;/tr&gt;');
};

$checked.each(function(i,o){
	var $o = $(o);
	var $row = $o.parents('tr');
	var section = $o.parents('fieldset').find('legend').text();
		if( 7 == D ) section = section.replace(/Hide /i, '');
	var label = &quot;&quot; + $row.find('td:nth(1) label').text();
	var version = $row.find( 7 == D ?'td:nth(2)' : 'td.version' ).text();
	var iden = $row.find(':checkbox').attr('name').match(/\]\[([^\]]+)\]/)[1];

	var row = {&quot;i&quot;: i, &quot;s&quot;: section, &quot;l&quot;: label, &quot;v&quot;: version, &quot;id&quot;: iden};

	render(row, render_to_div);
});
/*--end--*/ })(jQuery, 7, 'module-list-debug');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/drupal-how-to-get-a-list-of-your-active-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The &#8220;Complete&#8221; How-to Set Up XAMPP on Windows</title>
		<link>http://www.atlanticbt.com/blog/the-complete-how-to-set-up-xampp-on-windows/</link>
		<comments>http://www.atlanticbt.com/blog/the-complete-how-to-set-up-xampp-on-windows/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 16:06:38 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[IT/Hosting]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4486</guid>
		<description><![CDATA[A quick how-to guide to setting up XAMPP on a Windows computer: set alternate folders/domains/subdirectories, enable "missing" extensions, and let it play nicely with VisualStudio's local IIS.]]></description>
			<content:encoded><![CDATA[<p>If you run PHP locally on a Windows machine, you&#8217;re probably using XAMPP.  By default, you put all your files in the <em>xampp</em> directory (htdocs) to make things work.  However, if want a different directory structure (i.e. under &#8220;My Documents&#8221;) you can set up domain or subdirectory aliases.</p>
<p>The following steps are the mostly-complete guide to setting up XAMPP: set alternate folders/domains/subdirectories, enable &#8220;missing&#8221; extensions, and let it play nicely with VisualStudio&#8217;s local IIS.</p>
<ol>
<li>Download zip version</li>
<li>run <em>setup_xampp.bat</em> to fix directories</li>
<li>to access your local dev like <strong>`http://ALIAS.localhost:81/whatever.php`</strong>, in <em>\apache\conf\extra\httpd-vhosts.conf</em> add your custom directories like: (note port 81 from step 7)
<pre class="brush: php; html-script: true; title: ; notranslate">

&lt;VirtualHost *:81&gt;
 ServerAdmin YOUR@EMAIL.COM
 DocumentRoot &quot;/Relative/Path/To/LocalFiles&quot;
 ServerName ALIAS.localhost
 ServerAlias www.ALIAS.localhost
 ErrorLog &quot;logs/ALIAS.localhost-error.log&quot;
 CustomLog &quot;logs/ALIAS.localhost-access.log&quot; combined

 &lt;Directory &quot;/Relative/Path/To/LocalFiles&quot;&gt;
 Options Indexes FollowSymLinks
 AllowOverride All
 Order allow,deny
 Allow from all
 &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<p>&nbsp;</li>
<li>Update your hosts file (<span style="color: #a8a8a8;">C:\Windows\System32\drivers\etc\hosts</span>) accordingly: <span style="color: #808080; font-family: 'Courier New';">127.0.0.1 ALIAS.localhost</span><br />
(added bonus: <a title="Download Extension to Allow Wildcards in Hostfile" href="http://mayakron.altervista.org/support/browse.php?path=Acrylic&amp;name=UserManual">wildcards in hosts file</a> <em>(untested)</em>)</li>
<li>OR, instead of #3 and #4, configure subdirectory aliases in <span style="color: #a8a8a8;">\xampp\apache\conf\extra\httpd-userdir.conf</span>, which will let you access your local dev like <strong>`http://localhost/ALIAS/whatever.php`<br />
</strong>
<pre class="brush: php; html-script: true; title: ; notranslate">
&lt;IfModule alias_module&gt;
 # ===== Description of the following
 Alias /ALIAS &quot;/Relative/Path/To/LocalFiles&quot;
 # Access control, etc
 &lt;Directory &quot;/Relative/Path/To/LocalFiles&quot;&gt;
 AllowOverride All
 Options Indexes FollowSymLinks
 Order allow,deny
 Allow from all
 &lt;/Directory&gt;
&lt;/IfModule&gt;
</pre>
</li>
<li>Allow &#8220;missing&#8221; extensions by uncommenting dll line in <span style="color: #a8a8a8;">\xampp\php\php.ini</span></li>
<li>If also have IIS (VisualStudio) on same computer, you&#8217;ll <a href="http://one7.wordpress.com/2009/04/28/using-xampp-and-iis-together-easy-solution/">need to change the ports</a> (you can use other numbers)
<ol>
<li>in <span style="color: #a8a8a8;">\xampp\apache\conf\httpd.conf</span> &#8211; change `<strong>Listen *:80</strong>` to `<strong>Listen: *.81</strong>`, `<strong>ServerName localhost:80</strong>` to `<strong>ServerName localhost:81</strong>`</li>
<li>in <span style="color: #a8a8a8;">\xampp\apache\conf\extra\httpd-ssl.conf</span> &#8211; change `<strong>Listen 443</strong>` to `<strong>Listen 442</strong>`</li>
<li>ignore the message in xampp-control that says it started on port 80 (that&#8217;s hardcoded)</li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/the-complete-how-to-set-up-xampp-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Custom Registration Page</title>
		<link>http://www.atlanticbt.com/blog/wordpress-custom-registration-page/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-custom-registration-page/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 22:52:33 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4446</guid>
		<description><![CDATA[Wordpress plugin to customize the user registration page with additional validated fields. Hooks right into existing parts of the registration process, so it should work with other plugins like BuddyPress and Prospress.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a WordPress plugin that will allow you to customize the user registration fields through extra hooks.</p>
<p><a rel="attachment wp-att-4450" href="http://www.atlanticbt.com/blog/wordpress-custom-registration-page/custom-user-access/"><span style="text-decoration: line-through;">Download Custom User Registration plugin</span></a> <a title="Get the plugin!" href="http://wordpress.org/extend/plugins/custom-user-registration/">Download from WordPress</a></p>
<p>As taken from the <code>readme</code> file:</p>
<hr />
<h3>Description</h3>
<p>Customize the user registration page with additional validated  fields.   Hooks right into existing parts of the registration process.</p>
<p>Provides a number of hooks to allow further customization: fields,  validation, email header/message/template, custom signup url (if used  with other plugins like BuddyPress).</p>
<p>Works with anything using the regular WP register hooks, like <a title="BuddyPress forum login" href="http://wordpress.org/extend/plugins/buddypress/">BuddyPress</a> and <a title="Prospress Auction Plugin" href="http://wordpress.org/extend/plugins/prospress/">Prospress</a>.</p>
<hr />
<h3>Installation</h3>
<ol>
<li>Upload plugin folder <code>custom-user-access</code> to your plugins directory (<code>/wp-content/plugins/</code>)</li>
<li>Activate plugin</li>
<li>Go to new admin page <em>User Login &#8211; ABT</em> and change the registration url, if needed.</li>
</ol>
<p>Please note that this includes an instance of <code>Singleton</code> and <code>WP_Options_page</code>, both taken from the <a title="Wordpress Developer Library Plugin" href="http://wordpress.org/extend/plugins/wp-dev-library/">WP-Dev-Library</a> plugin, so if you are also using that plugin please be aware of  potential conflicts.  This plugin checks for the existance of those  classes before including files, so if you experience any issues you can  remove those lines.</p>
<hr />
<h3>Frequently Asked Questions</h3>
<h4>How do I add extra fields?</h4>
<ul>
<li>Use the hook <code>abt_custom_register_fields</code>.  Append or replace items in the <code>$fields</code> array with an array of attributes.</li>
<li>Specify validation with <code>data-validation</code>.  See plugin file for examples of password and name fields.</li>
<li>Make sure that, if you&#8217;re providing default WP fields, that the field names are correct.</li>
</ul>
<pre>function YOUR_register_fields($fields){
    $fields []= array('name'=&gt;'user_url', 'type'=&gt;'text', 'class'=&gt;'input url', 'size'=&gt;20, 'label'=&gt;'Your Website', 'data-validation'=&gt;'url');
    $fields []= array('name'=&gt;'aim', 'type'=&gt;'text', 'class'=&gt;'input social-client', 'size'=&gt;20, 'label'=&gt;'AIM', 'data-validation'=&gt;'alphanumeric');

    // set name required
    $fields[3]['data-validation'] = array('required', 'string');

    return $fields;
}
add_filter('abt_custom_register_fields', 'YOUR_register_fields');</pre>
<h4>How do I change the email?</h4>
<p>** Headers **:</p>
<pre>function YOUR_register_email_headers($headers){
    $headers []= 'Bcc:youremail@domain.com';
    return $headers;
}
add_filter('abt_custom_register_email_headers', 'YOUR_register_email_headers');</pre>
<p>** Template **: Just copy <code>email-signup.tpl.php</code> from the plugin folder to your theme folder.  Or use the hook <code>abt_custom_login_email_templates</code>.</p>
<h4>How do I customize my thank-you message?</h4>
<p>On your custom thank-you page, add something like the following:</p>
<pre><code>    // check if we had a successful signup - indicated by a notification in session
        $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : NULL;
        if( false !== strpos($referer, 'action=register')
            || (
                true === ABT_Custom_User_Access::flash_var('notification')
            )){
                ?&gt;
                &lt;p&gt;Thank you for registering!  Please check your email for a confirmation message.&lt;/p&gt;
                &lt;?php
                // clear the flash message
                ABT_Custom_User_Access::flash_var(false);
        }
</code></pre>
<hr />
<h3 id="Hooks">Hooks</h3>
<ol>
<li><code>abt_custom_login_nometa</code> determine which fields are not treated as usermeta, but instead directly on user table format: pipe-separated, default = <code>'|user_url|display_name|'</code></li>
<li><code>abt_custom_login_fields</code> add or remove additional login fields</li>
<li><code>abt_custom_login_extra_validation</code> apply extra validation, return whether it has errors or not &#8211; uses $has_errors, $key, $attr, $post</li>
<li><code>abt_custom_login_has_errors</code> do something with the errors instead of saving the field</li>
<li><code>abt_custom_login_email_templates</code> adjust default template names</li>
<li><code>abt_custom_login_email_headers</code> change default email headers</li>
<li><code>abt_custom_login_email_message</code> change email message before it&#8217;s sent to user</li>
<li><code>abt_custom_register_url</code> change where the form redirects to on error; not completely working, so please rely on the admin option instead.</li>
<li><code>abt_custom_register_admin_settings</code> add more admin settings (using <code>WP_Options_Page</code> class)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-custom-registration-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Debugging &#8211; &#8220;Doing It Wrong&#8221; warnings</title>
		<link>http://www.atlanticbt.com/blog/wordpress-debugging-doing-it-wrong-warnings/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-debugging-doing-it-wrong-warnings/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 16:57:38 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4435</guid>
		<description><![CDATA[Wordpress 3.3 introduced some not-so-helpful warnings for when you're not "doing it right".  But they gave us a hook (`doing_it_wrong_run`) to make things more helpful - here we discuss a simple trick to tell us exactly where we went wrong.]]></description>
			<content:encoded><![CDATA[<p>WordPress recently added some &#8220;helpful&#8221; error messages warning you when you&#8217;re not doing certain things correctly.  Specifically, adding scripts and/or styles incorrectly using the <code>wp_enqueue_*</code> function.</p>
<p>However, even though it appears they tell you where things went wrong (via <code>trigger_error</code>), it actually just points you to the <code>_doing_it_wrong</code> function.</p>
<p>Fortunately, those hook-crazy developers threw us a bone in that function:</p>
<pre class="brush: php; title: ; notranslate">
do_action( 'doing_it_wrong_run', $function, $message, $version );
//
</pre>
<p>Now we can figure out the offender ourselves with a hook:</p>
<pre class="brush: php; highlight: [13]; title: ; notranslate">
/**
 * Because new WP 3.3 &quot;doing it wrong&quot; warnings don't really tell you where you screwed up...
 * @param string $function The function that was called.
 * @param string $message A message explaining what has been done incorrectly.
 * @param string $version The version of WordPress where the message was added.
 */
function abt_doing_it_wrong_helper($function, $message, $version){
	$before = &lt;&lt;&lt;EOD
&lt;strong&gt;$function:&lt;/strong&gt; v$version
EOD;
	debug_whereat(3, 5, $before);
}
add_action( 'doing_it_wrong_run', 'abt_doing_it_wrong_helper', 10, 3 );
//
</pre>
<p>And the helper function for printing debug_backtrace (use your own flavor):</p>
<pre class="brush: php; title: ; notranslate">
/**
 * Pretty-print debug_backtrace()
 * @param int $limit {optional} when to stop printing - how many recursions up/down
 * @param int $skip {optional} when to start printing - how many calls to skip over
 * @param string $before {optional} extra html to print before the table, inside debug container
 * @param string $after {optional} extra html to print before the table, inside debug container
 *  */
function debug_whereat($limit = false, $skip = false, $before = '', $after = ''){
	static $debug_whereat_counter; if( !$debug_whereat_counter) $debug_whereat_counter = 0;
	$uid = $debug_whereat_counter++;
	?&gt;
	&lt;div class=&quot;debug trace&quot;&gt;
		&lt;?php echo $before; ?&gt;
	&lt;table&gt;
		&lt;thead&gt;&lt;tr&gt;
			&lt;th id=&quot;th-index-&lt;?=$uid?&gt;&quot;&gt;&lt;i&gt;nth&lt;/i&gt;&lt;/th&gt;
			&lt;th id=&quot;th-line-&lt;?=$uid?&gt;&quot;&gt;Line&lt;/th&gt;
			&lt;th id=&quot;th-file-&lt;?=$uid?&gt;&quot;&gt;File&lt;/th&gt;
			&lt;th id=&quot;th-method-&lt;?=$uid?&gt;&quot;&gt;Method&lt;/th&gt;
		&lt;/tr&gt;&lt;/thead&gt;
		&lt;tbody&gt;
	&lt;?php

	$backtrace = debug_backtrace();
	if( $skip ) $backtrace = array_slice($backtrace, $skip);

	foreach($backtrace as $index =&gt; $trace){
		//force quit
		if($limit !== false &amp;&amp; $index == $limit){
			?&gt;
			&lt;tr&gt;&lt;td colspan=&quot;4&quot;&gt;&lt;em&gt;----- FORCE STOP RECURSION -----&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;
			&lt;?php
			break;
		}

		?&gt;
		&lt;tr class=&quot;trace-item&quot;&gt;
			&lt;th headers=&quot;th-index-&lt;?=$uid?&gt;&quot;&gt;&lt;?=$index?&gt;&lt;/th&gt;
			&lt;td headers=&quot;th-line-&lt;?=$uid?&gt;&quot; class=&quot;line&quot;&gt;&lt;?=$trace['line']?&gt;&lt;/td&gt;
			&lt;td headers=&quot;th-file-&lt;?=$uid?&gt;&quot; class=&quot;file&quot;&gt;&lt;?=$trace['file']?&gt;&lt;/td&gt;
			&lt;td headers=&quot;th-method-&lt;?=$uid?&gt;&quot; class=&quot;method&quot;&gt;
				&lt;code&gt;&lt;?=$trace['function']?&gt;&lt;/code&gt;
				&lt;?php
				if(!empty($trace['args'])){
					echo '&lt;br /&gt;';
					while(!empty($trace['args'])){
						?&gt;	{&lt;i&gt;&lt;?php print_r(array_shift($trace['args']) ); ?&gt;&lt;/i&gt;}	&lt;?php
					}//	while !empty $trace['args']
				}
				?&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
		&lt;?php
	}
	?&gt;
	&lt;/tbody&gt;&lt;/table&gt;&lt;?php echo $after; ?&gt;&lt;/div&gt;
	&lt;?php

}//	function debug_whereat
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-debugging-doing-it-wrong-warnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.3 Shortcode Issue</title>
		<link>http://www.atlanticbt.com/blog/wordpress-3-3-shortcode-issue/</link>
		<comments>http://www.atlanticbt.com/blog/wordpress-3-3-shortcode-issue/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 20:04:19 +0000</pubDate>
		<dc:creator>Mark Caron</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[3.3]]></category>
		<category><![CDATA[add_action]]></category>
		<category><![CDATA[add_shortcode]]></category>
		<category><![CDATA[do_shortcode]]></category>
		<category><![CDATA[init]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4401</guid>
		<description><![CDATA[If you find yourself scratching your head over why your shortcodes have stopped working in WordPress 3.3, we&#8217;ve discovered a funny quirk. Granted, this fix may actually be the right way to call all shortcodes, but previously we&#8217;ve been able to lazily call it directly from our functions.php file and no one cared. But, now [...]]]></description>
			<content:encoded><![CDATA[<p>If you find yourself scratching your head over why your shortcodes have stopped working in WordPress 3.3, we&#8217;ve discovered a funny quirk. Granted, this fix may actually be the right way to call all shortcodes, but previously we&#8217;ve been able to lazily call it directly from our <code>functions.php</code> file and no one cared. But, now it seems, with the upgrade, that WordPress 3.3 does care. It requires your <em>add_shortcode()</em> function to be called within their <em>init()</em> hook. Calling it directly after your newly declared shortcode function won&#8217;t work anymore.</p>
<p>The lazy method we got away with before:</p>
<pre class="brush: php; title: ; notranslate">
function abtcore_shortcode_button( $atts, $content = null ) {
	extract( shortcode_atts( array(
		'color' =&gt; 'blue'
	), $atts ) );
	return '&lt;p&gt;' . $content . '&lt;/p&gt;';
}

add_shortcode( 'button', 'abtcore_shortcode_button' );
</pre>
<p>The better way that is now required by WordPress 3.3:</p>
<pre class="brush: php; highlight: [7]; title: ; notranslate">
function abtcore_shortcode_button( $atts, $content = null ) {
	extract( shortcode_atts( array(
		'color' =&gt; 'blue'
	), $atts ) );
	return '&lt;p&gt;' . $content . '&lt;/p&gt;';
}
add_action('init', 'abtcore_register_my_shortcodes', 100);
function abtcore_register_my_shortcodes() {
	add_shortcode( 'button', 'abtcore_shortcode_button' );
}
</pre>
<p>Notice the <em>add_action()</em> call on the &#8216;init&#8217; on line 7. This will properly register your shortcode function when WordPress initiates.</p>
<p>I hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/wordpress-3-3-shortcode-issue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to add custom fields to Drupal 7 breadcrumb</title>
		<link>http://www.atlanticbt.com/blog/how-to-add-custom-fields-to-drupal-7-breadcrumb/</link>
		<comments>http://www.atlanticbt.com/blog/how-to-add-custom-fields-to-drupal-7-breadcrumb/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 20:49:32 +0000</pubDate>
		<dc:creator>Jeremy Schwartz</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[breadcrumbs]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Drupal 7]]></category>
		<category><![CDATA[hooks]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.atlanticbt.com/blog/?p=4388</guid>
		<description><![CDATA[Breadcrumbs in Drupal 7 are normally based on the menu title, but what if you wanted to use a custom field instead?  This post provides brief instructions and snippets detailing how to customize the breadcrumb in Drupal 7.]]></description>
			<content:encoded><![CDATA[<p>Breadcrumbs in Drupal 7 are normally based on the menu title.  However, what if you wanted different breadcrumb text than what appears in the menu?  For example, you have a small space and long titles, and would rather use abbreviations in your breadcrumb to save space (usability concerns aside).<br />
I&#8217;m aware of modules like <a title="Custom Breadcrumb module on drupal.org" href="http://drupal.org/project/custom_breadcrumbs">Custom Breadcrumb</a>, but I wasn&#8217;t able to find anything that allowed me to:</p>
<ol>
<li>Create a custom field on a node</li>
<li>Optionally use that field (if populated) instead of the menu title in the breadcrumb list</li>
</ol>
<p>So, add the following to your template.php file after creating a node field <code>field_breadcrumb</code>.  If you have a better idea, let me know in the comments!</p>
<p><em>Based on digging through <a title="Drupal Function API Reference" href="http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_menu_breadcrumb_alter/7">hook_menu_breadcrumb_alter</a> and <a href="menu_get_active_breadcrumb">menu_get_active_breadcrumb</a>.</em></p>
<pre class="brush: php; title: ; notranslate">

/**
 * Reconfigure the breadcrumb trail to use each parent's custom field
 * @see hook_menu_breadcrumb_alter
 * @see menu_get_active_breadcrumb
 *
 * @param array $active_trail the current page active trail
 * @param whatever $item the current trail item
 */
function YOURTHEME_menu_breadcrumb_alter(&amp;amp;$active_trail, $item) {

	// must step through each menu item, check to see if it has the 'custom breadcrumb' field
	foreach( $active_trail as &amp;amp;$crumb ) :
		$node_id = str_replace('node/', '', $crumb['link_path']);
		if( $node_id ) :
			// get the node to find the field
			$node = node_load($node_id);
			// best...function...ever
			$crumb_text = field_get_items('node', $node, 'field_breadcrumb');

			// replace existing text if we should
			if( $crumb_text ) :
				$crumb['link_title'] = $crumb_text[0]['safe_value'];
				$crumb['title'] = $crumb_text[0]['safe_value'];
			endif;

		endif;
	endforeach;

	// add a sacrificial final item, since that gets removed later on
	$active_trail []= $crumb;

}//--	fn	YOURTHEME_menu_breadcrumb_alter

/**
 * Return a themed breadcrumb trail.
 *
 * Implements Zen theme `zen_breadcrumb`.  Paired with XYZ_menu_breadcrumb_alter, which appended a sacrificial duplicate
 *
 *
 * @param $variables
 *   - title: An optional string to be used as a navigational heading to give
 *	 context for breadcrumb links to screen-reader users.
 *   - title_attributes_array: Array of HTML attributes for the title. It is
 *	 flattened into a string within the theme function.
 *   - breadcrumb: An array containing the breadcrumb links.
 * @return
 *   A string containing the breadcrumb output.
 */
function YOURTHEME_breadcrumb($variables) {
	if( isset( $variables['breadcrumb']) &amp;amp;&amp;amp; !empty( $variables['breadcrumb'] )) :
		// Don't show a link to the current page in the breadcrumb trail.
		// this should automatically take into account theme settings...
		$last_key = end( array_keys( $variables['breadcrumb'] ) );
		$end = end( $variables['breadcrumb'] );
		$current_path = url(request_path(), array('absolute' =&amp;gt; false));
		if ( false !== strpos($end, $current_path) ) {
			$variables['breadcrumb'][$last_key] = strip_tags( $end );
		}
	endif;
	// business as usual
	return zen_breadcrumb($variables);
}//--	fn	YOURTHEME_breadcrumb
</pre>
<p><strong>Todo:</strong> make this a module&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.atlanticbt.com/blog/how-to-add-custom-fields-to-drupal-7-breadcrumb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/12 queries in 0.005 seconds using disk: basic
Object Caching 654/677 objects using disk: basic
Content Delivery Network via d1rvlzmuzboe2s.cloudfront.net

Served from: www.atlanticbt.com @ 2012-02-08 16:02:30 -->
