<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://blog.psicomante.net" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>il Blog di Psicomante - Eppur svolazzano! Esperimento di floating blocks in Drupal - Comments</title>
 <link>http://blog.psicomante.net/eppur-svolazzano-esperimento-di-floating-blocks-in-drupal.html</link>
 <description>Comments for &quot;Eppur svolazzano! Esperimento di floating blocks in Drupal&quot;</description>
 <language>en</language>
<item>
 <title>Ciao Vincenzo. Si forse è</title>
 <link>http://blog.psicomante.net/eppur-svolazzano-esperimento-di-floating-blocks-in-drupal.html#comment-4275</link>
 <description>&lt;p&gt;Ciao Vincenzo. Si forse è un pò troppo tecnico il post. Se puoi dirmi in dettaglio cosa non ti funziona, ti posso aiutare in modo mirato. &lt;img src=&quot;/sites/all/modules/smileys/packs/example/wink.png&quot; title=&quot;Eye-wink&quot; alt=&quot;Eye-wink&quot; /&gt;&lt;/p&gt;
&lt;p&gt;EDIT: C&#039;era un errore nel codice javascript, ho corretto. Prova a controllare se era per quel motivo che non ti funzionava.&lt;/p&gt;
</description>
 <pubDate>Fri, 14 Sep 2007 11:37:00 +0200</pubDate>
 <dc:creator>psicomante</dc:creator>
 <guid isPermaLink="false">comment 4275 at http://blog.psicomante.net</guid>
</item>
<item>
 <title>Mi piacerebbe creare un</title>
 <link>http://blog.psicomante.net/eppur-svolazzano-esperimento-di-floating-blocks-in-drupal.html#comment-4260</link>
 <description>&lt;p&gt;Mi piacerebbe creare un blocco fluttuante ma non riesco seguendo il tuo post... potresti spiegare meglio il procedimento ?&lt;br /&gt;
Grazie&lt;br /&gt;
Vincenzo&lt;/p&gt;
</description>
 <pubDate>Thu, 13 Sep 2007 23:05:29 +0200</pubDate>
 <dc:creator>drupillo anonimo</dc:creator>
 <guid isPermaLink="false">comment 4260 at http://blog.psicomante.net</guid>
</item>
<item>
 <title>Fico! Lo voglio *_*</title>
 <link>http://blog.psicomante.net/eppur-svolazzano-esperimento-di-floating-blocks-in-drupal.html#comment-848</link>
 <description>&lt;p&gt;Fico! Lo voglio *_*&lt;/p&gt;
</description>
 <pubDate>Fri, 20 Apr 2007 23:19:09 +0200</pubDate>
 <dc:creator>Andrea Micheloni</dc:creator>
 <guid isPermaLink="false">comment 848 at http://blog.psicomante.net</guid>
</item>
<item>
 <title>Eppur svolazzano! Esperimento di floating blocks in Drupal</title>
 <link>http://blog.psicomante.net/eppur-svolazzano-esperimento-di-floating-blocks-in-drupal.html</link>
 <description>&lt;p&gt;&lt;em&gt;Howto|Tutorial: Floating Blocks in Drupal con jquery&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Ho avuto un&#039;idea ieri sera, far svolazzare in mezzo alla pagina dei blocchi caricati dinamicamente, all&#039;interno di una qualsiasi installazione di Drupal. E così ho fatto &lt;img src=&quot;/sites/all/modules/smileys/packs/example/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; /&gt;&lt;br /&gt;
