<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" version="2.0">

<channel>
	<title>Asteriscoweb</title>
	
	<link>http://asteriscoweb.net</link>
	<description>webdesign e sviluppo</description>
	<lastBuildDate>Tue, 08 Sep 2009 12:36:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<creativeCommons:license>http://creativecommons.org/licenses/by-nc/3.0/</creativeCommons:license><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/asteriscoweb" type="application/rss+xml" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/asteriscoweb" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fasteriscoweb" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Digitale terrestre su Linux</title>
		<link>http://asteriscoweb.net/archivio/08-09-2009/digitale-terrestre-su-linux/</link>
		<comments>http://asteriscoweb.net/archivio/08-09-2009/digitale-terrestre-su-linux/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 12:34:01 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[Digitale terrestre]]></category>
		<category><![CDATA[DVBT]]></category>
		<category><![CDATA[Intel CE 6230]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=510</guid>
		<description><![CDATA[Più per gioco che per reale necessità tempo fa ho deciso di acquistare per pochi euro una penna usb per decodificare il segnale del digitale terrestre. La penna in questione monta un chip Intel CE 6230, che non sembra, però, essere supportato di base dal kernel linux. Dopo non pochi problemi sono riuscito comunque a [...]]]></description>
			<content:encoded><![CDATA[<p>Più per gioco che per reale necessità tempo fa ho deciso di acquistare per pochi euro una penna usb per decodificare il segnale del digitale terrestre. La penna in questione monta un <strong>chip Intel CE 6230</strong>, che non sembra, però, essere supportato di base dal kernel linux. Dopo non pochi problemi sono riuscito comunque a far funzionare il tutto. Ecco una guida per rendere operativo questo apparecchio su un sistema Ubuntu 9.04.</p>
<h3>Installazione</h3>
<p>Per prima cosa colleghiamo il <em>decoder</em> ad una porta USB e diamo da terminale il comando <strong>lsusb</strong> per controllare che il nostro <em>device</em> sia proprio uno basato sul chip in questione. Il risultato dovrebbe essere qualcosa del genere:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">[...]
Bus 002 Device 005: ID 8086:9500 Intel Corp. (Questo è il nostro decoder)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[...]</pre></td></tr></table></div>

<p>Adesso procuriamoci tutto ciò che ci serve per compilare ed installare i driver di video4linux. Apriamo un terminale e diamo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">sudo apt-get install mercurial linux-headers-$(uname -r) build-essential</pre></td></tr></table></div>

<p>Quindi scarichiamo i driver:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">hg clone http://linuxtv.org/hg/v4l-dvb</pre></td></tr></table></div>

<p>Entriamo nella cartella:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">cd v4l-dvb</pre></td></tr></table></div>

<p>E quindi instlliamo il tutto:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
5
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">sudo make
sudo make install</pre></td></tr></table></div>

<p>Il <strong>make</strong> ci impiegherà del tempo: non vi preoccupate è tutto normale. Ora non ci resta che riavviare il sistema.</p>
<h3>Scansione dei canali</h3>
<p>Per poter guardare finalmente la televisone, dobbiamo ora effettuare la scansione dei canali tramite il comando <strong>scan</strong>. Per prima cosa creiamo un file con le frequenze per la nostra zona ricavate dal sito <a href="http://www.dgtvi.it/dgtvi/copertura.aspx?TRS_ID=1550000">DGTVi</a>. Un esempio di file di frequenze per la zona di Napoli &egrave; questo:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;"># MUX-A RAI
T 722000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
&nbsp;
#MUX MEDIASET 2
T 754000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
T 626000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE
&nbsp;
# TIMB1
T 602000000 8MHz 3/4 NONE QAM64 8k 1/32 NONE</pre></div></div>

<p>Salviamo questo file nella nostra home con il nome <strong>frequenze</strong>, colleghiamo il nostro ricevitore usb e diamo da terminale il comando:</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">sudo scan frequenze &gt; canali.conf</pre></div></div>

<p>Al termine della scansione ci ritroveremo con un file <em>canali.conf</em> nella nostra home directory: apriamo questo file con <strong>VLC media player</strong> e ci troveremo con una playlist contenente tutti i canali trovati durante la scansione. Gli utenti KDE possono utilizzare il player <strong>Kaffeine</strong> che gestisce direttamente da interfaccia grafica l&#8217;operazione di scansione dei canali. Data la sua semplicità di utilizzo l&#8217;uso di Kaffeine è consigliato anche a chi, come me, usa Gnome o un altro desktop environment.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=_UmGhxeqg-0:YUCdx2lFdCk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=_UmGhxeqg-0:YUCdx2lFdCk:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=_UmGhxeqg-0:YUCdx2lFdCk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=_UmGhxeqg-0:YUCdx2lFdCk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=_UmGhxeqg-0:YUCdx2lFdCk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=_UmGhxeqg-0:YUCdx2lFdCk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=_UmGhxeqg-0:YUCdx2lFdCk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=_UmGhxeqg-0:YUCdx2lFdCk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/_UmGhxeqg-0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/08-09-2009/digitale-terrestre-su-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Redirect e codici maligni in WordPress</title>
		<link>http://asteriscoweb.net/archivio/26-06-2009/redirect-e-codici-maligni-in-wordpress/</link>
		<comments>http://asteriscoweb.net/archivio/26-06-2009/redirect-e-codici-maligni-in-wordpress/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 09:33:32 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Varie]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hijacking]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=460</guid>
		<description><![CDATA[In passato su vari blog ho letto di attacchi e problemi di sicurezza a blog basati su WordPress. Una cosa simile era capitata non molto tempo fa anche a Ghido su BigThink. Mai prima d&#8217;ora mi era capitato un problema del genere. Nel mio caso possiamo parlare di un attacco quasi invisibile: il codice che [...]]]></description>
			<content:encoded><![CDATA[<p>In passato su vari blog ho letto di attacchi e problemi di sicurezza a blog basati su WordPress. Una cosa simile era capitata non molto tempo fa anche a <a href="http://www.bigthink.it/virus/il-mio-blog-wordpress-e-stato-hackerato/">Ghido su BigThink</a>. Mai prima d&#8217;ora mi era capitato un problema del genere. Nel mio caso possiamo parlare di un attacco quasi invisibile: il codice che ha infettato questo blog si occupava di reindirizzare le richieste del bot di Google ad un altro sito.</p>
<h3>I sintomi</h3>
<p>La cosa pi&ugrave; difficile &egrave; stata proprio accorgersi che qualcosa non andava come doveva. Inizialmente mi ero accorto di alcuni <strong>problemi con il feed RSS</strong>: Google Reader non mi riportava pi&ugrave; gli aggiornamenti del blog nonostante il feed venisse visualizzato nel browser correttamente, ho quindi deciso di spostarmi su FeedBurner e il problema sembrava risolto.</p>
<p>Mi sono quindi accorto che su Google <strong>non venivano indicizzati i miei articoli</strong> pi&ugrave; recenti e, in fine, il <strong>Pagerank sceso</strong> da 3 a 0 senza alcun apparente motivo.</p>
<p>Inizio allora a sospettare che il bot di Google non riesca pi&ugrave; ad accedere alle mie pagine. Ne ho la conferma analizzando il <a href="http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/index.htm">risultato delle richieste HTTP</a>: Google viene reindirizzato ad un altro sito!</p>
<h3>Alla ricerca del problema</h3>
<p>Il primo posto dove mi  viene in mente di cercare &egrave; il file <strong>.htaccess</strong>: il modo pi&ugrave; semplice per effetture un redirect in base allo user agent &egrave; proprio quello di modificare questo file. Controllo il file, ma questo risulta pulito ed &egrave; presente solo il codice generato da WordPress per i permalink.</p>
<p>Ho letto spesso di inserimento di <strong>codici maligni nei temi WordPress</strong>. Anche se ero decisamente sicuro che il problema non risiedesse nel codice del tema, per togliermi ogni dubbio ho deciso di fare una scansione con <a href="http://wpantivirus.com/">WPAntiVirus</a>, ma nulla: come prevedibile anche il tema era pulito.</p>
<p>Arrivo alla conclusione che il problema deve stare in qualche file PHP. La lista dei file e delle cartelle presenti nel mio spazio sembra, per&ograve;, essere normale. Mi rassegno quindi al dover controllare uno ad uno i file del core di WordPress. Partendo da index.php seguo il percorso delle inclusioni: </p>
<ul>
<li>index.php: nulla di strano</li>
<li>wp-blog-header.php: nulla nemmeno qui</li>
<li>wp-load.php: pulito</li>
<li>wp-config.php: eccolo, qui c&#8217;&egrave; qualcosa che non ci dovrebbe essere</li>
</ul>
<p>Verso la <strong>linea 38 di wp-config.php</strong> fa capolino questa stringa:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>38
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$agent</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_USER_AGENT'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">eregi</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;google&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$agent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;HTTP/1.1 301&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: http://doormoney.us/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Per i non avezzi al PHP questo codice non fa altro che intercettare lo user agent di Google,  inviargli un codice di redirect permanente 301 al sito doormoney.us. Ecco spiegato perch&egrave; i contenuti non venivano pi&ugrave; indicizzati e il perch&egrave; del calo del PageRank. Eliminando questo codice finalmente tutto torna alla normalit&agrave;.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=c7BabfSGZwo:RaPF_B9OEb8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=c7BabfSGZwo:RaPF_B9OEb8:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=c7BabfSGZwo:RaPF_B9OEb8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=c7BabfSGZwo:RaPF_B9OEb8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=c7BabfSGZwo:RaPF_B9OEb8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=c7BabfSGZwo:RaPF_B9OEb8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=c7BabfSGZwo:RaPF_B9OEb8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=c7BabfSGZwo:RaPF_B9OEb8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/c7BabfSGZwo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/26-06-2009/redirect-e-codici-maligni-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>“Il meglio di” – Speciale Twitter</title>
		<link>http://asteriscoweb.net/archivio/23-06-2009/il-meglio-di-speciale-twitter/</link>
		<comments>http://asteriscoweb.net/archivio/23-06-2009/il-meglio-di-speciale-twitter/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 19:29:33 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[il meglio di]]></category>
		<category><![CDATA[Ispirazioni]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=428</guid>
		<description><![CDATA[Puntata speciale de &#34;il meglio di&#34; dedicata ai servizi correlati a Twitter. Sulla falsa riga di 86 Loghi per Twitter propongo qui una selezione di siti dal design interessante che hanno come tema il &#34;pennuto blu&#34;.

Segnalazioni


The Cosmic Machine &#8211; EventBox

	

Tweetbots

	

Gin&#038;Twitts

	

Quapture

	

TweetMeme

	

Trevor Sheridan

	

TweetCC

	

Twitter Twitpocalypse

	

Helveti-Tweet

	

Tweetzien

	

]]></description>
			<content:encoded><![CDATA[<p>Puntata speciale de &quot;<a href="http://asteriscoweb.net/tag/il-meglio-di">il meglio di</a>&quot; dedicata ai servizi correlati a <a href="http://asteriscoweb.net/tag/twitter">Twitter</a>. Sulla falsa riga di <a href="http://www.youon.it/96-twitter-loghi/">86 Loghi per Twitter</a> propongo qui una selezione di siti dal design interessante che hanno come tema il <em>&quot;pennuto blu&quot;</em>.</p>
<p><span id="more-428"></span></p>
<h3>Segnalazioni</h3>
<ul class="screens">
<li>
<h4>The Cosmic Machine &#8211; EventBox</h4>
<p><a href="http://thecosmicmachine.com/" title="Visita thecosmicmachine.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/eventbox.gif" alt="Screenshot eventbox" width="587" height="180" class="alignnone size-full wp-image-430" /></a>
	</li>
<li>
<h4>Tweetbots</h4>
<p><a href="http://tweetbots.com/"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/tweetbots.gif" alt="Screenshot tweetbots" width="587" height="180" class="alignnone size-full wp-image-448" /></a>
	</li>
<li>
<h4>Gin&#038;Twitts</h4>
<p><a href="http://www.oscarbarber.com/gintwitts/" title="Visita http://www.oscarbarber.com/gintwitts/"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/gintwitts.gif" alt="Screenshot gintwitts" width="587" height="180" class="alignnone size-full wp-image-440" /></a>
	</li>
<li>
<h4>Quapture</h4>
<p><a href="http://qapture.net/" title="Visita quapture.net"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/quapture.gif" alt="Screenshot quapture" width="587" height="180" class="alignnone size-full wp-image-443" /></a>
	</li>
<li>
<h4>TweetMeme</h4>
<p><a href="http://tweetmeme.com/" title="Visita tweetmeme.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/tweetmeme.gif" alt="Screenshot tweetmeme" width="587" height="180" class="alignnone size-full wp-image-433" /></a>
	</li>
<li>
<h4>Trevor Sheridan</h4>
<p><a href="http://www.trevorsheridan.com" title="Visita trevorsheridan.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/trevorsheridan.gif" alt="Screenshot trevorsheridan"  width="587" height="180" class="alignnone size-full wp-image-450" /></a>
	</li>
<li>
<h4>TweetCC</h4>
<p><a href="http://www.tweetcc.com/" title="Visita tweetcc.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/tweetcc.gif" alt="Screenshot tweetcc" width="587" height="180" class="alignnone size-full wp-image-437" /></a>
	</li>
<li>
<h4>Twitter Twitpocalypse</h4>
<p><a href="http://www.twitpocalypse.com/" title="Visita twitpocalypse.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/twitpocalypse.gif" alt="Screenshot twitpocalypse" width="587" height="180" class="alignnone size-full wp-image-435" /></a>
	</li>
<li>
<h4>Helveti-Tweet</h4>
<p><a href="http://helveti-tweet.geenius.co.uk/" title="Visita helveti-tweet.geenius.co.uk"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/helvetitweet.jpg" alt="Screenshot helvetitweet" width="587" height="180" class="alignnone size-full wp-image-446" /></a>
	</li>
<li>
<h4>Tweetzien</h4>
<p><a href="http://www.tweetizen.com/" title="VIsita tweetizen.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/tweetizen.gif" alt="Screenshot tweetizen"  width="587" height="180" class="alignnone size-full wp-image-452" /></a>
	</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=UFXMqvzcUFQ:Z4c5SxUX0Hk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=UFXMqvzcUFQ:Z4c5SxUX0Hk:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=UFXMqvzcUFQ:Z4c5SxUX0Hk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=UFXMqvzcUFQ:Z4c5SxUX0Hk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=UFXMqvzcUFQ:Z4c5SxUX0Hk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=UFXMqvzcUFQ:Z4c5SxUX0Hk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=UFXMqvzcUFQ:Z4c5SxUX0Hk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=UFXMqvzcUFQ:Z4c5SxUX0Hk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/UFXMqvzcUFQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/23-06-2009/il-meglio-di-speciale-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uno sguardo a Firefox 3.5</title>
		<link>http://asteriscoweb.net/archivio/20-06-2009/uno-sguardo-a-firefox-3-5/</link>
		<comments>http://asteriscoweb.net/archivio/20-06-2009/uno-sguardo-a-firefox-3-5/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 13:15:33 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=413</guid>
		<description><![CDATA[Senza nulla togliere a Firefox bisogna ammettere che nelle ultime release il borwser di casa Mozilla sia diventato incredibilmente lento e pesante e con tutta obiettivit&#224; non regge il confronto con altri browser. Mi sono, infatti, ritrovato a convertirmi all&#8217;uso di Google Chrome/Chromium sia su Linux che su Windows. Per la versione 3.5 da Mozilla [...]]]></description>
			<content:encoded><![CDATA[<p>Senza nulla togliere a Firefox bisogna ammettere che nelle ultime release il borwser di casa Mozilla sia diventato incredibilmente lento e pesante e con tutta obiettivit&agrave; non regge il confronto con altri browser. Mi sono, infatti, ritrovato a convertirmi all&#8217;uso di <a href="http://www.google.com/chrome">Google Chrome</a>/<a href="http://code.google.com/chromium/">Chromium</a> sia su Linux che su Windows. Per la versione 3.5 da Mozilla promettono una maggiore <em>leggerezza</em> e velocit&agrave; per il loro browser. Il rilascio &egrave; tra una decina di giorni, ma nulla ci vieta di dare sin da ora uno sguardo alla <strong>beta</strong> di Firefox 3.5.</p>
<h3>Installiamo da repository</h3>
<p>Vediamo come fare per installare la beta di Firefox 3.5 su <strong>Ubuntu Jaunty</strong>. Prima di tutto dobbiamo aggiungere il repository al file <strong>/etc/apt/sources.list</strong> aggiungendo le seguenti righe:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">deb http:<span style="color: #000000; font-weight: bold;">//</span>ppa.launchpad.net<span style="color: #000000; font-weight: bold;">/</span>ubuntu-mozilla-daily<span style="color: #000000; font-weight: bold;">/</span>ppa<span style="color: #000000; font-weight: bold;">/</span>ubuntu jaunty main
deb-src http:<span style="color: #000000; font-weight: bold;">//</span>ppa.launchpad.net<span style="color: #000000; font-weight: bold;">/</span>ubuntu-mozilla-daily<span style="color: #000000; font-weight: bold;">/</span>ppa<span style="color: #000000; font-weight: bold;">/</span>ubuntu jaunty main</pre></div></div>

<p>Quindi apriamo il terminale ed aggiungiamo la chiave GPG:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-key</span> adv <span style="color: #660033;">--keyserver</span> keyserver.ubuntu.com <span style="color: #660033;">--recv-keys</span> 247510BE</pre></div></div>

<p>Poi aggiorniamo la lista dei repository di apt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update</pre></div></div>

<p>Ora siamo pronti ad instalare la beta della 3.5:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> firefox-<span style="color: #000000;">3.5</span></pre></div></div>

<p>L&#8217;installazione non sovrascriver&agrave; le versioni precedenti e sar&agrave; accessibile dal menu <strong>Applicazioni &rarr; Internet</strong> sotto il nome di <strong>Minefield 3.5 Web Browser</strong>.</p>
<h3>Considerazioni</h3>
<p>I tempi non sono ovviamente ancora maturi per poter dare un giudizio: &egrave; pur sempre una <strong>beta</strong>. C&#8217;&egrave; da osservare, per&ograve;, che gi&agrave; da ora si nota un sensibile aumento nella velocit&agrave; di avvio e qualche piccolo cambiamento nell&#8217;interfaccia (&egrave; stato aggiunto un pulsante accanto alle tab per aprirne una nuova). Tutto sommato sembra sia abbastanza <em>stabile</em>, anche se non ho avuto modo di stressarla eccessivamente. Con i dovuti limiti questa versione <strong>potrebbe</strong> anche essere utilizzata per la navigazione di tutti i giorni, anche se lo sconsiglio.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=SR8m8V-0m8U:4XbslScn34g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=SR8m8V-0m8U:4XbslScn34g:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=SR8m8V-0m8U:4XbslScn34g:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=SR8m8V-0m8U:4XbslScn34g:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=SR8m8V-0m8U:4XbslScn34g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=SR8m8V-0m8U:4XbslScn34g:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=SR8m8V-0m8U:4XbslScn34g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=SR8m8V-0m8U:4XbslScn34g:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/SR8m8V-0m8U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/20-06-2009/uno-sguardo-a-firefox-3-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I 5 plugin a cui non potrei rinunciare</title>
		<link>http://asteriscoweb.net/archivio/18-06-2009/i-5-plugin-a-cui-non-potrei-rinunciare/</link>
		<comments>http://asteriscoweb.net/archivio/18-06-2009/i-5-plugin-a-cui-non-potrei-rinunciare/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:32:25 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[classifiche]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=373</guid>
		<description><![CDATA[Nella mia esperienza di blogger su piattaforma WordPress mi sono ritrovato a testare ed utilizzare decine di plugin e a svilupparne talvolta dei miei per poter personalizzare al punto giusto ogni singola installazione. Ognuno di noi utilizza dei plugin che ritiene gli siano indispensabili, ho deciso quindi di proporvi la mia classifica di quei 5 [...]]]></description>
			<content:encoded><![CDATA[<p>Nella mia esperienza di blogger su piattaforma WordPress mi sono ritrovato a testare ed utilizzare decine di plugin e a svilupparne talvolta dei miei per poter personalizzare al punto giusto ogni singola installazione. Ognuno di noi utilizza dei plugin che ritiene gli siano indispensabili, ho deciso quindi di proporvi la mia <em>classifica</em> di quei 5 plugin a cui non potrei rinunciare.</p>
<h3>1. Akismet</h3>
<p>Come non iniziare questa lista con <a href="http://akismet.com/">Akismet</a>, l&#8217;anti-spam sviluppato da <a href="http://automattic.com/">Automattic</a>, la societ&agrave; che sta dietro a WordPress. Lo si trova caricato di <em>default</em>, ma per attivarlo &egrave; necessario disporre di una <em>API key</em> ottenibile registrando gratuitamente un account su <a href="http://wordpress.com/">Wordpress.com</a>.</p>
<h3>2. Google Analytics for WordPress</h3>
<p><a href="http://wordpress.org/extend/plugins/google-analytics-for-wordpress/">Google Analytics for WordPress</a> &egrave; uno di quei plugin che non manco mai di aggiungere ad ogni nuova installazione. Sul perch&egrave; non sia consigliabile copiare ed incollare il codice di Google Analytics direttamente nel proprio theme se ne &egrave; parlato molto, per approfondire vi consiglio di dare una lettura a <a href="http://www.goanalytics.info/usare-al-meglio-google-analytics-su-wordpress/">questo articolo</a>.</p>
<h3>3. WP-Syntax</h3>
<p>In un blog tecnico come il mio capita spesso di dover postare dei blocchi di codice. Quasi da subito ho sentito l&#8217;esigenza di un plugin come <a href="http://wordpress.org/extend/plugins/wp-syntax/">WP-Syntax</a> che mi permettesse di evidenziare la sintassi dei codici in diversi linguaggi di programmazione.  Mi sono sempre trovato discretamente bene con questo <em>code highlighter</em>, ma sto pensando di migrare a<br />
<a href="http://wordpress.org/extend/plugins/google-syntax-highlighter/">Google Syntax Highlighter</a>.</p>
<h3>4. Maintenance Mode</h3>
<p>Ad ognuno di noi &egrave; capitato di dover <em>mandare in pausa</em> il proprio blog per un po&#8217;, anche solo per caricare e testare un nuovo theme o per aggiornare la versione di WordPress. <a href="http://wordpress.org/extend/plugins/maintenance-mode/">Maintenance Mode</a> &egrave; un plugin che ci aiuta in situazioni del genere. In giro si leggono opinioni discordanti a riguardo, ma posso dire che per quanto riguarda la mia personale esperienza Maintenance Mode non mi ha mai creato problemi.</p>
<h3>5. WP-ContactForm</h3>
<p>Una cosa a cui ogni blogger non pu&ograve; non  pu&ograve; rinunciare &egrave; dare la possibilit&agrave; ai propri lettori di poterlo contattare. Un semplice form di contatto come <a href="http://wordpress.org/extend/plugins/wp-contact-form/">WP-ContactForm</a> si adatta facilmente a tutte le esigenze. Attualmente sto meditando di cambiare plugin per il form di contatto, ma non ho ancora trovato qualcosa che faccia al caso mio.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=JVeSbk82Elc:gOw2bYQk2u0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=JVeSbk82Elc:gOw2bYQk2u0:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=JVeSbk82Elc:gOw2bYQk2u0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=JVeSbk82Elc:gOw2bYQk2u0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=JVeSbk82Elc:gOw2bYQk2u0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=JVeSbk82Elc:gOw2bYQk2u0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=JVeSbk82Elc:gOw2bYQk2u0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=JVeSbk82Elc:gOw2bYQk2u0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/JVeSbk82Elc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/18-06-2009/i-5-plugin-a-cui-non-potrei-rinunciare/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nuove API per i widget in WordPress 2.8</title>
		<link>http://asteriscoweb.net/archivio/16-06-2009/nuove-api-per-i-widget-in-wordpress-2-8/</link>
		<comments>http://asteriscoweb.net/archivio/16-06-2009/nuove-api-per-i-widget-in-wordpress-2-8/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 17:27:55 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Sviluppo web]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=343</guid>
		<description><![CDATA[Come alcuni di voi sapranno poco meno di una settimana fa &#232; stata rilasciata la nuova versione di WordPress, la 2.8. Tra le varie novit&#224; che quest&#8217;ultima versione porta con se c&#8217;&#232; anche un set di API per la scrittura dei widget tutto nuovo.
Le novit&#224;: l&#8217;approccio ad oggetti
La novità risiede nell&#8217;adozione del paradigma orientato agli [...]]]></description>
			<content:encoded><![CDATA[<p>Come alcuni di voi sapranno poco meno di una settimana fa &egrave; stata rilasciata la nuova versione di WordPress, la <strong>2.8</strong>. Tra le varie novit&agrave; che quest&#8217;ultima versione porta con se c&#8217;&egrave; anche un set di <a href="http://it.wikipedia.org/wiki/Application_programming_interface">API</a> per la scrittura dei widget tutto nuovo.</p>
<h3>Le novit&agrave;: l&#8217;approccio ad oggetti</h3>
<p>La novità risiede nell&#8217;adozione del <a href="http://it.wikipedia.org/wiki/Programmazione_orientata_agli_oggetti">paradigma orientato agli oggetti</a>: per sviluppare un nuovo widget ci baster&agrave; semplicemente estendere la classe <strong>WP_Widget</strong> ed in fine, similmente a come <a href="http://asteriscoweb.net/archivio/04-03-2009/scrivere-un-widget-per-wordpress">avevamo gi&agrave; visto</a>, registrare il tutto con <strong>register_widget</strong>.</p>
<p>La struttura di un widget scritto secondo le nuove specifiche sar&agrave; in sostanza questa:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">class</span> il_mio_widget <span style="color: #000000; font-weight: bold;">extends</span> WP_Widget <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> il_mio_widget<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Costruttore della classe</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> widget<span style="color: #009900;">&#40;</span><span style="color: #000088;">$args</span><span style="color: #339933;">,</span> <span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Corpo del Widget</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> update<span style="color: #009900;">&#40;</span><span style="color: #000088;">$new_instance</span><span style="color: #339933;">,</span> <span style="color: #000088;">$old_instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Salvataggio delle opzioni</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> form<span style="color: #009900;">&#40;</span><span style="color: #000088;">$instance</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// Form di amministrazione</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
register_widget<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'il_mio_widget'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Come &egrave; facile intuire dai nomi dei metodi e dai commenti al codice la funzione <strong>widget()</strong> si occuper&agrave; dell&#8217;output del widget, <strong>update()</strong> di salvare le opzioni e <strong>form()</strong> dell&#8217;output del form di amministrazione.</p>
<h3>Approfondimenti</h3>
<p>Per ulteriori approfondimenti a riguardo vi rimando come sempre al <a href="http://codex.wordpress.org/Plugins/WordPress_Widgets_Api">Codex</a> ufficiale di WordPress. Segnalo inoltre l&#8217;articolo <a href="http://wpengineer.com/wordpress-built-a-widget/">Build A WordPress 2.8 Widget With The New Widget API</a> pubblicato su WPengineer.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=oBbvB0FjQrU:GspvLIfMkIw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=oBbvB0FjQrU:GspvLIfMkIw:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=oBbvB0FjQrU:GspvLIfMkIw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=oBbvB0FjQrU:GspvLIfMkIw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=oBbvB0FjQrU:GspvLIfMkIw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=oBbvB0FjQrU:GspvLIfMkIw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=oBbvB0FjQrU:GspvLIfMkIw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=oBbvB0FjQrU:GspvLIfMkIw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/oBbvB0FjQrU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/16-06-2009/nuove-api-per-i-widget-in-wordpress-2-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>“Twittare” da linea di comando</title>
		<link>http://asteriscoweb.net/archivio/15-06-2009/twittare-da-linea-di-comando/</link>
		<comments>http://asteriscoweb.net/archivio/15-06-2009/twittare-da-linea-di-comando/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 16:11:35 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Varie]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[twitta.py]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=324</guid>
		<description><![CDATA[Io sono una di quelle persone uno di quegli smanettoni che adora lavorare da linea di comando. Come molti utenti Linux ho probabilmente fatto di necessit&#224; virt&#249;, ma fatto sta che ora non potrei pi&#249; farne a meno.
Come fare quindi a condividere i miei pensieri su twitter senza staccarmi dal fidato terminale di Linux?
Una lettura [...]]]></description>
			<content:encoded><![CDATA[<p>Io sono <del>una di quelle persone</del> uno di quegli smanettoni che <em>adora</em> lavorare da linea di comando. Come molti utenti Linux ho probabilmente fatto di necessit&agrave; virt&ugrave;, ma fatto sta che ora non potrei pi&ugrave; farne a meno.</p>
<p>Come fare quindi a condividere i miei pensieri su <a href="http://twitter.com/asteriscow">twitter</a> senza staccarmi dal fidato terminale di Linux?</p>
<p>Una lettura alla documentazione delle <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0update">API di twitter</a> ed una ripassata al manuale di python ed ecco pronto <strong>twitta.py</strong>: un piccolo script <em>fai da te</em> che fa al caso mio.</p>
<h3>Proprio tutto da linea di comando</h3>
<p>Per restare in tema vediamo come scaricare e rendere operativo il nostro script servendoci del solo terminale. Iniziamo con lo scaricare lo script dando questo comando:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>asteriscoweb.net<span style="color: #000000; font-weight: bold;">/</span>download<span style="color: #000000; font-weight: bold;">/</span>twitta.py</pre></td></tr></table></div>

<p>Rendiamolo eseguibile:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x twitta.py</pre></td></tr></table></div>

<p>Andiamo a settare ora il nostro username e password:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> twitta.py</pre></td></tr></table></div>

<p>Cerchiamo le variabili <var>username</var> e <var>password</var> e modifichiamo i loro valori con i nostri dati, salviamo e chiudiamo.</p>
<p>Eccoci pronti ad inviare il nostro primo <em>tweet</em> da linea di comando:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>twitta.py <span style="color: #ff0000;">&quot;Il tuo messaggio&quot;</span></pre></td></tr></table></div>

<h3>Precisazioni</h3>
<p>Twitta.py non &egrave; e non vuole essere un client completo per twitter: &egrave; poco pi&ugrave; di un mero esercizio di programmazione, sentitevi liberi di studiarlo e modificarlo (date uno sguardo alle <a href="http://asteriscoweb.net/info#licenza">informazioni sulla licenza</a> di questo blog). Se siete in cerca di un buon client, attualmente mi sto trovando molto bene con <a href="http://tweetdeck.com/">TweetDeck</a>: provatelo e fatemi sapere.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=M7H9CSPDklg:klCyGLxXDn4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=M7H9CSPDklg:klCyGLxXDn4:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=M7H9CSPDklg:klCyGLxXDn4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=M7H9CSPDklg:klCyGLxXDn4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=M7H9CSPDklg:klCyGLxXDn4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=M7H9CSPDklg:klCyGLxXDn4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=M7H9CSPDklg:klCyGLxXDn4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=M7H9CSPDklg:klCyGLxXDn4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/M7H9CSPDklg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/15-06-2009/twittare-da-linea-di-comando/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Il meglio di aprile e maggio 2009</title>
		<link>http://asteriscoweb.net/archivio/12-06-2009/il-meglio-di-aprile-e-maggio-2009/</link>
		<comments>http://asteriscoweb.net/archivio/12-06-2009/il-meglio-di-aprile-e-maggio-2009/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 10:55:22 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[il meglio di]]></category>
		<category><![CDATA[Ispirazioni]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=291</guid>
		<description><![CDATA[Con colpevole ritardo eccoci arrivati all&#8217;ennesimo episodio de &#34;Il meglio di&#34;. Questa volta puntata doppia per recuperare anche le segnalazioni del mese di aprile. Come sempre date anche un occhio al mio account delicious.

Segnalazioni di aprile


Tip&#8217;d

	

Mplusz

	

Sean Geng

	

Voce antica

	

Tea Round

	

Lennart Basler

	

Segnalazioni di maggio


Seth Said

	

Moblin

	

Blogsessive

	

Owltastic

	

Web Do&#8217;s and Don&#8217;ts

	

Rails Guides

	

]]></description>
			<content:encoded><![CDATA[<p>Con colpevole ritardo eccoci arrivati all&#8217;ennesimo episodio de <em>&quot;Il meglio di&quot;</em>. Questa volta puntata doppia per recuperare anche le segnalazioni del mese di aprile. Come sempre date anche un occhio al mio account <a href="http://delicious.com/asteriscow/ispirazioni+webdesign">delicious</a>.</p>
<p><span id="more-291"></span></p>
<h3>Segnalazioni di aprile</h3>
<ul class="screens">
<li>
<h4>Tip&#8217;d</h4>
<p><a href="http://tipd.com/" title="Visita tipd.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/tipd.gif" alt="Screenshot tipd" width="587" height="180" class="alignnone size-full wp-image-308" /></a>
	</li>
<li>
<h4>Mplusz</h4>
<p><a href="http://mplusz.com/" title="Visita mplusz.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/mplusz.gif" alt="Screenshot mplusz" width="587" height="180" class="alignnone size-full wp-image-310" /></a>
	</li>
<li>
<h4>Sean Geng</h4>
<p><a href="http://sean.in.the.phailbucket.com/" title="Visita sean.in.the.phailbucket.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/sean.gif" alt="Screnshoot seangeng" title="Screnshoot seangeng" width="587" height="180" class="alignnone size-full wp-image-320" /></a>
	</li>
<li>
<h4>Voce antica</h4>
<p><a href="http://www.voceantica.com/" title="Visita voceantica.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/voceantica.gif" alt="Screenshot voceantica" width="587" height="180" class="alignnone size-full wp-image-312" /></a>
	</li>
<li>
<h4>Tea Round</h4>
<p><a href="http://tearoundapp.com/" title="Visita tearoundapp.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/tearound1.gif" alt="Screenshot tearound" width="587" height="180" class="alignnone size-full wp-image-314" /></a>
	</li>
<li>
<h4>Lennart Basler</h4>
<p><a href="http://www.lennartbasler.com/" title="Visita lennartbasler.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/lennartbasler.gif" alt="Screenshot lennartbasler" width="587" height="180" class="alignnone size-full wp-image-318" /></a>
	</li>
</ul>
<h3>Segnalazioni di maggio</h3>
<ul class="screens">
<li>
<h4>Seth Said</h4>
<p><a href="http://sethsaid.com" title="Visita sethsaid.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/sethsaid.gif" alt="Screenshot sethsaid" width="587" height="180" class="alignnone size-full wp-image-306" /></a>
	</li>
<li>
<h4>Moblin</h4>
<p><a href="http://moblin.org/" title ="Visita moblin.org"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/moblin.gif" alt="Screenshot Moblin" width="587" height="180" class="alignnone size-full wp-image-296" /></a>
	</li>
<li>
<h4>Blogsessive</h4>
<p><a href="http://blogsessive.com/" title="Visita blogsessive.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/blogsessive.gif" alt="Screenshot blogsessive" width="587" height="180" class="alignnone size-full wp-image-298" /></a>
	</li>
<li>
<h4>Owltastic</h4>
<p><a href="http://owltastic.com"  title="Visita owltastic.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/owltastic.gif" alt="Screenshot owltastic" width="587" height="180" class="alignnone size-full wp-image-304" /></a>
	</li>
<li>
<h4>Web Do&#8217;s and Don&#8217;ts</h4>
<p><a href="http://webdosanddonts.com/" title="Visita webdosanddonts.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/webdosanddonts.gif" alt="Screenshot webdosanddonts" width="587" height="180" class="alignnone size-full wp-image-300" /></a>
	</li>
<li>
<h4>Rails Guides</h4>
<p><a href="http://guides.rubyonrails.org/" title="Visita guides.rubyonrails.org"><img src="http://asteriscoweb.net/wp-content/uploads/2009/06/railsguide.gif" alt="Screenshot railsguide" width="587" height="180" class="alignnone size-full wp-image-302" /></a>
	</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=IY30ZGGYdz8:FFfz28OMbdg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=IY30ZGGYdz8:FFfz28OMbdg:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=IY30ZGGYdz8:FFfz28OMbdg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=IY30ZGGYdz8:FFfz28OMbdg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=IY30ZGGYdz8:FFfz28OMbdg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=IY30ZGGYdz8:FFfz28OMbdg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=IY30ZGGYdz8:FFfz28OMbdg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=IY30ZGGYdz8:FFfz28OMbdg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/IY30ZGGYdz8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/12-06-2009/il-meglio-di-aprile-e-maggio-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Siiimple, uno showcase minimal</title>
		<link>http://asteriscoweb.net/archivio/07-05-2009/siiimple-uno-showcase-minimal/</link>
		<comments>http://asteriscoweb.net/archivio/07-05-2009/siiimple-uno-showcase-minimal/#comments</comments>
		<pubDate>Thu, 07 May 2009 14:40:48 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Varie]]></category>
		<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[in breve]]></category>
		<category><![CDATA[Ispirazioni]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=282</guid>
		<description><![CDATA[Una segnalazione veloce: siiimple, una gallery di siti in stile minimal da tenere d&#8217;occhio!



]]></description>
			<content:encoded><![CDATA[<p>Una segnalazione veloce: <a href="http://www.siiimple.com/">siiimple</a>, una gallery di siti in stile <em>minimal</em> da tenere d&#8217;occhio!</p>
<ul class="screens">
<li><a href="http://www.siiimple.com/"><img src="http://asteriscoweb.net/wp-content/uploads/2009/05/siiimple.gif" alt="Visita siiimple.com" title="Visita siiimple.com" width="587" height="180" class="alignnone size-full wp-image-283" /></a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=0h8JlX1oJ6A:tJQBIREUTOk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=0h8JlX1oJ6A:tJQBIREUTOk:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=0h8JlX1oJ6A:tJQBIREUTOk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=0h8JlX1oJ6A:tJQBIREUTOk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=0h8JlX1oJ6A:tJQBIREUTOk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=0h8JlX1oJ6A:tJQBIREUTOk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=0h8JlX1oJ6A:tJQBIREUTOk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=0h8JlX1oJ6A:tJQBIREUTOk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/0h8JlX1oJ6A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/07-05-2009/siiimple-uno-showcase-minimal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mostrare gli ultimi tweet nella sidebar</title>
		<link>http://asteriscoweb.net/archivio/02-05-2009/mostrare-gli-ultimi-tweet-nella-sidebar/</link>
		<comments>http://asteriscoweb.net/archivio/02-05-2009/mostrare-gli-ultimi-tweet-nella-sidebar/#comments</comments>
		<pubDate>Sat, 02 May 2009 10:41:08 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Sviluppo web]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[casi di studio]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=235</guid>
		<description><![CDATA[Quando ho deciso di rendere pubblico Semplice, il mio primo tema per WordPress, ho pensato che sarebbe stata una buona idea quella di includere qualche funzione che l&#8217;avrebbe reso diverso dagli altri temi in circolazione. La scelta è ricaduta sull&#8217;aggiunta di alcuni widget forniti di serie. Qui presenterò il widget relativo alla visualizzazione degli ultimi [...]]]></description>
			<content:encoded><![CDATA[<p>Quando ho deciso di rendere pubblico <a href="http://asteriscoweb.net/archivio/22-03-2009/semplice-un-tema-per-wordpress">Semplice</a>, il mio primo tema per WordPress, ho pensato che sarebbe stata una buona idea quella di includere qualche <em>funzione</em> che l&#8217;avrebbe reso <em>diverso</em> dagli altri temi in circolazione. La scelta è ricaduta sull&#8217;aggiunta di alcuni widget forniti di serie. Qui presenterò il widget relativo alla visualizzazione degli ultimi post su di un account Twitter.</p>
<h3>Magpie RSS</h3>
<p>Come alcuni di voi sapranno, WordPress include nel suo <em>core</em> <a href="http://magpierss.sourceforge.net/">Magpie RSS</a>, un parser PHP di feed RSS. In altre parole WordPress ha già tutto ciò che ci serve per elaborare un qualsiasi feed. Ci basterà semplicementi includere il file php relativo al parser ed istruirlo correttamente.</p>
<h3>Il codice di esempio</h3>
<p>Vediamo quindi come dire al nostro praser di visualizzare i nostri ultimi tweet. Ricordo che qui presenteremo solo una parte del codice, quella che effettivamente si occupa di elaborare il feed RSS, mentre il plug-in funzionante è disponibile per il download alla fine dell&#8217;articolo.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
	<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;asteriscow&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// settiamo il nostro username</span>
	<span style="color: #000088;">$n</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// il numero di tweet da visualizzare</span>
	<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://search.twitter.com/search.rss?q=from:&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$user</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// ci ricaviamo l'url del feed rss relativo al nostro user</span>
&nbsp;
    	<span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/rss.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// includiamo Magpie RSS</span>
    	<span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> fetch_rss<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_slice</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">items</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$n</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">//controlliamo che siano presenti dei tweet</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;li&gt;Non sono presenti tweet&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">else</span>
		<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #000088;">$n</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;li&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;a title=&quot;</span>\<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>Permalink<span style="color: #0000ff;">&quot; href=&quot;</span>\<span style="color: #0000ff;">&quot;&gt;#&lt;/a&gt;&lt;/li&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Il codice di esempio è abbastanza semplice ma contiene comunque dei commenti esplicativi. L&#8217;array <var>$item</var> contiene tutti i singoli nodi del nostro file rss. In altre parole per voler accedere al contenuto di <var>title</var> del primo nodo ci basterà scrivere <var>$item[0]['title']</var>.</p>
<h3 id="stw1-download">Download</h3>
<p>È disponibile per il download sia il codice completo che la versione plug-in già pronta all&#8217;uso. Entrambe le versioni contengono il codice relativo alla gestione del widget.</p>
<ul>
<li><a href="http://asteriscoweb.net/wp-content/uploads/2009/05/simpletweet_code-01.zip">Download codice completo</a></li>
<li><a href="http://asteriscoweb.net/wp-content/uploads/2009/05/simpletweet_plugin-01.zip">Download plug-in</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=tDxmiEU9qjE:dVEW0ah6dVE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=tDxmiEU9qjE:dVEW0ah6dVE:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=tDxmiEU9qjE:dVEW0ah6dVE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=tDxmiEU9qjE:dVEW0ah6dVE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=tDxmiEU9qjE:dVEW0ah6dVE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=tDxmiEU9qjE:dVEW0ah6dVE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=tDxmiEU9qjE:dVEW0ah6dVE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=tDxmiEU9qjE:dVEW0ah6dVE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/tDxmiEU9qjE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/02-05-2009/mostrare-gli-ultimi-tweet-nella-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Il meglio di marzo 2009</title>
		<link>http://asteriscoweb.net/archivio/04-04-2009/il-meglio-di-marzo-2009/</link>
		<comments>http://asteriscoweb.net/archivio/04-04-2009/il-meglio-di-marzo-2009/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 16:17:09 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[il meglio di]]></category>
		<category><![CDATA[Ispirazioni]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=209</guid>
		<description><![CDATA[Eccoci arrivati alla seconda puntata della serie di post dedicata al meglio del webdesign del mese appena trascorso. Se volete date un occhio alle segnalazioni dello scorso mese.

Segnalazioni


KISSmetrics


Immobiliamo


TJPH


Stefan Velthuys


Poshcss


Emarts


Gonzalog


Come sempre trovate link ad altre segnalazioni sfogliando le pagine del mio account delicious.
]]></description>
			<content:encoded><![CDATA[<p>Eccoci arrivati alla seconda puntata della serie di post dedicata al meglio del webdesign del mese appena trascorso. Se volete date un occhio alle <a href="http://asteriscoweb.net/archivio/03-03-2009/il-meglio-di-febbraio-2009">segnalazioni</a> dello scorso mese.</p>
<p><span id="more-209"></span></p>
<h3>Segnalazioni</h3>
<ul class="screens">
<li>
<h4>KISSmetrics</h4>
<p><a href="http://kissmetrics.com/" title="Visita kissmetrics.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/kiss.gif" alt="Screenshot KISSmetrics" width="587" height="180" class="alignnone size-full wp-image-210" /></a></li>
<li>
<h4>Immobiliamo</h4>
<p><a href="http://www.immobiliamo.com/" title="Visita immobiliamo.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/immobiliamo.gif" alt="Screenshot immobiliamo" width="587" height="180" class="alignnone size-full wp-image-221" /></a></li>
<li>
<h4>TJPH</h4>
<p><a href="http://www.tjphweb.com/" title="Visita tjphweb.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/tjph.gif" alt="Screenshot TJPH" title="Screenshot TJPH" width="587" height="180" class="alignnone size-full wp-image-225" /></a></li>
<li>
<h4>Stefan Velthuys</h4>
<p><a href="http://velthy.net/" title="Visita velthy.net"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/stefan.gif" alt="Screenshot velthy" width="587" height="180" class="alignnone size-full wp-image-219" /></a></li>
<li>
<h4>Poshcss</h4>
<p><a href="http://poshcss.com/" title="Visita poshcss.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/poshcss.gif" alt="Screenshot poshcss" width="587" height="180" class="alignnone size-full wp-image-213" /></a></li>
<li>
<h4>Emarts</h4>
<p><a href="http://blog.emarts.pe/" title="Visita blog.emarts.pe"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/emarts.gif" alt="Screenshot emarts" width="587" height="180" class="alignnone size-full wp-image-228" /></a></li>
<li>
<h4>Gonzalog</h4>
<p><a href="http://gonzalog.com/" title="Visita gonzalog.com"><img src="http://asteriscoweb.net/wp-content/uploads/2009/04/gonzalog.gif" alt="Screenshot gonzalog" width="587" height="180" class="alignnone size-full wp-image-215" /></a></li>
</ul>
<p>Come sempre trovate link ad altre segnalazioni sfogliando le pagine del mio <a href="http://delicious.com/asteriscow/ispirazioni">account delicious</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=TqJDuAOoDpo:tiT7YjqvcEU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=TqJDuAOoDpo:tiT7YjqvcEU:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=TqJDuAOoDpo:tiT7YjqvcEU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=TqJDuAOoDpo:tiT7YjqvcEU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=TqJDuAOoDpo:tiT7YjqvcEU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=TqJDuAOoDpo:tiT7YjqvcEU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=TqJDuAOoDpo:tiT7YjqvcEU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=TqJDuAOoDpo:tiT7YjqvcEU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/TqJDuAOoDpo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/04-04-2009/il-meglio-di-marzo-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Semplice, un tema per WordPress</title>
		<link>http://asteriscoweb.net/archivio/22-03-2009/semplice-un-tema-per-wordpress/</link>
		<comments>http://asteriscoweb.net/archivio/22-03-2009/semplice-un-tema-per-wordpress/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:08:04 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Webdesign]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[semplice]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=194</guid>
		<description><![CDATA[Sono lieto di presentarvi Semplice, il primo tema per WordPress che decido di rilasciare gratuitamente. Questo tema &#232; ripreso da quello utilizzato in un vecchio lavoro a dimostrazione di come un design semplice e pulito non passi mai di moda.


Demo
Download

Caratteristiche
Semplice &#232; stato pensato per essere leggero e facile da modificare, sentitevi quindi liberi di adattarlo [...]]]></description>
			<content:encoded><![CDATA[<p>Sono lieto di presentarvi <strong>Semplice</strong>, il primo tema per WordPress che decido di rilasciare gratuitamente. Questo tema &egrave; ripreso da quello utilizzato in un vecchio lavoro a dimostrazione di come un design semplice e pulito non passi mai di moda.</p>
<p class="screens" style="text-align: center"><a href="http://test.asteriscoweb.net/download/semplice_1.0.zip"><img src="http://asteriscoweb.net/wp-content/uploads/2009/03/screen_semplice.png" alt="Scarica il Tema!" title="Scarica il Tema!" width="587" height="180" class="alignnone size-full wp-image-195" /></a></p>
<ul>
<li><a href="http://test.asteriscoweb.net/?wptheme=semplice">Demo</a></li>
<li><a href="http://test.asteriscoweb.net/download/semplice_1.0.zip">Download</a></li>
</ul>
<h3>Caratteristiche</h3>
<p><strong>Semplice</strong> &egrave; stato pensato per essere <em>leggero</em> e facile da modificare, sentitevi quindi liberi di adattarlo alle vostre esigenze!</p>
<ul>
<li>Testato su WordPress 2.7</li>
<li>xHTML &amp; CSS Valido</li>
<li>Compatibile con i Widget</li>
<li><a href="http://asteriscoweb.net/archivio/02-05-2009/mostrare-gli-ultimi-tweet-nella-sidebar">Widget</a> personalizzato per <strong>Twitter</strong></li>
<li><strong>Made in Italy</strong></li>
</ul>
<h3>Traduzione</h3>
<p>Sono attualmente alla ricerca di un aiuto per tradurre questo tema in inglese, chi vuol collaborare si faccia avanti!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=dCRJgBpKwtk:sWi87spK70U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=dCRJgBpKwtk:sWi87spK70U:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=dCRJgBpKwtk:sWi87spK70U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=dCRJgBpKwtk:sWi87spK70U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=dCRJgBpKwtk:sWi87spK70U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=dCRJgBpKwtk:sWi87spK70U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=dCRJgBpKwtk:sWi87spK70U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=dCRJgBpKwtk:sWi87spK70U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/dCRJgBpKwtk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/22-03-2009/semplice-un-tema-per-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Inline edit in quasi 20 righe di codice</title>
		<link>http://asteriscoweb.net/archivio/16-03-2009/inline-edit-in-quasi-20-righe-di-codice/</link>
		<comments>http://asteriscoweb.net/archivio/16-03-2009/inline-edit-in-quasi-20-righe-di-codice/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 18:03:22 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Sviluppo web]]></category>
		<category><![CDATA[casi di studio]]></category>
		<category><![CDATA[for dummies]]></category>
		<category><![CDATA[in breve]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=173</guid>
		<description><![CDATA[Sulla falsa riga dell&#8217;articolo DOM for dummies di qualche giorno fa, ecco un&#8217;altro esempio un po&#8217; pi&#249; complesso di codice Javascript. In questo caso l&#8217;obiettivo &#232; quello di realizzare un inline edit.
Il codice di esempio
Il codice qui presentato &#232; volutamente molto semlice, ma comunque funzionante e compatibile con pi&#249; browser.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
var stat = false;
&#160;
function edit&#40;id, txt&#41;&#123;
	txt [...]]]></description>
			<content:encoded><![CDATA[<p>Sulla falsa riga dell&#8217;articolo <a href="http://asteriscoweb.net/archivio/07-03-2009/dom-for-dummies">DOM for dummies</a> di qualche giorno fa, ecco un&#8217;altro esempio un po&#8217; pi&ugrave; complesso di codice Javascript. In questo caso l&#8217;obiettivo &egrave; quello di realizzare un <em>inline edit</em>.</p>
<h3>Il codice di esempio</h3>
<p>Il codice qui presentato &egrave; volutamente molto semlice, ma comunque funzionante e compatibile con pi&ugrave; browser.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> stat <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> edit<span style="color: #009900;">&#40;</span>id<span style="color: #339933;">,</span> txt<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	txt <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>txt<span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">'undefined'</span> <span style="color: #339933;">?</span> txt <span style="color: #339933;">:</span> <span style="color: #3366CC;">'Salva'</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> el <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>stat<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> cmd <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;br /&gt;&lt;input type=&quot;submit&quot; value=&quot;'</span><span style="color: #339933;">+</span> txt <span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot; onclick=&quot;save(<span style="color: #000099; font-weight: bold;">\'</span>'</span><span style="color: #339933;">+</span> id <span style="color: #339933;">+</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\'</span>)&quot; /&gt;'</span><span style="color: #339933;">;</span>
		el.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;textarea cols=&quot;100%&quot; rows=&quot;8%&quot; id=<span style="color: #000099; font-weight: bold;">\&quot;</span>edit-'</span><span style="color: #339933;">+</span> id <span style="color: #339933;">+</span><span style="color: #3366CC;">'<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;'</span> <span style="color: #339933;">+</span> el.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/textarea&gt;'</span> <span style="color: #339933;">+</span> cmd<span style="color: #339933;">;</span>
		stat <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> save<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> elm <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> rep <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'edit-'</span><span style="color: #339933;">+</span> id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> str <span style="color: #339933;">=</span> rep.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
		elm.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> str<span style="color: #339933;">;</span>
		stat <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://asteriscoweb.net/esempi/inlineedit.html" class="esempio">Visualizza esempio</a></p>
<p>Per poter rendere un area del nostro documento modificabile andremo a richiamare tramite un link la funzione <code>edit()</code>. Questa funzione prende in input una stringa contente l&#8217;id dell&#8217;elemento da modificare ed eventualmente una stringa contenente il testo da visualizzare nel bottone per il salvataggio.</p>
<p>Volendo assegnare uno stile CSS alla textarea di modifica basta definire nel nostro foglio di stile una regola realtiva all&#8217;ID <code>edit-<var>$id</var></code>, dove <var>$id</var> &egrave; l&#8217;ID dell&#8217;elemento da modificare. Detto in parole pi&ugrave; semplici, volendo modificare il div che ha come ID <strong>esempio</strong>, il relativo ID della textarea sar&agrave; <strong>edit-esempio</strong>.</p>
<h3>Compatibilit&agrave;</h3>
<p>Il codice &egrave; stato testato con successo sui seguenti browser:</p>
<ul>
<li>Firefox 3</li>
<li>Internet Explorer 7</li>
<li>Opera 9.6</li>
<li>Safari per Windows</li>
</ul>
<h3>Raffinare il codice</h3>
<p>Per ridurre il codice al minimo, e rendere quindi l&#8217;esempio pi&ugrave; semplice, ho deciso di omettere la funzione relativa ad una chiamata asincrona ad una pagina scritta in PHP o in altro linguaggio di programmazione. Nelle prossime puntate vedremo come realizzare una chiamata ad una funzione AJAX e rendere quindi permanenti le modifiche effettuate.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=xmQPYJ79uWc:nml4OdZz3oU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=xmQPYJ79uWc:nml4OdZz3oU:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=xmQPYJ79uWc:nml4OdZz3oU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=xmQPYJ79uWc:nml4OdZz3oU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=xmQPYJ79uWc:nml4OdZz3oU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=xmQPYJ79uWc:nml4OdZz3oU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=xmQPYJ79uWc:nml4OdZz3oU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=xmQPYJ79uWc:nml4OdZz3oU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/xmQPYJ79uWc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/16-03-2009/inline-edit-in-quasi-20-righe-di-codice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gedit per programmare</title>
		<link>http://asteriscoweb.net/archivio/09-03-2009/gedit-per-programmare/</link>
		<comments>http://asteriscoweb.net/archivio/09-03-2009/gedit-per-programmare/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 20:44:40 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[gedit]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=151</guid>
		<description><![CDATA[Chi gi&#224; mi ha seguito in passato sa della mia mania per gli editor per programmare. Un software che ho sempre sottovalutato &#232; stato gedit, l&#8217;editor di testo di base che si trova sui sistemi basati su Gnome. Non mi ero mai soffermato pi&#249; di tanto a scoprirne le enormi potenzialit&#224;, ma adesso non potrei [...]]]></description>
			<content:encoded><![CDATA[<p>Chi gi&agrave; mi ha seguito in passato sa della mia mania per gli editor per programmare. Un software che ho sempre sottovalutato &egrave; stato <strong>gedit</strong>, l&#8217;editor di testo di base che si trova sui sistemi basati su <a href="http://it.wikipedia.org/wiki/Gnome">Gnome</a>. Non mi ero mai soffermato pi&ugrave; di tanto a scoprirne le enormi potenzialit&agrave;, ma adesso non potrei pi&ugrave; farne a meno.</p>
<p>Dopo le dovute personalizzazioni &egrave; diventato a pieno titolo l&#8217;editor che utilizzo pi&ugrave; spesso, specialmente per scrivere e testare al volo gli esempi proposti durante le lezioni universitarie.</p>
<h3>La personalizzazione</h3>
<p>Partiamo subito ad attivare le prime opzioni utili alla programmazione. Andiamo nel menu <strong>Modifica &rarr; Preferenze</strong> e selezioniamo la tab <strong>Vista</strong> e selezioniamo le caselle relative a:</p>
<ul>
<li><strong>Mostrare numeri di riga</strong></li>
<li><strong>Evidenziare la riga corrente</strong></li>
<li><strong>Evidenziare la parentesi corrispondente</strong></li>
</ul>
<p>Selezioniamo la tab <strong>Plugin</strong> e spuntiamo i seguenti plugin:</p>
<ul>
<li><strong>Esplorazione file</strong></li>
<li><strong>Strumenti esterni</strong></li>
</ul>
<p>Chiudiamo la finestra delle preferenze e spostiamoci nel menu <strong>Visualizza</strong>, selezioniamo quindi <strong>Riquadro laterale</strong> e <strong>Riquadro inferiore</strong>.</p>
<h3>Settiamo il compilatore</h3>
<p>Per chi come me, per ragioni di studio o di lavoro, si ritrova a dover lavorare in linguaggio C o C++ pu&ograve; essere utile compilare ed eseguire direttamente da gedit il proprio codice.</p>
<p>Spostiamoci nel menu <strong>Strumenti &rarr; Strumenti esterni&#8230;</strong> e clicchiamo sul pulsante <strong>Nuovo</strong>, chiamiamo il nuovo comando, ad esempio, &quot;Compila con G++&quot; e nella casella di testo <strong>Comando/i</strong> scriviamo il seguente codice:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">g++</span> <span style="color: #007800;">$GEDIT_CURRENT_DOCUMENT_NAME</span> 
<span style="color: #660033;">-o</span> <span style="color: #800000;">${GEDIT_CURRENT_DOCUMENT_NAME%.*}</span></pre></td></tr></table></div>

<p>Come <strong>Tasto scorciatoia</strong> inseriamo, ad esempio, <em>&lt;Control&gt;F7</em>; dai menu a discesa selezioniamo per <strong>Input</strong>, <em>Documento corrente</em>, per <strong>Output</strong>, <em>Visualizza nel pannello inferiore</em> e per <strong>Applicabilit&agrave;</strong>, <em>Tutti i documenti esclusi quelli non salvati</em>.</p>
<p>Creiamo un nuovo comando  e chiamiamolo &quot; Esegui nel terminale&quot; e in <strong>Comando/i</strong> scriviamo quanto segue:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">gnome-terminal <span style="color: #660033;">-x</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #800000;">${GEDIT_CURRENT_DOCUMENT_NAME%.*}</span> 
<span style="color: #660033;">--working-directory</span>=<span style="color: #007800;">$GEDIT_CURRENT_DOCUMENT_DIR</span></pre></td></tr></table></div>

<p>Impostiamo come <strong>Tasto scorciatoia</strong> <em>&lt;Control&gt;F8</em> e impostiamo per <strong>Input</strong>, <strong>Output</strong> e <strong>Applicabilit&agrave;</strong> gli stessi parametri visti prima.</p>
<p>Adesso nel menu <strong>Strumenti</strong> troveremo anche le nostre due <em>funzioni</em> che potremo richiamare da tastiera tramite le combinazioni di tasti <em>&lt;Control&gt;F7</em> e <em>&lt;Control&gt;F8</em>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=mc7ZcSFjxO0:1KwdxGmXdbQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=mc7ZcSFjxO0:1KwdxGmXdbQ:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=mc7ZcSFjxO0:1KwdxGmXdbQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=mc7ZcSFjxO0:1KwdxGmXdbQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=mc7ZcSFjxO0:1KwdxGmXdbQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=mc7ZcSFjxO0:1KwdxGmXdbQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=mc7ZcSFjxO0:1KwdxGmXdbQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=mc7ZcSFjxO0:1KwdxGmXdbQ:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/mc7ZcSFjxO0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/09-03-2009/gedit-per-programmare/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>DOM for dummies: esempi di scripting</title>
		<link>http://asteriscoweb.net/archivio/07-03-2009/dom-for-dummies/</link>
		<comments>http://asteriscoweb.net/archivio/07-03-2009/dom-for-dummies/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 12:49:27 +0000</pubDate>
		<dc:creator>Stefano/asterisco</dc:creator>
				<category><![CDATA[Sviluppo web]]></category>
		<category><![CDATA[for dummies]]></category>
		<category><![CDATA[in breve]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://asteriscoweb.net/?p=129</guid>
		<description><![CDATA[Ecco una serie di piccoli e semplici pezzi di codice Javascript che si occupano di modificare il DOM di una pagina HTML. Nulla di particolare, ma possono sempre risultare utili.
Mostrare/nascondere un elemento
La funzione prende in input l&#8217;ID dell&#8217;elemento da modificare.

1
2
3
4
5
6
7
function hide_unhide&#40;id&#41;&#123;
	var el = document.getElementById&#40;id&#41;;
	if &#40;el.style.display == &#34;&#34;&#41;
		el.style.display = 'none';
	else
		el.style.display = &#34;&#34;;
&#125;

Visualizza esempio
Cambiare il colore di [...]]]></description>
			<content:encoded><![CDATA[<p>Ecco una serie di piccoli e semplici pezzi di codice Javascript che si occupano di modificare il <a href="http://it.wikipedia.org/wiki/Document_Object_Model"><abbr title="Document Object Model">DOM</abbr></a> di una pagina HTML. Nulla di particolare, ma possono sempre risultare utili.</p>
<h3>Mostrare/nascondere un elemento</h3>
<p>La funzione prende in input l&#8217;ID dell&#8217;elemento da modificare.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> hide_unhide<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> el <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>el.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span>
		el.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'none'</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">else</span>
		el.<span style="color: #660066;">style</span>.<span style="color: #660066;">display</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://asteriscoweb.net/esempi/domfordummies1.html" class="esempio">Visualizza esempio</a></p>
<h3>Cambiare il colore di sfondo di un elemento</h3>
<p>La funzione prende in input l&#8217;ID dell&#8217;elemento da modificare ed il codice del colore.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> change_bgcolor<span style="color: #009900;">&#40;</span>id<span style="color: #339933;">,</span> color<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> el <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	el.<span style="color: #660066;">style</span>.<span style="color: #660066;">background</span> <span style="color: #339933;">=</span> color<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://asteriscoweb.net/esempi/domfordummies1.html" class="esempio">Visualizza esempio</a></p>
<h3>Modificare il contenuto di un elemento</h3>
<p>La funzione prende in input l&#8217;ID dell&#8217;elemento da modificare e il testo da sostituire.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> change_cont<span style="color: #009900;">&#40;</span>id<span style="color: #339933;">,</span> str<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> el <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	el.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> str<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://asteriscoweb.net/esempi/domfordummies1.html" class="esempio">Visualizza esempio</a></p>
<h3>Aggiungere contenuto ad un elemento</h3>
<p>La funzione prende in input l&#8217;ID dell&#8217;elemento da modificare e il testo da aggiungere.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> app_cont<span style="color: #009900;">&#40;</span>id<span style="color: #339933;">,</span> str<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> el <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> app <span style="color: #339933;">=</span> document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	el.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>app<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://asteriscoweb.net/esempi/domfordummies1.html" class="esempio">Visualizza esempio</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=-gKiakCFs2Y:UyEOBhxNWiU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=-gKiakCFs2Y:UyEOBhxNWiU:YwkR-u9nhCs"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?d=YwkR-u9nhCs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=-gKiakCFs2Y:UyEOBhxNWiU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=-gKiakCFs2Y:UyEOBhxNWiU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=-gKiakCFs2Y:UyEOBhxNWiU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=-gKiakCFs2Y:UyEOBhxNWiU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/asteriscoweb?a=-gKiakCFs2Y:UyEOBhxNWiU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/asteriscoweb?i=-gKiakCFs2Y:UyEOBhxNWiU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/asteriscoweb/~4/-gKiakCFs2Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://asteriscoweb.net/archivio/07-03-2009/dom-for-dummies/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
