<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:admin="http://webns.net/mvcb"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
		<title>Blog Posts</title>
		<link>http://gmurphey.com/index.php</link>
		<description>New Media Interactive Development</description>
		<dc:language>en</dc:language>
		<dc:creator>gmurphey@gmurphey.com</dc:creator>
		<dc:rights>Copyright 2011</dc:rights>
		<dc:date>2011-07-17T04:40:44+00:00</dc:date>
		<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
		
		<item>
			<title>Tracking Outbound Links with Google Analytics Using jQuery</title>
			<link>http://gmurphey.com/entry/tracking-outbound-links-with-google-analytics-using-jquery</link>
			<guid isPermalink="false">http://gmurphey.com/entry/tracking-outbound-links-with-google-analytics-using-jquery</guid>
			<description>Here&#8217;s a quick event binding I wrote today for the site to track outbound links in Google Analytics using some jQuery selector trickery.



(function ($) {
	$(function () {
		$(&apos;a[href^=&quot;http:&quot;]:not(a[href^=&quot;http://&apos; + document.location.hostname + &apos;&quot;])&apos;).click(function () {
			try { _gat._getTrackerByName()._trackEvent(&apos;Outbound Links&apos;, $(this).attr(&apos;href&apos;)); } catch (e) {}
		});
	});
}) (jQuery);



What&#8217;s going on here?

The selector&#8217;s doing most of the work here &#45; looking for anchors linking to absolute URLs, and then basically filtering out anchors with absolute URLs pointing to the current document&#8217;s domain. When the outgoing links are clicked, we fire off the event tracking method in Google Analytics. This clicks will be categorized as &#8220;Outbound Links&#8221; and the anchor&#8217;s full URL will be tracked as an Action.</description>
			
			<category>JavaScript</category>
			
			<category>jQuery</category>
			
			<category>Tips &amp; Tricks</category>
			
			<pubDate>Sun, 17 Jul 2011</pubDate>
		</item>
		
		<item>
			<title>Photoshop Plugin: Simple Sprites</title>
			<link>http://gmurphey.com/entry/photoshop-plugin-simple-sprites</link>
			<guid isPermalink="false">http://gmurphey.com/entry/photoshop-plugin-simple-sprites</guid>
			<description>I&#8217;ve been working on a site recently that&#8217;s needed a lot of pseudo sprites, and I was getting frustrated with creating sprite maps by hand, so I created simple Photoshop plugin that takes a directory of images and merges them into a CSS friendly sprite map.

Download the Plugin
I&#8217;ve added the plugin to GitHub, so download now and fork away!</description>
			
			<category>Cascading Style Sheets</category>
			
			<category>Plugins</category>
			
			<pubDate>Fri, 08 Jul 2011</pubDate>
		</item>
		
		<item>
			<title>How to Exclude Pages from WordPress&#8217; Search</title>
			<link>http://gmurphey.com/entry/how-to-exclude-pages-from-wordpress-search</link>
			<guid isPermalink="false">http://gmurphey.com/entry/how-to-exclude-pages-from-wordpress-search</guid>
			<description>While working on the new theme for the site, I quickly realized that I didn&#8217;t want to show pages in any of the searches on the site. I only wanted posts.

It was easy enough to find articles that illustrated ways to exclude certain categories or posts by ID, so I decided to apply those methods to pages as well. Simply paste the following into your theme&#8217;s functions.php file.



function gdmExcludePagesInSearch($query) {
 if ($query&#45;&gt;is_search) {
  $query&#45;&gt;query_vars[&apos;post__not_in&apos;] = get_all_page_ids();
 }
 
 return $query;
}

add_filter(&apos;pre_get_posts&apos;, &apos;gdmExcludePagesInSearch&apos;);



This will remove all pages from the loop, and only on the search page.

Something unclear, or have something to add? Please leave a comment.</description>
			
			<category>Tips &amp; Tricks</category>
			
			<category>WordPress</category>
			
			<pubDate>Fri, 23 Apr 2010</pubDate>
		</item>
		
		<item>
			<title>WordPress Development: Replacing Default Widgets</title>
			<link>http://gmurphey.com/entry/wordpress-development-replacing-default-widgets</link>
			<guid isPermalink="false">http://gmurphey.com/entry/wordpress-development-replacing-default-widgets</guid>
			<description>I&#8217;ve been working on a little WordPress project these last few weeks with a colleague. When I first heard the idea, I thought, &#8220;That should be easy enough to build.&#8221; I decided the best way to tackle the feature would be a custom widget, but when I finally sat down to get it working I quickly began to realize that there were a few obstacles to overcome.

The project was really meant to extend an existing widget, and it seemed confusing to have both the default and extended version there side by side (plus it would be really nice to call them the same thing for transparency). I needed to get rid of it. You can&#8217;t just overwrite an existing widget by registering a new one by the same name &#45; WordPress ignores it. And if I did manage to find a way to remove a default widget, when do you have to do it?

Luckily, some digging around found a solution.



function gdm_widget_meta_register() {
 // unregister the widget and its control
 wp_unregister_sidebar_widget(&apos;meta&apos;);

 // register the new and improved widget and control
 wp_register_sidebar_widget(&apos;meta&apos;, __(&apos;Meta&apos;), &apos;gdm_widget_meta&apos;);
 wp_register_widget_control(&apos;meta&apos;, __(&apos;Meta&apos;), &apos;gdm_widget_meta_control&apos;);
}

add_action(&apos;widgets_init&apos;, &apos;gdm_widget_meta_register&apos;, 1);



The really important pieces are the wp_unregister_sidebar_widget function and the widgets_init action hook. widgets_init actions are run right after all the default widgets are registered, giving us the perfect opportunity to call wp_unregister_sidebar_widget&amp;nbsp; with the ID of the widget you&#8217;re getting rid of. Now you can register your own widget and control, effectively replacing a default WordPress widget.</description>
			
			<category>Tips &amp; Tricks</category>
			
			<category>WordPress</category>
			
			<pubDate>Fri, 11 Apr 2008</pubDate>
		</item>
		
		<item>
			<title>WordPress Plugin: Home Page Link</title>
			<link>http://gmurphey.com/entry/wordpress-plugin-home-page-link</link>
			<guid isPermalink="false">http://gmurphey.com/entry/wordpress-plugin-home-page-link</guid>
			<description>I received an email this evening from Dan, who uses the Page Link Manager, wondering how to get a home page link to show up in his site navigation. I had never really thought about the problem, or even realized it was a problem until I started my search for a solution. There&#8217;s not much out there covering the issue besides a few forum posts at WordPress.org. But it&#8217;s an issue, nevertheless. I understand that the blog&#8217;s heading is supposed to link to your home page, but I believe there&#8217;s a large audience of Internet users, and potential readers, that wouldn&#8217;t think to look to a heading for a shortcut back to your home page.

And so we have the Home Page Link plugin.

The Plugin


v0.15 Release Changes (August 12, 2007)

This is a bug release.

Better Compatibility
The plugin now works whether your using the Pages widget or wp_list_pages.


The plugin does just what you think &#45; adds a Home link to your site navigation (wp_list_pages). And it&#8217;s very easy to use.


Download and unzip the plugin archive.
Place the plugin file under wp&#45;content/plugins directory on your Wordpress Installation
Log in to your admin interface and activate Home Page Link under the &#8216;Plugins&#8217; tab


That&#8217;s it! You should now be able to view your site with its shiny new Home link.

Like my other plugins, I hope to keep this going as a work in progress, and work along with the WordPress community to make it more useful and efficient. If you have something you&#8217;d like to see in an upcoming version, please don&#8217;t hesitate to add a comment or contact me.

Requirements

The current release requires a server running at least PHP4. The plugin has been tested on Wordpress 2.x. If anyone has gotten it working on older versions of Wordpress, please let me know.

Resources

If you&#8217;re interested in writing plugins, the Wordpress Plugin article is an excellent resource.

Download the Plugin

All source code is provided under the Creative Commons Attribution&#45;Sharealike License. If you agree to these terms, please download the plugin now.</description>
			
			<category>Plugins</category>
			
			<category>WordPress</category>
			
			<pubDate>Wed, 01 Aug 2007</pubDate>
		</item>
		
		<item>
			<title>Page Link Manager Now Available at WordPress.org</title>
			<link>http://gmurphey.com/entry/page-link-manager-now-available-at-wordpressorg</link>
			<guid isPermalink="false">http://gmurphey.com/entry/page-link-manager-now-available-at-wordpressorg</guid>
			<description>With the recent release of Page Link Manager v0.3, it has been added to WordPress.org.

I&#8217;ll still be hosting and supporting the plugin here for any of you that like to go straight to the source, but I&#8217;m hoping it will be easier to find and discover by other WordPress users over on the plugin site.</description>
			
			<category>Plugins</category>
			
			<category>WordPress</category>
			
			<pubDate>Sat, 16 Jun 2007</pubDate>
		</item>
		
		<item>
			<title>My Ideal Cascading Style Sheet: Organization</title>
			<link>http://gmurphey.com/entry/my-ideal-cascading-style-sheet-organization</link>
			<guid isPermalink="false">http://gmurphey.com/entry/my-ideal-cascading-style-sheet-organization</guid>
			<description>I am not the most organized person and I&#8217;m not afraid to admit it. It&#8217;s one of the things that has drawn me to designing with HTML and programming with  Javascript and PHP. With HTML things are designed to fit into a hierarchy of nested tags, and most programming languages are organized by functions and methods. There&#8217;s inherent organization. But one crucial piece of the web developer&#8217;s toolkit is missing syntactical design &amp;mdash; that being Cascading Style Sheets (CSS).

Here&#8217;s how I write my most of my CSS now.



#menu ul {
 list&#45;style: none;
 margin: 0;
 padding: 0;
}

