<?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>Kevin Deldycke &#187; K2</title> <atom:link href="http://kevin.deldycke.com/tag/k2/feed/" rel="self" type="application/rss+xml" /><link>http://kevin.deldycke.com</link> <description>Free software engineer &#38; wannabe videomaker</description> <lastBuildDate>Fri, 03 Feb 2012 19:08:27 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>How-to add a corner banner to a K2 WordPress theme&#8217;s style</title><link>http://kevin.deldycke.com/2008/06/how-to-add-a-corner-banners-to-a-k2-wordpress-theme-style/</link> <comments>http://kevin.deldycke.com/2008/06/how-to-add-a-corner-banners-to-a-k2-wordpress-theme-style/#comments</comments> <pubDate>Sat, 07 Jun 2008 17:34:20 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[alpha]]></category> <category><![CDATA[banner]]></category> <category><![CDATA[corner]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[design]]></category> <category><![CDATA[Gimp]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[IE]]></category> <category><![CDATA[K2]]></category> <category><![CDATA[Photoshop]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[PNG]]></category> <category><![CDATA[qpx]]></category> <category><![CDATA[style]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[transparency]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://kevin.deldycke.com/?p=226</guid> <description><![CDATA[In this post I will give you all the technical details to create a corner banner for the wordpress K2 theme. This solution is uninstrusive as it can be bundled with a K2 style without modifying the K2 core theme. &#8230; <a href="http://kevin.deldycke.com/2008/06/how-to-add-a-corner-banners-to-a-k2-wordpress-theme-style/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><img src="http://kevin.deldycke.com/wp-content/uploads/2008/06/beta-version-illustration-150x150.png" alt="" title="beta-version-illustration" width="150" height="150" class="alignleft size-thumbnail wp-image-227" /></p><p>In this post I will give you all the technical details to create a corner banner for the wordpress K2 theme. This solution is uninstrusive as it can be bundled with a K2 style without modifying the K2 core theme.</p><p>We will use the new <a href="http://code.google.com/p/kaytwo/wiki/K2CSSandCustomCSS#PHP">hooks</a> from the brand new <a href="http://getk2.com/2008/04/k2-release-candidate-6-released/">K2 1.0RC6</a>. So first, we have to create a <code>functions.php</code> file in our style directory (example: <code>/wp-content/themes/k2/styles/my-style</code>). Then add the following PHP code in it:</p><pre class="brush: php; title: ; notranslate">
&lt;?php

// Add HTML code required by our corner banner
function add_corner_banner() {
  ?&gt;
  &lt;a id=&quot;cornerbanner&quot; href=&quot;http://coolcavemen.com/news/new-website-beta-released/&quot; title=&quot;New website released as beta version !&quot;&gt;&lt;/a&gt;
  &lt;?php
}

// Call add_corner_banner() method on each template_body_top hook
add_action(‘template_body_top’, ‘add_corner_banner’);

?&gt;
</pre><p>This code tell K2 to replace the <code>template_body_top</code> hook define in all K2 pages, by the result of the <code>add_corner_banner()</code> PHP function. This function is coded to return the HTML code we need for the corner banner.</p><p>Then we need to add the following CSS code to our style (<code>/wp-content/themes/k2/styles/my-style/my-style.css</code>):</p><pre class="brush: css; title: ; notranslate">
#cornerbanner {
  background: url(&quot;/wp-content/themes/k2/styles/my-style/corner-banner.png&quot;) no-repeat;
  display: block;
  height: 205px;
  width: 205px;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 999;
  text-decoration: none;
}
</pre><p>This CSS code refer to the <code><a href='http://kevin.deldycke.com/wp-content/uploads/2008/06/corner-banner.png'>corner-banner.png</a></code> which is a 205&#215;205 px PNG image with an alpha channel to simulate shadows and fine transparency. Here is the <a href="http://kevin.deldycke.com/wp-content/uploads/2008/06/corner-banner.xcf">Gimp <code>xcf</code> source file</a> I used to generate it.</p><p>This CSS code is designed for a top right banner. If you need a top left banner, replace:</p><pre class="brush: css; title: ; notranslate">
  right: 0;
</pre><p>by</p><pre class="brush: css; title: ; notranslate">
  left: 0;
</pre><p>This also work for horizontal positioning:</p><pre class="brush: css; title: ; notranslate">
  top: 0;
</pre><p>can be replaced by</p><pre class="brush: css; title: ; notranslate">
  bottom: 0;
