<?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>Blogbonzo: Matteo Magni &#187; wordpress</title>
	<atom:link href="http://blog.ilbonzo.org/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ilbonzo.org</link>
	<description>Consulente Informatico, Web Developer &#38; System Administrator</description>
	<lastBuildDate>Wed, 09 Dec 2009 13:07:18 +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>Plugin shadowbox per wordpress</title>
		<link>http://blog.ilbonzo.org/2008/01/31/plugin-shadowbox-per-wordpress/</link>
		<comments>http://blog.ilbonzo.org/2008/01/31/plugin-shadowbox-per-wordpress/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 07:55:22 +0000</pubDate>
		<dc:creator>Bonzo</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2008/01/31/plugin-shadowbox-per-wordpress/</guid>
		<description><![CDATA[Ho letto di questo componente Shadowbox che è una specie di Lightbox, slimbox che consente di inserire molti tipi di contenuti: non solo foto ma video da youtube, animazioni flash, pagine html, ecc..    
Ho quindi pensato di provare a creare il mio primo plugin per wordpress integrando questo componente.
Qui intanto gli esempi [...]]]></description>
			<content:encoded><![CDATA[<p>Ho letto di questo componente <a href="http://mjijackson.com/shadowbox/">Shadowbox</a> che è una specie di Lightbox, slimbox che consente di inserire molti tipi di contenuti: non solo foto ma video da youtube, animazioni flash, pagine html, ecc..    </p>
<p>Ho quindi pensato di provare a creare il mio primo plugin per wordpress integrando questo componente.</p>
<p>Qui intanto gli esempi di come funziona Shadowbox:</p>
<h2><a name="demos">Demos</a></h2>
<h3>Images</h3>
<p>
        <a rel="shadowbox" href="http://farm2.static.flickr.com/1177/1150569783_61dbc56834.jpg" class="option">Single Image (Flickr)</a><br />
        <a rel="shadowbox[Aston Martin]" href="http://blog.ilbonzo.org/gallery/aston_martin/vantage.jpg" class="option" title="Aston Martin Vantage">Image Gallery</a></p>
<p>        <a rel="shadowbox[Aston Martin]" href="http://blog.ilbonzo.org/gallery/aston_martin/vanquish.jpg" class="hidden" title="Aston Martin Vanquish S">image</a><br />
        <a rel="shadowbox[Aston Martin]" href="http://blog.ilbonzo.org/gallery/aston_martin/db9.jpg" class="hidden" title="Aston Martin DB9">image</a>
    </p>
<h3><a name="lgimage-demo">Large Image</a></h3>
<p>You may have to shrink your browser window to view the effect here. See the <a href="#handlelgimages">handleLgImages</a> option for more information.</p>
<table class="thumbs" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Clipped (no resizing)</td>
<td>Resized</td>
<td>Draggable</td>
</tr>
<tr>
<td><a rel="shadowbox;options={handleLgImages:'none'}" href="http://blog.ilbonzo.org/gallery/greatwall.jpg" title="Great Wall of China"><img src="http://blog.ilbonzo.org/gallery/greatwall-thumb.jpg" alt=""></a></td>
<td><a rel="shadowbox" href="http://blog.ilbonzo.org/gallery/greatwall.jpg" title="Great Wall of China"><img src="http://blog.ilbonzo.org/gallery/greatwall-thumb.jpg" alt=""></a></td>
<td><a rel="shadowbox;options={handleLgImages:'drag'}" href="http://blog.ilbonzo.org/gallery/greatwall.jpg" title="Great Wall of China"><img src="http://blog.ilbonzo.org/gallery/greatwall-thumb.jpg" alt=""></a></td>
</tr>
</table>
<h3>Thumb Gallery</h3>
<p>Unlike the previous image gallery, this one is triggered by thumbnail links. It also uses a <a href="#countertype">skip counter</a> and is <a href="#continuous">continuous</a>.</p>
<table class="thumbs" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a rel="shadowbox[MustangThumbs];options={counterType:'skip',continuous:true}" href="http://blog.ilbonzo.org/gallery/mustang/red.jpg"><img src="http://blog.ilbonzo.org/gallery/mustang/red-thumb.jpg" alt="Red"></a></td>
<td><a rel="shadowbox[MustangThumbs];options={counterType:'skip',continuous:true}" href="http://blog.ilbonzo.org/gallery/mustang/blue.jpg"><img src="http://blog.ilbonzo.org/gallery/mustang/blue-thumb.jpg" alt="Red"></a></td>
<td><a rel="shadowbox[MustangThumbs];options={counterType:'skip',continuous:true}" href="http://blog.ilbonzo.org/gallery/mustang/grey.jpg"><img src="http://blog.ilbonzo.org/gallery/mustang/grey-thumb.jpg" alt="Red"></a></td>
</tr>
</table>
<h3>Flash</h3>
<p>
        <a rel="shadowbox;width=400;height=300" class="option" title="Girl Skipping" href="http://blog.ilbonzo.org/gallery/skip.swf">Single SWF</a><br />
        <a id="flash1" rel="width=600;height=450" class="option" title="Hollywood or Bust" href="http://blog.ilbonzo.org/gallery/old_man.swf">SWF Gallery</a><br />
        <a rel="shadowbox;width=600;height=450" class="option" title="Alien" href="http://blog.ilbonzo.org/gallery/alien.flv">Flash Video</a></p>
<h3>Movies</h3>
<p>
        <a rel="shadowbox;width=292;height=218" class="option" title="Unfortunate Kayaker" href="http://blog.ilbonzo.org/gallery/kayak.mov">Single Movie (mov)</a><br />
        <a rel="shadowbox;width=292;height=218;options={showMovieControls:false}" class="option" title="Unfortunate Kayaker" href="http://blog.ilbonzo.org/gallery/kayak.mp4">Single Movie (mpeg-4, controller disabled)</a><br />
        <a rel="shadowbox;width=318;height=218;options={autoplayMovies:false}" class="option" title="Unfortunate Kayaker" href="http://blog.ilbonzo.org/gallery/kayak.avi">Single Movie (avi, autoplay disabled)</a></p>
<p>        <a rel="shadowbox;width=320;height=240" class="option" title="Curious Cat" href="http://blog.ilbonzo.org/gallery/cat.wmv">Single Movie (wmv)</a><br />
        <a rel="shadowbox;width=640;height=272" class="option" title="Beowulf Trailer" href="http://images.apple.com/movies/paramount/beowulf/beowulf-tr2_h.640.mov">Apple.com Trailer</a><br />
        <a rel="shadowbox;width=405;height=340" class="option" title="David Beckham" href="http://www.youtube.com/v/wbzLpteC8ng&amp;autoplay=1">YouTube</a><br />
        <a rel="shadowbox;width=405;height=340" class="option" title="While My Ukulele Gently Weeps" href="http://video.google.com/googleplayer.swf?docid=1352016870638076087&amp;autoplay=1">Google Video</a><br />
        <a rel="shadowbox[Movies];width=405;height=340;options={continuous:true}" class="option" title="YouTube" href="http://www.youtube.com/v/JPSzcRbFArA&amp;autoplay=1">Movie Gallery</a><br />
        <a rel="shadowbox[Movies];width=292;height=218" class="hidden" title="QuickTime" href="gallery/kayak.mov">MOV</a></p>
<p>        <a rel="shadowbox[Movies];width=320;height=240" class="hidden" title="Windows Media" href="http://blog.ilbonzo.org/gallery/cat.wmv">WMV</a><br />
        <a rel="shadowbox[Movies];width=600;height=450" class="hidden" title="Flash Video" href="http://blog.ilbonzo.org/gallery/alien.flv">FLV</a><br />
        <a rel="shadowbox" class="option" title="Google.com" href="http://www.google.com/">External Website</a><br />
        <a rel="shadowbox" class="option" title="This page" href="http://blog.ilbonzo.org/">This page</a><br />
        <a rel="shadowbox[Mixed];options={counterType:'skip',continuous:true}" class="option" title="JPG" href="gallery/aston_martin/vanquish.jpg">Mixed Content Gallery</a><br />
        <a rel="shadowbox[Mixed];width=520;height=390" class="hidden" title="SWF" href="http://blog.ilbonzo.org/gallery/caveman.swf">swf</a></p>
<p>        <a rel="shadowbox[Mixed];width=292;height=218" class="hidden" title="MPEG-4" href="http://blog.ilbonzo.org/gallery/kayak.mp4">movie</a><br />
        <a rel="shadowbox[Mixed]" class="hidden" title="IFRAME" href="http://blog.ilbonzo.org/">iframe</a>
    </p>
<p>Il Plugin è molto semplice, basta caricare la cartella che si ottiene scompattando l&#8217;archivio compresso nelal cartella /wp-content/plugins, andare nella parte di amministrazione e attivare il plugin.</p>
<p>Per utilizzarlo basta aggiungere <strong>rel=&#8221;shadowbox&#8221;</strong> ai link che volete aprire in questo modo.</p>
<p>ecco un po&#8217; di esempi presi dal sito di <a href="http://mjijackson.com/shadowbox/">shadowbox</a></p>
<p><code></p>
<h3><a name="markup">Markup</a></h3>
<p>The simplest way to use Shadowbox is through your HTML markup. At the very least, you must add a <code>rel="shadowbox"</code> attribute to your links. For example, say you have this link to an image on your page:</p>
<pre>&lt;a href="myimage.jpg">My Image&lt;/a></pre>
<p>In order to set up this link for use with Shadowbox, simply change it to this:</p>
<pre>&lt;a href="myimage.jpg" rel="shadowbox">My Image&lt;/a></pre>
<p>If you would like to display a title for your image, simply add a <code>title</code> attribute to the link.</p>
<pre>&lt;a href="myimage.jpg" rel="shadowbox" title="My Image">My Image&lt;/a></pre>
<p>You must explicitly tell Shadowbox the dimensions to use to display content other than images. This is done by adding a few parameters to the end of the <code>rel</code> attribute, separated by semi-colons (like a CSS style declaration). To specify a movie's height and width, use the <code>height</code> and <code>width</code> parameters. Note: unlike in CSS, these values must always be specified in pixels.</p>
<pre>&lt;a href="mymovie.swf" rel="shadowbox;height=140;width=120">My Movie&lt;/a></pre>
<p>Additionally, you may set Shadowbox options on a per-link basis. To do this, you must include a <a href="http://www.json.org/">JSON</a>-formatted parameter called <code>options</code>. An example could be:</p>
<pre>&lt;a href="myimage.jpg" rel="shadowbox;options={overlayOpacity: 0.5, resize: false}">My Image&lt;/a></pre>
<p>In addition to displaying single images and movies, Shadowbox is also capable of displaying galleries of content. In order to designate a link as part of a gallery, you must add the gallery name to the <code>rel</code> attribute between square brackets immediately following the word "shadowbox". For example, the following markup creates a gallery called "Vacation" with two pictures:</p>
<pre>&lt;a href="beach.jpg" rel="shadowbox[Vacation]">The Beach&lt;/a>
&lt;a href="pier.jpg" rel="shadowbox[Vacation]">The Pier&lt;/a></pre>
<p>Galleries may be composed of content of many different types. The following markup is a compressed version of the last <a href="#demos">demo</a> above. It demonstrates how various media can be combined into a single gallery.</p>
<pre>&lt;a rel="shadowbox[Mixed];options={counterType:'skip',continuous:true}" href="vanquish.jpg">jpg&lt;/a>
&lt;a rel="shadowbox[Mixed];width=520;height=390" href="caveman.swf">swf&lt;/a>
&lt;a rel="shadowbox[Mixed];width=292;height=218" href="kayak.mp4">movie&lt;/a>
&lt;a rel="shadowbox[Mixed]" href="index.html">iframe&lt;/a></pre>
<p></code></p>
<p>Per ora il plugin funziona con mootools, ma è facilmente adattabile ad altre librerie javascript, visto che shqdowbox include i vari adapter per queste librerie.</p>
<ul>
<li><a href="http://developer.yahoo.com/yui/">Yahoo! User Interface Library</a> (yahoo, dom, event, anim)</li>
<li><a href="http://extjs.com">Ext</a> (standalone, ext-core.js)</li>
<li><a href="http://prototypejs.org/">Prototype</a> + <a href="http://script.aculo.us/">Scriptaculous</a></li>
<li><a href="http://jquery.com/">jQuery</a></li>
<li><a href="http://mootools.net/">MooTools</a> (requires Fx.Styles and its dependancies)</li>
<li><a href="http://dojotoolkit.org/">Dojo Toolkit</a> (thanks Peter Higgins)</li>
</ul>
<p><a href="http://blog.ilbonzo.org/upload/shadowbox.tar.gz">Scarica il plugin versione 0.1</a><br />
Ovviamente spero che se ci sono reeori qualcuno me lo segnali.</p>
<p>Gabba Gabba Hey<br />
Bonzo</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2008/01/31/plugin-shadowbox-per-wordpress/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
<enclosure url="http://blog.ilbonzo.org/gallery/kayak.mov" length="860878" type="video/quicktime" />
<enclosure url="http://blog.ilbonzo.org/gallery/kayak.mp4" length="848200" type="video/mp4" />
<enclosure url="http://blog.ilbonzo.org/gallery/kayak.avi" length="1519768" type="video/x-msvideo" />
<enclosure url="http://blog.ilbonzo.org/gallery/cat.wmv" length="422489" type="video/x-ms-wmv" />
<enclosure url="http://images.apple.com/movies/paramount/beowulf/beowulf-tr2_h.640.mov" length="120" type="video/quicktime" />
		</item>
	</channel>
</rss>