#menu ul li {
 height: 1.2em;
 line&#45;height: 1.2em;
}

#menu ul li a {
 color: #006699;
}

#menu ul li a.here {
 color: #999999;
}



Now that&#8217;s not very hard to read, but amongst hundreds, if not thousands, of other lines of CSS, it&#8217;s quite easy to lose track of those 18 lines. And I, being the unorganized designer I am, tend to throw lines of CSS in the middle rules that should otherwise be grouped together. And those relationships are quite important when we need to debug a design issue caused by a child inheriting styles from a parent. The CSS syntax really lends nothing to natural organization.

One way I&#8217;ve tried to become a more efficient with the current CSS model is through rule and style separation by files. For instance, I may create files like design.css, typography.css, etc. But then I run into scenarios where I can&#8217;t decide which files to keep certain rules in, since they may apply to both, and eventually that system collapses upon itself.

I&#8217;ve thought long and hard about how CSS can improve (and hopefully make us more productive). One idea is illustrated below.



#menu {
 ul {
  list&#45;style: none;
  margin: 0;
  padding: 0;
  li {
   height: 1.2em;
   line&#45;height: 1.2em;
  }
 }
 a {
  color: #06699;
  .here {
   color: #999999;
  }
 } 
}



As you can see, I&#8217;ve nested my styles within parents to show relationships more efficiently. Nothing can come between any of the rules for the #menu element.

