<?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>:: TechBlog :: &#187; Everything</title>
	<atom:link href="http://techblog.touchbasic.com/html/category/everything/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.touchbasic.com/html</link>
	<description>Techblog is collection of articles covering a wide variety of tech related topics including: Linux, Microsoft, Google, web development, web design, open source, wordpress, security, and more.</description>
	<lastBuildDate>Fri, 06 May 2011 00:58:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Quick fix to get Simple Tags plugin working with WordPress 2.9+</title>
		<link>http://techblog.touchbasic.com/html/quick-fix-to-get-simple-tags-working-with-wordpress-2-9/</link>
		<comments>http://techblog.touchbasic.com/html/quick-fix-to-get-simple-tags-working-with-wordpress-2-9/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 23:01:46 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[simple tags]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=636</guid>
		<description><![CDATA[Note: There&#8217;s a new version of Simple Tags that works with WP 2.9.1 so no need for this hack anymore. If you&#8217;re using the Simple Tags plugin, you might be holding off on upgrading to WordPress 2.9.1 because this plugin is only Compatible up to: 2.8. Well, turns out the plugin does actually seem to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note: There&#8217;s a new version of Simple Tags that works with WP 2.9.1 so no need for this hack anymore.</strong></p>
<p>If you&#8217;re using the <a href="http://wordpress.org/extend/plugins/simple-tags/">Simple Tags</a> plugin, you might be holding off on upgrading to WordPress 2.9.1 because this plugin is only Compatible up to: 2.8.</p>
<p>Well, turns out the plugin does actually seem to work with WP 2.9.x &#8212; but you have to make a quick edit to the plugin file itself. Now, normally i&#8217;m not a fan of hacking plugin files to get things working because your changes would be lost with each new release. But, in this case, i figured that when the author does decide to release an update, i would be ok with losing these changes because they would no longer be necessary anyway.</p>
<p>Note: if you&#8217;re not comfortable editing plugin files directly (although this edit is really easy), then maybe you should wait until the author releases an official update. Otherwise, i&#8217;ve included the bit of code here for reference.</p>
<p><strong>To get Simple Tags working with WP 2.9+</strong></p>
<p>1) Open simple-tags.php and find the line:</p>
<p><code>if ( strpos($wp_version, '2.7') !== false || strpos($wp_version, '2.8') !== false  ) {</code></p>
<p>2) Change that to:</p>
<p><code>if ( strpos($wp_version, '2.7') !== false || strpos($wp_version, '2.8') !== false || strpos($wp_version, '2.9') !== false  ) {</code></p>
<p>That&#8217;s right, it&#8217;s just a matter of adding the additional condition which allows WP version 2.9 to work.</p>
<p>As always, be sure to backup and test this fix on your own site before going live.</p>
<p>This fix was found / documented here:<br />
- <a href="http://www.wordpress-fr.net/support/viewtopic.php?pid=173448#p173448">http://www.wordpress-fr.net/support/viewtopic.php?pid=173448#p173448</a><br />
- <a href="http://www.herewithme.fr/simple-tags-et-wordpress-2-8#comment-34072">http://www.herewithme.fr/simple-tags-et-wordpress-2-8#comment-34072</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/quick-fix-to-get-simple-tags-working-with-wordpress-2-9/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Setting up a Minimal Samba Server in Fedora Core 12</title>
		<link>http://techblog.touchbasic.com/html/setting-up-a-minimal-samba-server-in-fedora-core-12/</link>
		<comments>http://techblog.touchbasic.com/html/setting-up-a-minimal-samba-server-in-fedora-core-12/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 04:58:47 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[Fedora Code]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=505</guid>
		<description><![CDATA[Goal: Minimal FC12 Samba install with low RAM usage, high security, and least amount of configuration. Why? Quickly turn an older machine into a modern Fedora Core 12 file server compatible with linux and windows clients. Less software installed means less setup, less maintenance, less updates, and less chance of human error somewhere along the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Goal:</strong><br />
Minimal FC12 <a href="http://www.samba.org/">Samba</a> install with low RAM usage, high security, and least amount of configuration.</p>
<p><strong>Why?</strong><br />
Quickly turn an older machine into a modern Fedora Core 12 file server compatible with linux and windows clients. Less software installed means less setup, less maintenance, less updates, and less chance of human error somewhere along the way. The theory here is, the system starts out relatively secure and (if kept up-to-date) should remains so over time.</p>
<p><strong>Side Note:</strong><br />
There are definitely many other ways to go about setting up a Samba server, much of which depends on your networking environment and overall requirements / constraints. This article is meant more as a guide &#8211; my notes which describe the method i happen to use &#8211; so that if i have to, i can do it all again.</p>
<p><strong>Assumptions:</strong><br />
- Comfortable with install and use of Fedora Core Linux OS (command line)<br />
- Basic understanding of networking concepts (setting up a static IP)<br />
- Some experience with editing the smb.conf file</p>
<p><strong>Features:</strong><br />
- No GUI / Desktop Environment<br />
- Low RAM usage: boots up @ ~80MB with smbd and nmbd running<br />
- SELinux and iptables firewall enabled / configured for use with Samba<br />
- Samba Security level = User</p>
<p><strong>System Resources:</strong><br />
CPU: AMD @ 700MHz<br />
RAM: 192MB</p>
<p><strong>Steps Involved:</strong></p>
<ol>
<li><a href="http://fedoraproject.org/en/get-fedora-all">Download</a> and burn the Fedora-12-i386-DVD.iso file to dvd</li>
<li>Boot from the disc and go through install process (with less that 200MB RAM it defaults to text mode install &#8211; you can also force a text mode install at the boot: prompt by typing: linux text)</li>
<li>Once install is completed and system is rebooted, login as root</li>
<li>Check that networking is up<br />
- type:
<pre>ifconfig</pre>
<p> (see if you have an IP address)<br />
- type:
<pre>dhclient eth0</pre>
<p> (to use dhcp for now)</li>
<li>Bring the system up to date<br />
- type:
<pre>yum check-update</pre>
<p> (to check for updates first)<br />
- type:
<pre>yum update</pre>
<p> (say &#8220;yes&#8221; to install the updates)</li>
<p>- type:
<pre>yum list installed</pre>
<p> (to see a list of all installed packages)</p>
<li>Check to see what package &#8220;groups&#8221; got installed by default<br />
- type:
<pre>yum grouplist > grouplist.txt</pre>
<p>- type:
<pre>cat grouplist.txt | more</pre>
</li>
<li>Remove any unwanted package groups<br />
- type:
<pre>yum groupremove "Mail Server"</pre>
</li>
<li>Add the Samba package group<br />
- type:
<pre>yum groupinstall "Windows File Server"</pre>
</li>
<li>Configure Samba by editing /etc/samba/smb.conf<br />
- Note, for Vista support (in the Global section) add:
<pre>client NTLMv2 auth = yes</pre>
<p>- Note, to hide unreadable files like /lost+found/ (in the Global section) add:
<pre>hide unreadable = yes</pre>
<p>- type:
<pre>testparm</pre>
<p> (confirm output has no errors in it)</li>
<li>Deal with SELinux security policies (see default smb.conf file for details)<br />
- type:
<pre>setsebool -P samba_domain_controller on</pre>
<p>- type:
<pre>setsebool -P samba_enable_home_dirs on</pre>
<p>- type:
<pre>chcon -t samba_share_t /path-to-mounted-directories</pre>
<p> (remember to mount any/all directories first)<br />
- type:
<pre>ls -ldZ /path-to-mounted-directories</pre>
<p> (to confirm it worked)<br />
- Note, for existing shares, to make sure this affects all files and folders recursively add:
<pre>chcon -R -t samba_share_t /path-to-existing-mounted-directories</pre>
<p>- Note: to completely disable SELinux protection for smbd daemon (not recommended) type:
<pre>setsebool -P smbd_disable_trans 1</pre>
<p>- Note: you can temporarily disable SELinux by putting it into permissive mode &#8211; type:
<pre>getenforce</pre>
<p> to find out whether SELinux is in permissive [0], enforcing [1], or disabled [2] mode.<br />
- Note: to put SELinux into permissive mode (for testing purposes but not recommended) type:
<pre>setenforce 0</pre>
</li>
<li>Add samba users<br />
- type:
<pre>useradd john</pre>
<p>- type:
<pre>smbpasswd -a john</pre>
</li>
<li>Configure the firewall to accept samba connections<br />
- type:
<pre>system-config-firewall-tui</pre>
<p> (add an asterix next to the line: &#8220;Samba&#8221;)</li>
<li>Configure the network to use static IP/netmask/gateway/DNS info<br />
- type:
<pre>system-config-network-tui</pre>
<p>- select: [Edit a Device Params] and remove the asterix from the line: &#8220;Use DHCP&#8221;. then, and add static info</li>
<li>Configure the network to use a static Hostname and DNS address (note: DNS settings may not be required)<br />
- type:
<pre>system-config-network-tui</pre>
<p>- select: [Edit DNS configuration] then, and add static hostname and dns info</li>
<li>Get the network, smb, and nmb to start automatically next time you reboot<br />
- type:
<pre>chkconfig --level 3 network on</pre>
<p>- type:
<pre>chkconfig --level 3 smb on</pre>
<p>- type:
<pre>chkconfig --level 3 nmb on</pre>
<p>- type:
<pre>chkconfig --list network</pre>
<p> (or smb, or nmb to confirm it worked. you can also leave out the servicename to see a list of all services)</li>
</ol>
<p><strong>Reboot.</strong><br />
Use another computer to check that everything went well.</p>
<p><strong>Optionally:</strong><br />
1. Install NTFS support.<br />
- type:
<pre>yum install ntfs-3g</pre>
<p>2. Once it&#8217;s done downloading/installing, figure out which device it is (for me it was /dev/sde1) and mount it.<br />
- type:
<pre>mount -t ntfs /dev/[your-usb-device] /media/</pre>
<p>3. Deal with selinux and ntfs support<br />
- type:
<pre>setsebool -P samba_share_fusefs 1</pre>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/setting-up-a-minimal-samba-server-in-fedora-core-12/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My Favorite Web-based Tools of 2009</title>
		<link>http://techblog.touchbasic.com/html/my-favorite-web-based-tools-of-2009/</link>
		<comments>http://techblog.touchbasic.com/html/my-favorite-web-based-tools-of-2009/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 20:40:13 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[Writing]]></category>
		<category><![CDATA[web based]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[webapps]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=407</guid>
		<description><![CDATA[After having recently wiped out my main workstation&#8217;s RAID array [see twitter link] &#8211; i wanted to compile a list of softwares/services i had picked up over the course of the year and couldn&#8217;t do without. These were going to be the first things i would need to reinstall after restoring everything else from an [...]]]></description>
			<content:encoded><![CDATA[<p>After having recently wiped out my main workstation&#8217;s RAID array [<a href="http://twitter.com/elranoded/status/6273454539">see twitter link</a>] &#8211; i wanted to compile a list of softwares/services i had picked up over the course of the year and couldn&#8217;t do without. These were going to be the first things i would need to reinstall after restoring everything else from an older backup. Fortunately, nearly all of my most recent data is stored online and thus, i didn&#8217;t lose any &#8220;important&#8221; information. I did however temporarily lose access to many of my newer web-based accounts, as well as bookmarked shortcuts to these accounts, that sort of thing. Basically, i had to deal with the hassle of downloading and reinstalling anything Firefox might have lost since my last backup.</p>
<p><em>Anyway, here are all the new webapps and firefox extensions i picked up (and &#8220;stuck&#8221; with me) over the course of the year:</em></p>
<p><strong>Web-based Tools:</strong></p>
<ul>
<li><a href="http://twitter.com/">Twitter</a> &#8211; Just started using it (less than 3 months ago), but obviously it&#8217;s a keeper.</li>
<li><a href="http://brizzly.com/">Brizzly</a> &#8211; Best web-based Twitter app i could find.</li>
<li><a href="http://readitlaterlist.com/">ReadItLater</a> &#8211; One click bookmarks, online sync between browsers, delicious integration.</li>
<li><a href="http://su.pr/">Su.pr</a> &#8211; URL shortener of choice with Twitter and StumbleUpon intergration</li>
<li><a href="http://www.feedly.com/">Feedly</a> &#8211; Next generation feed reader with Google Reader and Twitter inegration</li>
<li><a href="http://www.shareaholic.com/">Shareaholic</a> &#8211; Social networking tool that integrates with tons of popular services including Su.pr, Del.icio.us, and Twitter.</li>
</ul>
<p><em>Here&#8217;s some stuff i&#8217;ve been using for a while now and will continue to use &#8211; although technically all of these were restored from my older backup and i won&#8217;t be linking to or describing each of them at this time.</em></p>
<p>Web Apps:</p>
<ul>
<li>Del.icio.us &#8211; Still my online bookmarking tool of choice.</li>
<li>Google Products &#8211; Gmail / Docs / Reader (and more but i don&#8217;t feel like going into detail here).</li>
</ul>
<p>FireFox Extensions:</p>
<ul>
<li>All-in-One Sidebar</li>
<li>Download Sort</li>
<li>Download Statusbar</li>
<li>Firebug</li>
<li>Link Evaluator</li>
<li>Live HTTP Headers</li>
<li>BookmarkDD</li>
<li>SEO for Firefox</li>
<li>Tab Kit</li>
<li>text/plain</li>
<li>Web Developer Toolbar</li>
<li>YSlow</li>
</ul>
<p>Also, I was impressed by the decreasing number of desktop softwares i needed to reinstall.</p>
<p>Desktop Apps:</p>
<ul>
<li>VMware player (win/linux)</li>
<li>Firefox (win)</li>
<li>7zip (win)</li>
<li>unrar (linux)</li>
<li>Inkscape (linux)</li>
<li>gftp (linux)</li>
</ul>
<p>That&#8217;s all i could think of at the moment. If i missed any important ones, i&#8217;ll probably just add them to the list. I&#8217;m sure there are many other great web-based tools out there. These are just the few i&#8217;ve been using. I wonder what new and cool webapps will be added to my arsenal in the coming year? In the meantime, feel free to use the comments below to let me know if you&#8217;re using a great webapp not mentioned here.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/my-favorite-web-based-tools-of-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Amazon Affiliate plugins for WordPress</title>
		<link>http://techblog.touchbasic.com/html/testing-amazon-affiliate-plugins-for-wordpress/</link>
		<comments>http://techblog.touchbasic.com/html/testing-amazon-affiliate-plugins-for-wordpress/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 15:30:56 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=350</guid>
		<description><![CDATA[There are so many amazon related plugins &#8211; as a result, my testing was pretty brief. Some notes: Amazon Associate Filter &#8211; nothing happens Amazon Book Picture from ASIN &#8211; just creates images from ASIN , uses shortcodes Amazon Carousel(*) &#8211; flash, uses shortcodes, cool, lots of options, easy to use Amazon Context Links Ads [...]]]></description>
			<content:encoded><![CDATA[<p>There are so many amazon related plugins &#8211; as a result, my testing was pretty brief.</p>
<p><strong>Some notes:</strong></p>
<p><a href="http://wordpress.org/extend/plugins/amazon-associate-filter/">Amazon Associate Filter</a> &#8211; nothing happens</p>
<p><a href="http://narcanti.keyboardsamurais.de/amazon-book-picture.html">Amazon Book Picture from ASIN</a> &#8211; just creates images from ASIN , uses shortcodes</p>
<p><a href="http://wordpress.org/extend/plugins/wp-amazon-carousel/">Amazon Carousel</a>(*) &#8211; flash, uses shortcodes, cool, lots of options, easy to use</p>
<p><a href="http://wordpress.org/extend/plugins/amazon-context-link-ads/">Amazon Context Links Ads</a> &#8211; does nothing</p>
<p><a href="http://learningtheworld.eu/2009/amazon-authorization/">Amazon Machine Tags</a> &#8211; complicated, uses shortcodes, requires an AWS key</p>
<p><a href="http://wordpress.org/extend/plugins/wp-amazon-mp3-widget/">Amazon MP3 Clips widget</a>(*) &#8211; cool, flash 9.0.45 or above required, shortcodes, lots of options</p>
<p><a href="http://geeklad.com/build-your-own-amazon-niche-store">Amazon Niche Store</a>(*) &#8211; shortcodes, lots of options, 10% of the time is plugin author&#8217;s Amazon affiliate ID, plugin author linkback, widget included</p>
<p><a href="http://www.proactivewebdesign.co.uk/wordpress/amazon-product-ads">Amazon Product Ads</a>(*) &#8211; widget only, displays 1 item only, self-optimizing (auto) setting</p>
<p><a href="http://nickohrn.com/amazon-reloaded-for-wordpress">Amazon Reloaded for WordPress</a> &#8211; adds setting to post page but ajax not working</p>
<p><a href="http://wordpress.org/extend/plugins/amazon-search/">Amazon Search</a> &#8211; not working, error: MissingParameter / Signature, widget and shortcode links only</p>
<p><a href="http://www.aaronforgue.com/projects/amazon-showcase/">Amazon Showcase</a> &#8211; Access Identifiers required (AWS keys?)</p>
<p><a href="http://www.ichdigital.de/AmazonSimpleAdmin">AmazonSimpleAdmin</a> &#8211; Access Identifiers required (AWS keys?)</p>
<p><a href="http://wordpress.org/extend/plugins/amazon-smartlinks/">Amazon SmartLinks Widget</a> &#8211; many widget, working pretty well, looks nice</p>
<p><a href="http://case.oncle-tom.net/code/wordpress/">Amazon Widgets Shortcodes</a>(*) &#8211; cool, lots of shortcodes, adds section to post page, conflicts with Amazon Niche Store plugin resulting in no output, must know exact widget ID</p>
<p><a href="http://www.keralpatel.com/amazon-plugin-by-keral-patel/">Keral Patel Amazon WordPress Plugin</a> &#8211; requires an amazon web services access key</p>
<p><em>(*) i liked, but needs further testing</em></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/testing-amazon-affiliate-plugins-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Notes on Event and Calendar related WordPress plugins</title>
		<link>http://techblog.touchbasic.com/html/notes-on-event-and-calendar-related-wordpress-plugins/</link>
		<comments>http://techblog.touchbasic.com/html/notes-on-event-and-calendar-related-wordpress-plugins/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 03:54:16 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Everything]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=342</guid>
		<description><![CDATA[Tried and tested some plugins over the last few weeks.. here, are my thoughts, brief and in no particular order: Gigs Calendar (v0.4.6) - issues with timestamps posted to the future (but not with filter turned on) - no multi-day events - post created automatically GigPress (v1.4.9) - lots of setting (maybe too many) Events [...]]]></description>
			<content:encoded><![CDATA[<p>Tried and tested some plugins over the last few weeks..<br />
here, are my thoughts, brief and in no particular order:</p>
<p><a href="http://blogsforbands.com/">Gigs Calendar</a> (v0.4.6)<br />
- issues with timestamps posted to the future (but not with filter turned on)<br />
- no multi-day events<br />
- post created automatically</p>
<p><a href="http://gigpress.com/">GigPress</a> (v1.4.9)<br />
- lots of setting (maybe too many)</p>
<p><a href="http://davidebenini.it/wordpress-plugins/events-manager/">Events Manager</a> (v2.0rc2)<br />
- not creating &#8220;real&#8221; WP posts (with post IDs)<br />
- all event posts are on same page (eg: domain.com/events?events_id=1)</p>
<p><a href="http://www.wp-eventscalendar.com/">Events Calendar</a> (v6.5.2.1)<br />
- simple / good<br />
- fills in actual post content</p>
<p><a href="http://meandmymac.net/plugins/events/">Events</a> (v2.1.1)<br />
- not creating &#8220;real&#8221; WP posts (with post IDs)</p>
<p><a href="http://wpcal.firetree.net/">Event Calendar</a> (v3.1.4)<br />
- just adds dates and times to the edit posts screen</p>
<p><a href="http://www.kieranoshea.com/">Calendar</a> (v1.2.2)<br />
- buggy (widget seems broken)<br />
- not creating &#8220;real&#8221; WP posts (with post IDs)</p>
<p>Keep in mind, i&#8217;ve only tested these specific versions of each plugin. So, newer versions might include significant improvements over previous versions. Also, don&#8217;t take my word for it.. test them all out for yourself ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/notes-on-event-and-calendar-related-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to increase the size of a VMware vmdk file formatted as linux lvm</title>
		<link>http://techblog.touchbasic.com/html/how-to-increase-the-size-of-a-vmware-vmdk-file-formatted-as-linux-lvm/</link>
		<comments>http://techblog.touchbasic.com/html/how-to-increase-the-size-of-a-vmware-vmdk-file-formatted-as-linux-lvm/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 05:03:33 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[virtual disk]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[vmdk]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=293</guid>
		<description><![CDATA[VMware can run many cool operating systems on a single host computer. But, having run the software for an extended amount of time, i eventually always run out of space on my guest OSes. This happened a few times before, but it wasn&#8217;t until my VM really froze up on me that i figured it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vmware.com">VMware</a> can run many cool operating systems on a single host computer. But, having run the software for an extended amount of time, i eventually always run out of space on my guest OSes. This happened a few times before, but it wasn&#8217;t until my VM really froze up on me that i figured it was time to look into extending or expanding the current virtual disk i had in use.</p>
<p><strong>Have you ever tried increasing the size of a vmdk file / virtual hard disk ?</strong><br />
<em>It&#8217;s not that easy.. and it&#8217;s kind of confusing.</em></p>
<p>So, once i finally figured out how to do it, i thought it would be useful to write it down so that i wouldn&#8217;t forget next time this happened. Here goes..</p>
<p><strong>In my example i have: </strong><br />
- a Windows Vista host OS running a <a href="http://fedoraproject.org/">Fedora Core</a> guest OS<br />
- an 8GB vmdk file (formatted as Linux LVM &#8211; fedora fs) on the guest OS which i have backed up before attempting anything here !!! </p>
<p><strong>I want to:</strong><br />
- increase the 8GB vmdk file to 16GB<br />
- not lose any data saved on the vmdk file<br />
- not move any data off/on the vmdk file</p>
<h2>Follow these Steps:</h2>
<ol>
<li>Download and Install: <a href="http://downloads.vmware.com/d/details/workstation_6_5_3_for_windows/dHdiZHdodGJAJXQ=">VMware Workstation for Windows</a> (trial)</li>
<li>Note the location of the VMware Workstation folder (after install) &#8211; in my case it&#8217;s &#8220;C:\Program Files\VMware\VMware Workstation&#8221;</li>
<li>Open a Windows Command Prompt and navigate to the folder where your vmdk file resides and execute the following command:<br /><code>"C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe" -x 16GB "Name of Your Virtual Disk File.vmdk"</code><br />Ok, now you just made the disk twice as big but you can&#8217;t use the space yet because it&#8217;s inactive, unpartitioned, unformatted, and still utterly useless to us. (but not for long)</li>
<li>Next, boot up the guest OS and log in as root. Verify that there is in fact a large amount of unallocated space/sectors by typing the command: <code>fdisk -l</code></li>
<li>Then we&#8217;ll partition and format the new portion of the disk. First select the disk: <code>fdisk /dev/sda</code></li>
<li>Type &#8220;n&#8221; at the fdisk menu to create a new partition</li>
<li>Type &#8220;p&#8221; for primary partition, and then select the appropriate partition number, as well as first and last cylinders to set how large to make the new partition (defaults &#8211; ie: use all the free space &#8211; worked well for me here)</li>
<li>Type &#8220;t&#8221; to change the partition&#8217;s system id, then type &#8220;8e&#8221; to switch it to Linux LVM </li>
<li>Type &#8220;w&#8221; to write the table to disk and exit fdisk. You might get a warning about needing to reboot for changes to take effect &#8211; either way, reboot your guest OS just to be safe.</li>
<li>Once rebooted, log in as root again and verify  the new partition exists. Type &#8220;fdisk -l&#8221; to see a list of partitions. In my case, the new partition is: /dev/sda3</li>
<li>Now comes the confusing part. We&#8217;re going to merge the new partition into the current Volume Group (which is just what fedora calls it&#8217;s own virtual disks that are made up of a bunch of virtual LVM partitions). So, first, to &#8220;create&#8221; the necessary &#8220;physical volume&#8221; from our newly created disk partition (/dev/sda3) first type: <code>pvcreate /dev/sda3</code></li>
<li>You need to find out the name of the Volume Group before you can extend it to include the newly created physical volume. Type: <code>vgdisplay</code> and look for the first line, &#8220;VG Name&#8221; &#8211; in this case it was VolGroup00 [<a href="http://techblog.touchbasic.com/html/how-to-increase-the-size-of-a-vmware-vmdk-file-formatted-as-linux-lvm/#comment-36074">thanks agm</a>]</li>
<li>Next, you need to extend the Volume Group to include the newly created physical volume. Type: <code>vgextend VolGroup00 /dev/sda3</code></li>
<li>Then, type: <code>pvscan</code> You should see the new partition (/1dev/sda3) in the list of partitions and the total should read approximately 16GB (the amount we set earlier). In my example, it said 15.75GB</li>
<li>Now type: <code>lvextend -L+8GB /dev/VolGroup00/LogVol00</code> to increase / extend the Logical Volume by 8GB (to a total of 16GB).</li>
<li>Finally, to resize the filing system type: <code>resize2fs /dev/VolGroup00/LogVol00</code></li>
</ol>
<p>Now your fedora guest OS should have twice the amount of space and your VM should be running smoothly.<br />
Repeat this process if / when the vmdk file gets filled up again and runs out of space ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/how-to-increase-the-size-of-a-vmware-vmdk-file-formatted-as-linux-lvm/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin &#8211; Notify Admin Only of WP Updates</title>
		<link>http://techblog.touchbasic.com/html/wordpress-plugin-notify-admin-only-of-wp-updates/</link>
		<comments>http://techblog.touchbasic.com/html/wordpress-plugin-notify-admin-only-of-wp-updates/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 15:42:15 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[notify admin]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/?p=274</guid>
		<description><![CDATA[Update: This plugin is tested and known to be working with WP 2.9.1 ok, with the release of WordPress 2.8.3 &#8211; if finally got around to upgrading my Notify Admin Only plugin to work with WP 2.8+ Download Plugin: Notify Admin Only v2.0 in case you&#8217;re not sure what this plugin actually does, well, it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: This plugin is tested and known to be working with WP 2.9.1</strong></p>
<p>ok, with the release of WordPress 2.8.3 &#8211; if finally got around to upgrading my Notify Admin Only plugin to work with WP 2.8+</p>
<h2>Download Plugin: <a href='http://touchbasic.googlepages.com/notify_admin_only.php'>Notify Admin Only v2.0</a></h2>
<p>in case you&#8217;re not sure what this plugin actually does, well, it removes this text from the backend that says: &#8220;A new version of WordPress is available! Please notify the site administrator&#8221; &#8211; (see the images below).</p>
<p>great for admins who don&#8217;t want their many users to ever see the WordPress Update nag.</p>
<p><img id="image185" src="http://techblog.touchbasic.com/html/wp-content/uploads/2007/10/wp_notice.jpg" alt="wp notifying the admin" /></p>
<p>anyway the new code is really simple: (thanks <a href="http://techblog.touchbasic.com/html/wp-231-plugin-notify-admin-only-of-wordpress-updates/#comment-35611">Lazzymonk</a>)</p>
<p><code lang="php"><br />
< ?php<br />
function stop_wpupdate() {<br />
	if ( current_user_can('manage_options') ) {<br />
		return;<br />
	} else {<br />
		remove_action( 'admin_notices', 'update_nag', 3 );<br />
	}<br />
}<br />
add_action( 'admin_notices', 'stop_wpupdate', 1 );<br />
?><br />
</code></p>
<p><a href="http://techblog.touchbasic.com/html/wp-231-plugin-notify-admin-only-of-wordpress-updates/">the old plugin</a> is here and only works for WP 2.3 &#8211; 2.5 series.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/wordpress-plugin-notify-admin-only-of-wp-updates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WP 2.3 Plugin &#8211; Per Post Creative Commons License</title>
		<link>http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/</link>
		<comments>http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 22:33:31 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Copyright]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[cc]]></category>
		<category><![CDATA[creative commons]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/</guid>
		<description><![CDATA[This plugin will add the ability to choose different Creative Commons licensing structures for different posts that you publish to your WordPress blog. As far as i could tell, there are currently 2 other CC plugins for WordPress &#8211; wpLicense and cc-configurator &#8211; however both of them only let you set your license on a [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin will add the ability to choose different Creative Commons licensing structures for different posts that you publish to your WordPress blog.</p>
<p>As far as i could tell, there are currently 2 other CC plugins for WordPress &#8211; <a href="http://wiki.creativecommons.org/WpLicense">wpLicense</a> and <a href="http://www.g-loaded.eu/2006/01/14/creative-commons-configurator-wordpress-plugin/">cc-configurator</a> &#8211; however both of them only let you set your license on a global level. That is, they let you pick one license for all your posts and pages throughout your entire site. I thought it might be useful if each WP user/author could choose between different CC licenses and be able to set them on a post-by-post basis. So, i modified the wpLicense plugin to do just that. </p>
<blockquote><p><strong>&#8220;The main purpose of this plugin is to give WP admins who run sites with multiple users/authors the option let these users/authors set specific CC licensing terms on a post by post basis.&#8221;</strong></p></blockquote>
<p><strong>How it works:</strong><br />
It uses the <a href="http://api.creativecommons.org/docs/readme_15.html#details-license-uri-uri">CC api</a> and the <a href="http://wiki.creativecommons.org/JsWidget">JsWidget</a> to add a new section to the write/edit post page and then displays a small CC graphic/button and text on your published posts for all to see. The widget lets you choose the appropriate licensing structure and then your choice is automatically saved to a custom field the next time you click &#8220;Save and Continue Editing&#8221;, &#8220;Save&#8221;, or &#8220;Publish&#8221;. Then, it uses the CC api (details-license-uri-uri) to call some javascript that displays a small graphic/button and some text linking back to the definitions for the license you have chosen. Jquery was used to insert the new CC license section to the write/edit post pages as well as to open/close the new section. I also had to use Jquery to fix the tooltips for the JsWidget. Lastly, this plugin is optimized so that it will add only 1 DB query (the cc_js_result_uri) to each post that has set a CC license and stores it to a custom field for that given post &#8211; whereas the wpLicense plugin seemed to use 3 seperate db queries to set the global licencing for the site.</p>
<p><strong>Screenshots:</strong><br />
Check out the plugin in action.<br />
<a href='http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/cc-edit-post-view/' rel='attachment wp-att-202' title='cc edit post view'><img style="float:left;margin:15px;padding:2px;border:1px solid #bbb;" src='http://techblog.touchbasic.com/html/wp-content/uploads/2008/02/cc-edit-post.thumbnail.jpg' alt='cc edit post view' /></a><a href='http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/cc-view-post-license/' rel='attachment wp-att-203' title='cc view post license'><img style="float:left;margin:15px;padding:2px;border:1px solid #bbb;" src='http://techblog.touchbasic.com/html/wp-content/uploads/2008/02/cc-view-post.thumbnail.jpg' alt='cc view post license' /></a></p>
<div style="clear:both;"></div>
<p><span id="more-201"></span></p>
<p><strong>Download:</strong><br />
Click on the following link to download the plugin: <a href="http://touchbasic.googlepages.com/per-post-license_v0.2.zip">per-post-license_v.02.zip</a></p>
<p><strong>Requirements:</strong><br />
1. This plugin has been testing and works on WP 2.3.x using the default theme (but it is still a work in progess / comments and suggestions are welcome).<br />
2. Your web server needs either curl (most have it installed and it&#8217;s the default setting used in this plugin) or URL file-access enabled (to be able to run file_get_contents() instead of curl).</p>
<p><strong>Install:</strong><br />
1. Unzip and Copy the per-post-license folder to your plugins directiory and activate it.<br />
2. Add the template function (see next paragraph) to where you&#8217;d like the CC image/button and text to appear on your post (this might be the single.php or footer.php template file).<br />
3. Go to the Write post page or Edit an existing post.<br />
4. Look for the new section marked &#8220;CC License&#8221; and click the small &#8220;plus&#8221; sign to open the section.<br />
5. Select &#8220;A Creative Commons license&#8221; and choose the appropriate licensing structure.<br />
6. Save the post and You&#8217;re Done!</p>
<p><strong>WP Template Function:</strong><br />
Add the following function to the WP template file (like single.php, or footer.php) to get the CC license to appear on your post.<br />
<code lang="php">
<div id="cc_code">< ?php if(function_exists('cc_insert_html')) { cc_insert_html($display=true); } /* get cc code */ ?></div>
<p></code></p>
<p><strong>Template Options:</strong><br />
Right now, there are only 2 options that you can use with the cc_insert_html() template function.<br />
1. The first is the $display variable. [$display=true ---> will show the CC license , $display=false will not]<br />
2. The second is the $use_curl variable [default is set to --> $use_curl=true , if you explicitly set $use_curl=false the plugin will revert to the php function file_get_contents() which is not always enabled on all web servers]</p>
<p><strong>CSS styles:</strong><br />
Here is a sample style you can use to center, add padding and margins, as well as a horizontal dashed separator (you can ofcourse use any style you like). You would add this code to your style.css file in your template directory.<br />
<code lang="css">#cc_code { text-align:center; font-size:11px; width:450px; margin-top:25px; padding-top:25px; border-top:1px dashed #ccc; }</code><br />
You could also just use inline css and replace the < div id="cc_code" > and add these styles directly &#8211; something like < div style="text-align:center; font-size:11px;" >.</p>
<p><strong>To Do:</strong><br />
- get rss/atom feeds showing CC license<br />
- possibly add CC to header (if appropriate)<br />
- option to set per author licensing (for all an author&#8217;s posts)<br />
- option to set global default license for entire site<br />
- option to turn off graphic/button and just show text<br />
- option to choose/add an existing licensing structure (other than CC) by providing a URL<br />
- create another template function to gather and list all posts with CC licensing (by title)</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/wp-23-plugin-per-post-creative-commons-license/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using Subversion with WordPress &#8211; Part 2: Maintaining Vendor Branches and Upgrading WP Core Files</title>
		<link>http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-2-maintaining-vendor-branches-and-upgrading-wp-core-files/</link>
		<comments>http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-2-maintaining-vendor-branches-and-upgrading-wp-core-files/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 23:01:11 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[merging]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[vendor branches]]></category>
		<category><![CDATA[vendor drop]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-2-maintaining-vendor-branches-and-upgrading-wp-core-files/</guid>
		<description><![CDATA[This article assumes you have already read, &#8220;Using Subversion with WordPress &#8211; Part 1: Creating Vendor Branches and Integrating your Existing Code&#8220;. In short, you want to use Subversion to track/maintain local versions of both WordPress code and your own internal project code, side-by-side, all in the same svn repository. In the previously mentioned article [...]]]></description>
			<content:encoded><![CDATA[<p><em>This article assumes you have already read, &#8220;<a href="http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/">Using Subversion with WordPress &#8211; Part 1: Creating Vendor Branches and Integrating your Existing Code</a>&#8220;. In short, you want to use Subversion to track/maintain local versions of both WordPress code and your own internal project code, side-by-side, all in the same svn repository.</em></p>
<p>In the previously mentioned article we used WordPress version 2.3.1 as our initial vendor drop. The following procedure illustrates how to use <em>svn merge</em> to quickly upgrade WordPress core files from version 2.3.1 to version 2.3.2 &#8211; without losing your local changes &#8211; but could be used as a general outline for upgrading any version of WordPress provided you followed the steps discussed in Part 1. Note: Backup your files and database before attempting any of this. Also, although not strictly required, the following steps assume you have some kind of shell access (like ssh) and a command line subversion client (like svn).</p>
<p><strong><em>Maintaining Vendor Branches -</em></strong><br />
To perform this upgrade, we check out a copy of our current vendor branch (which contains our WP 2.3.1 source code), and replace that code with the new WP 2.3.2 source code. So, we simply copy the new files on top of existing files and directories. The goal here is to make our current directory contain only the new WP 2.3.2 code, and to ensure that all that code is under version control. I use the <em>svn export</em> command to grab the WP 2.3.2 source code &#8211; but downloading and extracting the WP files manually works just as well.</p>
<p><span id="more-193"></span></p>
<p>1. Prepare Current and New Code<br />
<code><br />
$ mkdir upgrade<br />
$ cd upgrade<br />
$ svn co http://svn.yourdomain.com/vendor/wordpress/current/<br />
$ svn export http://svn.automattic.com/wordpress/tags/2.3.2/<br />
â€¦<br />
</code></p>
<p>2. Copy, Resolve Conflicts, and Commit Changes<br />
<code><br />
$ cd current [optionally, delete all files but NOT folders / dont delete .svn folders]<br />
$ cp -a ../2.3.2/* .<br />
$ svn status<br />
$ svn ci -m "commiting WP 2.3.2 vendor drop to current branch"<br />
$ cd ../../<br />
$ rm -rf upgrade<br />
â€¦<br />
</code></p>
<p>3. Tag the New Version<br />
Our current branch now contains the new vendor drop. We tag the new version (in the same way we previously tagged the version 2.3.1 vendor drop &#8211; in <a href="http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/">Part 1</a>)<br />
<code><br />
$ svn copy http://svn.yourdomain.com/vendor/wordpress/current  \<br />
           http://svn.yourdomain.com/vendor/wordpress/2.3.2      \<br />
           -m "tagging WordPress 2.3.2"<br />
â€¦<br />
</code></p>
<p>4. Merge the Differences and Commit Changes<br />
Checkout a copy of your current project (from <a href="http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/">Part 1</a> &#8211; we used the folder: &#8220;newproject&#8221;). Merge the differences between the tag of the previous version (WP 2.3.1) and the new current version into our main development branch. Type <em>svn status</em> to see what files were modified and resolve any conflicts. Run <em>svn add</em> and <em>svn delete</em> commands where appropriate. Commit the changes and our local version of WP will now been completely upgraded without over-writing or deleting any existing modifications we may have previously made.<br />
<code><br />
$ mkdir newproject<br />
$ cd newproject<br />
$ svn co http://svn.yourdomain.com/branches/newproject .<br />
$ svn merge http://svn.yourdomain.com/vendor/wordpress/2.3.1      \<br />
            http://svn.yourdomain.com/vendor/wordpress/current  .<br />
$ svn status<br />
$ svn ci -m 'merging WordPress 2.3.2 into the main branch'<br />
â€¦<br />
</code></p>
<p>That&#8217;s all there is to it! </p>
<p>And, best of all, every change made to your internal project code  &#8211; including those made to WP core files &#8211; is now documented and tracked from within your own local version control system.</p>
<p>Note: Don&#8217;t forget to visit http://www.yourdomain.com/wp-admin/upgrade.php in your web browser once you&#8217;ve completed all of these steps to make sure any database upgrades get applied as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-2-maintaining-vendor-branches-and-upgrading-wp-core-files/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Using Subversion with WordPress &#8211; Part 1: Creating Vendor Branches and Integrating your Existing Code</title>
		<link>http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/</link>
		<comments>http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/#comments</comments>
		<pubDate>Tue, 29 Jan 2008 01:03:57 +0000</pubDate>
		<dc:creator>elran</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Everything]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[merging]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[vendor branches]]></category>
		<category><![CDATA[vendor drop]]></category>

		<guid isPermaLink="false">http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/</guid>
		<description><![CDATA[This article assumes that you&#8217;ve read the basic svn howto and the more specific one provided on the WP Codex but would like to try or need a setup similar to that described here on a page called: Vendor branches. In short, you want to use Subversion to track/maintain local versions of both WordPress code [...]]]></description>
			<content:encoded><![CDATA[<p>This article assumes that you&#8217;ve read the <a href="http://codex.wordpress.org/Using_Subversion">basic svn howto</a> and the <a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">more specific one</a> provided on the WP Codex but would like to try or need a setup similar to that described <a href="http://svnbook.red-bean.com/en/1.4/svn.advanced.vendorbr.html">here</a> on a page called: Vendor branches. In short, you want to use Subversion to track/maintain local versions of both WordPress code and your own internal project code, side-by-side, all in the same svn repository.</p>
<p><strong>Scenario:</strong><br />
Let&#8217;s say you have an in-house web developement project that is built upon or otherwise dependent on the WordPress core files. This can be for something as simple as creating/customizing your own WP themes and plugins, or as complex as maintaining your own modified versions of WP core files, with additional components/modules, etc. The important thing is that you imagine a scenario where you are already using Subversion to commit changes/updates to this internal project of yours. However, a problem occurs whenever a new version of WordPress is released. You need to upgrade the WP core files whithout losing any of the custom modifications you&#8217;ve been making up until now. Ideally, you would like to apply (to your internal project) only the changes made to the upgraded WP core files without over-writing any of your own work.</p>
<p><strong>Solution:</strong></p>
<blockquote><p>&#8220;The solution to this problem is to use vendor branches. A vendor branch is a directory tree in your own version control system that contains information provided by a third-party entity, or vendor. Each version of the vendor&#8217;s data that you decide to absorb into your project is called a vendor drop.&#8221; (<a href="http://svnbook.red-bean.com/en/1.4/svn.advanced.vendorbr.html">quote</a>)</p></blockquote>
<p>So, in this case, the third-party entity or vendor, is WordPress. What we want to do is: absorb the WP code into our own project. The rest of this article is going to illustrate the concept of &#8220;vendor drops&#8221; as they would apply to this particular scenario and using WordPress as the third-party vendor. Some of the benefits of this method are described in the article that the previously mentioned quote came from. In addition, this article goes on to describe the exact same process (but in more general terms) in a section entitled: General Vendor Branch Management Procedure. Well, here is my &#8220;Specific Vendor Branch Management Procedure&#8221; for WordPress.</p>
<p><strong><em>Vendor Branch Management &#8211; Description</em></strong></p>
<blockquote><p>&#8220;Managing vendor branches generally works like this. You create a top-level directory (such as /vendor) to hold the vendor branches. Then you import the third party code into a subdirectory of that top-level directory. You then copy that subdirectory into your main development branch (for example, /trunk) at the appropriate location. You always make your local changes in the main development branch. With each new release of the code you are tracking you bring it into the vendor branch and merge the changes into /trunk, resolving whatever conflicts occur between your local changes and the upstream changes.&#8221; (<a href="http://svnbook.red-bean.com/en/1.4/svn.advanced.vendorbr.html">quote</a>)</p></blockquote>
<p><strong><em>Our Setup -</em></strong><br />
Let&#8217;s use WordPress 2.3.1 as an example. A newer version of WP (2.3.2) was just released and we&#8217;ll be using that version in a follow-up article to show how you can maintain this setup across multiple WP version upgrades without losing your local changes. However, for right now, we&#8217;ll assume that this is your first vendor drop and that your current project is already using Subversion and is also built against WP 2.3.1. In theory, you could use this same procedure with any version of WP &#8211; just make sure to start with an initial vendor drop that is the exact same version of WP as the one your project is currently using. Remember, we are not upgrading WP yet. We are just importing the WP code into our existing subversion-based system, side-by-side with our internal project. Note: Backup your files and database before attempting any of this. Also, although not strictly required, the following steps assume you have some kind of shell access (like ssh) and a command line subversion client (like svn).</p>
<p><span id="more-192"></span></p>
<p><strong><em>Creating Vendor Branches -</em></strong></p>
<p>1. Download Vendor Source Code<br />
<code><br />
$ mkdir workspace<br />
$ cd workspace<br />
$ svn export http://svn.automattic.com/wordpress/tags/2.3.1/<br />
â€¦<br />
</code></p>
<p>2. Importing Initial Vendor Drop<br />
<code><br />
$ cd 2.3.1<br />
$ svn import . http://svn.yourdomain.com/vendor/wordpress/current        \<br />
             -m "importing initial WordPress vendor drop"<br />
$ cd ../<br />
$ rm -rf 2.3.1<br />
â€¦<br />
</code></p>
<p>3. Tagging Initial Vendor Drop<br />
<code><br />
$ svn copy http://svn.yourdomain.com/vendor/wordpress/current        \<br />
           http://svn.yourdomain.com/vendor/wordpress/2.3.1        \<br />
           -m "tagging WordPress 2.3.1"<br />
â€¦<br />
</code></p>
<p>4. Copying Vendor Drop into a New Branch<br />
<code><br />
$ svn copy http://svn.yourdomain.com/vendor/wordpress/2.3.1        \<br />
           http://svn.yourdomain.com/branches/newproject        \<br />
           -m "bringing WordPress 2.3.1 into the new branch"<br />
â€¦<br />
</code></p>
<p>5. Check Out and Add Customizations<br />
We check out our project&#8217;s new branch &#8211; which now includes a copy of our first WP vendor drop &#8211; and we begin customizing or re-applying any changes to the code. Unless you&#8217;re starting from scratch, this probably just involves copying over any files and folders that were previously a part of your internal project code. Since we made sure to import the exact same version of WP that was used in our in-house development (this is not an upgrade) &#8211; there should be no conflicts and fewer surprises.<br />
<code><br />
$ mkdir newproject<br />
$ cd newproject<br />
$ svn co http://svn.yourdomain.com/branches/newproject .<br />
$ cp -a /path/to/your/oldproject/* .<br />
â€¦<br />
</code></p>
<p>6. Resolve conflicts and Commit Changes<br />
Type <em>svn status</em> to see what files were modified and resolve any conflicts. Run <em>svn add</em> and <em>svn delete</em> commands where appropriate. Commit the changes and our modified version of WP is now completely integrated into our in-house project.<br />
<code><br />
$ svn ci -m "commiting changes into the new branch"<br />
$ cd ../<br />
$ rm -rf newproject<br />
â€¦<br />
</code></p>
<p>That&#8217;s It! You&#8217;re Done.</p>
<p>At this point you might be thinking to yourself: &#8220;Well, that&#8217;s not exactly a time saver.. now is it?&#8221; And, you&#8217;d be right! But we won&#8217;t stop there! With WordPress integrated into our in-house versioning system &#8211; we can now use <em>svn merge</em> to quickly perform WP upgrades on our internal project code without risk of ever deleting or over-writing our own work.</p>
<p>And, best of all, every change made to your internal project code &#8211; including those made to WP core files &#8211; will now be documented and tracked from within your own local version control system.</p>
<p><strong><em>[ Be sure to check back for the follow-up article entitled: "<a href="http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-2-maintaining-vendor-branches-and-upgrading-wp-core-files/">Using Subversion with WordPress - Part 2: Maintaining Vendor Branches and Upgrading WP Core Files</a>" ]</em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://techblog.touchbasic.com/html/using-subversion-with-wordpress-part-1-creating-vendor-branches-and-integrating-your-existing-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

