<?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>GFMorris.org &#187; WordPress</title>
	<atom:link href="http://gfmorris.org/categories/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://gfmorris.org</link>
	<description>Smart Guy, Dumb Code</description>
	<lastBuildDate>Sat, 17 Jul 2010 15:39:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress Upload Management Tip</title>
		<link>http://gfmorris.org/archives/2005/12/17/wordpress-upload-management-tip/</link>
		<comments>http://gfmorris.org/archives/2005/12/17/wordpress-upload-management-tip/#comments</comments>
		<pubDate>Sat, 17 Dec 2005 23:15:11 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://gfmorris.org/?p=19</guid>
		<description><![CDATA[A tip for all WordPress users out there who have unwieldy uploads folders in wp-content: take a bit of the chaos out by creating a bit of a hierarchy in your uploads folder! Here&#8217;s what I do: Create a folder named &#8220;uploads&#8221; in wp-content. Having a separte folder for the stuff I upload allows me [...]]]></description>
			<content:encoded><![CDATA[<p>A tip for all WordPress users out there who have unwieldy uploads folders in wp-content: take a bit of the chaos out by creating a bit of a hierarchy in your uploads folder!</p>
<p>Here&#8217;s what I do:</p>
<ol>
<li><strong>Create a folder named &#8220;uploads&#8221; in wp-content</strong>.
<p>Having a separte folder for the stuff I upload allows me to keep things a bit tidier in there.  As you probably know, wp-content isn&#8217;t in danger of being overwritten when you upgrade WordPress, and so it&#8217;s a good place to stash stuff.</li>
<li><strong>Create folders by year inside uploads to store images, movies, etc</strong>.
<p>If you&#8217;re like the rest of us normal folks, you aren&#8217;t very good at renaming images that you upload.  All that stuff takes a lot of work.  However, if you create year-based folders inside your wp-content/uploads/ directory, you&#8217;ll be able to start to pin down when you used that really goofy image of your cat.</li>
</ol>
<p>The only issue with this approach is that you have to make sure to have a new folder on hand when the calendar turns over a new year.  If you take the time, though, to make a list of things that you should do every time January comes around again, this is a quick-and-easy thing to add to the list.</p>
<p>One last thing: make sure to chmod all these image folders to 777&#8212;otherwise, WordPress won&#8217;t be able to work with them!</p>
<p>[<a href="http://domesticat.net/content.php?q=site_mgmt2">Thanks to Amy Qualls-McClure for making this suggestion <em>years</em> ago</a>.]</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=19&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2005/12/17/wordpress-upload-management-tip/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Alternating Comment Classes</title>
		<link>http://gfmorris.org/archives/2004/07/29/alternating-comment-classes/</link>
		<comments>http://gfmorris.org/archives/2004/07/29/alternating-comment-classes/#comments</comments>
		<pubDate>Thu, 29 Jul 2004 15:26:00 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2004/07/29/alternating-comment-classes/</guid>
		<description><![CDATA[This idea expands on something originally done by MooKitty: Comment Backgrounds Hack. Kitty was directly inputting a background in wp-comments.php, but I realized that it made more sense to use an if/else statement and create two classes, comment-even and comment-odd, that could then be styled however the user wished. My end result is like so: [...]]]></description>
			<content:encoded><![CDATA[<p>This idea expands on something originally done by <a href="http://mookitty.co.uk/">MooKitty</a>: <a href="http://mookitty.co.uk/devblog/archives/2004/07/28/comment-backgrounds-hack/">Comment Backgrounds Hack</a>.  Kitty was directly inputting a background in wp-comments.php, but I realized that it made more sense to use an if/else statement and create two classes, comment-even and comment-odd, that could then be styled however the user wished.  My end result is like so:</p>
<pre style="overflow:scroll">
    35  &lt;?php if ($comments) { ?&gt;
    36  &lt;ol id=&quot;commentlist&quot;&gt;
    37  &lt;?php <span style="color:red">$i=0;</span> foreach ($comments as $comment) { ?&gt;
    38       &lt;li id=&quot;comment-&lt;?php comment_ID() ?&gt;&quot; <span style="color:red">&lt;?php if($i%2) {echo &#039;class=&quot;comment-even&quot;&#039;;} else {echo &#039;class=&quot;comment-odd&quot;&#039;;} $i++ ?&gt;&gt;</span>
    39          &lt;?php comment_text() ?&gt;
    40          &lt;p&gt;&lt;cite&gt;&lt;?php comment_type(); ?&gt; &lt;?php _e(&quot;by&quot;); ?&gt; &lt;?php comment_author_l
ink() ?&gt; &amp;#8212; &lt;?php comment_date() ?&gt; @ &lt;a href=&quot;#comment-&lt;?php comment_ID() ?&gt;&quot;&gt;&lt;?php c
omment_time() ?&gt;&lt;/a&gt;&lt;/cite&gt; &lt;?php edit_comment_link(__(&quot;Edit This&quot;), &#039; |&#039;); ?&gt;&lt;/p&gt;
    41          &lt;/li&gt;
</pre>
<p>Using i=0 as a starting point for the counter allows the logic of if / 2 to work as one expects; the first comment is &lt;li id=&#8221;comment-blahdiblah&#8221; class=&#8221;comment-even&#8221;&gt;, etc.</p>
<p>I personally would suggest this as a code change for 1.3+.</p>
<p>[Thanks to Carthik's <a href="http://wordlog.com/">WordLog</a> for <a href="http://wordlog.com/index.php?p=29">pointing me to MooKitty's hack</a> in the first place.]</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=11&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2004/07/29/alternating-comment-classes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Making a Permalink to Daily Archives</title>
		<link>http://gfmorris.org/archives/2004/06/10/making-a-permalink-to-daily-archives/</link>
		<comments>http://gfmorris.org/archives/2004/06/10/making-a-permalink-to-daily-archives/#comments</comments>
		<pubDate>Thu, 10 Jun 2004 19:05:13 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2004/06/10/making-a-permalink-to-daily-archives/</guid>
		<description><![CDATA[If you want to create a permalink in WordPress to all entries on a particular day, it&#8217;s pretty simple: &#60;?php echo mysql2date('Y/m/d', $post->post_date); ?&#62; For me, I put http://ijsm.org/archives/[echo statement] in an anchor I&#8217;ve placed this around my instance of the_date to get a permalink that has the date. I suggest adding a title=&#8221;Permalink to [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to create a permalink in WordPress to all entries on a particular day, it&#8217;s pretty simple:</p>
<pre style="overflow:scroll">
&lt;?php echo mysql2date('Y/m/d', $post->post_date); ?&gt;
</pre>
<p>For me, I put http://ijsm.org/archives/[echo statement] in an anchor I&#8217;ve placed this around my instance of <code>the_date</code> to get a permalink that has the date.  I suggest adding a title=&#8221;Permalink to entries on this date&#8221; to the anchor element in an effort to make it clear to your readers what you are doing.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=7&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2004/06/10/making-a-permalink-to-daily-archives/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin: Wonderping</title>
		<link>http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/</link>
		<comments>http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/#comments</comments>
		<pubDate>Fri, 28 May 2004 19:07:35 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/</guid>
		<description><![CDATA[I have come up with the following WordPress plugin for the pingWondergeeks() function that Rick King wrote back in the day. Please note: Wondergeeks.net is a closed system. Only users of Wondergeeks need mess with this! pingWondergeeks() in a Plugin! &#60;?php /* Plugin Name: pingWondergeeks Plugin URI: http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/ Description: Notifies wondergeeks.net when a new, public [...]]]></description>
			<content:encoded><![CDATA[<p>I have come up with the following WordPress plugin for the pingWondergeeks() function that <a href="http://geekking.com/" rel="friend met">Rick King</a> wrote back in the day.</p>
<p><em><strong>Please note: Wondergeeks.net is a closed system.  Only users of Wondergeeks need mess with this!</strong></em></p>
<h4>pingWondergeeks() in a Plugin!</h4>
<pre style="overflow:scroll;">
&lt;?php
/*
Plugin Name: pingWondergeeks
Plugin URI: http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/
Description: Notifies wondergeeks.net when a new, public post is made.
Version: 0.1
Author: Geof F. Morris
Author URI: http://gfmorris.net/
*/

function pingWondergeeks() {
        // Rick King
        $client = new xmlrpc_client("/ping/pingme.php?name=[domain.tld]", "wondergeeks.net", 80);
        $message = new xmlrpcmsg("", array(new xmlrpcval("[domain.tld]")));
        $result = $client->send($message);
        if (!$result || $result->faultCode()) {
                return false;
        }
        return true;
}

add_filter('publish_post', 'pingWondergeeks');

?&gt;
</pre>
<p><em>Per my convention, data in [brackets] should be replaced by the user.</em>  </p>
<p><a href="http://gfmorris.org/wp-content/code/wonderping.php.zip"><acronym title="Uniform Resource Locator">URL</acronym> to download wonderping.php</a>.  You will also need the <a href="http://gfmorris.org/wp-content/code/wonderping-syndication.zip">wonderping-syndication.zip</a> files to support Wonderpinging.</p>
<p>This code should be saved as wondergeeks.php and placed in /wp-content/plugins/.  Before activating the plugin in the <acronym title="WordPress">WP</acronym> admin, you need to remove the pingWondergeeks() functionality from my-hacks.php.</p>
<p>Future work for this plugin:</p>
<ul>
<li>Passing more data through the XML-RPC array, thereby eliminating the need for the post syndication file.</li>
<li>Adding a function to pass comment data on to wondergeeks.net when comments are made using the <a href="http://wiki.wordpress.org/Plugin/API">WP Plugin <acronym title="Application Programming Interface">API</acronym></a>&#8216;s comment_post filter, thereby eliminating the need for periodic polling of the comment syndication files.</li>
</ul>
<p>Thanks to Rick and to <a href="http://slidingconstant.net/" rel="friend met">Jeff McClure</a> for their help in developing the Wonderping functionality for WP, and to <a href="http://domesticat.net/" rel="friend met">Amy</a> for developing wonderPortal back in the day.</p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=6&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2004/05/28/wordpress-plugin-wonderping/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Backup Shell Script</title>
		<link>http://gfmorris.org/archives/2004/04/29/wordpress-backup-shell-script/</link>
		<comments>http://gfmorris.org/archives/2004/04/29/wordpress-backup-shell-script/#comments</comments>
		<pubDate>Thu, 29 Apr 2004 17:22:54 +0000</pubDate>
		<dc:creator>Geof F. Morris</dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://gfmorris.org/archives/2004/04/29/wordpress-backup-shell-script/</guid>
		<description><![CDATA[For those seeking to backup their WordPress installations on a nightly basis, I have decided to publish the following shell script. Below, any instance of a tilde [~] indicates /home/[username]/. Referencing to user root is key to this. You could change it to /home/[username]/ if you so chose. #!/bin/csh -f # Determine current date setenv [...]]]></description>
			<content:encoded><![CDATA[<p>For those seeking to backup their WordPress installations on a nightly basis, I have decided to publish the following shell script.</p>
<p>Below, any instance of a tilde [~] indicates /home/[username]/. Referencing to user root is key to this. You could change it to /home/[username]/ if you so chose.</p>
<pre style="overflow:scroll;">
#!/bin/csh -f

# Determine current date
setenv CURDATE date +%Y%m%d

# Backup all WP databases to compressed, dated file in home directory
mysqldump -q -e -hlocalhost -u[user] -p[pass] [database] | gzip - &gt; ~/${CURDATE}_db-backup.sql.gz

# Backup WP files to compressed, dated file in home directory
cd ~/path/to/wp-files/
tar cf - . | gzip - &gt; ~/${CURDATE}_files.tar.gz
</pre>
<p>Any data in [brackets] should be filled in, sans brackets.</p>
<p>This should sit in userroot, chmod&#8217;d to 755 to be executable.</p>
<p>You will get errors for all files in wp-uploads on the second TAR run for the backups. If you don&#8217;t want backups of your WP files but are more concerned about the backup of the database, remove everything from the last comment on down.</p>
<p>I personally get an email sent to me to verify that there were no errors in the running of the script.  I also use <a href="http://ftpvoyager.com/">FTP Voyager</a>&#8216;s scheduler to do a Move Down on the backups to a local machine.  When I can get a RAID box running at home, I&#8217;ll be dumping it to that, since I trust RAID more than a single-point-of-failure HD machine.  <img src='http://gfmorris.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://gfmorris.org/wordpress/?ak_action=api_record_view&id=4&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://gfmorris.org/archives/2004/04/29/wordpress-backup-shell-script/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>
