<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title>Sage of Code</title>
	<link>http://www.sageofcode.com</link>
	<description>ad fontes</description>
	<pubDate>Thu, 01 Oct 2009 01:37:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
	<image>
<link>http://www.sageofcode.com</link>
<url>http://sageofcode.com/wp-content/mbp-favicon/soc.gif</url>
<title>Sage of Code</title>
</image>
		<item>
		<title>Open Projects: IT</title>
		<link>http://www.sageofcode.com/?p=93</link>
		<comments>http://www.sageofcode.com/?p=93#comments</comments>
		<pubDate>Mon, 01 Jun 2009 14:38:22 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=93</guid>
		<description><![CDATA[If delivering quality software on time and on budget is the goal, then a great team is a must.  A good team simply will not do.  A great team required great tools.  And great tools cannot run in the ether.  Therefore, lets start at the beginning: IT.The first software project that [...]]]></description>
			<content:encoded><![CDATA[<p>If delivering quality software on time and on budget is the goal, then a great team is a must.  A good team simply will not do.  A great team required great tools.  And great tools cannot run in the ether.  Therefore, lets start at the beginning: IT.The first software project that I started had a &#8220;shoe string&#8221; budget.  I applied all the money to hardware and ran the project on 100% Open Source software.  This project thought me a very costly lesson: the installation, configuration, and management of IT systems will consume valuable time from the project time line and quality software will not be delivered on time or on budget.</p>
<p>The minimal IT infrastructure that is required to efficiently lead and manage an Open Project is a Wiki, Project Management System, Bug Tracking System, Test Management System, and a Source Control System.  My go-to applications for this minimal infrastructure are:</p>
<ol>
<li> <a href="http://trac.edgewall.org/" target="_blank">Trac</a> - Wiki &amp;  Project Management System</li>
<li> <a href="http://www.bugzilla.org/" target="_blank">Bugzilla</a> - Bug Tracking system</li>
<li><a href="http://www.mozilla.org/projects/testopia/" target="_blank">Testopia</a> -  Test Management system</li>
<li> <a href="http://subversion.tigris.org/" target="_blank">SVN</a> - Source Control System</li>
</ol>
<p>In conclusion, the bedrock of a successful Open Project is an IT Infrastructure that &#8220;just works&#8221; and does not consume project resources.  The most cost effective way this can be realized by employing a hosting service like <a href="http://svnrepository.com/" target="_blank">SVNRepository</a>, which provides Trac, SVN, Bugzilla, Testopia, and SVN hosting services.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=93</wfw:commentRss>
		</item>
		<item>
		<title>Open Source Stacks</title>
		<link>http://www.sageofcode.com/?p=91</link>
		<comments>http://www.sageofcode.com/?p=91#comments</comments>
		<pubDate>Sat, 14 Mar 2009 00:02:39 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=91</guid>
		<description><![CDATA[When I first installed Apache, MySQL, PHP, phpMyAdmin manually on a Windows machine, the whole process took hours!  After learning that  these applications can be installed by a single installer or package, I searched to the last page of the Internet for this time-saving program.  In Open Source fashion, there is not [...]]]></description>
			<content:encoded><![CDATA[<p>When I first installed Apache, MySQL, PHP, phpMyAdmin manually on a Windows machine, the whole process took hours!  After learning that  these applications can be installed by a single installer or package, I searched to the last page of the Internet for this time-saving program.  In Open Source fashion, there is not one, but several such programs:</p>
<ol>
<li><a href="http://www.easyphp.org/" target="_blank">EasyPHP</a></li>
<li><a href="http://apache2triad.net/" target="_blank">Apache2Triade</a></li>
<li><a href="http://www.wampserver.com/en/" target="_blank">WampServer</a></li>
<li><a href="http://www.mamp.info" target="_blank">MAMP</a></li>
<li><a href="http://www.apachefriends.org/en/xampp.html" target="_blank">XAMP</a></li>
</ol>
<p>These technology stacks are NOT all created equal!  They all have Apache, PHP, and MySQL, but the versions vary.  Moreover, each stack also have additional programs like phpMyAdmin and Filezilla.  Therefore, when evaluating what stack to exploit, determine if the programs and versions satisfy your requirements.</p>
<p>After researching, installing, and evaluating several stacks, my go to &#8220;*AMP&#8221; solution is XAMP because:</p>
<ol>
<li>Windows Support</li>
<li>Linux Support</li>
<li>Mac OS X</li>
<li>Easy install</li>
<li>Clean un-install</li>
<li>Easy to use Web UI</li>
</ol>
<p>Installing Apache, MySQL, PHP, and phpMyAdmin on an Windows machine via XAMP took less than 5 minutes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=91</wfw:commentRss>
		</item>
		<item>
		<title>Drupal: How to hide the login block</title>
		<link>http://www.sageofcode.com/?p=87</link>
		<comments>http://www.sageofcode.com/?p=87#comments</comments>
		<pubDate>Sat, 14 Feb 2009 22:04:29 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=87</guid>
		<description><![CDATA[How to hide the login block from all pages:

Navigation to: Administer &#8211;&#62; Site building &#8211;&#62; Blocks
Set the region of the &#8220;User Login&#8221; block to &#8220;none&#8221;
Click Save.
Open another webbrowser and append &#8220;?q=user&#8221; to the site url to login.
Enter the user and and password in the rendered User Login block.

]]></description>
			<content:encoded><![CDATA[<p>How to hide the login block from all pages:</p>
<ol>
<li>Navigation to: Administer &#8211;&gt; Site building &#8211;&gt; Blocks</li>
<li>Set the region of the &#8220;User Login&#8221; block to &#8220;none&#8221;</li>
<li>Click Save.</li>
<li>Open another webbrowser and append &#8220;?q=user&#8221; to the site url to login.</li>
<li>Enter the user and and password in the rendered User Login block.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=87</wfw:commentRss>
		</item>
		<item>
		<title>Dia: Wow!</title>
		<link>http://www.sageofcode.com/?p=82</link>
		<comments>http://www.sageofcode.com/?p=82#comments</comments>
		<pubDate>Fri, 19 Dec 2008 22:55:36 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Dia]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=82</guid>
		<description><![CDATA[I have been searching for an Open Source alternative to Visio for some time.  I found several alternatives.  The application that I have found most flexible and usable is Dia.
Dia supports several diagram types (e.g., flow chart, UML, etc.), as noted in the online help.  To view objects for each of these diagram types, select [...]]]></description>
			<content:encoded><![CDATA[<p>I have been searching for an Open Source alternative to Visio for some time.  I found several alternatives.  The application that I have found most flexible and usable is <a href="http://live.gnome.org/Dia" target="_blank">Dia</a>.</p>
<p>Dia supports several diagram types (e.g., flow chart, UML, etc.), as noted in the online help.  To view objects for each of these diagram types, select the &#8221; &#8221; in the In the floating window with objects and select &#8221; &#8221;</p>
<p><a href="http://sageofcode.com/wp-content/uploads/2008/12/dia_main_tool_bar.png" title="Main Tool Bar"><img src="http://sageofcode.com/wp-content/uploads/2008/12/dia_main_tool_bar.png" alt="Main Tool Bar" /></a></p>
<p>&#8230;and a list of all the diagram types will appear:</p>
<p><a href="http://sageofcode.com/wp-content/uploads/2008/12/dia_diagram_types.png" title="Diagram Types"><img src="http://sageofcode.com/wp-content/uploads/2008/12/dia_diagram_types.png" alt="Diagram Types" /></a></p>
<p>This is the <strong>coolest</strong> feature!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=82</wfw:commentRss>
		</item>
		<item>
		<title>Drupal: ActiveField Module</title>
		<link>http://www.sageofcode.com/?p=59</link>
		<comments>http://www.sageofcode.com/?p=59#comments</comments>
		<pubDate>Fri, 22 Aug 2008 01:00:20 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=59</guid>
		<description><![CDATA[&#60;&#60;RAW&#62;&#62;
Summary
This module takes the values entered for pre-defined &#8220;source&#8221; fields and dynamically sets the values of predefined &#8220;target&#8221; fields via jQuery and AJAX.  The &#8220;source&#8221; and &#8220;target&#8221; fields can be of any field type; i.e., they are not limited to drop down menu fields.  There are two primary use cases for this module: Creating content [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><span style="color: #ff0000"><span style="color: #ff0000">&lt;&lt;RAW&gt;&gt;</span></span></p>
<p><strong>Summary</strong></p>
<p>This module takes the values entered for pre-defined &#8220;source&#8221; fields and dynamically sets the values of predefined &#8220;target&#8221; fields via jQuery and AJAX.  The &#8220;source&#8221; and &#8220;target&#8221; fields can be of any field type; i.e., they are not limited to drop down menu fields.  There are two primary use cases for this module: <em>Creating content </em>and <em>Editing content</em>. For Example, there is a Drupal site that allows it users to create &#8220;Location&#8221; and &#8220;Field Trip&#8221; content:</p>
<p align="left"><em>Fig. 1 Location content<br />
</em></p>
<p><a href="http://sageofcode.com/wp-content/uploads/2008/08/location_content.png" title="Location Content"><img src="http://sageofcode.com/wp-content/uploads/2008/08/location_content.png" alt="Location Content" /></a></p>
<p><em>Fig. 2 Field Trip content </em></p>
<p><a href="http://sageofcode.com/wp-content/uploads/2008/08/field_trip_content.png" title="Field Trip Content"><img src="http://sageofcode.com/wp-content/uploads/2008/08/field_trip_content.png" alt="Field Trip Content" height="469" width="442" /></a></p>
<p><em>Creating Content Use Case</em></p>
<ol>
<li>Create a new location. (Fig. 1)</li>
<li>Create a new Field Trip. (Fig. 2)</li>
<li>Enter Title</li>
<li>Select a date</li>
<li>Select a location from the drop down menu.</li>
<li>The Capital, Sunrise, and Sunset are populated with values based on the date and location selected.</li>
<li>Submit.</li>
<li>Extensions:
<ol>
<li>The Editing Content Use Case (steps 2 - 7) is also applicable while creating content.</li>
<li>If a value is not set for one of the source fields, then the target fields are not set.</li>
</ol>
</li>
</ol>
<p><em>Editing Content Use Case</em></p>
<ol>
<li>Edit an existing Field Trip</li>
<li>Select a <em>new</em> date</li>
<li>The Capital, Sunrise, and Sunset are populated with <em>new</em> values based on the <em>new</em> date.</li>
<li>Select a <em>new</em> location</li>
<li>The Capital, Sunrise, and Sunset are populated with <em>new</em> values based on the <em>new</em> location selected.</li>
<li>Select a <em>new</em> date and a <em>new</em> location.</li>
<li>The Capital, Sunrise, and Sunset are populated with <em>new</em> values based on the <em>new</em> date and <em>new </em>location selected.</li>
<li>Save.</li>
</ol>
<p><strong>Technical Description</strong></p>
<p>Technically speaking, these two use cases above represent a bidirectional communication between jQuery (client side) and Drupal (server side) via AJAX: <em><a href="http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktype" target="_blank">$.get(url, params, callback)</a>;</em> More specifically:</p>
<p><em>Fig. 3 Active Field Sequence Diagram</em></p>
<p><a href="http://sageofcode.com/wp-content/uploads/2008/08/activefieldsequencediagram_04.png" title="Sequence Diagram"><img src="http://sageofcode.com/wp-content/uploads/2008/08/activefieldsequencediagram_04.png" alt="Sequence Diagram" height="262" width="458" /></a></p>
<p>(1) The change event of the source field triggers an (2) AJAX call to a URL (i.e. &#8220;add/field-trip&#8221;), (3) which is mapped to a Drupal function via ActiveField_menu() hook that (4) calls the ActiveField_getTargets() function, which executes a SQL query to the Drupal database and (5) returns a <a href="http://json.org/" target="_blank">JSON</a> via <a href="http://api.drupal.org/?q=api/function/drupal_to_js/5" target="_blank">drupal_to_js()</a> function; (6) this JSON is then passed into <a href="http://en.wikipedia.org/wiki/Anonymous_function" target="_blank">anonymous function</a> (i.e. the &#8220;call back&#8221;), which (7) sets the value of the target fields.</p>
<p>The <em>params</em> parameter of the AJAX <em>$.get(url, params, callback) </em>function is not specified in Fig. 3 above because its value depends on respective use case scenario being solved.  For example, if the target fields are not dependent on the values of the selected source fields, then value is &#8220;null&#8221;; in this scenario, the target field will be populated with default values when the change events of the source fields are fired.  In scenarios where the values of the target fields are in fact dependent on the values selected for the source fields, then <em>params</em> would look something like:</p>
<address align="left">{sourcefield1:$(&#8217;#srcfld1-id&#8217;).val();,srfld2:$(&#8217;#sourcefield2-id&#8217;).val();}</address>
<p>In the Location/Field Trip scenario, <em>params </em>would look something like:</p>
<address align="left">{date:$(&#8217;#edit-field-date-value&#8217;).val();, location:$(&#8217;#edit-field-location-key&#8217;).val();}</address>
<p>The exact selector ids may vary from system to system.</p>
<p>A Drupal module can define its own theme and forms or interoperate  with an existing theme and forms.  The ActiveField module is an example of the latter.  In order to realize this, the .js file containing the JavaScript must be called from the ActiveField module itself and not from the theme layer (<a href="http://drupal.org/node/304255" target="_blank"><em>c.f.</em></a>).  One way to realize this is via <a href="http://api.drupal.org/api/function/hook_form_alter/" target="_blank">hook_alter_form()</a>.  This hook utilizes a <a href="http://www.lullabot.com/articles/modifying-forms-5-and-6" target="_blank">form id</a> to alter a form.  The form id of the Field Trip form is &#8220;field_trip_node_form&#8221;:</p>
<p align="center">&lt;input id=&#8221;edit-field-trip-node-form&#8221; type=&#8221;hidden&#8221; value=&#8221;<span style="color: #ff0000">field_trip_node_form</span>&#8221; name=&#8221;<span style="color: #ff0000">form_id</span>&#8220;/&gt;</p>
<p>FireBug, can be used to obtain the field ids on the  page:</p>
<ol>
<li>  Go to the webpage.</li>
<li>Open up FireBug.</li>
<li>Click the HTML tab.</li>
<li>Click the Ispect menu item.</li>
<li>Move the mouse cursor over the fields (e.g. Capital, Sunrise, Sunset) and the respective HTML with the field id will be displayed to the console.</li>
</ol>
<p><strong><em>Code </em></strong></p>
<p>The ActiveField module has the following files:</p>
<ol>
<li>ActiveField.info</li>
<li>ActiveField.js</li>
<li>ActiveField.module</li>
</ol>
<p>A .install file was not created because no database tables need to be created or deleted when the module is activated or disabled; or at least, not at this time.  Currently the &#8220;source&#8221; and &#8220;target&#8221; fields are pre-defined via code (i.e. hard-coded) and a separate instance of the module (i.e. copy/paste/modify) may be required for each set of &#8220;source&#8221; and &#8220;target&#8221; fields.  In ActiveField 2.0, the follow features will be implemented:</p>
<ol>
<li>Pre-define &#8220;target&#8221; and &#8220;source&#8221; fields via Admin interface</li>
<li>Create multiple sets of &#8220;target&#8221; and &#8220;source&#8221; fields</li>
</ol>
<p><strong><em>Software</em></strong></p>
<ol>
<li>Drupal 5.3</li>
<li>CCK Module 5.x-1.6-1</li>
<li><a href="http://drupal.org/project/devel" target="_blank">Devel Module 5.x-0.4</a></li>
<li><a href="http://drupal.org/project/jquery_interface" target="_blank">jQuery Interface Library 5.x-1.0</a></li>
<li><a href="http://drupal.org/project/jquery_update" target="_blank">jQuery Update 5.x-1.0</a></li>
<li>JSCalendar 5.x-1.0</li>
<li>FireFox</li>
<li><a href="https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank">FireBug</a></li>
</ol>
<p><strong>Reference</strong>s</p>
<p><em>Drupal API</em></p>
<ol>
<li><a href="http://api.drupal.org/api/function/drupal_add_js/" target="_blank">drupal_ad_js()</a></li>
<li><a href="http://api.drupal.org/api/function/hook_form_alter" target="_blank">hook_alter_form()</a></li>
<li><a href="http://api.drupal.org/api/function/hook_menu" target="_blank">hook_menu()</a></li>
<li><a href="http://api.drupal.org/api/function/check_plain" target="_blank">check_plain()</a></li>
</ol>
<p><em>jQuery</em></p>
<ol>
<li><a href="http://jquery.com/" target="_blank">jQuery</a></li>
<li><a href="http://www.learningjquery.com/" target="_blank">Learning jQuery</a></li>
<li><a href="http://www.visualjquery.com/1.1.2.html" target="_blank">Visual jQuery</a></li>
</ol>
<p><em>Books</em></p>
<ol>
<li><a href="http://www.bookpool.com/sm/1590595629">Building Online Communities with Drupal, phpBB, and WordPress</a></li>
<li><a href="http://www.bookpool.com/sm/1904811809">Drupal: Creating Blogs, Forums, Portals and Community Websites</a></li>
<li><a href="http://www.bookpool.com/sm/1847191827">Drupal 5 Themes</a></li>
<li><a href="http://www.bookpool.com/sm/1590597559" target="_blank">Pro Drupal Development</a></li>
<li><a href="http://www.packtpub.com/jQuery/book/mid/100407j4kh3d" target="_blank">Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques</a></li>
<li><a href="http://www.manning.com/bibeault/" target="_blank">jQuery in Action</a></li>
</ol>
<p><em>Videos</em></p>
<ol>
<li><a href="http://drupaldojo.com/lesson/jquery-resurrected" target="_blank">Lesson 12: jQuery Resurrected</a></li>
<li><a href="http://drupaldojo.com/lesson/intro-to-jquery-magic" target="_blank">Lesson 07: An intro to jQuery magic</a></li>
<li><a href="http://drupaldojo.com/minilesson/show-login-block-using-jquery-modal-window" target="_blank">Show login block using jQuery modal window</a></li>
<li><a href="http://docs.jquery.com/Tutorials:Quick_and_Dirty_Ajax" target="_blank">Tutorials:Quick and Dirty Ajax (Screencast)</a></li>
<li><a href="http://www.top54u.com/videos-javascript/howto+++style/URF2sVQWuxU/play-video.aspx" target="_blank">Essentials of DOM and JavaScript</a></li>
<li><a href="http://video.aol.com/video-detail/drupal-school-tasty-jquery-modules/632828424" target="_blank">Drupal School: Tasty JQuery Modules</a></li>
<li><a href="http://video.google.com/videoplay?docid=-978395286272895697&amp;ei=UhCdSJD3EI7-qwKaipyrDg&amp;q=Drupal+jQuery+Ajax&amp;vt=lf&amp;hl=en" target="_blank">jQuery - Google Tech Talks</a></li>
<li><a href="http://video.google.com/videoplay?docid=1143730844923407591&amp;ei=EhKdSJP7BISUqQLHqqjJDA&amp;q=Drupal+jQuery+Ajax&amp;hl=en" target="_blank">AHAH! - Ajax + FormAPI = More Responsive UI</a></li>
<li><a href="http://video.google.com/videoplay?docid=-5024384117158411563&amp;vt=lf&amp;hl=en" target="_blank">jQuery AJAX forms</a></li>
</ol>
<p><em>Blogs</em></p>
<ol>
<li><a href="http://www.learningjquery.com/" target="_blank">Leaning jQuery</a></li>
<li><a href="http://15daysofjquery.com/" target="_blank">15 Days of jQuery</a></li>
</ol>
<p><em>Articles</em></p>
<ol>
<li><a href="http://drupal.org/node/121997" target="_blank">Javascript, jQuery and AJAX</a></li>
<li><a href="http://drupal.org/node/116539" target="_blank">jQuery Hints and Snippets</a></li>
<li><a href="http://drupalsn.com/learn-drupal/drupal-tutorials/drupal-and-ajax-working-together">Drupal and Ajax working together</a></li>
<li><a href="http://drupal.org/node/88978" target="_blank">Using jQuery</a></li>
<li><a href="http://drupal.org/node/239367" target="_blank">How to pass a value in a form (jQuery) to Drupal (PHP)</a></li>
<li><a href="http://11heavens.com/using-ajax-in-Drupal-6">Using Ajax in Drupal 6</a></li>
<li><a href="http://drupal.org/node/145162" target="_blank">Storing what jQuery returns in a PHP variable</a></li>
<li><a href="http://docs.jquery.com/Tutorials:How_to_Get_Anything_You_Want" target="_blank">Tutorials: How to Get Anything You Want</a></li>
<li><a href="http://www.ibm.com/developerworks/library/x-ajaxjquery.html" target="_blank">Simplify Ajax development with jQuery</a></li>
<li><a href="http://www.lullabot.com/articles/modifying-forms-5-and-6" target="_blank">Modifying Forms in Drupal 5 and 6</a></li>
<li><a href="http://drupal.org/node/304255" target="_blank">Adding JavaScript to your theme or module</a></li>
<li><a href="http://www.lullabot.com/articles/introduction-unit-testing" target="_blank">An Introduction to Unit Testing in Drupal</a></li>
</ol>
<p><strong>&#8220;Debugging&#8221;</strong></p>
<ol>
<li><a href="http://drupal.org/node/301959" target="_blank">Drupal Module Development Support</a></li>
<li><a href="http://groups.drupal.org/node/16472">Drupal Dojo Discussion</a></li>
<li><a href="http://drupal.org/node/147267" target="_blank">Debugging Drupal via XDebug &amp; Eclipse PDT</a></li>
<li><a href="http://www.lullabot.com/articles/quick_and_dirty_debugging" target="_blank">Quick-and-Dirty Debugging</a></li>
<li><a href="http://www.lullabot.com/audiocast/drupal_podcast_no_31_drupal_development_tools" target="_blank">Drupal Podcast No. 31: Drupal Development Tools</a></li>
<li>Methodology
<ol>
<li>Client Side
<ol>
<li>FireBug - use the &#8216;console&#8217; tab to determine whether the AJAX callback is being invoked and to examine what is being returned</li>
<li>FireBug - Click the &#8220;Profile&#8221; button.  Execute the respective use case. Click the &#8220;Profile&#8221; button again.  Review the resulting JavaScript function execution profile.</li>
<li>FireFox - Delete the cache: Tools menu &#8211;&gt; Clear Private Data&#8230;</li>
</ol>
</li>
<li>Server Side
<ol>
<li>There are several options here.</li>
<li>Quick Option: use  <a href="http://api.drupal.org/api/function/drupal_set_message/5" target="_blank">drupal_set_message(&#8221;FunctionName: entered&#8221;)</a>;</li>
</ol>
</li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=59</wfw:commentRss>
		</item>
		<item>
		<title>Drupal: Populating CCK Fields via SQL</title>
		<link>http://www.sageofcode.com/?p=38</link>
		<comments>http://www.sageofcode.com/?p=38#comments</comments>
		<pubDate>Tue, 29 Jul 2008 18:24:18 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=38</guid>
		<description><![CDATA[&#60;&#60;RAW&#62;&#62; 
Querying a Drupal database requires knowledge of SQL and Drupal&#8217;s Database Abstraction Layer.  Once you have the result from the query, how you manipulate this returned object depends on how you want to utilize that data.  For example:

Adding a default value to a text field in a CCK content type
Adding values to a select [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><strong><span style="color: #ff0000">&lt;&lt;RAW&gt;&gt; </span></strong></p>
<p>Querying a Drupal database requires knowledge of SQL and <a href="http://api.drupal.org/api/group/database/" target="_blank">Drupal&#8217;s Database Abstraction Layer</a>.  Once you have the result from the query, how you manipulate this returned object depends on how you want to utilize that data.  For example:</p>
<ol>
<li>Adding a default value to a text field in a CCK content type</li>
<li>Adding values to a select field (a.k.a &#8220;drop down menu&#8221;) in a CCK content type</li>
</ol>
<p><strong>Steps</strong></p>
<ol>
<li>Define the SQL Query and store it in a variable</li>
<li>Call <a href="http://api.drupal.org/?q=api/function/db_query/" target="_blank">db_query</a> with the SQL Query variable</li>
<li>Manipulating the Returned Object
<ol>
<li>If you only need one field, then call <a href="http://api.drupal.org/api/function/db_result/" target="_blank">db_result()</a></li>
<li>Else, call <a href="http://api.drupal.org/api/function/db_fetch_object/" target="_blank">db_fetch_object()</a> or <a href="http://api.drupal.org/api/function/db_fetch_array/" target="_blank">db_fetch_array()</a></li>
</ol>
</li>
</ol>
<p><strong>Articles</strong></p>
<ol>
<li><a href="http://api.drupal.org/api/group/database/5" target="_blank">Database Abstraction Layer</a></li>
<li><a href="http://drupal.org/node/233237" target="_blank">Making a database enquiry using db_query</a></li>
</ol>
<p><a href="http://api.drupal.org/?q=api/function/db_fetch_object/5" target="_blank"></a><strong>Drupal API</strong></p>
<ol>
<li><a href="http://api.drupal.org/?q=api/function/db_query/5" target="_blank">db_query</a></li>
<li><a href="http://api.drupal.org/?q=api/function/db_fetch_object/5" target="_blank">db_fetch_object</a></li>
<li><a href="http://api.drupal.org/api/function/node_get_types/5" target="_blank">node_get_types</a></li>
<li><a href="http://api.drupal.org/api/function/db_result/5" target="_blank">db_result()</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=38</wfw:commentRss>
		</item>
		<item>
		<title>jQuery&#124;Drupal QRC</title>
		<link>http://www.sageofcode.com/?p=52</link>
		<comments>http://www.sageofcode.com/?p=52#comments</comments>
		<pubDate>Sun, 11 May 2008 12:37:09 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=52</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<br />
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=52</wfw:commentRss>
		</item>
		<item>
		<title>Drupal: API QRC</title>
		<link>http://www.sageofcode.com/?p=51</link>
		<comments>http://www.sageofcode.com/?p=51#comments</comments>
		<pubDate>Fri, 09 May 2008 01:08:08 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=51</guid>
		<description><![CDATA[


db_query
db_fetch_object
node_get_types
db_result
drupal_add_js
hook_nodeapi
hook_form_alter

NOTE: download and activate the Devel module
]]></description>
			<content:encoded><![CDATA[<p><strong><br />
</strong></p>
<ol>
<li><a href="http://api.drupal.org/?q=api/function/db_query/5" target="_blank">db_query</a></li>
<li><a href="http://api.drupal.org/?q=api/function/db_fetch_object/5" target="_blank">db_fetch_object</a></li>
<li><a href="http://api.drupal.org/api/function/node_get_types/5" target="_blank">node_get_types</a></li>
<li><a href="http://api.drupal.org/api/function/db_result/5" target="_blank">db_result</a></li>
<li><a href="http://api.drupal.org/api/function/drupal_add_js/5" target="_blank">drupal_add_js</a></li>
<li><a href="http://api.drupal.org/api/function/hook_nodeapi/5" target="_blank">hook_nodeapi</a></li>
<li><a href="http://api.drupal.org/api/function/hook_form_alter/5" target="_blank">hook_form_alter</a></li>
</ol>
<p>NOTE: download and activate the <a href="http://drupal.org/project/devel" target="_blank">Devel</a> module</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=51</wfw:commentRss>
		</item>
		<item>
		<title>Screencasting</title>
		<link>http://www.sageofcode.com/?p=50</link>
		<comments>http://www.sageofcode.com/?p=50#comments</comments>
		<pubDate>Wed, 07 May 2008 02:14:04 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=50</guid>
		<description><![CDATA[Resources

What is screencasting
Wikipedia Screencast
Tools Comparison

Tools

Wink - Freeware, Windows + Linux support
Screen Kast - Open Source, Linux only
Windows Media Encoder - Free MS Download, Windows Only

]]></description>
			<content:encoded><![CDATA[<p><strong>Resources</strong></p>
<ul>
<li><a href="http://digitalmedia.oreilly.com/pub/a/oreilly/digitalmedia/2005/11/16/what-is-screencasting.html?page=1" target="_blank">What is screencasting</a></li>
<li><a href="http://en.wikipedia.org/wiki/Screencast#Screencast_software" target="_blank">Wikipedia Screencast</a></li>
<li><a href="http://www.donationcoder.com/Reviews/Archive/ScreenCasting/" target="_blank">Tools Comparison</a></li>
</ul>
<p><strong>Tools</strong></p>
<ul>
<li><a href="http://www.debugmode.com/wink/" target="_blank">Wink</a> - Freeware, Windows + Linux support</li>
<li><a href="http://sourceforge.net/projects/screenkast" target="_blank">Screen Kast</a> - Open Source, Linux only</li>
<li><a href="http://www.microsoft.com/windows/windowsmedia/forpros/encoder/default.mspx" target="_blank">Windows Media Encoder</a> - Free MS Download, Windows Only</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=50</wfw:commentRss>
		</item>
		<item>
		<title>Web Meeting Tools</title>
		<link>http://www.sageofcode.com/?p=49</link>
		<comments>http://www.sageofcode.com/?p=49#comments</comments>
		<pubDate>Sat, 26 Apr 2008 13:38:05 +0000</pubDate>
		<dc:creator>patron</dc:creator>
		
		<category><![CDATA[Virtual Teams]]></category>

		<guid isPermaLink="false">http://www.sageofcode.com/?p=49</guid>
		<description><![CDATA[
Dimdim - Free Web Meeting Application
Skype - Free Instant Messaging and Teleconference

]]></description>
			<content:encoded><![CDATA[<ol>
<li><a target="_blank" href="http://www.dimdim.com/">Dimdim</a> - Free Web Meeting Application</li>
<li><a target="_blank" href="http://www.skype.com/">Skype</a> - Free Instant Messaging and Teleconference</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.sageofcode.com/?feed=rss2&amp;p=49</wfw:commentRss>
		</item>
	</channel>
</rss>
