<?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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Blogbonzo</title>
	
	<link>http://blog.ilbonzo.org</link>
	<description>Blog del Bonzo sull'informatica a tutto campo</description>
	<pubDate>Fri, 26 Jun 2009 11:02:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Blogbonzo" type="application/rss+xml" /><item>
		<title>links for 2009-06-26</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/NPYuM5dIVWw/</link>
		<comments>http://blog.ilbonzo.org/2009/06/26/links-for-2009-06-26/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 11:02:51 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[Delicous]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/06/26/links-for-2009-06-26/</guid>
		<description><![CDATA[

Jquery Floating Box Plugin
(tags: jquery floating box menu float plugin in)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.phpletter.com/Demo/Jquery-Floating-Box-Plugin/">Jquery Floating Box Plugin</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/jquery">jquery</a> <a href="http://delicious.com/ilbonzo/floating">floating</a> <a href="http://delicious.com/ilbonzo/box">box</a> <a href="http://delicious.com/ilbonzo/menu">menu</a> <a href="http://delicious.com/ilbonzo/float">float</a> <a href="http://delicious.com/ilbonzo/plugin">plugin</a> <a href="http://delicious.com/ilbonzo/in">in</a>)</div>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/NPYuM5dIVWw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/06/26/links-for-2009-06-26/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/06/26/links-for-2009-06-26/</feedburner:origLink></item>
		<item>
		<title>Modulo Drupal per nuovo tipo di contenuto</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/Yzis5ynaAro/</link>
		<comments>http://blog.ilbonzo.org/2009/06/25/modulo-drupal-per-nuovo-tipo-di-contenuto/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 08:02:13 +0000</pubDate>
		<dc:creator>Bonzo</dc:creator>
		
		<category><![CDATA[drupal]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/?p=284</guid>
		<description><![CDATA[In Drupal è molto semplice sviluppare un modulo che permeta di avere a disposizione un nuovo tipo di contenuto che estenda il classico nodo.
Vediamo come sviluppare un modulo che aggiunga il tipo di contenuto libro.
Creiamo la cartella node_book che andremo a mettere nella cartella modules del nostro sito.
Dentro questa cartella mettiamo il file node_book.info con [...]]]></description>
			<content:encoded><![CDATA[<p>In Drupal è molto semplice sviluppare un modulo che permeta di avere a disposizione un nuovo tipo di contenuto che estenda il classico nodo.</p>
<p>Vediamo come sviluppare un modulo che aggiunga il tipo di contenuto libro.</p>
<p>Creiamo la cartella node_book che andremo a mettere nella cartella modules del nostro sito.<br />
Dentro questa cartella mettiamo il file <em>node_book.info</em> con le specifiche del nodo:<br />
<code><br />
; $Id$<br />
name = node book<br />
description = "nodo libro"<br />
core = 6.x<br />
</code></p>
<p>e il file node_book.module con il codice vero e proprio.</p>
<p>Ecco i vari hook che si devono implementare:<br />
<strong>Hook menu</strong><br />
<code><br />
function node_book_menu()<br />
{<br />
	$items[] = array( &#8216;path&#8217; => &#8216;node_book&#8217;, &#8216;callback&#8217; => &#8216;node_book_page&#8217;, &#8216;access&#8217; => true, &#8216;type&#8217; => MENU_CALLBACK );<br />
      return $items;<br />
}<br />
</code></p>
<p><strong>hook perm</strong><br />
<code><br />
function node_book_perm()<br />
{<br />
  return array('create book node', 'edit own book nodes');<br />
}<br />
</code><br />
<strong>hook access</strong><br />
<code>function node_book_access($op, $node, $account) {<br />
  if ($op == 'create') {<br />
    // Only users with permission to do so may create this node type.<br />
    return user_access('create nameofnodetype', $account);<br />
  }<br />
  // Users who create a node may edit or delete it later, assuming they have the<br />
  // necessary permissions.<br />
  if ($op == 'update' || $op == 'delete') {<br />
    if (user_access('edit own nameofnodetype', $account) &#038;&#038; ($account->uid == $node->uid)) {<br />
      return TRUE;<br />
    }<br />
  }<br />
}</code></p>
<p><strong>hook help</strong><br />
<code>function node_book_help($path, $arg) {<br />
  switch ($path) {<br />
    case 'admin/help#block':<br />
      return '
<p>&#8216;. t(&#8217;Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. Blocks are usually generated automatically by modules (e.g., Recent Forum Topics), but administrators can also define custom blocks.&#8217;) .&#8217;</p>
<p>&#8216;;</p>
<p>    case &#8216;admin/build/block&#8217;:<br />
      return t(&#8217;
<p>Blocks are boxes of content that may be rendered into certain regions of your web pages, for example, into sidebars. They are usually generated automatically by modules, but administrators can create blocks manually.</p>
<p>If you want certain blocks to disable themselves temporarily during high server loads, check the &#8220;Throttle&#8221; box. You can configure the auto-throttle on the <a href="@throttle">throttle configuration page</a> after having enabled the throttle module.</p>
<p>You can configure the behaviour of each block (for example, specifying on which pages and for what users it will appear) by clicking the &#8220;configure&#8221; link for each block.</p>
<p>&#8216;, array(&#8217;@throttle&#8217; => url(&#8217;admin/settings/throttle&#8217;)));<br />
  }<br />
}</code><br />
Ora passiamo agli hook che implementano veramente il nostro modulo:<br />
<strong>hook form</strong><br />
<code><br />
function node_book_form(&#038;$node) {<br />
$type = node_get_types('type', $node);<br />
  if ($type->has_title) {<br />
    $form['title'] = array(<br />
      &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
      &#8216;#title&#8217; => check_plain($type->title_label),<br />
      &#8216;#required&#8217; => TRUE,<br />
      &#8216;#default_value&#8217; => $node->title,<br />
      &#8216;#weight&#8217; => -5<br />
    );<br />
  }<br />
  if ($type->has_body) {<br />
    // In Drupal 6, we can use node_body_field() to get the body and filter<br />
    // elements. This replaces the old textarea + filter_form() method of<br />
    // setting this up. It will also ensure the teaser splitter gets set up<br />
    // properly.<br />
    $form['body_field'] = node_body_field($node, $type->body_label, $type->min_word_count);<br />
  }<br />
  // NOTE in node_example there is some addition code here not needed for this simple node-type<br />
 // Now we define the form elements specific to our node type.<br />
  $form['editor'] = array(<br />
    &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
    &#8216;#title&#8217; => t(&#8217;Editore&#8217;),<br />
    &#8216;#default_value&#8217; => isset($node->editor) ? $node->editor : &#8221;,<br />
  );<br />
  $form['book_author'] = array(<br />
    &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
    &#8216;#title&#8217; => t(&#8217;Autore&#8217;),<br />
    &#8216;#default_value&#8217; => isset($node->book_author) ? $node->book_author : &#8221;,<br />
  );<br />
  $form['place'] = array(<br />
    &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
    &#8216;#title&#8217; => t(&#8217;Luogo&#8217;),<br />
    &#8216;#default_value&#8217; => isset($node->place) ? $node->place : &#8221;,<br />
  );<br />
  $form['year'] = array(<br />
    &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
    &#8216;#title&#8217; => t(&#8217;Anno&#8217;),<br />
    &#8216;#default_value&#8217; => isset($node->year) ? $node->year : &#8221;,<br />
  );<br />
  $form['book_type'] = array(<br />
    &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
    &#8216;#title&#8217; => t(&#8217;Tipo&#8217;),<br />
    &#8216;#default_value&#8217; => isset($node->book_type) ? $node->book_type : &#8221;,<br />
  );<br />
  $form['magazine'] = array(<br />
    &#8216;#type&#8217; => &#8216;textfield&#8217;,<br />
    &#8216;#title&#8217; => t(&#8217;Rivista&#8217;),<br />
    &#8216;#default_value&#8217; => isset($node->magazine) ? $node->magazine : &#8221;,<br />
  );<br />
  return $form;<br />
}</code></p>
<p><strong>hook insert</strong><br />
/**<br />
 * Implementation of hook_insert().<br />
 *<br />
 * As a new node is being inserted into the database, we need to do our own<br />
 * database inserts.<br />
 */<br />
<code>function node_book_insert($node) {<br />
  db_query("INSERT INTO {node_book} (vid, nid, editor, book_author, place, year, book_type, magazine) VALUES (%d, %d, '%s', '%s', '%s', '%s', '%s', '%s')", $node->vid, $node->nid,$node->editor,$node->book_author,$node->place,$node->year,$node->book_type,$node->magazine);<br />
}</code></p>
<p><strong>hook update</strong><br />
<code>/**<br />
 * Implementation of hook_update().<br />
 *<br />
 * As an existing node is being updated in the database, we need to do our own<br />
 * database updates.<br />
 */<br />
function node_book_update($node) {<br />
  // if this is a new node or we're adding a new revision,<br />
  if ($node->revision) {<br />
    node_book_insert($node);<br />
  }<br />
  else {<br />
    db_query("UPDATE {node_book} SET editor='%s', book_author='%s', place='%s', year='%s', book_type='%s', magazine='%s' WHERE vid = %d",  $node->editor, $node->book_author, $node->place, $node->year, $node->book_type, $node->magazine, $node->vid);<br />
  }<br />
}<br />
</code></p>
<p><strong>hook nodeapi</strong><br />
<code>/**<br />
 * Implementation of hook_nodeapi().<br />
 *<br />
 * When a node revision is deleted, we need to remove the corresponding record<br />
 * from our table. The only way to handle revision deletion is by implementing<br />
 * hook_nodeapi().<br />
 */<br />
function node_book_nodeapi(&#038;$node, $op, $teaser, $page) {<br />
  switch ($op) {<br />
    case 'delete revision':<br />
      // Notice that we're matching a single revision based on the node's vid.<br />
      db_query('DELETE FROM {node_book} WHERE vid = %d', $node->vid);<br />
      break;<br />
  }<br />
}</code></p>
<p><strong>hook_delete</strong><br />
/**<br />
 * Implementation of hook_delete().<br />
 *<br />
 * When a node is deleted, we need to remove all related records from out table.<br />
 */<br />
function node_book_delete($node) {<br />
  // Notice that we&#8217;re matching all revision, by using the node&#8217;s nid.<br />
  db_query(&#8217;DELETE FROM {node_book} WHERE nid = %d&#8217;, $node->nid);<br />
}</p>
<p><strong>hook load</strong><br />
<code>/**<br />
 * Implementation of hook_load().<br />
 *<br />
 * Now that we've defined how to manage the node data in the database, we<br />
 * need to tell Drupal how to get the node back out. This hook is called<br />
 * every time a node is loaded, and allows us to do some loading of our own.<br />
 */<br />
function node_book_load($node) {<br />
  $additions = db_fetch_object(db_query('SELECT editor,book_author,place,year,book_type,magazine FROM {node_book} WHERE vid = %d', $node->vid));<br />
  return $additions;<br />
}<br />
</code></p>
<p><strong>hook view</strong><br />
<code>/**<br />
 * Implementation of hook_view().<br />
 *<br />
 * This is a typical implementation that simply runs the node text through<br />
 * the output filters.<br />
 */<br />
function node_book_view($node, $teaser = FALSE, $page = FALSE) {<br />
    $node = node_prepare($node, $page);<br />
    $node->content['myfield'] = array(<br />
	&#8216;#value&#8217; => &#8216;Editore: &#8216;.$node->editor.&#8217;&lt;br /&gt;&#8217;.'Autore: &#8216;.$node->book_author.&#8217;&lt;br &gt;&#8217;.'Luogo: &#8216;.$node->place.&#8217;&lt;br &gt;&#8217;.'Anno: &#8216;.$node->year.&#8217;&lt;br &gt;&#8217;.'Tipologia: &#8216;.$node->book_type.&#8217;&lt;br &gt;&#8217;,<br />
    	&#8216;#weight&#8217; => 1,<br />
  );<br />
  return $node;<br />
}<br />
</code></p>
<p>Ora manca solo il DB, ecco la tabella per i campi in più del nostro nodo<br />
CREATE TABLE node_book (<br />
vid int(10) unsigned NOT NULL default &#8216;0&#8242;,<br />
nid int(10) unsigned NOT NULL default &#8216;0&#8242;,<br />
editor varchar(255) NOT NULL default &#8221;,<br />
book_author varchar(255) NOT NULL default &#8221;,<br />
place varchar(255),<br />
year varchar(255),<br />
book_type varchar(255),<br />
magazine varchar(255),<br />
PRIMARY KEY (vid, nid),<br />
KEY `node_type_book_nid` (nid)<br />
)</p>
<p>Dopo aver creato la tabella e attivato il modulo avrete un nuovo tipo di contenuto disponibile.</p>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/Yzis5ynaAro" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/06/25/modulo-drupal-per-nuovo-tipo-di-contenuto/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/06/25/modulo-drupal-per-nuovo-tipo-di-contenuto/</feedburner:origLink></item>
		<item>
		<title>links for 2009-06-24</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/usUH_R-LZiU/</link>
		<comments>http://blog.ilbonzo.org/2009/06/24/links-for-2009-06-24/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 11:03:01 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[Delicous]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/06/24/links-for-2009-06-24/</guid>
		<description><![CDATA[

stu nicholls dot com &#124; javascript and CSS home page
(tags: css javascript webdesign tutorials design menus menu webdev)


KPMRS -Website position and keyword ranking tool
(tags: seo tools google website tool Search web webmaster keyword monitoring ranking keywords)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.stunicholls.com/index.html">stu nicholls dot com | javascript and CSS home page</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/css">css</a> <a href="http://delicious.com/ilbonzo/javascript">javascript</a> <a href="http://delicious.com/ilbonzo/webdesign">webdesign</a> <a href="http://delicious.com/ilbonzo/tutorials">tutorials</a> <a href="http://delicious.com/ilbonzo/design">design</a> <a href="http://delicious.com/ilbonzo/menus">menus</a> <a href="http://delicious.com/ilbonzo/menu">menu</a> <a href="http://delicious.com/ilbonzo/webdev">webdev</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://www.kpmrs.com/index.php">KPMRS -Website position and keyword ranking tool</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/seo">seo</a> <a href="http://delicious.com/ilbonzo/tools">tools</a> <a href="http://delicious.com/ilbonzo/google">google</a> <a href="http://delicious.com/ilbonzo/website">website</a> <a href="http://delicious.com/ilbonzo/tool">tool</a> <a href="http://delicious.com/ilbonzo/Search">Search</a> <a href="http://delicious.com/ilbonzo/web">web</a> <a href="http://delicious.com/ilbonzo/webmaster">webmaster</a> <a href="http://delicious.com/ilbonzo/keyword">keyword</a> <a href="http://delicious.com/ilbonzo/monitoring">monitoring</a> <a href="http://delicious.com/ilbonzo/ranking">ranking</a> <a href="http://delicious.com/ilbonzo/keywords">keywords</a>)</div>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/usUH_R-LZiU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/06/24/links-for-2009-06-24/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/06/24/links-for-2009-06-24/</feedburner:origLink></item>
		<item>
		<title>Finalmente si stampa</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/T-gRhE41exM/</link>
		<comments>http://blog.ilbonzo.org/2009/06/16/finalmente-si-stampa/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 09:05:41 +0000</pubDate>
		<dc:creator>Bonzo</dc:creator>
		
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/?p=277</guid>
		<description><![CDATA[Finalmente ho configurato la stampante canon iP 1500 PIXMA su Ubuntu.
Grazie ad un post su ubuntuforums.org:
http://ubuntuforums.org/&#8230;.
Ecco come ho fatto:

The first step is to open up your source list and add this to it
deb http://mambo.kuhp.kyoto-u.ac.jp/~takushi/ubuntu ./
If you don&#8217;t know how to open up your source list you can do it by putting this in the terminal
gksudo [...]]]></description>
			<content:encoded><![CDATA[<p>Finalmente ho configurato la stampante canon iP 1500 PIXMA su Ubuntu.</p>
<p>Grazie ad un post su ubuntuforums.org:<br />
<a href="http://ubuntuforums.org/showthread.php?t=487890">http://ubuntuforums.org/&#8230;.</a></p>
<p>Ecco come ho fatto:</p>
<blockquote><p>
The first step is to open up your source list and add this to it</p>
<p><code>deb http://mambo.kuhp.kyoto-u.ac.jp/~takushi/ubuntu ./</code></p>
<p>If you don&#8217;t know how to open up your source list you can do it by putting this in the terminal</p>
<p><code>gksudo gedit /etc/apt/sources.list</code></p>
<p>you can use whatever text editor you like to edit your source list.</p>
<p>After adding that to your source list you need to do this in the terminal</p>
<p><code>sudo apt-get update</code></p>
<p>Next you need to install these files</p>
<p><code>sudo apt-get install libcnbj-2.5 bjfilter-2.5 pstocanonbj</code></p>
<p>Cupsys will be automatically restarted and you can select printer in cupsys configuration which is<br />
http://localhost:631 or if you don&#8217;t want to do that you can go to System>Admistration>Printer>Add Printer.</p>
<p>To add the printer through the cups, the first thing you do is click on add a printer. The next screen will ask you for the name of you printer, location and description the ony thing you really have to fill in is the name. After you done filling in the information click continue. The next page is asks you to select your printer which should be Canon iP1500 USB # (Canon iP1500). Hit continue and then it will ask you for your driver, select the Canon Pixma iP1500 Ver.2.50 (en) then click on add printer.</p>
<p>To add the printer the other way once you click on add printer a new window will open up that say&#8217;s add a printer at the top and Step 1 of 3: Printer connection. As long as your printer is turned on it should show up in &#8220;Use a detected printer&#8221;, if it doesn&#8217;t you can select it in &#8220;Use another printer by speciying a port&#8221; and selecting Canon iP1500 USB # (Canon iP1500) then click forward. The next page is where you select the printer driver. The manufacturer is Canon if it already isn&#8217;t selected and the Driver is Pixma iP1500 Ver.2.50, then click forward. Finally the next screen is the printer information you don&#8217;t really have to worry about filling in the rest of the information if you don&#8217;t want to just click &#8220;Apply&#8221; and now your iP1500 printer should show up under printers.</p>
<p>Right click on your printer and then click on Print a Test Page and your printer should crank out a test page, if it doesn&#8217;t please let me know and we can try to figure out why.
</p></blockquote>
<p>Un grazie per aver creato il pacchetto:<br />
<a href=" http://mambo.kuhp.kyoto-u.ac.jp/~takushi/#canon"><br />
http://mambo.kuhp.kyoto-u.ac.jp/&#8230;</a></p>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/T-gRhE41exM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/06/16/finalmente-si-stampa/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/06/16/finalmente-si-stampa/</feedburner:origLink></item>
		<item>
		<title>links for 2009-06-12</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/gHg_1BDWqIw/</link>
		<comments>http://blog.ilbonzo.org/2009/06/12/links-for-2009-06-12/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 11:03:45 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[Delicous]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/06/12/links-for-2009-06-12/</guid>
		<description><![CDATA[

Dynamic Drive DHTML(dynamic html) &#38; JavaScript code library
(tags: javascript webdesign css scripts web ajax programming html dhtml)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.dynamicdrive.com/">Dynamic Drive DHTML(dynamic html) &amp; JavaScript code library</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/javascript">javascript</a> <a href="http://delicious.com/ilbonzo/webdesign">webdesign</a> <a href="http://delicious.com/ilbonzo/css">css</a> <a href="http://delicious.com/ilbonzo/scripts">scripts</a> <a href="http://delicious.com/ilbonzo/web">web</a> <a href="http://delicious.com/ilbonzo/ajax">ajax</a> <a href="http://delicious.com/ilbonzo/programming">programming</a> <a href="http://delicious.com/ilbonzo/html">html</a> <a href="http://delicious.com/ilbonzo/dhtml">dhtml</a>)</div>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/gHg_1BDWqIw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/06/12/links-for-2009-06-12/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/06/12/links-for-2009-06-12/</feedburner:origLink></item>
		<item>
		<title>Scrivere Modulo Drupal</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/xRinDv-S2fk/</link>
		<comments>http://blog.ilbonzo.org/2009/06/01/scrivere-modulo-drupal/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 15:28:31 +0000</pubDate>
		<dc:creator>Bonzo</dc:creator>
		
		<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/?p=264</guid>
		<description><![CDATA[Ultimamente mi sono concentrato molto su Drupal, soprattutto per la sua flessibilità e modularità.
La possibilità di scrivere un modulo, che aggiunge funzioni, senza andare a toccare il core  del resto del cms è veramente molto utile e produttivo.
Ecco un esempio di primo modulo che chiameremo nodelist:
Creiamo un file nodelist.info che contiene le informazioni del [...]]]></description>
			<content:encoded><![CDATA[<p>Ultimamente mi sono concentrato molto su <a href="http://drupal.org">Drupal</a>, soprattutto per la sua flessibilità e modularità.<br />
La possibilità di scrivere un modulo, che aggiunge funzioni, senza andare a toccare il core  del resto del cms è veramente molto utile e produttivo.</p>
<p>Ecco un esempio di primo modulo che chiameremo <code>nodelist</code>:<br />
Creiamo un file <strong>nodelist.info</strong> che contiene le informazioni del modulo.</p>
<p><code>; $Id: nodelist.info Exp $<br />
name = Nodelist<br />
description = visualizza list nodi<br />
package = node<br />
version = VERSION<br />
core = 6.x</code></p>
<p><code>; Information added by drupal.org packaging script on 2008-08-14<br />
version = "6.4"<br />
project = "drupal"</code></p>
<p>Creare il file <strong>nodelist.module</strong> in cui scriveremo il modulo vero e proprio.</p>
<p>Per fare ciò utilizziamo i famosi <a href="http://api.drupal.org/api/group/hooks">Hook</a> di Drupal.<br />
Le varie function per convenzione si chiameranno nodelist_[hook].</p>
<p><code><br />
/**<br />
* Display help and module information<br />
* @param path which path of the site we're displaying help<br />
* @param arg array that holds the current path as would be returned from arg() function<br />
* @return help text for the path<br />
*/<br />
function nodelist_help($path, $arg) {<br />
  $output = '';<br />
  switch ($path) {<br />
    case "admin/help#nodelist":<br />
      $output = '&lt;p&gt;'.t("Displays links to nodes ") .'&lt;/p&gt;';<br />
      break;<br />
  }<br />
  return $output;<br />
}<br />
/**<br />
* Valid permissions for this module<br />
* @return array An array of valid permissions for the mailing module<br />
*/<br />
function nodelist_perm() {<br />
  return array('access nodelist content');<br />
} // function nodelist_perm()<br />
/**<br />
*<br />
* @return<br />
*/<br />
function nodelist_block($op='list', $delta=0) {<br />
  // listing of blocks, such as on the admin/block page<br />
  if ($op == "list") {<br />
    $block[0]["info"] = t(&#8221;node List&#8221;);<br />
    return $block;<br />
  } else if ($op == &#8216;view&#8217;) {<br />
  // our block content<br />
    // content variable that will be returned for display<br />
    $block_content = &#8221;;<br />
    $result =  db_query(&#8221;SELECT nid, title, created FROM {node} &#8220;);<br />
    while ($links = db_fetch_object($result)) {<br />
      $block_content .= l($links->title, &#8216;node/&#8217;.$links->nid) . &#8216;<br />&#8216;;<br />
    }<br />
    // check to see if there was any content before setting up the block<br />
    if ($block_content == &#8221;) {<br />
      // no content from a week ago, return nothing.<br />
      return;<br />
    }<br />
    // set up the block<br />
    $block['subject'] = &#8216;node&#8217;;<br />
    $block['content'] = $block_content;<br />
    return $block;<br />
  }<br />
}<br />
</code></p>
<p>Con questi file dentro la cartella nodelist e caricata nella cartella modules vi troverete la possibilità di abilitare il nuovo modulo.<br />
Abilitandolo avrete il nuovo blocco a disposizione.</p>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/xRinDv-S2fk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/06/01/scrivere-modulo-drupal/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/06/01/scrivere-modulo-drupal/</feedburner:origLink></item>
		<item>
		<title>links for 2009-05-28</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/YSfQjQrcpHg/</link>
		<comments>http://blog.ilbonzo.org/2009/05/28/links-for-2009-05-28/#comments</comments>
		<pubDate>Thu, 28 May 2009 11:35:50 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[Delicous]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/05/28/links-for-2009-05-28/</guid>
		<description><![CDATA[

200+ Massive Free Drupal Theme Compilation &#124; tripwire magazine
(tags: themes drupal template)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.tripwiremagazine.com/design/templates/200-massive-free-drupal-theme-compilation.html">200+ Massive Free Drupal Theme Compilation | tripwire magazine</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/themes">themes</a> <a href="http://delicious.com/ilbonzo/drupal">drupal</a> <a href="http://delicious.com/ilbonzo/template">template</a>)</div>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/YSfQjQrcpHg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/05/28/links-for-2009-05-28/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/05/28/links-for-2009-05-28/</feedburner:origLink></item>
		<item>
		<title>links for 2009-05-19</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/ckbvODlVR_I/</link>
		<comments>http://blog.ilbonzo.org/2009/05/19/links-for-2009-05-19/#comments</comments>
		<pubDate>Tue, 19 May 2009 11:04:17 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[Delicous]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/05/19/links-for-2009-05-19/</guid>
		<description><![CDATA[

Madarco DevBlog » Blog Archive » Build a Facebook application with Zend Framework
(tags: zendframework facebook application)


Slideshow casuale con jQuery &#124; Articoli Javascript &#124; Javascript.HTML.it


Calendario settimanale &#124; Script JavaScript Date e orari &#124; Javascript.HTML.it


15 Useful Project Management Tools &#124; Developer&#39;s Toolbox &#124; Smashing Magazine
(tags: tools projectmanagement management project web2.0 software productivity work)


14 Applications for Project Management [...]]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://blog.madarco.net/91/build-a-facebook-application-with-zend-framework/">Madarco DevBlog » Blog Archive » Build a Facebook application with Zend Framework</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/zendframework">zendframework</a> <a href="http://delicious.com/ilbonzo/facebook">facebook</a> <a href="http://delicious.com/ilbonzo/application">application</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://javascript.html.it/articoli/leggi/3062/slideshow-casuale-con-jquery/1/">Slideshow casuale con jQuery | Articoli Javascript | Javascript.HTML.it</a></div>
</li>
<li>
<div class="delicious-link"><a href="http://javascript.html.it/script/vedi/5269/calendario-settimanale/">Calendario settimanale | Script JavaScript Date e orari | Javascript.HTML.it</a></div>
</li>
<li>
<div class="delicious-link"><a href="http://www.smashingmagazine.com/2008/11/13/15-useful-project-management-tools/">15 Useful Project Management Tools | Developer&#39;s Toolbox | Smashing Magazine</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/tools">tools</a> <a href="http://delicious.com/ilbonzo/projectmanagement">projectmanagement</a> <a href="http://delicious.com/ilbonzo/management">management</a> <a href="http://delicious.com/ilbonzo/project">project</a> <a href="http://delicious.com/ilbonzo/web2.0">web2.0</a> <a href="http://delicious.com/ilbonzo/software">software</a> <a href="http://delicious.com/ilbonzo/productivity">productivity</a> <a href="http://delicious.com/ilbonzo/work">work</a>)</div>
</li>
<li>
<div class="delicious-link"><a href="http://www.webdesignerdepot.com/2009/02/14-applications-for-project-management-and-collaboration/">14 Applications for Project Management and Collaboration | Webdesigner Depot</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/projectmanagement">projectmanagement</a> <a href="http://delicious.com/ilbonzo/collaboration">collaboration</a> <a href="http://delicious.com/ilbonzo/tools">tools</a> <a href="http://delicious.com/ilbonzo/management">management</a> <a href="http://delicious.com/ilbonzo/project">project</a> <a href="http://delicious.com/ilbonzo/applications">applications</a> <a href="http://delicious.com/ilbonzo/software">software</a> <a href="http://delicious.com/ilbonzo/productivity">productivity</a> <a href="http://delicious.com/ilbonzo/web">web</a>)</div>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/ckbvODlVR_I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/05/19/links-for-2009-05-19/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/05/19/links-for-2009-05-19/</feedburner:origLink></item>
		<item>
		<title>Aggiungi a preferiti</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/DcIduL9Drs8/</link>
		<comments>http://blog.ilbonzo.org/2009/05/18/aggiungi-a-preferiti/#comments</comments>
		<pubDate>Mon, 18 May 2009 13:23:12 +0000</pubDate>
		<dc:creator>Bonzo</dc:creator>
		
		<category><![CDATA[Senza categoria]]></category>

		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/05/18/aggiungi-a-preferiti/</guid>
		<description><![CDATA[Funzione javascript per aggiungere una pagina ai preferiti

function BookmarkPage(){
if (window.sidebar)
window.sidebar.addPanel(document.title, window.location,"");
else if(document.all)
window.external.AddFavorite(window.location, document.title);
else if(window.opera &#038;&#038; window.print)
alert("Utenti Opera: per aggiungere questo sito ai preferiti, cliccare su 'OK' poi premere CTRL-D");
else
alert("Utenti: per aggiungere questo sito ai preferiti, cliccare su 'OK' poi premere CTRL-D");}

]]></description>
			<content:encoded><![CDATA[<p>Funzione javascript per aggiungere una pagina ai preferiti</p>
<p><code><br />
function BookmarkPage(){<br />
if (window.sidebar)<br />
window.sidebar.addPanel(document.title, window.location,"");<br />
else if(document.all)<br />
window.external.AddFavorite(window.location, document.title);<br />
else if(window.opera &#038;&#038; window.print)<br />
alert("Utenti Opera: per aggiungere questo sito ai preferiti, cliccare su 'OK' poi premere CTRL-D");<br />
else<br />
alert("Utenti: per aggiungere questo sito ai preferiti, cliccare su 'OK' poi premere CTRL-D");}<br />
</code></p>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/DcIduL9Drs8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/05/18/aggiungi-a-preferiti/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/05/18/aggiungi-a-preferiti/</feedburner:origLink></item>
		<item>
		<title>links for 2009-05-14</title>
		<link>http://feedproxy.google.com/~r/Blogbonzo/~3/KUjMtHL2jMw/</link>
		<comments>http://blog.ilbonzo.org/2009/05/14/links-for-2009-05-14/#comments</comments>
		<pubDate>Thu, 14 May 2009 11:06:55 +0000</pubDate>
		<dc:creator>delicious</dc:creator>
		
		<category><![CDATA[Delicous]]></category>

		<guid isPermaLink="false">http://blog.ilbonzo.org/2009/05/14/links-for-2009-05-14/</guid>
		<description><![CDATA[

stereomood – emotional internet radio - music for my mood and activities
(tags: music mp3 streaming internet audio free tags stereomood mixtape mood web radio)


]]></description>
			<content:encoded><![CDATA[<ul class="delicious">
<li>
<div class="delicious-link"><a href="http://www.stereomood.com/">stereomood – emotional internet radio - music for my mood and activities</a></div>
<div class="delicious-tags">(tags: <a href="http://delicious.com/ilbonzo/music">music</a> <a href="http://delicious.com/ilbonzo/mp3">mp3</a> <a href="http://delicious.com/ilbonzo/streaming">streaming</a> <a href="http://delicious.com/ilbonzo/internet">internet</a> <a href="http://delicious.com/ilbonzo/audio">audio</a> <a href="http://delicious.com/ilbonzo/free">free</a> <a href="http://delicious.com/ilbonzo/tags">tags</a> <a href="http://delicious.com/ilbonzo/stereomood">stereomood</a> <a href="http://delicious.com/ilbonzo/mixtape">mixtape</a> <a href="http://delicious.com/ilbonzo/mood">mood</a> <a href="http://delicious.com/ilbonzo/web">web</a> <a href="http://delicious.com/ilbonzo/radio">radio</a>)</div>
</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Blogbonzo/~4/KUjMtHL2jMw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.ilbonzo.org/2009/05/14/links-for-2009-05-14/feed/</wfw:commentRss>
		<feedburner:origLink>http://blog.ilbonzo.org/2009/05/14/links-for-2009-05-14/</feedburner:origLink></item>
	</channel>
</rss>