</pre><p>That&#8217;s all ! My solution is not supposed to work (and was not tested) with Internet Explorer as the latter is known to have <a href="http://en.wikipedia.org/wiki/Portable_Network_Graphics#Web_browser_support_for_PNG">terrible PNG transparency support</a>. You can still apply fixes on my code using <a href="http://www.twinhelix.com/css/iepngfix/">iepngfix</a>, <a href="http://jquery.andreaseberhard.de/pngFix/">jquery</a> or <a href="http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/">PNG8 images</a>.</p><p>I&#8217;ve provided you with all the technical details to create a corner banner and add it to your K2 style seamlessly. It&#8217;s now up to you to adapt it to your needs. Be Creative ! Oh, and by the way, when you&#8217;ll change the banner PNG file, do not forget to update the CSS code with your image width and height.</p><p><ins datetime="2008-06-14T12:29:47+00:00"><strong>Update</strong>: <a href="http://qpx.coolcavemen.com">my friend QPX</a> sent me an alternative banner made with photoshop: here is the <a href="http://kevin.deldycke.com/wp-content/uploads/2008/06/corner-banner-qpx.png">ready-to-use PNG file</a> and the <a href="http://kevin.deldycke.com/wp-content/uploads/2008/06/corner-banner-qpx.psd">photoshop source file</a>.</ins></p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2008/06/how-to-add-a-corner-banners-to-a-k2-wordpress-theme-style/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Sapphire v0.4 style for wordpress K2 theme</title><link>http://kevin.deldycke.com/2007/11/sapphire-v04-style-for-wordpress-k2-theme/</link> <comments>http://kevin.deldycke.com/2007/11/sapphire-v04-style-for-wordpress-k2-theme/#comments</comments> <pubDate>Fri, 23 Nov 2007 23:45:29 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[K2]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/11/sapphire-v04-style-for-wordpress-k2-theme/</guid> <description><![CDATA[Here is my latest version (0.4) of Sapphire for K2. This version fix the style to let it work with the Release Candidate 3 of K2. It also include some CSS backports from K2 v0.9.6, especially the CSS trick that &#8230; <a href="http://kevin.deldycke.com/2007/11/sapphire-v04-style-for-wordpress-k2-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Here is my <a href="http://kevin.deldycke.com/static/wordpress/wordpress-k2-style-sapphire-0.4.zip">latest version (0.4) of Sapphire</a> for K2. This version fix the style to let it work with the <a href="http://getk2.com/2007/10/k2-release-candidate-3-released/">Release Candidate 3 of K2</a>.</p><p>It also include some CSS backports from K2 v0.9.6, especially the CSS trick that automaticcaly resize your big images to fit the weight of the  central theme column.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/11/sapphire-v04-style-for-wordpress-k2-theme/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Sapphire 0.3 for K2 WordPress Theme</title><link>http://kevin.deldycke.com/2007/06/sapphire-03-for-k2-wordpress-theme/</link> <comments>http://kevin.deldycke.com/2007/06/sapphire-03-for-k2-wordpress-theme/#comments</comments> <pubDate>Sat, 16 Jun 2007 15:22:16 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[English]]></category> <category><![CDATA[K2]]></category> <category><![CDATA[style]]></category> <category><![CDATA[Template]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/06/sapphire-03-for-k2-wordpress-theme/</guid> <description><![CDATA[I&#8217;ve updated my Sapphire adaptation for the new K2 v0.9.6 release. Sapphire 0.3 is now compatible with K2 sidebars, which mean that the header and footer of the theme will be expanded or reduced according to the number of sidebars. &#8230; <a href="http://kevin.deldycke.com/2007/06/sapphire-03-for-k2-wordpress-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I&#8217;ve updated <a href="http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/">my Sapphire adaptation</a> for the <a href="http://getk2.com/2007/06/k2-v096-released/">new K2 v0.9.6 release</a>.</p><p><a href="http://kevin.deldycke.com/wp-content/uploads/2007/04/sapphire-style-for-k2-03-wordpress-theme.png"><img src="http://kevin.deldycke.com/wp-content/uploads/2007/04/sapphire-style-for-k2-03-wordpress-theme-300x179.png" alt="" title="Wordpress Theme: Sapphire Style for K2 in action (v0.3)" width="300" height="179" class="aligncenter size-medium wp-image-2450" /></a></p><p>Sapphire 0.3 is now compatible with K2 sidebars, which mean that the header and footer of the theme will be expanded or reduced according to the number of sidebars. To achieve this flexibility, I had to redo all images included in the original Sapphire theme. All Inkscape and Gimp source files can be found in the &#8220;<code>sources</code>&#8221; folder of the <a href="http://kevin.deldycke.com/static/wordpress/wordpress-k2-style-sapphire-0.3.zip">Sapphire v0.3 zip file</a>. This total rework also mean that I no longer use any file or code from the legacy sapphire theme.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/06/sapphire-03-for-k2-wordpress-theme/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Sapphire v0.2 for K2</title><link>http://kevin.deldycke.com/2007/04/sapphire-v02-for-k2/</link> <comments>http://kevin.deldycke.com/2007/04/sapphire-v02-for-k2/#comments</comments> <pubDate>Thu, 19 Apr 2007 14:45:29 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[Blog]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[K2]]></category> <category><![CDATA[Template]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/04/sapphire-v02-for-k2/</guid> <description><![CDATA[I&#8217;ve just release a new version of my Sapphire adaptation for K2 theme. This second release not only fix margins regarding the main layout, but also styles of blockquotes and lists (to render them consistently in comments). Here is a &#8230; <a href="http://kevin.deldycke.com/2007/04/sapphire-v02-for-k2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><img src='http://kevin.deldycke.com/wp-content/uploads/2007/04/sapphire-for-k2-in-action.png' alt='Sapphire style for K2 in action' class="center"/></p><p>I&#8217;ve just release a new version of <a href="http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/">my Sapphire adaptation for K2 theme</a>. This second release not only fix margins regarding the main layout, but also styles of blockquotes and lists (to render them consistently in comments).</p><p>Here is a <a href="http://kevin.deldycke.com/static/wordpress/wordpress-k2-style-sapphire-0.2.zip">direct download link to this v0.2</a>.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/04/sapphire-v02-for-k2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Sapphire style for K2 WordPress theme</title><link>http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/</link> <comments>http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/#comments</comments> <pubDate>Wed, 21 Mar 2007 11:49:41 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[Blog]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[K2]]></category> <category><![CDATA[Template]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/</guid> <description><![CDATA[Yesterday I&#8217;ve build a new K2 style based on the legacy Sapphire 1.0 WordPress theme by Michael Martine. This is the result of my love to the blue bend of Sapphire and the versatility of K2. As you can see &#8230; <a href="http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href='http://kevin.deldycke.com/wp-content/uploads/2007/03/k2-sapphire.png' title='Sapphire custom style for K2 WordPress Theme'><img src='http://kevin.deldycke.com/wp-content/uploads/2007/03/k2-sapphire.png' alt='Sapphire custom style for K2 WordPress Theme' /></a></p><p>Yesterday I&#8217;ve build a new <a href="http://getk2.com">K2</a> style based on <a href="http://www.michaelmartine.com/free-wordpress-themes/free-wordpress-theme-sapphire/">the legacy Sapphire 1.0 WordPress theme</a> by <a href="http://www.michaelmartine.com">Michael Martine</a>. This is the result of my love to the blue bend of Sapphire and the versatility of K2.</p><p>As you can see in the footer of that blog, I&#8217;m using my Sapphire 0.1 style right now. So if you like the look and feel of that blog, don&#8217;t ask yourself and <a href="http://kevin.deldycke.com/static/wordpress/wordpress-k2-style-sapphire-0.1.zip">download Sapphire 0.1 for for K2</a> !</p><p>To install it, unzip the archive to your <code>/wp-content/themes/k2/styles/</code> folder.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2007/03/sapphire-style-for-k2-wordpress-theme/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Blog Theme Update</title><link>http://kevin.deldycke.com/2006/08/blog-theme-update/</link> <comments>http://kevin.deldycke.com/2006/08/blog-theme-update/#comments</comments> <pubDate>Sun, 20 Aug 2006 15:10:26 +0000</pubDate> <dc:creator>Kev</dc:creator> <category><![CDATA[Blog]]></category> <category><![CDATA[K2]]></category> <category><![CDATA[Theme]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[WordPress]]></category><guid isPermaLink="false">http://kevin.deldycke.com/2006/08/20/blog-theme-update/</guid> <description><![CDATA[I&#8217;ve updated my blog theme from K2 svn flavour to latest 0.9 version. Please refresh your browser&#8217;s cache if you experience some layout problems.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve updated my blog theme from <a href="http://getk2.com">K2</a> svn flavour to <a href="http://getk2.com/2006/08/k2-09-release/">latest 0.9 version</a>. Please refresh your browser&#8217;s cache if you experience some layout problems.</p> ]]></content:encoded> <wfw:commentRss>http://kevin.deldycke.com/2006/08/blog-theme-update/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/22 queries in 0.011 seconds using apc
Object Caching 796/836 objects using apc

Served from: kevin.deldycke.com @ 2012-02-08 03:33:25 -->
