<?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>Konstruktors&#187; Blog About Web, Design and the Future of Publishing</title>
	<atom:link href="http://konstruktors.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://konstruktors.com</link>
	<description>Web Design, WordPress and Performance Services</description>
	<lastBuildDate>Sun, 18 Dec 2011 15:12:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
	<atom:link rel='hub' href='http://konstruktors.com/?pushpress=hub'/>
		<item>
		<title>Away Until February&#160;2012</title>
		<link>http://konstruktors.com/blog/wordpress/3397-away-until-february-2012/</link>
		<comments>http://konstruktors.com/blog/wordpress/3397-away-until-february-2012/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 15:05:24 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3397</guid>
		<description><![CDATA[I am participating in the Dakar rally 2012 from January 1 to 15th in Argentina, Chile and Peru. We have built the world&#8217;s first electric off-road rally car OSCar eO and our aim is to win the &#8220;Alternative Energy&#8221; category. Plugin Updates I know that the latest WordPress update (version 3.3) broke both Widget Context [...]]]></description>
			<content:encoded><![CDATA[<p>I am participating in the <a href="http://dakar.com">Dakar rally 2012</a> from January 1 to 15th in Argentina, Chile and Peru. We have built the world&#8217;s first <a href="http://oscareo.lv">electric off-road rally car</a> <strong>OSCar eO</strong> and our aim is to win the &#8220;Alternative Energy&#8221; category.</p>
<h3>Plugin Updates</h3>
<p>I know that the latest WordPress update (version 3.3) broke both Widget Context and Tabbed Widgets plugins. I&#8217;ll be able to fix them only by the end of January 2012. Please check the <a href="http://wordpress.org/tags/widget-context?forum_id=10">WordPress forum</a> for temporary fixes.</p>
<p>Wish you all happy holidays and don&#8217;t forget to follow us in the Dakar rally (live on <a href="http://www.dakar.com">dakar.com</a> and on your TV) and see how we&#8217;re changing the perception of what electric cars can do!</p>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/105-suggestions-for-writing-flexible-and-usable-plugin/' rel='bookmark' title='Suggestions for writing flexible and usable&nbsp;plugin'>Suggestions for writing flexible and usable&nbsp;plugin</a></li>
<li><a href='http://konstruktors.com/blog/free-software/1589-whitehouse-gov-runs-drupal/' rel='bookmark' title='WhiteHouse.gov Runs&nbsp;Drupal'>WhiteHouse.gov Runs&nbsp;Drupal</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/wordpress/3397-away-until-february-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Embed Your YouTube Channel as a&#160;Playlist</title>
		<link>http://konstruktors.com/blog/web-design/3384-embed-youtube-channel-playlist/</link>
		<comments>http://konstruktors.com/blog/web-design/3384-embed-youtube-channel-playlist/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 11:43:47 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3384</guid>
		<description><![CDATA[Update: There is an undocumented ID of your channel playlist which is available in the current beta version of YouTube UI as described by Federico in the comments. For some reason YouTube doesn&#8217;t offer a simple way to embed your YouTube channel. The only official method is to manually create a playlist with all your videos [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> There is an undocumented ID of your channel playlist which is available in the current <a href="http://www.youtube.com/cosmicpanda">beta version of YouTube UI</a> as <a href="#comment-11790">described by Federico</a> in the comments.</p>
<p>For some reason YouTube doesn&#8217;t offer a simple way to embed your YouTube <strong>channel</strong>. The only official method is to manually create a <strong>playlist</strong> with all your videos and embed that. However, it requires additional work after every upload which is not cool, especially if you&#8217;re on a mobile. Here is <a href="http://jsfiddle.net/q3meN/">a simple script</a> that creates an HTML5 (iframe) player using the YouTube API:</p>
<pre>(function() {
    function createPlayer(jqe, video, options) {
        var ifr = $('iframe', jqe);
        if (ifr.length === 0) {
            ifr = $('&lt;iframe scrolling="no" frameborder="no"&gt;');
            ifr.addClass('player');
            if (options.playeropts)
                ifr.attr(options.playeropts);
        }
        var src = 'http://www.youtube.com/embed/' + video;
        if (options.playopts) {
            src += '?';
            for (var k in options.playopts) {
                src+= k + '=' + options.playopts[k] + '&amp;';
            }
        }
        ifr.attr('src', src);
        jqe.append(ifr);
    }

    var defoptions = {
        autoplay: false,
        user: null,
        player: createPlayer,
        playeropts: {},
        loaded: function() {},
        playopts: {
            fs: 1,
            showinfo: 1,
            modestbranding: 1
        }
    };

    $.fn.extend({
        youTubeChannel: function(options) {
            var md = $(this);
            var allopts = $.extend(true, {}, defoptions, options);
            $.getJSON('http://gdata.youtube.com/feeds/api/users/' + allopts.user + '/uploads?alt=jsonc&amp;v=2', null, function(data) {
                var videos = [];
                var playlist = '';
                $.each(data.data.items, function(i, item) {
                    videos.push(item.id);
                    if (i &gt; 0)
                        playlist += item.id + ',';
                });
                allopts.playopts.playlist = playlist;
                allopts.player(md, videos[0], allopts);
            });
        }
    });

})();

$(function() {
    $('#player').youTubeChannel({user:'kasparsdambis', playeropts: { width: 400, height: 280 }});
});</pre>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/random-musings/1929-sunday-with-beethoven/' rel='bookmark' title='Sunday with&nbsp;Beethoven'>Sunday with&nbsp;Beethoven</a></li>
<li><a href='http://konstruktors.com/blog/random-musings/1790-pari-jumtiem-lido-kaijas/' rel='bookmark' title='Pāri jumtiem lido&nbsp;kaijas'>Pāri jumtiem lido&nbsp;kaijas</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/2610-jquery-script-for-loading-more-posts/' rel='bookmark' title='jQuery Script for Loading More&nbsp;Posts'>jQuery Script for Loading More&nbsp;Posts</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/web-design/3384-embed-youtube-channel-playlist/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Use Sticky Posts as Category&#160;Description</title>
		<link>http://konstruktors.com/blog/wordpress/3364-sticky-posts-as-category-description/</link>
		<comments>http://konstruktors.com/blog/wordpress/3364-sticky-posts-as-category-description/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 14:24:56 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3364</guid>
		<description><![CDATA[One putukrejums.lv blog we use the &#8216;sticky&#8217; posts to add introductory information to all category pages (see here, for example). This approach is better than using the category description field because it allows for all the usual formatting options. Here is how to add sticky posts on top of their respective category index pages and hide them [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://konstruktors.com/wp-content/uploads/2011/11/putukrejums-sticky-posts-category-introduction.jpg"><img class="alignnone size-medium wp-image-3369" title="Sticky posts as Category Description" src="http://konstruktors.com/wp-content/uploads/2011/11/putukrejums-sticky-posts-category-introduction-500x330.jpg" alt="Sticky posts as Category Description" width="500" height="330" /></a></p>
<p>One <a href="http://putukrejums.lv">putukrejums.lv</a> blog we use the &#8216;sticky&#8217; posts to add introductory information to all category pages (<a href="http://putukrejums.lv/tavas-kazas/">see here</a>, for example). This approach is better than using the category description field because it allows for all the usual formatting options.<span id="more-3364"></span></p>
<p>Here is how to add sticky posts on top of their respective category index pages and hide them from the rest of pages and indexes:</p>
<pre>add_action('pre_get_posts', 'alter_stickies');
function alter_stickies($query) {
	if (!$query-&gt;is_category &amp;&amp; !$query-&gt;is_single)
		$query-&gt;set('post__not_in', get_option('sticky_posts'));
}

add_filter('posts_orderby', 'sticky_orderby');
function sticky_orderby($orderby){
	global $wpdb;
	if (is_category())
		$orderby = "Field(". $wpdb-&gt;prefix ."posts.ID," . implode(',', get_option('sticky_posts')) . ") DESC, " . $orderby;
 	return $orderby;
}</pre>
<p>Add the <code>is-sticky</code> class to the post wrap for additional formatting control:</p>
<pre>add_filter('post_class', 'add_stickies_class');
function add_stickies_class($classes) {
	if (is_sticky())
		$classes[] = 'is-sticky';
	return $classes;
}</pre>
<h3>Redirect Sticky Posts to Their Category Index Page</h3>
<p>We don&#8217;t want the sticky posts to be available as individual posts that can be access via their permalinks because this information is already being displayed at the top of every category index page. Here is a simple filter to redirect all sticky posts to their category index pages:</p>
<pre>add_action('template_redirect', 'redirect_stickies');
function redirect_stickies() {
	global $wp_query;

	if (!is_single())
		return;
	$stickies = get_option('sticky_posts');
	if (empty($stickies))
		return;

 	if (in_array($wp_query-&gt;post-&gt;ID, $stickies))
		if ($cats = get_the_category($wp_query-&gt;post-&gt;ID))
			if ($cat = end($cats))
				wp_redirect(get_category_link($cat-&gt;cat_ID), '302');
}</pre>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/3177-exclude-sticky-posts-from-adjacent-post-links/' rel='bookmark' title='How to Exclude Sticky Posts from Adjacent Post&nbsp;Links'>How to Exclude Sticky Posts from Adjacent Post&nbsp;Links</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/2610-jquery-script-for-loading-more-posts/' rel='bookmark' title='jQuery Script for Loading More&nbsp;Posts'>jQuery Script for Loading More&nbsp;Posts</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/3335-remove-view-all-posts-filed-under-category-widget/' rel='bookmark' title='How to Remove &#8220;View all posts filed under&#8221; Prefix from Link Title Attribute in Category&nbsp;Widget'>How to Remove &#8220;View all posts filed under&#8221; Prefix from Link Title Attribute in Category&nbsp;Widget</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/wordpress/3364-sticky-posts-as-category-description/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Remove &#8220;View all posts filed under&#8221; Prefix from Link Title Attribute in Category&#160;Widget</title>
		<link>http://konstruktors.com/blog/wordpress/3335-remove-view-all-posts-filed-under-category-widget/</link>
		<comments>http://konstruktors.com/blog/wordpress/3335-remove-view-all-posts-filed-under-category-widget/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 14:57:13 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3335</guid>
		<description><![CDATA[add_filter('wp_list_categories', 'remove_category_link_prefix'); function remove_category_link_prefix($output) { return str_replace('View all posts filed under ', '', $output); } Related posts Remove Inline CSS and Line Breaks in WordPress&#160;Galleries Use Sticky Posts as Category&#160;Description How to Exclude Sticky Posts from Adjacent Post&#160;Links]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-3349" title="Remove link prefix from categories widget in WordPress" src="http://konstruktors.com/wp-content/uploads/2011/11/site-categories-remove-title-links-500x236.jpg" alt="Remove link prefix from categories widget in WordPress" width="500" height="236" /></p>
<pre>add_filter('wp_list_categories', 'remove_category_link_prefix');

function remove_category_link_prefix($output) {
	return str_replace('View all posts filed under ', '', $output);
}</pre>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/2920-remove-inline-css-line-breaks-galleries/' rel='bookmark' title='Remove Inline CSS and Line Breaks in WordPress&nbsp;Galleries'>Remove Inline CSS and Line Breaks in WordPress&nbsp;Galleries</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/3364-sticky-posts-as-category-description/' rel='bookmark' title='Use Sticky Posts as Category&nbsp;Description'>Use Sticky Posts as Category&nbsp;Description</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/3177-exclude-sticky-posts-from-adjacent-post-links/' rel='bookmark' title='How to Exclude Sticky Posts from Adjacent Post&nbsp;Links'>How to Exclude Sticky Posts from Adjacent Post&nbsp;Links</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/wordpress/3335-remove-view-all-posts-filed-under-category-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check Who is Tweeting About Your Blog or&#160;Website</title>
		<link>http://konstruktors.com/blog/the-web/3308-mentioning-your-blog-on-twitter/</link>
		<comments>http://konstruktors.com/blog/the-web/3308-mentioning-your-blog-on-twitter/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 16:16:32 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3308</guid>
		<description><![CDATA[Knowing who is talking about your blog or website on Twitter is easy &#8212; simply subscribe to the following RSS feed: http://search.twitter.com/search.rss?q=konstruktors.com Replace konstruktors.com with your own domain. Related posts Widget Context Update &#8212; Word Count&#160;Check Cite, Quote and&#160;Twitter WordPress Plugins which&#160;I&#160;Use]]></description>
			<content:encoded><![CDATA[<p>Knowing who is talking about your blog or website on Twitter is easy &#8212; simply subscribe to the following RSS feed:</p>
<pre>http://search.twitter.com/search.rss?q=konstruktors.com</pre>
<p>Replace <code>konstruktors.com</code> with your own domain.</p>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/944-widget-context-update-word-count-check/' rel='bookmark' title='Widget Context Update &#8212; Word Count&nbsp;Check'>Widget Context Update &#8212; Word Count&nbsp;Check</a></li>
<li><a href='http://konstruktors.com/blog/web-design/914-cite-quote-and-twitter/' rel='bookmark' title='Cite, Quote and&nbsp;Twitter'>Cite, Quote and&nbsp;Twitter</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/831-wordpress-plugins-which-i-use/' rel='bookmark' title='WordPress Plugins which&nbsp;I&nbsp;Use'>WordPress Plugins which&nbsp;I&nbsp;Use</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/the-web/3308-mentioning-your-blog-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Online Backup Strategy; Backblaze&#160;Review</title>
		<link>http://konstruktors.com/blog/meta/3248-my-online-backup-strategy-backblaze-review/</link>
		<comments>http://konstruktors.com/blog/meta/3248-my-online-backup-strategy-backblaze-review/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 19:57:11 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[Meta]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3248</guid>
		<description><![CDATA[Most of us learn about the importance of having and keeping regular backups only after loosing some of our important files, photos and documents. Luckily, I haven&#8217;t lost a single file and mostly because I have been lucky. Even the best hard drives crash and laptops get smashed or stolen. My first real backup solution [...]]]></description>
			<content:encoded><![CDATA[<p>Most of us learn about the importance of having and keeping regular backups only after loosing some of our important files, photos and documents. Luckily, I haven&#8217;t lost a single file and mostly because I have been lucky. Even the best hard drives crash and laptops get smashed or stolen.</p>
<p>My first real backup solution more than six years ago was a 120 GB external hard disk that needed a bulky power adopter to be plugged into the wall and turned on before it could be used. There was no software that would be able to sync only the modified files so I had to create folders such as <code>jun_2006</code> and <code>aug_2007</code> and copy everything again and again every time. USB transfer speeds were slow and it took only month to have reached the ultimate backup mess on that external disk.</p>
<p><img class="aligncenter size-medium wp-image-3256" title="Maxtor external USB disk drive" src="http://konstruktors.com/wp-content/uploads/2011/10/maxtor-external-disk-drive-500x281.jpg" alt="" width="500" height="281" /></p>
<p>Few years later I got a new external Maxtor disk that would use two USB wires to power the disk instead of the external adapter. It should have made it easier but it didn&#8217;t because the syncing software was still too slow and hard to configure to do any good. So I lived my life on the digital edge and presumably didn&#8217;t think about loosing all my client website source files, server access information, invoices and many other important files.<span id="more-3248"></span></p>
<h3>Fast Forward to 2011 &#8212; Online Backup</h3>
<p>The fact is that I don&#8217;t buy software before I make sure that there is no way I can build it myself or find an existing open source solutions. I was surprised to discover that I couldn&#8217;t buy even the necessary disk space on any shared server for the price of most online backup solutions that were available on the market. The conclusion was simple &#8212; <strong>I had to choose from the existing online backup providers</strong>.</p>
<p>First I tried <a href="http://www.carbonite.com/">Carbonite</a> because Leo Laporte had them as one of the sponsors of TWiT and I really wanted to like it. I also tried <a href="http://mozy.com/">Mozy</a> and <a href="http://konstruktors.com/go/sugarsync">SugarSync</a> and many others but there were exactly two things that I didn&#8217;t like about all of them:</p>
<ol>
<li>limited backup storage, and</li>
<li>complex software that slowed down computer.</li>
</ol>
<p>None of these limitations are relevant today &#8212; bandwidth and storage are cheap and performant software is a must (just look at Apple and Google Chrome). Nobody should think about which photos or documents to backup just to avoid having unexpected payments at the end of month.</p>
<h3>The Solution &#8212; Backblaze Online Backup</h3>
<p style="text-align: center;"><a href="http://konstruktors.com/go/backblaze/"><img class="aligncenter size-medium wp-image-3271" title="My Backblaze settings / status screen" src="http://konstruktors.com/wp-content/uploads/2011/10/my-backblaze-settings-500x340.png" alt="My Backblaze settings / status screen" width="500" height="340" /></a></p>
<p>I don&#8217;t remember how I discovered <a title="Blackbaze Online Backup Service" href="http://konstruktors.com/go/backblaze/">Backblaze</a>, but their offer sounded exactly how I imagined it should be &#8212; <strong>reasonably priced and without limits</strong>. It automatically created a trial account for me once I had it installed and I didn&#8217;t even have to visit their website again. In a few days I had forgotten that it was running in the background and all my important files (~ 40 GB) were backed up just before the end of the 15-day trial.</p>
<p>I was amazed at how <strong>fast and resource aware their software was</strong> both on my Mac and Windows machines and what a difference it made. After being their customer for two month I signed up my girlfriend&#8217;s laptop under the same account and today <strong>we both have around 150GB stored at Backblaze servers for $10/month in total</strong>.</p>
<h3>My Backblaze Stories</h3>
<h4>Changing Computers and Transferring Files</h4>
<p>Recently I got a new Macbook Pro as my main machine for work and I ended up using Backblaze to transfer all my documents and files from the old Windows machine just because they were already in the Backblaze cloud. Restoring files using their website is really simple &#8212; just select the folders you want and a single .zip files is prepared for direct download in minutes. I have a 100 Mbps internet connection at home, so it ended up being faster than if I had used an external hard drive.</p>
<h4>That PowerPoint Presentation During Vacation</h4>
<p>A month ago I went to Germany for a little weekend vacation and didn&#8217;t bring the laptop with me because I had just finished all the work and I really didn&#8217;t want to think about it for at least a weekend. On Saturday my colleague calls and asks for a little but important modification to one of the presentations that I had just finished. I had sent him a PDF version of that presentation due to some font issues so there was no way he could edit it.</p>
<p>It took me at least five minutes to figure out that Backblaze might have managed to sync the latest version of the original PPT file that I saved on my desktop just before shutting down the computer. <strong>And it had!</strong> So I simply download the original presentation using the online restore feature and got it fixed in no time. It felt really good considering that my laptop at home was turned off and the wireless router was unplugged to save some electricity. There is no way I could have done it without Backblaze.</p>
<h3><a href="http://konstruktors.com/go/backblaze/"><img class="alignright size-full wp-image-3286" title="Backup your computer online" src="http://konstruktors.com/wp-content/uploads/2011/10/bzad_125x125_red4.gif" alt="Backblaze -- backup your computer online" width="125" height="125" /></a>Conclusion</h3>
<p><a href="http://konstruktors.com/go/backblaze/">Try Backblaze for 15 days</a> and see if it works for you as well as it does for me. There is nothing like a comfort of knowing that all my important files, photos and podcast videos are stored securely in Backblaze datacenter and I can get them from wherever I am.</p>
]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/meta/3248-my-online-backup-strategy-backblaze-review/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>How to Automatically Add Image Credit or Source URL to Photo Captions in&#160;WordPress</title>
		<link>http://konstruktors.com/blog/wordpress/3203-how-to-automatically-add-image-credit-or-source-url-to-photo-captions-in-wordpress/</link>
		<comments>http://konstruktors.com/blog/wordpress/3203-how-to-automatically-add-image-credit-or-source-url-to-photo-captions-in-wordpress/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 16:32:44 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3203</guid>
		<description><![CDATA[Crediting and linking the source of any republished photo or illustration on the web is one of the most important best practices of web publishing. Unfortunately, there isn&#8217;t a standard way of doing it in WordPress and authors are left with their own decision on how and where to credit the original author or website. I [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_3205" class="wp-caption aligncenter" style="width: 510px"><img class="size-medium wp-image-3205 " title="Add image author or source URL to photos in WordPress" src="http://konstruktors.com/wp-content/uploads/2011/10/wordpress-image-photo-source-author-url-500x369.png" alt="Add image author or source URL to photos in WordPress" width="500" height="369" /><p class="wp-caption-text">Photo credit added automatically to every photo with a caption (via <a href="http://putukrejums.lv">putukrejums.lv</a>)</p></div>
<p>Crediting and linking the source of any republished photo or illustration on the web is one of the most important best practices of web publishing. Unfortunately, there isn&#8217;t a standard way of doing it in WordPress and authors are left with their own decision on how and where to credit the original author or website.<span id="more-3203"></span></p>
<p>I decided to add <strong>a simple &#8220;Source URL&#8221; input field to every image that is uploaded</strong>. Adding credit with a link to the source of that image now becomes as easy as adding a title or caption for an image:</p>
<p><a href="http://konstruktors.com/wp-content/uploads/2011/10/image-source-url-credit-dashboard.png"><img class="aligncenter size-medium wp-image-3206" title="Attached image Source URL input field" src="http://konstruktors.com/wp-content/uploads/2011/10/image-source-url-credit-dashboard-500x523.png" alt="Attached image Source URL input field" width="500" height="523" /></a></p>
<h3>Implementation</h3>
<p>You need to add the <a href="http://pastebin.com/FZJ3DJBg">following snippet of PHP</a> to your theme&#8217;s <code>functions.php</code>:</p>
<h4>Add the source URL input field to image upload screen</h4>
<pre>add_filter("attachment_fields_to_edit", "add_image_source_url", 10, 2);
function add_image_source_url($form_fields, $post) {
	$form_fields["source_url"] = array(
		"label" =&gt; __("Source URL"),
		"input" =&gt; "text",
		"value" =&gt; get_post_meta($post-&gt;ID, "source_url", true),
                "helps" =&gt; __("Add the URL where the original image was posted"),
	);
 	return $form_fields;
}

add_filter("attachment_fields_to_save", "save_image_source_url", 10 , 2);
function save_image_source_url($post, $attachment) {
	if (isset($attachment['source_url']))
		update_post_meta($post['ID'], 'source_url', trim($attachment['source_url']));
	return $post;
}</pre>
<h4>Automatically append the source URL to image captions</h4>
<pre>add_filter('img_caption_shortcode', 'caption_shortcode_with_credits', 10, 3);
function caption_shortcode_with_credits($empty, $attr, $content) {
	extract(shortcode_atts(array(
		'id'	=&gt; '',
		'align'	=&gt; 'alignnone',
		'width'	=&gt; '',
		'caption' =&gt; ''
	), $attr));

	// Extract attachment $post-&gt;ID
	preg_match('/\d+/', $id, $att_id);
	if (is_numeric($att_id[0]) &amp;&amp; $source_url = get_post_meta($att_id[0], 'source_url', true)) {
		if (!strstr($source_url, 'http://'))
			$source_url = 'http://' . $source_url;
		$parts = parse_url($source_url);
		$caption .= ' ('. __('via') .' &lt;a href="'. $source_url .'"&gt;'. $parts['host'] .'&lt;/a&gt;)';
	}

	if (1 &gt; (int) $width || empty($caption))
		return $content;

	if ($id)
		$id = 'id="' . esc_attr($id) . '" ';

	return '&lt;div ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="width: ' . (10 + (int) $width) . 'px"&gt;'
		. do_shortcode($content) . '&lt;p class="wp-caption-text"&gt;' . $caption . '&lt;/p&gt;&lt;/div&gt;';
}</pre>
<p>Please note that the source URL will be visible only if you specify image caption upon inserting the image.</p>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/1850-automatically-escape-html-entities-of-code-fragments-in-comments/' rel='bookmark' title='Automatically Escape HTML Entities of Code Fragments in&nbsp;Comments'>Automatically Escape HTML Entities of Code Fragments in&nbsp;Comments</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/2890-add-rel-attribute-to-image-links-in-wordpress-galleries/' rel='bookmark' title='Add rel Attribute to Image Links in WordPress&nbsp;Galleries'>Add rel Attribute to Image Links in WordPress&nbsp;Galleries</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/3364-sticky-posts-as-category-description/' rel='bookmark' title='Use Sticky Posts as Category&nbsp;Description'>Use Sticky Posts as Category&nbsp;Description</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/wordpress/3203-how-to-automatically-add-image-credit-or-source-url-to-photo-captions-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebKit Bug: Anti-aliasing for @font-face&#160;fonts</title>
		<link>http://konstruktors.com/blog/web-design/3190-webkit-bug-anti-aliasing-for-font-face-fonts/</link>
		<comments>http://konstruktors.com/blog/web-design/3190-webkit-bug-anti-aliasing-for-font-face-fonts/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 14:43:15 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3190</guid>
		<description><![CDATA[This is a known Webkit bug &#8212; any text with @font-face applied will be rendered without anti-aliasing if there is a text element without anti-aliasing applied preceding it. Usually those are fonts smaller than 5px or monospaced fonts at small sizes which are rendered without anti-aliasing. I noticed this bug on this page &#8212; the [...]]]></description>
			<content:encoded><![CDATA[<p>This is <a href="http://seanmcb.com/junk/webkit-antialiasing-test.html">a known Webkit bug</a> &#8212; <strong>any text with <code>@font-face</code> applied will be rendered without anti-aliasing if there is a text element without anti-aliasing applied preceding it</strong>. Usually those are fonts smaller than 5px or monospaced fonts at small sizes which are rendered without anti-aliasing.</p>
<p><a href="http://jsfiddle.net/39GZd/7/"><img class="alignnone size-full wp-image-3191" title="Webkit @font-face anti-aliasing bug due to preceding font-size" src="http://konstruktors.com/wp-content/uploads/2011/10/webkit-font-aliasing-bug.png" alt="" width="500" height="211" /></a></p>
<p>I noticed this bug on <a href="http://putukrejums.lv/kazu-abc/">this page</a> &#8212; the heading &#8220;Kāzu ABC&#8221; was rendered aliased despite having the main menu in between that heading and the logo which had <code>font-size:1px;</code> applied. The only way to fix this is by avoiding aliased text directly before elements that use @font-face.</p>
<p>Here is <a href="http://jsfiddle.net/39GZd/7/">a live demo of the bug</a>.</p>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/design/158-were-back-with-a-free-font-suggestion-liberation-sans/' rel='bookmark' title='We&#8217;re back with a free font suggestion &#8212; Liberation&nbsp;Sans'>We&#8217;re back with a free font suggestion &#8212; Liberation&nbsp;Sans</a></li>
<li><a href='http://konstruktors.com/blog/web-design/1461-no-font-embedding-on-web/' rel='bookmark' title='No Font Embedding,&nbsp;Please'>No Font Embedding,&nbsp;Please</a></li>
<li><a href='http://konstruktors.com/blog/web-design/2899-replace-login-logo-with-site-name-link/' rel='bookmark' title='Replace WordPress Login Logo With Your Site&#8217;s Name and&nbsp;Link'>Replace WordPress Login Logo With Your Site&#8217;s Name and&nbsp;Link</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/web-design/3190-webkit-bug-anti-aliasing-for-font-face-fonts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Exclude Sticky Posts from Adjacent Post&#160;Links</title>
		<link>http://konstruktors.com/blog/wordpress/3177-exclude-sticky-posts-from-adjacent-post-links/</link>
		<comments>http://konstruktors.com/blog/wordpress/3177-exclude-sticky-posts-from-adjacent-post-links/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 11:21:22 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[how to]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3177</guid>
		<description><![CDATA[add_filter('get_previous_post_where', 'remove_stickies_adjacent'); add_filter('get_next_post_where', 'remove_stickies_adjacent'); function remove_stickies_adjacent($where) { return $where . ' AND p.ID NOT IN (' . implode(',', get_option('sticky_posts')) . ')'; } Related posts Use Sticky Posts as Category&#160;Description How to Remove &#8220;View all posts filed under&#8221; Prefix from Link Title Attribute in Category&#160;Widget Enable WordPress Plugin, Theme Updates and Pretty Permalinks on&#160;Nginx]]></description>
			<content:encoded><![CDATA[<pre>add_filter('get_previous_post_where', 'remove_stickies_adjacent');
add_filter('get_next_post_where', 'remove_stickies_adjacent');
function remove_stickies_adjacent($where) {
	return $where . ' AND p.ID NOT IN (' . implode(',', get_option('sticky_posts')) . ')';
}</pre>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/3364-sticky-posts-as-category-description/' rel='bookmark' title='Use Sticky Posts as Category&nbsp;Description'>Use Sticky Posts as Category&nbsp;Description</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/3335-remove-view-all-posts-filed-under-category-widget/' rel='bookmark' title='How to Remove &#8220;View all posts filed under&#8221; Prefix from Link Title Attribute in Category&nbsp;Widget'>How to Remove &#8220;View all posts filed under&#8221; Prefix from Link Title Attribute in Category&nbsp;Widget</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/2885-enable-plugin-theme-updates-and-pretty-permalinks-nginx/' rel='bookmark' title='Enable WordPress Plugin, Theme Updates and Pretty Permalinks on&nbsp;Nginx'>Enable WordPress Plugin, Theme Updates and Pretty Permalinks on&nbsp;Nginx</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/wordpress/3177-exclude-sticky-posts-from-adjacent-post-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Widget Context UI Update 2011, Version&#160;2</title>
		<link>http://konstruktors.com/blog/design/3147-widget-context-ui-2011-v-2/</link>
		<comments>http://konstruktors.com/blog/design/3147-widget-context-ui-2011-v-2/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 17:31:09 +0000</pubDate>
		<dc:creator>Kaspars</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[Widget Context]]></category>

		<guid isPermaLink="false">http://konstruktors.com/?p=3147</guid>
		<description><![CDATA[Here is the second iteration of the UX update for the Widget Context plugin. Please check out the live demo and let me know what you think!  The Concept The number of locations where you might want to show or hide a widget can vary significantly &#8212; having &#8220;Related Posts&#8221; widget on all blog entries [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.konstruktors.com/widget-context-ui-2011/?v2"><img class="alignnone size-full wp-image-3148" title="Widget Context UI Update, Version 2" src="http://konstruktors.com/wp-content/uploads/2011/08/widget-context-ui-v2.png" alt="Widget Context UI Update, Version 2" width="506" height="333" /></a></p>
<p>Here is the second iteration of the <a href="http://konstruktors.com/blog/wordpress/3116-feedback-widget-context-ui-2011-v1/">UX update</a> for the Widget Context plugin. Please <a href="http://lab.konstruktors.com/widget-context-ui-2011/?v2">check out the live demo</a> and let me know what you think! <span id="more-3147"></span></p>
<h3>The Concept</h3>
<p>The number of locations where you might want to show or hide a widget can vary significantly &#8212; having &#8220;Related Posts&#8221; widget on all blog entries except on posts that are tagged &#8220;twitter&#8221; (many); or showing the &#8220;About Me&#8221; widget only on the front page of a blog (few). However, the combinations are endless.</p>
<p>Therefore, I realized that the most important feature should be the <strong>ability to find those groups of locations very fast</strong>. So there will be only two ways to sort through the content: (1) search, or (2) choose one of the core locations such as homepage, blog index, <strong>all</strong> pages/(custom)posts or their indices (archives).</p>
<p>Once you have found and selected the sections, it is only a matter of ordering (or chaining) them according to their &#8220;power&#8221; &#8212; low power locations sink to the bottom and are overwritten by the ones floating above them. This is done via drag-and-drop.</p>
<p>The question is &#8212; can you think of a combination of locations that can&#8217;t be covered using this approach?</p>
<h4>Related posts</h4><ol>
<li><a href='http://konstruktors.com/blog/wordpress/3116-feedback-widget-context-ui-2011-v1/' rel='bookmark' title='Request for Feedback: Widget Context UI Update 2011,&nbsp;v1'>Request for Feedback: Widget Context UI Update 2011,&nbsp;v1</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/944-widget-context-update-word-count-check/' rel='bookmark' title='Widget Context Update &#8212; Word Count&nbsp;Check'>Widget Context Update &#8212; Word Count&nbsp;Check</a></li>
<li><a href='http://konstruktors.com/blog/wordpress/1261-widget-context-update-for-wordpress-2-8/' rel='bookmark' title='Widget Context Update for WordPress&nbsp;2.8'>Widget Context Update for WordPress&nbsp;2.8</a></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://konstruktors.com/blog/design/3147-widget-context-ui-2011-v-2/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
