<?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>Idealien Studios &#187; Tutorials</title>
	<atom:link href="http://idealienstudios.com/category/blog/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://idealienstudios.com</link>
	<description>We will turn your dreams into reality together!</description>
	<lastBuildDate>Thu, 27 Oct 2011 01:54:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Migrating WordPress MultiSite to Media Temple Grid Server</title>
		<link>http://idealienstudios.com/blog/development/migrating-wordpress-grid-server/</link>
		<comments>http://idealienstudios.com/blog/development/migrating-wordpress-grid-server/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 18:41:24 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://idealienstudios.com/?p=950</guid>
		<description><![CDATA[If you have ever setup a WordPress Multi-Site aka a WordPress Network, you know that it is not quite the famous 5-minute install that the single site version can be. The few bumps in the road that you encounter are well worth smoothing over as the simplicity of having a single instance of the back-end code to update for multiple domains is worth the effort. ]]></description>
			<content:encoded><![CDATA[<p>If you have ever setup a WordPress Multi-Site aka a WordPress Network, you know that it is not quite the <a href="http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install">famous 5-minute install</a> that the single site version can be. The few bumps in the road that you encounter are well worth smoothing over as the simplicity of having a single instance of the back-end code to update for multiple domains is worth the effort. I originally setup my WordPress Network when 3.0 consolidated the code-base which simplified or eliminated a number of the more complex parts of the process. Recently I have been changed my primary webhosting environment to a Media Temple (MT) Grid Server (GS) environment. The process has gone far smoother than I expected, but wanted to document a few of the issues I encountered and resolutions to them (as much for myself as anyone else).</p>
<h3>Single Site Instructions</h3>
<p>The <a href="http://kb.mediatemple.net/questions/1556/Migrating+your+websites+to+the+%28gs%29+Grid-Service#gs">MT: GS single site migration documentation</a> for is quite excellent. My process was only marginally different than what they describe. A brief outline of the process which took 10 &#8211; 20 minutes per domain depending on file sizes:</p>
<ol>
<li>Add a new domain on MT:GS</li>
<li>Create email user with FTP and SSH access for the domain.</li>
<li>Create new database and user / pass with permissions access to it.</li>
<li>Login to your phpmyadmin to take an export of your entire database.<br />
<em>Optional: </em>Use a <a href="http://wordpress.org/extend/plugins/wp-db-backup/">WordPress database backup plugin</a> if you find it easier.</li>
<li>SSH login to your existing webhosting domain root folder (httpdocs? html? wwwroot?)</li>
<li><strong>tar -zcf yourentiresitebackup.tar.gz *</strong>to create a single archive of your entire site.</li>
<li>SSH login to your MT:GS server and the appropriate domain /html/ folder.</li>
<li><strong>wget http://[insertyourdomainname.com]/yourentiresitebackup.tar.gz </strong>to copy the archive folder.<br />
For large sites or for those who are not on truly high-speed connections, doing this server-to-server copy of a single file is MUCH faster than the alternative download to local PC / upload to new server alternative.</li>
<li><strong>tar -zxf yourentiresitebackup.tar.gz</strong> to uncompress the archive.<br />
Don&#8217;t forget to delete the archive once you&#8217;ve confirmed the site is operational.</li>
<li>Go into the MT:GS database admin page and import your mySQL archive from step 3.</li>
<li>Setup your new local FTP connection in your development IDE of choice.</li>
<li>Your database connection strings will have changed. Modify the wp-config.php files on the new server.<br />
The tutorial linked above outlines this information very well. The change of <strong>localhost </strong>to <strong>$ENV{&#8216;DATABASE_SERVER&#8217;}</strong> was the only unexpected item to me for this.</li>
<li>Replacing 000000 with your account details, you can now preview the domain either at http:/s00000.gridserver.com if it is the primary domain on your MT:GS site or http://sub.alt-example.com.s00000.gridserver.com if it is an additional domain.</li>
<li>Update the DNS entries and wait for the magic to happen.</li>
</ol>
<p>Their tutorial did cover updating site paths &amp; previews within the SQL database before updating the DNS, but once you&#8217;ve ensured your landing page is accessible, the rest of the site will show properly when the DNS have propogated so I found it as a step worth skipping. You may have to re-generate your .htaccess file via the WordPress admin console once that has been done. If you&#8217;re DNS are taking longer than you care to wait you can <a href="http://www.mediacollege.com/computer/network/dns.html">temporarily map DNS/IP addresses</a> to the new server.</p>
<p>Another quirk I discovered is regarding the mail server configuration. Despite the fact that, &#8220;When a domain is added to a (gs)Grid-Service, the mail service is automatically created&#8221; it is not <a href="http://kb.mediatemple.net/questions/519/How+to+enable+or+disable+local+mail+for+your+server%3F#gs">enabled by default</a>. You have to enable it via the account center in Media Temple.</p>
<h3>MultiSite Migration</h3>
<p>Wash, rise, repeat? Almost. In the case where I was migrating existing domains as a part of a MultiSite installation things were essentially the same for steps 1 to 13 as above for the primary domain.  In the case of the sub-sites there is no need for database or file transfer since the primary one stores everything. One merely had to create a <a href="http://www.rogerstringer.com/2011/01/03/wordpress-using-multisite-domain-mapping-on-a-mediatemple-grid-server/">symlink</a> between your subsite and primary network site via ssh on your MT:GS environment. This was actually a lot easier to resolve than my previous hosting environment which had a mix of cPanel + Plesk and required an intricate series of steps.</p>
<p>To bring other domains over to the new WordPress Network on MT:GS environment this <a href="http://codex.wordpress.org/Migrating_Multiple_Blogs_into_WordPress_3.0_Multisite">migration guide</a> was a useful place to start. A couple of other pieces of info I discovered along the way that may prove helpful to others:</p>
<ul>
<li>The <a href="http://codex.wordpress.org/Tools_Export_Screen"><strong>WordPress Import screen</strong></a> for WXR data will not be available on sub-sites until you <a href="http://wordpress.org/support/topic/import-plugin-does-not-install-in-mu-setup">enable it on the primary</a> domain of your Network.</li>
<li>With the Super Admin / Network Admin changeover, as of 3.2.1 you may find the excellent <a href="http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/">domain mapping plugin</a> menu has <a href="http://wordpress.org/support/topic/lost-domain-mapping-after-wp-321-upgrade">changed locations</a>.</li>
<li>When dealing with a site that was already domain mapped in the new installation (but had not yet had the DNS updates) I was struggling to find a way to preview the site similar to step #13 above for a single site. The subsite URL would re-point to the full domain, and the subsite.s000000.gridserver.com would be treated as if it were a new registration request. The easiest solution is actually to NOT have a domain mapping in the primary site until you are ready for the switch, that way subdomain.primarydomain.com will display everything as you need to test plugins, theme, etc.</li>
<li>The WXR import / export will bring all your posts, pages and related content and then offer you the option to bring across all attachments which could be a lengthy conversion depending on size of your files &#8211; which are essentially moving from /wp-content/uploads/ on your single-site to /wp-content/blogs.dir/##/ on the new server where ## represents the ID of your subsite.</li>
<li>Don&#8217;t forget to confirm whether the plugins / theme features from your single install work on the multi-site environment.</li>
</ul>
<p>Good luck! If you find any other tips / tricks that can help others on this path, feel free to post a comment to share.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://idealienstudios.com/blog/development/migrating-wordpress-grid-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Template &#8211; Retail Locations</title>
		<link>http://idealienstudios.com/blog/wordpress/template-retail-locations/</link>
		<comments>http://idealienstudios.com/blog/wordpress/template-retail-locations/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 13:36:06 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[ICE]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://idealienstudios.com/?p=647</guid>
		<description><![CDATA[Learn how to capture and display custom fields in a template using <a title="More Fields" href="http://wordpress.org/extend/plugins/more-fields/">More Fields</a>, a plugin that "enables you to define post types, which are custom Write/Edit pages that contains a pre-defined set of boxes"]]></description>
			<content:encoded><![CDATA[<div id="attachment_648" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-648" title="Retail Locations" src="http://idealienstudios.com/wp-content/uploads/projects_ice_09july9_retail-300x200.jpg" alt="Capture and display custom data types" width="300" height="200" /><p class="wp-caption-text">Capture and display custom data types using ICE and More Fields</p></div>
<p>Building on the concept of category templates which I started with the <a title="FAQ template tutorial" href="http://idealienstudios.com/projects/ice/template-demo-faq/">FAQ template tutorial</a> last week, this tutorial will cover how to capture and display custom fields in a template. What&#8217;s more, I&#8217;ll go through the step-by-step process of how to implement this using <a title="More Fields" href="http://wordpress.org/extend/plugins/more-fields/">More Fields</a> which is a plugin that &#8220;enables you to define post types, which are custom Write/Edit pages that contains a pre-defined set of boxes&#8221; that store their data behind the scenes in custom fields. The concepts from this tutorial will be of interest for anyone who:</p>
<ul>
<li>Has multiple categories of blog content with unique data to capture / present. Thumbnail per post, photo of the day or other customized items.</li>
<li>Uses WordPress as a CMS for unique page data types (event calendar, classified ads, business partners, etc)</li>
<li>Finds the selection of custom fields from a drop-down to not be the best user interface experience for capturing structured data.</li>
</ul>
<p><object width="590" height="346"><param name="movie" value="http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/flvplayer.swf"></param><param name="quality" value="high"></param><param name="bgcolor" value="#FFFFFF"></param><param name="flashVars" value="thumb=http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/FirstFrame.jpg&#038;containerwidth=590&#038;containerheight=346&#038;content=http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/ICEMoreFields.mp4"></param><param name="allowFullScreen" value="true"></param><param name="scale" value="showall"></param><param name="allowScriptAccess" value="always"></param><param name="base" value="http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/"></param>  <embed src="http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/flvplayer.swf" quality="high" bgcolor="#FFFFFF" width="590" height="346" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/FirstFrame.jpg&#038;containerwidth=590&#038;containerheight=346&#038;content=http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/ICEMoreFields.mp4" allowFullScreen="true" base="http://content.screencast.com/users/Idealien/folders/ICE/media/98b832dc-fc7e-4d98-8ac7-d60e39ccfb18/" scale="showall"></embed></object></p>
<p>Direct Video Link:<a href="http://www.screencast.com/t/2dcpYsSlk">http://www.screencast.com/t/2dcpYsSlk</a></p>
<h2>Example Code</h2>
<p>The only real code in this template that is unique is the retrieval of data from a <a href="http://codex.wordpress.org/Using_Custom_Fields">custom field</a> using the <a href="http://codex.wordpress.org/Function_Reference/get_post_meta">get_post_meta</a> function.</p>
<p><strong>A single custom field retrieval</strong><br />
Place this example within the loop of an existing category / post template.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$locationPhone</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'locationPhone'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationPhone</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div class=&quot;locationInfo&quot;&gt;
		&lt;h4&gt;Phone Number&lt;/h4&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span>  <span style="color: #000088;">$locationPhone</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Full retail location fields</strong><br />
This example is the full loop for use within a category.php file to display the contents of custom fields named: location</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	&lt;h2&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/h2&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$locationAddress</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'locationAddress'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationAddress</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;div class=&quot;locationInfo&quot;&gt;
			&lt;h4&gt;Address&lt;/h4&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$locationMapURL</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'locationMapURL'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationMapURL</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">echo</span>  <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$locationMapURL</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;'&gt;&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span>  <span style="color: #000088;">$locationAddress</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationMapURL</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/div&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$locationPhone</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'locationPhone'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationPhone</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;div class=&quot;locationInfo&quot;&gt;
			&lt;h4&gt;Phone Number&lt;/h4&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span>  <span style="color: #000088;">$locationPhone</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/div&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$locationHours</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'locationHours'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationHours</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;div class=&quot;locationInfo&quot;&gt;
			&lt;h4&gt;Business Hours&lt;/h4&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span>  <span style="color: #000088;">$locationHours</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/div&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$locationWebsite</span> <span style="color: #339933;">=</span> get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'locationWebsite'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locationWebsite</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;div class=&quot;locationInfo&quot;&gt;
			&lt;h4&gt;Website&lt;/h4&gt;
			<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span>  <span style="color: #0000ff;">&quot;&lt;a href='&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$locationWebsite</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;'&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$locationWebsite</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/a&gt;&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
		&lt;/div&gt;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
&nbsp;
	<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
	&lt;p&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> _e<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, no posts matched your criteria.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/p&gt;
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://idealienstudios.com/blog/wordpress/template-retail-locations/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Share your plugins on WordPress.org</title>
		<link>http://idealienstudios.com/blog/tutorials/share-your-plugin-on-wordpress/</link>
		<comments>http://idealienstudios.com/blog/tutorials/share-your-plugin-on-wordpress/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 17:02:28 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://idealienstudios.com/?p=233</guid>
		<description><![CDATA[Wordpress 2.7 offers direct download of plugins from the Plugin Repository. This tutorial shows you how to maintain a plugin code on the Wordpress repository using Dreamweaver.]]></description>
			<content:encoded><![CDATA[<p>Are you comfortable building plugins for WordPress? Have you made some for personal (or paying) projects that would be useful to others? Did you know that WordPress 2.7 offers direct download of plugins from the Plugin Repository? Think of how much traffic that could build compared to all those blog comments you&#8217;ve written. I&#8217;m starting to hear your thoughts of &#8220;I need to get me some of that plugin repository action!&#8221;.  You&#8217;ve come to the right place to learn.</p>
<p>A repository is just a fancy way for saying a place to store your data much like an FTP server. What makes using one so important is that you create versions of files so that you can always roll back if you make mistakes. The WordPress.org site contains some very good information on <a title="How To Use Subversion" href="http://wordpress.org/extend/plugins/about/svn/">How To Use Subversion</a> to create / contribute to a plugin&#8230;if you are a fan of command line tools. Some people probably prefer that approach &#8211; just like using vi as a text editor. However, I find graphical based user interfaces easier and more efficient to use.</p>
<p>This tutorial is for those who &#8211; like me &#8211; use Dreamweaver for web development and want to maintain their plugin code on the WordPress repository through it. For those who use <a title="Eclipse" href="http://www.eclipse.org/">Eclipse</a>, you can follow a similar process using <a title="SubClipse" href="http://subclipse.tigris.org/">SubClipse</a>. The two key pieces of the puzzle are:</p>
<ul>
<li><a title="TortoiseSVN" href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> &#8211; An SVN client for Windows that makes version management simple.</li>
<li><a title="Subweaver" href="http://code.google.com/p/subweaver/">SubWeaver</a> &#8211; A Dreamweaver extension to integrate SVN commands through Tortoise.</li>
</ul>
<p><strong></strong></p>
<h3><span id="more-233"></span>Setup your WordPress.org account and plugin repository</h3>
<p>The first thing you will want to do is go to WordPress.org &gt; Extend &gt; Plugins and <a title="Register on WordPress.org" href="http://wordpress.org/extend/plugins/register.php">register for an account</a>. The contact information (name, email, website, etc) you provide will show up with any plugins that you create or contribute to.</p>
<p>Since you&#8217;re on the site and ready to start your first plugin, go to the <a title="Add A Plugin" href="http://wordpress.org/extend/plugins/add/">Add a Plugin form</a> and provide the appropriate details (name, description, url). Note that it may take 24 &#8211; 48 hours for your plugin request to be approved, but this will create a new repository for your plugin.</p>
<h3>Install Tortoise and SubWeaver</h3>
<p>Download and install Tortoise SVN from <a href="http://tortoisesvn.tigris.org">http://tortoisesvn.tigris.org</a>. You will have to restart your computer for the changes to take effect.  After that has completed, you will want to download and install Subweaver from <a title="SubWeaver" href="http://code.google.com/p/subweaver/">http://code.google.com/p/subweaver/</a></p>
<p>When you are looking at the file explorer in Dreamweaver, you will now see a new SubWeaver sub-menu that I will explain the primary uses of it as we go along.</p>
<h3>Create a local repository</h3>
<p><a href="http://idealienstudios.com/wp-content/uploads/blog_svnpluginintro_checkout.jpg"><img class="alignright size-thumbnail wp-image-234" title="Checking Out ICE" src="http://idealienstudios.com/wp-content/uploads/blog_svnpluginintro_checkout-150x150.jpg" alt="Checking Out ICE" width="150" height="150" /></a>You will need a folder on your hard drive to store the plugin files / folders. Find the folder in Windows Explorer and right-click on it to select SVN Checkout. You will have to add the repository information which was specified when you completed the Add a Plugin form. The repository path should start with http://svn.wp-plugins.org/ as the image at right shows for <a title="ICE" href="http://www.idealienstudios.com/code/ice/">Idealien Category Enhancements</a>.</p>
<p>You could do this through Dreamweaver directly, however I prefer to do the initial checkout by Tortoise so that when I create the site in Dreamweaver it already contains the standard SVN structure.</p>
<h3>Understanding the structure of a repository</h3>
<p><img class="size-full wp-image-246 alignright" title="Repository directory structure" src="http://idealienstudios.com/wp-content/uploads/blog_svnpluginintro_structure.jpg" alt="Repository directory structure" width="240" height="200" />There are 3 different locations where you can place code which are loosely based on the analogy of a tree:</p>
<ul>
<li><strong>Trunk </strong>represents the area where your active development goes. When starting your plugin, it will be where you add your first files. It is the <em>latest and greatest</em> so might not be ready for public consumption.</li>
<li><strong>Tags</strong> are for specific versions of your plugin. Any time you commit significant changes to your trunk (i.e. a new version) you should create a new tag and update the <a title="Plugin Readme.txt" href="http://wordpress.org/extend/plugins/about/">readme.txt file</a> to indicate what the newest release is. I have gotten into the habit of developing on a separate WP installation (easier for testing, debug, etc) and as a result the code in the trunk usually mirrors the most up to date tag available.</li>
<li><strong>Branches</strong> are for working on enhancements or code you would like others to beta test or build in isolation of other functionality. When you&#8217;re satisfied with a particular branch, you will have to merge the changes into the trunk. Smaller scope plugins usually won&#8217;t use branches.</li>
</ul>
<p>Or as the wordpress.org site puts it:</p>
<blockquote><p>Each time you make a formal release of your plugin, you should tag a copy of that release&#8217;s code. This lets your users easily grab the latest (or an older) version, it lets you keep track of changes more easily, and lets the WordPress.org Plugin Directory know what version of your plugin it should tell people to download.</p></blockquote>
<h3>Add, Modify, Delete or just Commit!</h3>
<p><a href="http://idealienstudios.com/wp-content/uploads/blog_svnpluginintro_commit2.jpg"><img class="size-medium wp-image-245 alignright" title="Committing updates" src="http://idealienstudios.com/wp-content/uploads/blog_svnpluginintro_commit2-300x136.jpg" alt="Committing updates" width="300" height="136" /></a>You now have a link between the repository and your local computer. Work with the files on your local PC until you are satisfied and ready to commit them to the repository.</p>
<ul>
<li>Highlight all of the files that you have modified.</li>
<li>Right click and chose to <strong>SubWeaver &gt; Commit</strong></li>
<li>Dreamweaver will show you the SVN log in which it compares every file on your PC against the repositor and the action (add, modify, delete) it did to the version in the repository as well.</li>
<li>If you want to ensure you don&#8217;t miss anything, select the top-level folder for your plugin and then commit. Note that if you do this and you have added / deleted any files, you will have to specifically check their checkbox under the changes made window.</li>
</ul>
<p>The update process on the repository server will take a few minutes to show up in the <a title="Plugin Directory" href="http://wordpress.org/extend/plugins/about/">Plugin Directory</a>.</p>
<h3>Updates and Merges</h3>
<p>The work scenario I described above is written on the assumption that you are the only one editing files for your plugin. If you are collaborating on another plugin, before you start to work on changes you will want to execute an SVN update to ensure you have pulled the latest files from the server to your local PC.</p>
<p>It is possible (read: likely) that at some point in time you will encounter a scenario where someone else has updated the files which you are working on in between when you updated your files and when you went to commit. You now must merge your changes with theirs which is the bane of many developers. While Tortoise / SubWeaver do have tools built in to compare files, I have found that <a title="WinMerge" href="http://winmerge.org/">WinMerge</a> is a better tool built specifically for this task. You can install it and configure it with Tortoise under the Settings &gt; External Programs menu.</p>
]]></content:encoded>
			<wfw:commentRss>http://idealienstudios.com/blog/tutorials/share-your-plugin-on-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

