<?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>Paragraphe.org</title>
	<atom:link href="http://paragraphe.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://paragraphe.org</link>
	<description></description>
	<lastBuildDate>Sun, 23 Jan 2011 20:05:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Scroll Page with jQuery</title>
		<link>http://paragraphe.org/2011/01/23/scroll-page-with-jquery/</link>
		<comments>http://paragraphe.org/2011/01/23/scroll-page-with-jquery/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 20:04:27 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=971</guid>
		<description><![CDATA[Here&#8217;s a simple method to scroll smoothly across a page, with the jQuery library. Thanks to Oncemade.com $('.scrollPage').click(function() { var elementClicked = $(this).attr("href"); var destination = $(elementClicked).offset().top; $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 ); return false; });]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple method to scroll smoothly across a page, with the jQuery library. Thanks to <a href="http://oncemade.com/animated-page-scroll-with-jquery/">Oncemade.com</a></p>
<pre>
$('.scrollPage').click(function() {
   var elementClicked = $(this).attr("href");
   var destination = $(elementClicked).offset().top;
   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
   return false;
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2011/01/23/scroll-page-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Waiting for the bus: should I walk?</title>
		<link>http://paragraphe.org/2011/01/16/waiting-for-the-bus-should-i-walk/</link>
		<comments>http://paragraphe.org/2011/01/16/waiting-for-the-bus-should-i-walk/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 23:40:34 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[bus]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[new york times]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[waiting]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=968</guid>
		<description><![CDATA[Now, this is delicious. Bus-Wait Formula, The By CLIVE THOMPSON You arrive at the bus stop to catch the ride to work, but the bus isn’t there. Your destination isn’t very far, so you think, Hmm, maybe I should just walk. But then you might find yourself halfway between stops when the bus whips past, [...]]]></description>
			<content:encoded><![CDATA[<p>Now, this is delicious.</p>
<p>Bus-Wait Formula, The<br />
By CLIVE THOMPSON</p>
<p>You arrive at the bus stop to catch the ride to work, but the bus isn’t there. Your destination isn’t very far, so you think, Hmm, maybe I should just walk. But then you might find yourself halfway between stops when the bus whips past, which would be deeply annoying. What to do? Should you walk or should you wait?</p>
<p>This question has plagued commuters for years, but this year three undergraduate students at Harvard and Cal Tech decided to resolve it. “We were sick of sitting at a bus stop, not seeing the bus and torturing ourselves over whether we should start walking,” says Scott Kominers, a Harvard student studying math, economics and ethnomusicology. So Kominers and his co-authors, Justin Chen and Robert Sinnott, drew up the problem as a classic game‑theory dilemma, began crunching the numbers and, three pages later, had their answer: You should probably wait — and whatever you do, don’t second-guess yourself.</p>
<p>Buses, after all, are usually punctual and move much faster than you. If you start walking and catch the bus halfway through your journey, you might consider yourself fortunate — but even then you won’t have gotten to your destination any faster. What’s more, Kominers — like a good economist — points out that</p>
<p>waiting allows you to “optimize” your time, because you could get some work done while hanging out at the bus stop. There’s also a practical problem with walking, because people who decide to walk usually pause at each stop to see if a bus is coming, which drags their journey out. “You think you’re not slowing down if you stop, but you’re adding a bunch of time each time,” Kominers adds.</p>
<p>Mind you, their equation breaks down in extreme cases. If your journey is relatively short — less than a mile — and you suspect the next bus is half an hour away, they calculate that you should walk. (Though you should walk decisively, without dallying at each stop along the way.) But since most trips involve more-punctual buses and longer journeys, waiting is, far more frequently, the winning strategy. Or as Kominers concludes with some delight, “Laziness almost always works.”</p>
<p>&#8212;</p>
<p>The article is from a <a href="http://www.nytimes.com/interactive/2008/12/14/magazine/2008_IDEAS.html#b-ideas-5">special issue in the New York Times: Year in Ideas 2008</a> <img src='http://paragraphe.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2011/01/16/waiting-for-the-bus-should-i-walk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Admin screen won&#8217;t load with Firebug</title>
		<link>http://paragraphe.org/2010/01/15/wordpress-admin-screen-wont-load-with-firebug/</link>
		<comments>http://paragraphe.org/2010/01/15/wordpress-admin-screen-wont-load-with-firebug/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 09:50:36 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=455</guid>
		<description><![CDATA[I run today onto a problem in one of the sites I&#8217;m managing. Using WordPress 2.8.5 and Firefox with Firebug activated, the Admin screen was loading forever, with only the background color displayed. The html source code was there, but something seemed to avoid the final display. Deactivating Firebug did solve the problem. More details [...]]]></description>
			<content:encoded><![CDATA[<p>I run today onto a problem in one of the sites I&#8217;m managing.<br />
Using WordPress 2.8.5 and Firefox with <a href="http://getfirebug.com/">Firebug</a> activated, the Admin screen was loading forever, with only the background color displayed. The html source code was there, but something seemed to avoid the final display.</p>
<p>Deactivating Firebug did solve the problem.</p>
<p><a href="http://code.google.com/p/fbug/issues/detail?id=1277">More details in this post in Google.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2010/01/15/wordpress-admin-screen-wont-load-with-firebug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In category template, get a post per child categories of queried category</title>
		<link>http://paragraphe.org/2009/12/08/in-category-template-get-a-post-per-child-categories-of-queried-category/</link>
		<comments>http://paragraphe.org/2009/12/08/in-category-template-get-a-post-per-child-categories-of-queried-category/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 10:26:36 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[subcategories]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=439</guid>
		<description><![CDATA[&#60;?php // in category template, get child categories of queried category and if there are child cats, get one post for each child if ( is_category() ) { $categories = get_categories('child_of='.get_query_var('cat')); if ( $categories ) { foreach($categories as $category) { $posts=get_posts('showposts=1&#38;cat='. $category-&#62;term_id); if ($posts) { echo 'Category: &#60;a href=&#34;' . get_category_link( $category-&#62;term_id ) . '&#34; [...]]]></description>
			<content:encoded><![CDATA[<pre><code>&lt;?php
// in category template, get child categories of queried category and if there are child cats, get one post for each child
if ( is_category() ) {
$categories = get_categories('child_of='.get_query_var('cat'));
if ( $categories ) {
foreach($categories as $category) {
$posts=get_posts('showposts=1&amp;cat='. $category-&gt;term_id);
if ($posts) {
echo 'Category: &lt;a href=&quot;' . get_category_link( $category-&gt;term_id ) . '&quot; title=&quot;' . sprintf( __( &quot;View all posts in %s&quot; ), $category-&gt;name ) . '&quot; ' . '&gt;' . $category-&gt;name.'&lt;/a&gt;
';
foreach($posts as $post) {
setup_postdata($post); ?&gt;
&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;

&lt;?php
} // foreach($posts
} // if ($posts
} // foreach($categories
} // if (categories
} // if (is_category
?&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/12/08/in-category-template-get-a-post-per-child-categories-of-queried-category/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checking the user&#8217;s browser language, and serving the adecuated template, with PHP (WordPress)</title>
		<link>http://paragraphe.org/2009/11/19/checking-the-users-browser-language-and-serving-the-adecuated-template-with-php-wordpress/</link>
		<comments>http://paragraphe.org/2009/11/19/checking-the-users-browser-language-and-serving-the-adecuated-template-with-php-wordpress/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 16:22:20 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Choose Language]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=402</guid>
		<description><![CDATA[I&#8217;ve been recently working in a project where it was necessary to check the language in which the user&#8217;s browser was set up to be. With the next code, we will check if it&#8217;s german (serving a german template), or spanish (serving a spanish template), or other (serving an english template). This would be inserted [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been recently working in a project where it was necessary to check the language in which the user&#8217;s browser was set up to be.</p>
<p>With the next code, we will check if it&#8217;s german (serving a german template), or spanish (serving a spanish template), or other (serving an english template). This would be inserted in header.php, and would concern only the Homepage, so later the user could choose, via a button, another &#8220;Home&#8221; custom template focused in one language or the other :</p>
<pre>
<code>
&lt;?php if (is_home()) { ?&gt;
&lt;?php

	if(preg_match('/de-DE/i', $_SERVER['HTTP_ACCEPT_LANGUAGE']))
		include( TEMPLATEPATH . '/german-navbar.php' );

	elseif(preg_match('/de/i', $_SERVER['HTTP_ACCEPT_LANGUAGE']))
		include( TEMPLATEPATH . '/german-navbar.php' );

	elseif(preg_match('/es-ES/i', $_SERVER['HTTP_ACCEPT_LANGUAGE']))
		include( TEMPLATEPATH . '/spanish-navbar.php' );

	elseif(preg_match('/es/i', $_SERVER['HTTP_ACCEPT_LANGUAGE']))
		include( TEMPLATEPATH . '/spanish-navbar.php' );

	else
		include( TEMPLATEPATH . '/english-navbar.php' );
?&gt;
&lt;?php } ?&gt;
</code>
</pre>
<p>The HTTP codes for german is <code>de-DE</code>, or simply <code>de</code>, and for spanish <code>es-ES</code>, or simply <code>es</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/11/19/checking-the-users-browser-language-and-serving-the-adecuated-template-with-php-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create a Sliding Panel with javascript</title>
		<link>http://paragraphe.org/2009/11/11/how-to-create-a-sliding-panel-with-javascript/</link>
		<comments>http://paragraphe.org/2009/11/11/how-to-create-a-sliding-panel-with-javascript/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 21:30:21 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Sliding Panels]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=364</guid>
		<description><![CDATA[Here&#8217;s a quick way to create a sliding panel, menu-driven, with pure javascript (easiest than many jQuery plugins). I write it here in the Blog to find it easily in the future, is an script offered by Adobe. Complete article here. DEMO DOWNLOAD Files to include in the head : SprySlidingPanels.css SprySlidingPanels.js Necessary customitzation of [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick way to create a sliding panel, menu-driven, with pure javascript (easiest than many jQuery plugins). I write it here in the Blog to find it easily in the future, is an script offered by <a href="http://labs.adobe.com/technologies/spry/samples/slidingpanels/SlidingPanelsSample.html#HorizontalSliding">Adobe</a>. Complete article <a href="http://www.adobe.com/devnet/dreamweaver/articles/sliding_panel.html">here</a>.</p>
<p><a href="http://paragraphe.org/slidingpanels/">DEMO</a><br />
<a href="http://paragraphe.org/slidingpanels/slidingpanels.zip">DOWNLOAD</a></p>
<p>Files to include in the head :</p>
<p><code>SprySlidingPanels.css</code><br />
<code>SprySlidingPanels.js</code></p>
<p>Necessary customitzation of the boxes in your main CSS file :</p>
<pre>
<code>
.SlidingPanels {
	width:575px;
	height:400px;
	float: left;
	border: 1px dashed #000;
}

.SlidingPanelsContentGroup {
	float: left;
	width: 10000px;
}

.SlidingPanelsContent {
	width:575px;
	height:400px;
	float: left;
	background:#eee;
	border-right:3px dotted #999
}
</code>
</pre>
<p>Basic HTML and javascript :</p>
<pre>
<code>
&lt;div id=&quot;navigation&quot;&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot; onclick=&quot;sp2.showPanel(0); return false;&quot;&gt;Some Heading 1&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot; onclick=&quot;sp2.showPanel(1); return false;&quot;&gt;Some Heading 2&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot; onclick=&quot;sp2.showPanel(2); return false;&quot;&gt;Some Heading 3&lt;/a&gt;
	&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot; onclick=&quot;sp2.showPanel(3); return false;&quot;&gt;Some Heading 4&lt;/a&gt;
	&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&quot;maindiv&quot;&gt;
	&lt;div id=&quot;example&quot; class=&quot;SlidingPanels&quot; tabindex=&quot;0&quot;&gt;
		&lt;div class=&quot;SlidingPanelsContentGroup&quot;&gt;
			&lt;div id=&quot;ex2_p1&quot; class=&quot;SlidingPanelsContent p1&quot;&gt;
				&lt;h3&gt;Some Heading 1&lt;/h3&gt;
				&lt;p&gt;many text here many text here&lt;/p&gt;
			&lt;/div&gt;
			&lt;div id=&quot;ex2_p2&quot; class=&quot;SlidingPanelsContent p2&quot;&gt;
				&lt;h3&gt;Some Heading 2&lt;/h3&gt;
				&lt;p&gt;many text here many text here&lt;/p&gt;
			&lt;/div&gt;
			&lt;div id=&quot;ex2_p3&quot; class=&quot;SlidingPanelsContent p3&quot;&gt;
				&lt;h3&gt;Some Heading 3&lt;/h3&gt;
				&lt;p&gt;many text here many text here&lt;/p&gt;
			&lt;/div&gt;
			&lt;div id=&quot;ex2_p4&quot; class=&quot;SlidingPanelsContent p4&quot;&gt;
				&lt;h3&gt;Some Heading 4&lt;/h3&gt;
				&lt;p&gt;many text here many text here&lt;/p&gt;
			&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
var sp2 = new Spry.Widget.SlidingPanels('example');
&lt;/script&gt;
</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/11/11/how-to-create-a-sliding-panel-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial : using sIFR with WordPress</title>
		<link>http://paragraphe.org/2009/11/09/tutorial-using-sifr-with-wordpress/</link>
		<comments>http://paragraphe.org/2009/11/09/tutorial-using-sifr-with-wordpress/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 16:26:53 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[sIFR]]></category>
		<category><![CDATA[Typography]]></category>
		<category><![CDATA[Web Fonts]]></category>
		<category><![CDATA[Webdesign]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=313</guid>
		<description><![CDATA[If you are into web design, it&#8217;s almost sure you have asked yourself : how does guys do to deliver that nice typographies in their designs? As you might know, the simple reason behind this limitation, is that our browsers are not still ready to deliver a font unless it is installed in the user&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>If you are into web design, it&#8217;s almost sure you have asked yourself : <a href="http://www.noded.biz/">how does guys do to deliver that nice typographies in their designs</a>?</p>
<p>As you might know, the simple reason behind this limitation, is that our browsers are not still ready to deliver a font unless it is installed in the user&#8217;s computer.</p>
<p>That way, a font like Helvetica, which could eventually get out of the common spectrum of fonts a user has, would not apply in our design, giving room to the unmediated alternative we just set up in our stylesheet :</p>
<pre>
<code>body{
font-family: Helvetica, Arial, Verdana, sans-serif;
}
</code>
</pre>
<p>Is this just a technical problem ? Not only : if <a href="http://www.css3.info/">in the new standart version of CSS, the CSS3</a>, we can <a href="http://www.zeldman.com/2009/08/17/web-fonts-and-standards/">link to a file from the stylesheet and deliver a specific font</a> regardless of the user computer set up, the Foundries are, as it is reasonable, <a href="http://www.zeldman.com/2009/05/23/web-fonts-now-how-were-doing-with-that/">restricting the free spread to their work</a>.</p>
<p>Things being that, when the main browsers support the CSS3 standarts, so the <code>@font-face</code> property (<a href="http://www.css3.info/category/browsers/">Safari does, Firefox and Opera I think they&#8217;re working in it&#8230;</a>), we will have to hope that our font of choice is freely usable as a linked file (<a href="http://www.fontsquirrel.com/fontface">many nice, popular fonts will be</a>).</p>
<h3>sIFR to the rescue</h3>
<p>To get around this, and start TODAY to deliver nice fonts, there&#8217;s a well tested, popular solution. Some argue it&#8217;s a pain to install, slow to load, with some accessibility issues (it relies on Flash), but I&#8217;ve been always (as well as my clients), very satisfied with it.</p>
<p>In this tutorial, we&#8217;ll show how to install <a href="http://wiki.novemberborn.net/sifr/What+is+sIFR">sIFR</a> into a WordPress driven web-site, to enjoy <a href="http://www.idsgn.org/posts/finding-images-in-reverse/">the typography we want</a>, inside the legal context that the font designers ask to be warranted.</p>
<p>As you might know, sIFR replace some HTML tags, like headings (h1, h2, h3&#8230;), with little Flash movies, a technology able to renderize any font we want, and that, legally, because we are delivering a video of only lecture produced by a font we purchased, and not and exploitable file &#8211; so, we are safe to do that, like we are safe to do the same using images instead of text when we want a special logo with custom typography.</p>
<p>As a sidenote, is good to know that a little percentage of users will have no Flash in their browser (which can be disabled, or don&#8217;t have it at all). In that case, sIFR will not process itself, and the text will show with the default CSS style we gave to our basic text (so appearing in Georgia, Arial, whatever).</p>
<p>The magic code we must use was written by <a href="http://twitter.com/patdryburgh">Pat Dryburgh</a>, a cool webdesigner from Canada who published the idea in his Blog.</p>
<p>To install sIFR, we first must download it from <a href="http://dev.novemberborn.net/sifr3/nightlies/">their repository, here</a>. We&#8217;ll download the first file in the list, so the last version.</p>
<p>Once in our Desktop, we are going to decompress it, and delete the demo and the changelog, that we&#8217;ll not use at all.</p>
<p>We&#8217;ll enter then into the &#8220;flash&#8221; folder, and we&#8217;ll open sifr.fla.</p>
<p>(If we don&#8217;t have the software, we can always <a href="http://www.sifrgenerator.com/">go to sIFR Generator</a>, upload a font of our own, and receive their version as .swf, which is all we need.)</p>
<p>We&#8217;ll click then in the white square, we&#8217;ll select the text, and, we&#8217;ll format it with the font of our choice, from a drop down menu.</p>
<p>If we&#8217;d like to add some special caracter (special signs in asian, european, etc languages) now it&#8217;s the moment : a function down in the right side will allow it for us.</p>
<p>We&#8217;ll nox export that file as it is. <code>File -> Export -> Export Movie</code>.</p>
<p>We&#8217;ll use the default parameters that Flash ask us to specify, and we&#8217;ll save the file in our Desktop, with the font&#8217;s name, for example rockwell.</p>
<p>We go now there to retake the file, and move it onto the sifr &#8220;flash&#8221; folder.</p>
<p>Then we open the &#8220;js&#8221; folder, select sifr-config.js, and we&#8217;ll edit it with our <a href="http://notepad-plus.sourceforge.net/">Text Editor of choice</a>.</p>
<p>We will select all of this content and &#8230; we&#8217;ll delete it.</p>
<h3>Pasting our particular sifr-config.js</h3>
<p>Now we&#8217;ll have to use the font name we decided for our .swf file, in our example rockwell.swf, so we will paste that :</p>
<pre>
<code>
sIFR.activate(rockwell);

sIFR.replace(rockwell, {
      selector: 'h1',
     css: [
        '.sIFR-root { color:#000000; font-size: 3em; }',
        'a {color: #000000; text-decoration: none;}',
        'a:hover {color: #555555;}'
        ]
});

sIFR.replace(rockwell, {
      selector: 'h2',
     css: [
        '.sIFR-root { color:#000000; font-size: 2em; background-color:#F9F9F9 }',
        'a {color: #000000; text-decoration: none;}',
        'a:hover {color: #555555;}'
        ]
});

sIFR.replace(rockwell, {
      selector: 'h3',
     css: [
        '.sIFR-root { color:#000000; font-size: 1.5em; background-color:#F9F9F9 }',
        'a {color: #000000; text-decoration: none;}',
        'a:hover {color: #555555;}'
        ]
});

sIFR.replace(rockwell, {
      selector: 'h4',
     css: [
        '.sIFR-root { color:#000000; font-size: 1.2em;  background-color:#F9F9F9  }',
        'a {color: #000000; text-decoration: none;}',
        'a:hover {color: #555555;}'
        ]
});

sIFR.replace(rockwell, {
      selector: 'h5',
     css: [
        '.sIFR-root { color:#000000; font-size: 1em; background-color:#F9F9F9  }',
        'a {color: #000000; text-decoration: none;}',
        'a:hover {color: #333333;}'
        ]
});

sIFR.replace(rockwell, {
      selector: 'h6',
     css: [
        '.sIFR-root { color:#000000; font-size: 18px; background-color:#F9F9F9  }',
        'a {color: #000000; text-decoration: none;}',
        'a:hover {color: #555555;}'
        ]
});
</code>
</pre>
<p>Save and close. Remember here you must include your font&#8217;s name, Rockwell is just an example.</p>
<p>We&#8217;ll go now to rename the whole sIFR folder, to, obviously, &#8220;sifr&#8221;, because normally it will come with the version number, etc. We will place it so in our theme&#8217;s folder, next to the images folder.</p>
<p>Now, we have 3 sub-folders inside &#8220;sifr&#8221; :</p>
<ol>
<li>in &#8220;flash&#8221;, we have added a .swf file with our chosen font in it.</li>
<li>in &#8220;js&#8221;, we have modified one of the files with a fresh-pasted code.</li>
<li>in &#8220;css&#8221;&#8230; we are going to open it, and edit sifr-screen.css</li>
</ol>
<p>We&#8217;ll go directly at the end of the file, then we&#8217;ll add the following :</p>
<pre>
<code>
.sIFR-active h1 {
  visibility:hidden;
  }

.sIFR-active h2 {
  visibility:hidden;
  }

.sIFR-active h3 {
  visibility:hidden;
	}

.sIFR-active h4 {
  visibility:hidden;
	}

.sIFR-active h5 {
  visibility:hidden;
	}

.sIFR-active h6 {
  visibility:hidden;
	}
</code>
</pre>
<p>That code will be nice to hide the replaced text while sIFR is processing the replacement, and that otherwise would show up for a second.</p>
<h3>Last Step</h3>
<p>We are going to create a file, and name it functions.php, and fill it with this code :</p>
<pre>
<code>
//sIFR

function sifr_scripts() {
global $siteurl;
if (empty($siteurl)) $siteurl = get_settings('siteurl');
$sifrurl = $siteurl.'/'.'wp-content/themes/THEMESFOLDERNAME/sifr/';

echo '&lt;!-- start sifr scripts --&gt;

&lt;link rel=&quot;stylesheet&quot; href=&quot;'.$sifrurl.'css/sIFR-screen.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;'.$sifrurl.'css/sIFR-print.css&quot; type=&quot;text/css&quot; media=&quot;print&quot;&gt;

&lt;script src=&quot;'.$sifrurl.'js/sifr.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var FONTNAME = { src: &quot;'.$sifrurl.'flash/FONTNAME.swf&quot; };
&lt;/script&gt;
&lt;script src=&quot;'.$sifrurl.'js/sifr-config.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;!-- sifr scripts --&gt;

' ;

}

add_action('wp_head', 'sifr_scripts');

?&gt;
</code>
</pre>
<p>Once pasted, we&#8217;ll replace three elements :</p>
<ul>
<li>THEMESFOLDERNAME</li>
<li>FONTNAME</li>
<li>FONTNAME (a second time)</li>
</ul>
<p>Save and close !</p>
<p>The most part of WordPress themes have, in header.php, a hook to insert code from our plugins. Is the following :</p>
<pre>
<code>
&lt;?php wp_head(); ?&gt;
</code>
</pre>
<p>We&#8217;ll make sure we have it as well, just before the closing <code>head</code> tag.</p>
<p>Now, we should go to see our Blog, and hope all worked nicely !</p>
<p><em>To change the colors, we&#8217;ll have to modify with hexadecimal values the sifr-config.js colors (I used some grey and black colors here).<br />
</em></p>
<p>Remember as well, if you want to replace paragraphs (&#8216;p&#8217; tags), you must hide them :</p>
<p><code><br />
.sIFR-active h6 {<br />
  visibility:hidden;<br />
	}<br />
</code></p>
<p>And, for sure, keep in mind that replacing large amounts of text is very energy consuming and very slow. sIFR works at its best replacing only headings.</p>
<p>We have some <a href="http://wordpress.org/extend/plugins/wp-sifr/">very nice plugins in WordPress</a> to automatize this process, but if you were curious abou what every file does, here you have it.</p>
<p>Hope you enjoy a nice typo.</p>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/11/09/tutorial-using-sifr-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Pages as Modules in WordPress : how to pull a page by name</title>
		<link>http://paragraphe.org/2009/11/09/using-pages-as-modules-in-wordpress-how-to-pull-a-page-by-name/</link>
		<comments>http://paragraphe.org/2009/11/09/using-pages-as-modules-in-wordpress-how-to-pull-a-page-by-name/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 14:38:15 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[custom loop]]></category>
		<category><![CDATA[get_posts]]></category>
		<category><![CDATA[Home Page]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[lay out]]></category>
		<category><![CDATA[modules]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=300</guid>
		<description><![CDATA[Sometimes you want your client can edit some &#8220;presentation paragraphs&#8221; in the Home of the website you are building. Those paragraphs, that in most CMS are called &#8216;modules&#8217;, have usually a static text, that rarely changes. But, as the business / website grows, sooner or later you&#8217;ll be changing little snippets of information, and the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want your client can edit some &#8220;presentation paragraphs&#8221; in the Home of the website you are building.</p>
<p>Those paragraphs, that in most CMS are called &#8216;modules&#8217;, have usually a static text, that rarely changes.</p>
<p>But, as the business / website grows, sooner or later you&#8217;ll be changing little snippets of information, and the best is to prevent that, and offer to the client an easy way to edit that &#8216;almost decoratif&#8217; snippets of text (rather that hardcode it, then editing it).</p>
<p>In WordPress, we can have that via the WordPress pages : they are easily accessible from the Administration (while a post get lost in the deep), and they are quite versatile to use as Modules (a concept that, again, most CMS have, and WordPress does not &#8211; still).</p>
<p>Here&#8217;s a quick trick to pull a WordPress Page by its slug name (foundable and editable in the Admin screen), then print it somewhere in your template &#8211; say, Index.php.</p>
<p>Drop this into <code>functions.php</code>, create the file if you don&#8217;t have it :</p>
<pre><code>
&lt;?php

function wt_get_ID_by_page_name($page_name)
{
	global $wpdb;
	$page_name_id = $wpdb-&gt;get_var("SELECT ID FROM $wpdb-&gt;posts WHERE post_name = '".$page_name."'");
	return $page_name_id;
}

?&gt;
</code></pre>
<p>Then, paste this in the place you want to show up that &#8216;Module&#8217; :</p>
<pre><code>&lt;?php
$posts = get_posts('include='.wt_get_ID_by_page_name('your-page-name').'&amp;post_type=page');
foreach($posts as $post):
setup_postdata($post);
?&gt;

&lt;?php the_title(); ?&gt;
&lt;?php the_content(); ?&gt;

&lt;?php endforeach; ?&gt;</code></pre>
<p>Is a classical <code>get_posts</code> loop, a custom way to call a specific content from the database.<br />
You have to replace <code>your-page-name</code> by the slug that the concerned page will have (usually, is the same as it&#8217;s normal title, but &#8220;dashed&#8221;, like <code>about-my-business</code>, or <code>about-me</code>.</p>
<p>I took this nice code from <a href="http://www.web-templates.nu/2008/09/02/get-id-by-page-name/">Web Templates.nu</a>.</p>
<p>Thanks for reading !</p>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/11/09/using-pages-as-modules-in-wordpress-how-to-pull-a-page-by-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to paste code examples in your website</title>
		<link>http://paragraphe.org/2009/10/13/how-to-paste-code-examples-in-your-website/</link>
		<comments>http://paragraphe.org/2009/10/13/how-to-paste-code-examples-in-your-website/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 15:11:45 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Convert]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML Entities]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=92</guid>
		<description><![CDATA[If we ever try to make posts about webdesign or webdevelopment, and we need to show out a snippet of code, we will be forced to write it in a special manner, in order the browser doesn&#8217;t interpret it as code to execute, but as code to show as is. That way, if I ever [...]]]></description>
			<content:encoded><![CDATA[<p>If we ever try to make posts about webdesign or webdevelopment, and we need to <strong>show out a snippet of code</strong>, we will be forced to write it in a special manner, in order the browser doesn&#8217;t interpret it as code to execute, but as code to show as is.</p>
<p>That way, if I ever want to talk about the WordPress function <code>the_content</code>, so it get printed like these &#8230; : </p>
<pre>
&lt;?php the_content ?&gt;
</pre>
<p>&#8230; I must <em>write it</em> that way :</p>
<pre>
&amp;lt;?php the_content ?&amp;gt;
</pre>
<p>(between, in order to display the last, I have to do it again not directly because it would show the first thing, but with a second <em>&#8220;meta-language&#8221; &#8211; which unique use is put such an example !</em> ).</p>
<p>Those are the most common caracters entities to preserve a code to be executed, so it just shows away :</p>
<pre>
&lt; = &amp;lt;
&gt; = &amp;gt;
/ = &amp;#47;
] = &amp;#93;
[ = &amp;#91;
&quot; = &amp;#34;
' = &amp;#39;
</pre>
<p>As we should that way be aware of a bunch of HTML caracter entities, <a href="http://www.spacefem.com/tutorials/makecode.php">the easier is go here and convert our code</a> to <em>showable</em> code.</p>
<p>This page runs a little script that will convert any code you put in in inoffensive code to show in your posts.</p>
<p>If you work with WordPress, you&#8217;ll find <a href="http://www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/">excellent plugins that will do the job</a> for you. I realized however that the quickest way for me was bookmarking <a href="http://www.spacefem.com/tutorials/makecode.php">Spacefem.com</a> !</p>
<p>Edit : another online-tool is http://centricle.com/tools/html-entities/</p>
<blockquote><p>note : if some of you knows some website which explains in detail why all this happen, I shall thank you to share it, as I found difficult to find a complete explanation of all this !</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/10/13/how-to-paste-code-examples-in-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to animate dynamically a Menu in WordPress</title>
		<link>http://paragraphe.org/2009/10/13/how-to-animate-dynamically-a-menu-in-wordpress/</link>
		<comments>http://paragraphe.org/2009/10/13/how-to-animate-dynamically-a-menu-in-wordpress/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:14:27 +0000</pubDate>
		<dc:creator>Ignacio</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Working (design and development)]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Menus]]></category>
		<category><![CDATA[Micro-Tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://paragraphe.org/?p=89</guid>
		<description><![CDATA[If you ever wanted to style the menu item corresponing to the current visited page within WordPress, here there&#8217;s an easy way to do it. First, we&#8217;ll imagine a simple menu &#60;ul&#62; &#60;li class=&#34;&#60;?php if ( is_home() ) { echo &#34; current&#34;; } ?&#62;&#34;&#62;Home &#60;/li&#62; &#60;li class=&#34;&#60;?php if (is_page('About')) { echo &#34; current&#34;; } ?&#62;&#34;&#62;About [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever wanted to style the menu item corresponing to the current visited page within WordPress, here there&#8217;s an easy way to do it.</p>
<p>First, we&#8217;ll imagine a simple menu</p>
<pre>
&lt;ul&gt;
	&lt;li class=&quot;&lt;?php if ( is_home() ) { echo &quot; current&quot;; } ?&gt;&quot;&gt;Home
	&lt;/li&gt;
	&lt;li class=&quot;&lt;?php if (is_page('About')) { echo &quot; current&quot;; } ?&gt;&quot;&gt;About
	&lt;/li&gt;
	&lt;li class=&quot;&lt;?php if (is_page('About')) { echo &quot; current&quot;; } ?&gt;&quot;&gt;Contact
	&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>And then :</p>
<pre>
.current{
	background-color: #EEE;
	text-decoration:underline;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://paragraphe.org/2009/10/13/how-to-animate-dynamically-a-menu-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

