<?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>Notes, links and conversation &#187; IA</title>
	<atom:link href="http://pascal.vanhecke.info/category/informationarchitecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://pascal.vanhecke.info</link>
	<description></description>
	<lastBuildDate>Thu, 11 Aug 2011 14:38:56 +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>Create your own WordPress Information Widgets</title>
		<link>http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/</link>
		<comments>http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/#comments</comments>
		<pubDate>Tue, 14 Jun 2005 21:56:40 +0000</pubDate>
		<dc:creator>Pascal Van Hecke</dc:creator>
				<category><![CDATA[IA]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/</guid>
		<description><![CDATA[Adding structure within blog postings can go further than using H1, H2, H3 headings and blockquote tags&#8230; You can create and use your own &#8220;information widgets&#8221;. Here&#8217;s an example: the &#8220;info box&#8221;&#8230; WordPress Themes The WordPress theme system is a really powerful way to change and customize layout and navigation for your blog. You can [...]<div class="tantan-getcomments"><a href="http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/#comments"><img src="http://pascal.vanhecke.info/wp-content/plugins/tantan/get-comments.php?p=52" width="100" height="15" style="border:0;" /></a></div>]]></description>
			<content:encoded><![CDATA[<p>Adding structure within blog postings can go further than using H1, H2, H3 headings and blockquote tags&#8230;  You can create and use your own &#8220;information widgets&#8221;.  Here&#8217;s an example: the &#8220;info box&#8221;&#8230;<span id="more-52"></span></p>
<div class="infobox">
<div class="infoboxheader">WordPress Themes</div>
<div class="infoboxbody">The <a href="http://codex.wordpress.org/Using_Themes">WordPress theme</a> system is a really powerful way to change and customize layout and navigation for your blog.  You can <a href="http://www.alexking.org/index.php?content=software/wordpress/themes.php">download themes</a>, or <a href="http://codex.wordpress.org/Theme_Development">develop your own</a>.  </p>
<p>The first and most easy step in developing your own theme is  customizing the <a href="http://codex.wordpress.org/CSS">WordPress stylesheet</a>, but you can go and change the structure of your blog by rearranging <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a> in the <a href="http://codex.wordpress.org/The_Loop">WordPress Loop</a>.</div>
</div>
<p>An info box (<em>my definition, <a href="http://en.wikipedia.org/wiki/Information_architecture">Information Architects</a> probably have a better word for it&#8230; <a href="http://www.poorbuthappy.com/ease/">Peter</a>?</em>) contains some background info you want to add it as a side note, separate from the normal text flow.  You can achieve the effect in 2 steps:</p>
<h3 id="toc-define-containing-css-classes">Define containing css classes</h3>
<p>First we want to have a css class wrapping the box, sizing and positioning it on the right side in the blog text.<br />
Simply add this to the style.css file of your theme:</p>
<blockquote><p>
.entrytext .infobox<br />
{<br />
width: 200px;<br />
position: relative;<br />
float: right;<br />
padding: 0px;<br />
margin: 0px 0px 10px 10px;<br />
border: 1px solid #06c;<br />
}
</p></blockquote>
<p>Then define infobox header and body text:</p>
<blockquote><p>
.entrytext .infoboxbody<br />
{<br />
font-size: 0.75em;<br />
padding: 10px;<br />
line-height: 1.2em;<br />
}<br />
.entrytext .infoboxheader<br />
{<br />
color: #FFFFFF;<br />
font-weight: bold;<br />
text-align: center;<br />
line-height: 3em;<br />
background-color : #06c;<br />
}</p></blockquote>
<h3 id="toc-create-your-custom-quicktag">Create your custom &#8220;quicktag&#8221;</h3>
<p>Of course you do not want to write </p>
<blockquote><p>&lt;div class=&quot;infobox&quot;&gt;<br />
&lt;div class=&quot;infoboxheader&quot;&gt;Infobox Title&lt;/div&gt;<br />
&lt;div class=&quot;infoboxbody&quot;&gt;Infobox Body text&lt;/div&gt;<br />
&lt;/div&gt; </p></blockquote>
<p>every time manually.  In /wp-admin/quicktags.js you can copy-paste:</p>
<blockquote><p>
edButtons[edButtons.length] = new edButton(&#8216;infobox&#8217;<br />
,&#8217;IBox&#8217;<br />
,&#8217;&lt;div class=&quot;infobox&quot;&gt;&lt;div class=&quot;infoboxheader&quot;&gt;Infobox:<br />
Title&lt;/div&gt;&lt;div class=&quot;infoboxbody&quot;&gt;&lt;/div&gt;Infobox Body text&lt;/div&gt;&#8217;<br />
,&#8221;<br />
,&#8217;x&#8217;<br />
);
</p></blockquote>
<p>to get your own IBox button<br />
<img src='http://pascal.vanhecke.info/wp-content/upload_images/20050615_quicktags.png' alt='Customized quicktags in WordPress admin interface' /><br />
in between the similarly looking other definitions.  The 5th argument makes the &#8216;SHIFT+ALT+x&#8217; a shortcut key for inserting a dummy info box.  By the way: the extra &#8220;H3&#8243; button is the result of almost identical code: </p>
<blockquote><p>edButtons[edButtons.length] = new edButton(&#8216;heading_3&#8242;<br />
,&#8217;H3&#8242;<br />
,&#8217;&lt;H3&gt;&#8217;<br />
,&#8217;&lt;/H3&gt;&#8217;<br />
,&#8221;<br />
);</p></blockquote>
<p>the only difference being that with &lt;H3&gt; and &lt;/H3&gt; split over 2 arguments, the same button will open and afterwards close the tag, or wrap selected text within them immediately.</p>
<h3 id="toc-some-caution">Some caution</h3>
<p>Note that /wp-admin/quicktags.js is not included in your WordPress theme, and so can be overwritten when upgrading WordPress.  So don&#8217;t forget to document this somewhere you can refer back to when upgrading.  Hey&#8230; why not simply  <a href="http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/">blog it</a>?</p>
<h3 id="toc-update-june-15-feeds">Update June 15: feeds&#8230;</h3>
<p>Doesn&#8217;t seem to be a good idea if you include your entire posts in rss feeds: <a href="http://www.bloglines.com/preview?siteid=1506090">Bloglines preview</a>&#8230;  Including css in rss feeds (or rather, in the html of each and every individual post) is probably not really what rss is made for, and using tables or inline css makes the widget far less attractive&#8230;  Any ideas?</p>
<div class="tantan-getcomments"><a href="http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/#comments"><img src="http://pascal.vanhecke.info/wp-content/plugins/tantan/get-comments.php?p=52" width="100" height="15" style="border:0;" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://pascal.vanhecke.info/2005/06/14/create-your-own-wordpress-widgets/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