Another way this solution could help is by making it much easier to collaborate. My colleagues rarely organize their CSS files exactly like mine, and when we&#8217;re trading these files back and forth, there&#8217;s a lot of time spent familiarizing ourselves with each other&#8217;s personal style. I&#8217;m not saying that a syntax like this would completely cut out a &#8220;familiarization period&#8221;, but it would definitely reduce it by creating a rule&#45;grouping standard.

I&#8217;m curious to know how you think CSS could be made more efficient and cleaner. It&#8217;s definitely a subject I want to discuss more.</description>
			
			<category>Cascading Style Sheets</category>
			
			<category>Random</category>
			
			<pubDate>Mon, 12 Mar 2007</pubDate>
		</item>
		
		<item>
			<title>Off to SXSW 2007</title>
			<link>http://gmurphey.com/entry/off-to-sxsw-2007</link>
			<guid isPermalink="false">http://gmurphey.com/entry/off-to-sxsw-2007</guid>
			<description>I&#8217;m off for a 5 day trip to Austin, Texas, for SXSW Interactive 2007.

If you&#8217;re going to be in Austin and would like to meet up, please don&#8217;t hesitate to contact me.</description>
			
			<category>Random</category>
			
			<pubDate>Fri, 09 Mar 2007</pubDate>
		</item>
		
		<item>
			<title>Wordpress Plugin: Category Link Manager</title>
			<link>http://gmurphey.com/entry/wordpress-plugin-category-link-manager</link>
			<guid isPermalink="false">http://gmurphey.com/entry/wordpress-plugin-category-link-manager</guid>
			<description>I can&#8217;t really call this a new plugin. If you look under the hood, most of codebase is just a reworking of the popular Page Link Manager. It&#8217;s one of the nice things about Wordpress plugin development&#8212;being able to borrow ideas from similiar plugins&#8212;and it&#8217;s what makes scripting for Wordpress enjoyable.

