<?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>Devolux 2010 &#187; WP Code</title>
	<atom:link href="http://devolux.nh2.me/category/wp-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://devolux.nh2.me</link>
	<description>WordPress resource</description>
	<lastBuildDate>Sat, 04 Sep 2010 09:24:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Transforming jQ index pages</title>
		<link>http://devolux.nh2.me/2009/10/jq-index-pages/</link>
		<comments>http://devolux.nh2.me/2009/10/jq-index-pages/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 18:13:57 +0000</pubDate>
		<dc:creator>Devolux</dc:creator>
				<category><![CDATA[WP Code]]></category>
		<category><![CDATA[WP Themes]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQ]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://devolux.org/?p=312</guid>
		<description><![CDATA[If you want to transform jQ in a way that only the post headings are displayed on index pages, there's a very easy method to achieve this. ]]></description>
			<content:encoded><![CDATA[<p>If you want to transform jQ in a way that only the post headings are displayed on index pages, there&#8217;s a very easy method to achieve this. The one thing you have to do is editing the file <em>theme.js</em> which is located in <em>/wp-content/themes/jQ/lib/js/</em>.</p>
<h3>Replace the code inside the file with the following:</h3>
<pre name="code" class="js">

$(document).ready(function(){

//Superfish menu
$(&quot;ul.sf-menu&quot;).supersubs().superfish(
{
delay:       1000,                            // one second delay on mouseout
animation:   {opacity:&#039;show&#039;},  // fade-in and slide-down animation
speed:       &#039;normal&#039;,                          // faster animation speed
autoArrows:  false,                           // disable generation of arrow mark-up
dropShadows: false                            // disable drop shadows
}
);

//Toggle functions
$(&quot;.excerpt&quot;).hide();
$(&quot;.hide-excerpt&quot;).click(function (event) {
event.preventDefault();
$(this).parents(&quot;.excerpt&quot;).hide(&quot;normal&quot;);
});

$(&quot;.view-excerpt&quot;).toggle(
function(){
$(this).parents(&quot;.headline&quot;).next(&quot;.excerpt&quot;).show(&quot;normal&quot;);
}, function() {
$(this).parents(&quot;.headline&quot;).next(&quot;.excerpt&quot;).hide(&quot;normal&quot;);
});

$(&quot;#toggle-all&quot;).toggle(
function(){
$(&quot;.excerpt&quot;).show(&#039;slow&#039;);
$(&quot;#toggle&quot;).attr(&quot;class&quot;,&quot;show-all&quot;);
}, function() {
$(&quot;.excerpt&quot;).hide(&#039;slow&#039;);
$(&quot;#toggle&quot;).attr(&quot;class&quot;,&quot;hide-all&quot;);
});
});
</pre>
<p>This hides all post content by default. It also switches the controls, so that you can show the post content properly by clicking, instead of hiding it when it is hidden anyway.</p>
<p>Now, there&#8217;s just one thing left to do. Go to your sidebar.php file. In <em>line 2</em> you will find the following:</p>
<pre name="code" class="php">

&lt;p id=&quot;toggle-all&quot;&gt;&lt;a href=&quot;#&quot; id=&quot;toggle&quot; class=&quot;hide-all&quot;&gt;Toggle posts&lt;/a&gt;&lt;/p&gt;
</pre>
<h3>Replace <em>line 2</em> with this:</h3>
<pre name="code" class="php">

&lt;p id=&quot;toggle-all&quot;&gt;&lt;a href=&quot;#&quot; id=&quot;toggle&quot; class=&quot;show-all&quot;&gt;Toggle posts&lt;/a&gt;&lt;/p&gt;
</pre>
<p>The new line will effect the image of the &#8220;toggle-all&#8221; link on top of the sidebar. Now you see &#8220;+&#8221; instead of &#8220;-&#8221; when loading the page. That&#8217;s it, the appearence of the theme should have changed. One further note: I consider it reasonable to offer the user at least some content of a web page directly. To show the content of the first post of your index (while of course keeping the others hidden), add this</p>
<pre name="code" class="js">

$(&quot;.excerpt:first&quot;).show();
</pre>
<p>to your theme.js, right after:</p>
<pre name="code" class="js">

$(&quot;.excerpt&quot;).hide();
</pre>
<p>Anything else to mention?</p>
]]></content:encoded>
			<wfw:commentRss>http://devolux.nh2.me/2009/10/jq-index-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP-Plugin: jQuery Font Scaling</title>
		<link>http://devolux.nh2.me/2009/08/fontresizer/</link>
		<comments>http://devolux.nh2.me/2009/08/fontresizer/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 16:38:37 +0000</pubDate>
		<dc:creator>Devolux</dc:creator>
				<category><![CDATA[WP Code]]></category>
		<category><![CDATA[WP Plugins]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://devolux.org/?p=266</guid>
		<description><![CDATA[The plugin is a jQuery supported fontscaling script that offers three links to change the font size of your WordPress web-log.]]></description>
			<content:encoded><![CDATA[<h2>Description</h2>
<p>The plug-in offers three links to change the font size of your blog. They can be inserted anywhere on your website by including a simple PHP-function (-&gt; <em>Installation</em>). These links change the font size value of the most outward html element of the page: the body element. All values of the elements inside the html body must therefore have relative font size values. Only text that you want not to change its font size at all must have an absolute value.</p>
<p>Here is an example for better understanding: The default font size value of the body element must be set to &#8220;10px&#8221; (-&gt; <em>Installation</em>). By clicking the &#8220;A+&#8221;-link this value will be set to &#8220;11px&#8221;. All elements with <em>relative</em> font size values like</p>
<pre name="code" class="css">

p {font-size: 100%;}
</pre>
<p>will then be automatically adjusted to the new top-level font size. In this case the font size of a &#8220;p&#8221;-element will switch from 10px (100% of 10px = 10px) to 11px (100% of 11px = 11px). Font size values of other elements will change likewise (a value of 120% will result in a new font size of 13.2px).<br />
<strong>Important: </strong>Relative font size values are calculated from the <em>direct</em> parent element. This means: An element B which has a 100% font size and which lays inside an element A that has a 120% font size will have the font size values of the element A (12px/13.2px), not the values calculated in proportion to the body element (10px/11px).</p>
<h2>Installation</h2>
<p>1. Upload the plug-in to the &#8220;/wp-content/plugins/&#8221; directory.</p>
<p>2. Activate the plug-in through the &#8220;Plug-ins&#8221; menu in WordPress.</p>
<p>3. Place &#8220;&lt;?php resize_links(); ?&gt;&#8221; in one of your templates to provide the scaling links on your website.</p>
<p>4. Go to your style.css file and assign a font size of 10px to the body element of your website: &#8220;body {font-size: 10px;}&#8221;.</p>
<p>5. This is the most <em>important</em> step: All other font size values in your style sheets must be <em>relative</em> values. Only elements with text that you want not to change its font size at all must have an absolute value.</p>
]]></content:encoded>
			<wfw:commentRss>http://devolux.nh2.me/2009/08/fontresizer/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Custom Text if no tags are available</title>
		<link>http://devolux.nh2.me/2009/04/custom-text-for-no-tags/</link>
		<comments>http://devolux.nh2.me/2009/04/custom-text-for-no-tags/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 19:21:57 +0000</pubDate>
		<dc:creator>Devolux</dc:creator>
				<category><![CDATA[WP Code]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://devolux.org/?p=188</guid>
		<description><![CDATA[I have just worked out a way to dislpay a custom piece of text for a wordpress post which has no tags assigned to it.]]></description>
			<content:encoded><![CDATA[<p>Just insert the following code to one of your WP templates:</p>
<pre name="code" class="php">

&lt;?php
$tag = get_the_tags();
if (! $tag)
{
echo &quot;No tags&quot;;
}
else
{
the_tags(&#039;Tags: &#039;, &#039;, &#039;, &#039;&#039;);
}
?&gt;
</pre>
<p>This prints &#8220;No tags&#8221; where ever you want it.</p>
]]></content:encoded>
			<wfw:commentRss>http://devolux.nh2.me/2009/04/custom-text-for-no-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