Nulla di così difficile, o per soli esperti. L&#039;operazione è banale, e anche piuttosto incompleta.&lt;/p&gt;
&lt;p&gt;Eccovi l&#039;anteprima:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;/files/images/float_block.jpg&quot; class=&quot;thickbox&quot; rel=&quot;gallery-plants&quot;&gt;&lt;img src=&quot;/files/images/float_block.preview.jpg&quot; title=&quot;Floating blocks in Drupal&quot; alt=&quot;Floating blocks in Drupal&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Requisiti:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Drupal,e un tema in PHPTemplate (ovvio)&lt;/li&gt;
&lt;li&gt;La libreria &lt;a href=&quot;http://www.consulenza-web.com/jquery_plugins/xwin.html&quot;&gt;xWin per jQuery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;10 minuti di tempo&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Inserire nel tema le due librerie fondamentali, più il CSS, nella cartella xwin. Creare nel template una sezione chiamata, ad esempio, &quot;floating&quot;, ed inserire nel page.tpl.php il riferimento alla sezione più una &quot;id&quot;.&lt;/p&gt;
&lt;p&gt;Ecco il codice:&lt;/p&gt;
&lt;p&gt;Aggiungere gli script e il css nell&#039;head.&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;base_path&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;path_to_theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;/xwin/jQueryxWin.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;base_path&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;path_to_theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;/xwin/jquery.xwin.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;base_path&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;path_to_theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;/xwin/script.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; media=&amp;quot;screen&amp;quot; href=&amp;quot;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;base_path&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;path_to_theme&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;() &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;/xwin/xwin.css&amp;quot; /&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Codice dello script da inserire nella pagina, io l&#039;ho inserito in script.js&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$(document).ready(function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&amp;quot;#floating1&amp;quot;).xWin({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; show:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;si&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; top:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width:&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;&amp;nbsp; $(&amp;quot;#floating2&amp;quot;).xWin({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; show:&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;si&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; top:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; left:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 500,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; width:&amp;nbsp;&amp;nbsp;&amp;nbsp; 200&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;});&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Le due sezioni nel page.tpl.php&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;div class=&amp;quot;xWin&amp;quot; id=&amp;quot;floating1&amp;quot;&amp;gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$floating1 ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class=&amp;quot;xWin&amp;quot; id=&amp;quot;floating2&amp;quot;&amp;gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;print &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$floating2 ?&amp;gt;&lt;/span&gt;&lt;/span&gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Le sezioni nel template.php&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;function garland2_regions() {&lt;br /&gt;&amp;nbsp; return array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#039;left&amp;#039; =&amp;gt; t(&amp;#039;left sidebar&amp;#039;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#039;right&amp;#039; =&amp;gt; t(&amp;#039;right sidebar&amp;#039;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#039;floating&amp;#039; =&amp;gt; t(&amp;#039;floating1&amp;#039;),&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#039;floating2&amp;#039; =&amp;gt; t(&amp;#039;floating2&amp;#039;)&lt;br /&gt;&amp;nbsp; );&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;KNOWN BUGS&lt;/strong&gt;&lt;br /&gt;
E&#039; incompatibile, con quasi tutti i moduli che interagiscono con il DOM, io ho provato JsTools e DHTML_menu&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TODO&lt;/strong&gt;&lt;br /&gt;
Ricordarsi la posizione, le dimensioni e non far ricaricare con effetto comparsa ogni volta i blocchi. Insomma è solo una tech demo per vedere le potenzialità di Drupal &lt;img src=&quot;/sites/all/modules/smileys/packs/example/tongue.png&quot; title=&quot;Sticking out tongue&quot; alt=&quot;Sticking out tongue&quot; /&gt;&lt;/p&gt;
</description>
 <comments>http://blog.psicomante.net/eppur-svolazzano-esperimento-di-floating-blocks-in-drupal.html#comments</comments>
 <category domain="http://blog.psicomante.net/blog/ajax">ajax</category>
 <category domain="http://blog.psicomante.net/blog/drupal">drupal</category>
 <category domain="http://blog.psicomante.net/blog/esperimenti">esperimenti</category>
 <category domain="http://blog.psicomante.net/blog/guide">guide</category>
 <category domain="http://blog.psicomante.net/blog/guide-drupal">guide drupal</category>
 <category domain="http://blog.psicomante.net/blog/howto">howto</category>
 <category domain="http://blog.psicomante.net/blog/howto-drupal">howto drupal</category>
 <category domain="http://blog.psicomante.net/blog/javascript">javascript</category>
 <category domain="http://blog.psicomante.net/blog/themes">themes</category>
 <category domain="http://blog.psicomante.net/blog/tutorial">tutorial</category>
 <category domain="http://blog.psicomante.net/blog/tutorial-drupal">tutorial drupal</category>
 <pubDate>Fri, 20 Apr 2007 09:33:10 +0200</pubDate>
 <dc:creator>psicomante</dc:creator>
 <guid isPermaLink="false">69 at http://blog.psicomante.net</guid>
</item>
</channel>
</rss>