The motivation behind this plugin is the fact that excluding categories is somewhat of a barrier to those of us who are not programmers. It used to be that we would have to dig through PHP templates and add exclude=2,7 to the wp_list_cats tag. To clients or anyone not familiar with the Wordpress system, that may seem like an impossible task. And, for those who are comfortable with the Wordpress system, it can be just plain annoying. The Category Link Manager attempts to make things just a little bit easier.

One last note: I&#8217;d like to thank Valerie for sharing this idea with me.

The Plugin

The Category Link Manager Plugin is a Wordpress plugin that adds an administration panel that allows users to pick which category links are included in the site navigation. It also provides a function that uses these settings to replace wp_list_cats. Adding it to your Wordpress installation is as easy as ever.


Download and unzip the plugin archive.
Place the plugin file under wp&#45;content/plugins directory on your Wordpress Installation.
Log in to your admin interface and activate Category Link Manager under the &#8216;Plugins&#8217; tab.
Go to the new panel under the &#8216;Manage&#8217; tab called &#8216;Category Links&#8217;.
Select and update the categories you want included in your site navigation.
Open the source of the template file where you call the wp_list_cats function (the default file is sidebar.php, however it may be different if you&#8217;re using certain plugins) and replace it with gdm_list_selected_cats.


If you&#8217;re wondering, gdm_list_selected_cats is what does all the work for us. It takes the categories we chose to include in the navigation and works out what categories it should exclude. Besides that, it acts exactly like wp_list_cats&#8212;it even takes the same parameters.

Here&#8217;s a few examples of what we can do:


// sort the categories by name
gdm_list_selected_cats(&apos;sort_column=name&apos;);

// sort the list by name and show empty categories
gdm_list_selected_cats(&apos;sort_column=name&amp;amp;hide_empty=0&apos;);

// sort the list by name and manually exclude 
// additional categories
gdm_list_selected_cats(&apos;sort_column=name&amp;amp;exclude=2,7&apos;);


Like my other Wordpress plugins, I hope to keep this plugin going as a work in progress as it helps make content management just a little bit easier. If you have any problems, questions or suggestions, please let me know.

Requirements

The current release requires a server running at least PHP4. The plugin has been tested on Wordpress 2.x. If anyone has gotten it working on older versions of Wordpress, please let me know.

Download the Plugin

All source code is provided under the Creative Commons Attribution&#45;Sharealike License. If you agree to these terms, please download the plugin now.</description>
			
			<category>Plugins</category>
			
			<category>WordPress</category>
			
			<pubDate>Mon, 16 Oct 2006</pubDate>
		</item>
		
		<item>
			<title>Localizing the Page Link Manager Plugin</title>
			<link>http://gmurphey.com/entry/localizing-the-page-link-manager-plugin</link>
			<guid isPermalink="false">http://gmurphey.com/entry/localizing-the-page-link-manager-plugin</guid>
			<description>For the next release of the Page Link Manager (v0.3), I&#8217;d like to add some localization to the plugin (especially with all the international attention it&#8217;s received).

I&#8217;m a guy who thinks that Wordpress wouldn&#8217;t be the success it is without the community involvement around it. So, I&#8217;m currently looking for some volunteers to help translate some of the output the plugin produces. It&#8217;s pretty much just small, but important, things like page headings and form labels and instructions. I&#8217;d like to get as many translations as possible for this next release, and I&#8217;m open to taking any localizations people are willing to provide.

If you&#8217;re interested in helping out, please download the translation file and email it to gmurphey@gmurphey.com once you&#8217;re done.

Just for the record&#8212;I took four years of Latin in high school, so unfortunately I can&#8217;t really contribute any translations for the plugin&#8212;unless someone really, really wants a Latin version.</description>
			
			<category>Plugins</category>
			
			<category>WordPress</category>
			
			<pubDate>Tue, 10 Oct 2006</pubDate>
		</item>
		
	</channel>
</rss>
