<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Luca&#039;s forge &#187; drupal</title>
	<atom:link href="http://lucasforge.bmeme.com/category/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://lucasforge.bmeme.com</link>
	<description>Experiments from the land of open source</description>
	<lastBuildDate>Wed, 19 Oct 2011 10:29:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>[Drupal7] How display block programmatically</title>
		<link>http://lucasforge.bmeme.com/2011/10/drupal7-how-display-block-programmatically/</link>
		<comments>http://lucasforge.bmeme.com/2011/10/drupal7-how-display-block-programmatically/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 10:29:20 +0000</pubDate>
		<dc:creator>Luca Corbo</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://lucasforge.2bopen.org/?p=139</guid>
		<description><![CDATA[If you want to display a block in your template: $block = block_load(&#60;code&#62;$module, $delta&#60;/code&#62;); print render(_block_get_renderable_array( _block_render_blocks( array($block) ))); where: $module Name of the module that implements the block to load. $delta Unique ID of the block within the context of $module. Pass NULL to return an empty block object for $module. Reference links: block_load [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to display a block in your template:</p>
<pre class="brush: php">
$block = block_load(&lt;code&gt;$module, $delta&lt;/code&gt;);
print render(_block_get_renderable_array( _block_render_blocks( array($block) )));
</pre>
<p>where:</p>
<p>$module Name of the module that implements the block to load.</p>
<p>$delta Unique ID of the block within the context of $module. Pass NULL to return an empty block object for $module.</p>
<p>Reference links:</p>
<ul>
<li><a title="block_load API" href="http://api.drupal.org/api/drupal/modules--block--block.module/function/block_load/7" target="_blank">block_load API</a></li>
<li><a title="Drupal.org comment" href="http://api.drupal.org/api/drupal/includes--module.inc/function/module_invoke/7#comment-15884" target="_blank">Drupal.org comment</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://lucasforge.bmeme.com/2011/10/drupal7-how-display-block-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal 6: how create a node with CCK fields programmatically</title>
		<link>http://lucasforge.bmeme.com/2010/06/drupal-6-create-a-node-with-cck-fields-programmatically/</link>
		<comments>http://lucasforge.bmeme.com/2010/06/drupal-6-create-a-node-with-cck-fields-programmatically/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 15:19:04 +0000</pubDate>
		<dc:creator>Luca Corbo</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://lucasforge.2bopen.org/?p=119</guid>
		<description><![CDATA[&#60;?php require_once &#039;./includes/bootstrap.inc&#039;; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); module_load_include(&#039;inc&#039;, &#039;node&#039;, &#039;node.pages&#039;); $node = new stdClass(); //Set up default values, if required. node_object_prepare($node); //Specify the content type $node-&#62;type = &#039;profile&#039;; //Specify an author for the node $node-&#62;uid = 1; //Add the title $node-&#62;title = &#039;Test&#039;; //Add the CCK fields data $node-&#62;field_name[0][&#039;value&#039;] = &#039;Name&#039;; $node-&#62;field_surname[0][&#039;value&#039;] = &#039;Surname&#039;; //Save the node object [...]]]></description>
			<content:encoded><![CDATA[<pre class="brush: php">
&lt;?php 

require_once &#039;./includes/bootstrap.inc&#039;;
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
module_load_include(&#039;inc&#039;, &#039;node&#039;, &#039;node.pages&#039;);

$node = new stdClass();

//Set up default values, if required.
node_object_prepare($node);

//Specify the content type
$node-&gt;type = &#039;profile&#039;;

//Specify an author for the node
$node-&gt;uid = 1;

//Add the title
$node-&gt;title = &#039;Test&#039;;

//Add the CCK fields data
$node-&gt;field_name[0][&#039;value&#039;] = &#039;Name&#039;;
$node-&gt;field_surname[0][&#039;value&#039;] = &#039;Surname&#039;;

//Save the node object into the database.
node_save($node);

//Debug the created node
print &#039;&lt;pre&gt;&#039;;
print_($node);
print &#039;&lt;/pre&gt;&#039;;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lucasforge.bmeme.com/2010/06/drupal-6-create-a-node-with-cck-fields-programmatically/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

