<?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>Springfield MO Web Designer</title>
	<atom:link href="http://springfield.mowebdesigner.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://springfield.mowebdesigner.com</link>
	<description></description>
	<lastBuildDate>Wed, 19 May 2010 09:31:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Default Location for CCK field on Drupal Node Add Form</title>
		<link>http://springfield.mowebdesigner.com/default-location-for-cck-field-on-drupal-node-add-form/</link>
		<comments>http://springfield.mowebdesigner.com/default-location-for-cck-field-on-drupal-node-add-form/#comments</comments>
		<pubDate>Tue, 04 May 2010 02:47:13 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[CCK]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Form Alter]]></category>
		<category><![CDATA[Location]]></category>
		<category><![CDATA[default location]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=45</guid>
		<description><![CDATA[We wanted to automatically fill in the Location fields on a node add form based upon the author&#8217;s location. Since most of these items that are posted would share the same location as the author, it seemed like a nice thing to do to make it a little easier for users.
In order to accomplish this, <a href="http://springfield.mowebdesigner.com/default-location-for-cck-field-on-drupal-node-add-form/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>We wanted to automatically fill in the Location fields on a node add form based upon the author&#8217;s location. Since most of these items that are posted would share the same location as the author, it seemed like a nice thing to do to make it a little easier for users.</p>
<p>In order to accomplish this, we used Drupal&#8217;s after_build. This allows you to call your own custom function. In this case it calls add_user_location which takes the user&#8217;s location and fills in the CCK location fields.</p>
<p><code>function digitalstax_customizations_form_alter(&amp;$form, $form_state, $form_id) {<br />
if($form_id == 'widget_node_form') {<br />
$form['#after_build'][] = 'add_user_location';<br />
}</code></p>
<p>function add_user_location(&amp;$form) {<br />
global $user;<br />
$viewinguser = user_load(array(&#8216;uid&#8217; =&gt; $user-&gt;uid));<br />
$form['locations'][0]['street']['#value'] = $viewinguser-&gt;locations[0]['street'];<br />
$form['locations'][0]['city']['#value'] = $viewinguser-&gt;locations[0]['city'];<br />
$form['locations'][0]['province']['#value'] = $viewinguser-&gt;locations[0]['province'];<br />
$form['locations'][0]['postal_code']['#value'] = $viewinguser-&gt;locations[0]['postal_code'];<br />
return $form;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/default-location-for-cck-field-on-drupal-node-add-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Values in Drupal Webform Additional Processing</title>
		<link>http://springfield.mowebdesigner.com/setting-values-in-drupal-webform-additional-processing/</link>
		<comments>http://springfield.mowebdesigner.com/setting-values-in-drupal-webform-additional-processing/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 06:35:21 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Webform]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=41</guid>
		<description><![CDATA[Sometimes when using the Drupal Webform module, you may want to do some calculations and then fill in a hidden field after the form has been submitted. For example, if we needed to calculate a total amount from the values of a few numerical fields, it might look something like this.

$total_amount = $form_values['submitted_tree']['pizza_price'] + $form_values['submitted_tree']['donut_price'];
//Then <a href="http://springfield.mowebdesigner.com/setting-values-in-drupal-webform-additional-processing/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes when using the <a href="http://drupal.org/project/webform" target="_blank">Drupal Webform module</a>, you may want to do some calculations and then fill in a hidden field after the form has been submitted. For example, if we needed to calculate a total amount from the values of a few numerical fields, it might look something like this.</p>
<p><code><br />
$total_amount = $form_values['submitted_tree']['pizza_price'] + $form_values['submitted_tree']['donut_price'];<br />
//Then we have a hidden field with a component ID of 8 and we set it's value like this<br />
$form_values['submitted'][8] = $total_amount;<br />
$form_values['submitted_tree'][8] = $total_amount;<br />
</code></p>
<p>To get the component id, hover over &#8220;Edit&#8221; next to the component in your list on the webform and the id will be in the url after &#8220;components/.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/setting-values-in-drupal-webform-additional-processing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using multiple databases with Drupal</title>
		<link>http://springfield.mowebdesigner.com/using-multiple-databases-with-drupal/</link>
		<comments>http://springfield.mowebdesigner.com/using-multiple-databases-with-drupal/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 06:21:02 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[external databases]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=37</guid>
		<description><![CDATA[Using an external database with Drupal is very simple.
First, you must add the database to your settings.php file like so:

$db_url['default'] = 'mysqli://user:password@localhost/database_name';
$db_url['external'] = 'mysqli://user:password@localhost/database_name';

So, &#8220;default&#8221; is our regular Drupal database and &#8220;external&#8221; is an additional database. To switch to the &#8220;external&#8221; database,  you would use this code:

db_set_active('external');
//Your code here

//*****then remember to SWITCH BACK TO <a href="http://springfield.mowebdesigner.com/using-multiple-databases-with-drupal/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Using an external database with Drupal is very simple.</p>
<p>First, you must add the database to your settings.php file like so:<br />
<code><br />
$db_url['default'] = 'mysqli://user:password@localhost/database_name';<br />
$db_url['external'] = 'mysqli://user:password@localhost/database_name';<br />
</code></p>
<p>So, &#8220;default&#8221; is our regular Drupal database and &#8220;external&#8221; is an additional database. To switch to the &#8220;external&#8221; database,<code> </code> you would use this code:</p>
<p><code><br />
db_set_active('external');</code><code><br />
//Your code here<br />
</code></p>
<p><code>//</code><code>*****</code><code>then remember to SWITCH BACK TO DEFAULT DATABASE when done</code><br />
<code> db_set_active('default');<br />
</code></p>
<p>Easy as Pie!</p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/using-multiple-databases-with-drupal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal Views PHP Filter</title>
		<link>http://springfield.mowebdesigner.com/drupal-views-php-filter/</link>
		<comments>http://springfield.mowebdesigner.com/drupal-views-php-filter/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 06:10:00 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP Views Filter]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=34</guid>
		<description><![CDATA[Sometimes it requires a little PHP to get the job done in a Views filter. That&#8217;s where the Views PHP Filter module comes in. The goal when using a PHP snippet is to return an array of nids.
In this example we&#8217;re returning an array of nids where a field in a CCK content type is <a href="http://springfield.mowebdesigner.com/drupal-views-php-filter/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes it requires a little PHP to get the job done in a Views filter. That&#8217;s where the <a href="http://drupal.org/project/viewsphpfilter" target="_blank">Views PHP Filter module</a> comes in. The goal when using a PHP snippet is to return an array of nids.</p>
<p>In this example we&#8217;re returning an array of nids where a field in a CCK content type is equal to the user&#8217;s name. This is a rare instance that we won&#8217;t go into. But the concept is the same for many other use cases.</p>
<p><code><br />
global $user;<br />
$nids = array();<br />
$result = db_query("SELECT nid FROM content_type_property WHERE field_propmanager_value = '%s'", $user-&gt;name);<br />
while (  $row  =  db_fetch_array($result) )  {<br />
$nids[] = $row['nid'];<br />
}<br />
return $nids;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/drupal-views-php-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove &#8220;preview&#8221; button in Drupal</title>
		<link>http://springfield.mowebdesigner.com/remove-preview-button-in-drupal/</link>
		<comments>http://springfield.mowebdesigner.com/remove-preview-button-in-drupal/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 05:44:34 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[preview button]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=27</guid>
		<description><![CDATA[Sometimes the preview button is unnecessary or unwanted in your Drupal installation. To remove the preview button, add this function to a custom module.
In this case, we wanted to remove the button from the node form for a &#8220;property&#8221; content type.

function digitalstax_customizations_form_alter(&#038;$form, $form_state, $form_id) {
    if($form_id=='property_node_form') {
    unset ($form['buttons']['preview']);
 <a href="http://springfield.mowebdesigner.com/remove-preview-button-in-drupal/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes the preview button is unnecessary or unwanted in your Drupal installation. To remove the preview button, add this function to a custom module.</p>
<p>In this case, we wanted to remove the button from the node form for a &#8220;property&#8221; content type.</p>
<p><code><br />
function digitalstax_customizations_form_alter(&#038;$form, $form_state, $form_id) {<br />
    if($form_id=='property_node_form') {<br />
    unset ($form['buttons']['preview']);<br />
  }<br />
  }</code></p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/remove-preview-button-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change &#8220;apply&#8221; button text in Drupal Views exposed filters</title>
		<link>http://springfield.mowebdesigner.com/change-apply-button-text-in-drupal-views-exposed-filters/</link>
		<comments>http://springfield.mowebdesigner.com/change-apply-button-text-in-drupal-views-exposed-filters/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 05:38:16 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Views]]></category>
		<category><![CDATA[exposed filters]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=23</guid>
		<description><![CDATA[When you want the user to search, the &#8220;apply&#8221; text can be confusing in a Drupal views exposed filter button.
To change this, create your own custom module and add the function below. Note that our module is named &#8220;digitalstax_customizations&#8221; and we wanted the change applied to a view named &#8220;admin_dashboard.&#8221; 

function digitalstax_customizations_form_alter(&#038;$form, $form_state, $form_id) {
 <a href="http://springfield.mowebdesigner.com/change-apply-button-text-in-drupal-views-exposed-filters/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>When you want the user to search, the &#8220;apply&#8221; text can be confusing in a Drupal views exposed filter button.</p>
<p>To change this, create your own custom module and add the function below. Note that our module is named &#8220;digitalstax_customizations&#8221; and we wanted the change applied to a view named &#8220;admin_dashboard.&#8221; </p>
<p><code><br />
function digitalstax_customizations_form_alter(&#038;$form, $form_state, $form_id) {<br />
    if($form_state['view']->name == 'admin_dashboard') {<br />
    $form['submit']['#value'] = t('Search');<br />
  }<br />
  }<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/change-apply-button-text-in-drupal-views-exposed-filters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic meta descriptions and keywords in Drupal Views</title>
		<link>http://springfield.mowebdesigner.com/dynamic-meta-descriptions-and-keywords-in-drupal-views/</link>
		<comments>http://springfield.mowebdesigner.com/dynamic-meta-descriptions-and-keywords-in-drupal-views/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 05:20:52 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Nodewords]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=14</guid>
		<description><![CDATA[We created a view with exposed filters and arguments in Drupal so users could search for a particular product by city and state. For the purposes of this, we&#8217;ll call them widgets. We wanted to have custom meta descriptions and keywords for each of these city and state pages.
This requires the Nodewords module and you&#8217;ll <a href="http://springfield.mowebdesigner.com/dynamic-meta-descriptions-and-keywords-in-drupal-views/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>We created a view with exposed filters and arguments in Drupal so users could search for a particular product by city and state. For the purposes of this, we&#8217;ll call them widgets. We wanted to have custom meta descriptions and keywords for each of these city and state pages.</p>
<p>This requires the Nodewords module and you&#8217;ll need to create a custom module to take advantage of the functionality of the Nodewords API.</p>
<p>The arguments we used in the url for the view are as follows:</p>
<ul>
<li> arg 0 is &#8220;widgets&#8221; or the custom content type.</li>
<li> arg 1 is the city.</li>
<li> arg 2 is the state.</li>
</ul>
<p>So a path would look like this: widgets/springfield/mo</p>
<p>We also included the ability to search all cities in a state by using: widgets/search/mo</p>
<p>Or all of the United States with: widgets/search/us</p>
<p>(This is done simply by replacing the &#8220;ALL&#8221; wildcard term that Views uses)</p>
<p>Using these arguments from the url, we were able to create meta descriptions and keywords on the fly:</p>
<p><code>function digitalstax_customizations_nodewords_tags_alter(&amp;$tags, $parameters) {<br />
if(arg(0) == 'widgets') {<br />
if(arg(1) != 'search' &amp;&amp; arg(2) != 'us'){<br />
$city = ucwords(str_replace( "-", " ", arg(1)));<br />
$state = strtoupper(str_replace( "-", " ",arg(2)));<br />
$tags['description'] = "Find widgets for sale in " . $city.", ". $state . " at The Widget Place.";<br />
$tags['keywords'] = "". $city .", " . $state . ", widgets, what-nots, the widget place";<br />
}<br />
if(arg(1) == 'search'){<br />
$state = strtoupper(str_replace( "-", " ",arg(2)));<br />
$tags['description'] = "Find widgets for sale in ". $state . " at The Widget Place.";<br />
$tags['keywords'] = "". $state . ", widgets, what-nots, the widget place";<br />
}<br />
if(arg(2) == 'us'){<br />
$tags['description'] = "Find widgets for sale in the United States at The Widget Place.";<br />
$tags['keywords'] = "united states, us, widgets, what-nots, the widget place";<br />
}<br />
}<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/dynamic-meta-descriptions-and-keywords-in-drupal-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove &#8220;Split Summary At Cursor&#8221; button in Drupal</title>
		<link>http://springfield.mowebdesigner.com/remove-split-summary-at-cursor-button-in-drupal/</link>
		<comments>http://springfield.mowebdesigner.com/remove-split-summary-at-cursor-button-in-drupal/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 04:32:44 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://springfield.mowebdesigner.com/?p=1</guid>
		<description><![CDATA[We were developing a website that required use by novice users and wanted to eliminate anything that could be confusing. The &#8220;Split Summary At Cursor&#8221; button on the body field in Drupal served no purpose and could possibly confuse users.
In order to remove it, you must create a module with the following function. Note that <a href="http://springfield.mowebdesigner.com/remove-split-summary-at-cursor-button-in-drupal/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>We were developing a website that required use by novice users and wanted to eliminate anything that could be confusing. The &#8220;Split Summary At Cursor&#8221; button on the body field in Drupal served no purpose and could possibly confuse users.</p>
<p>In order to remove it, you must create a module with the following function. Note that our module was named &#8220;digitalstax_customizations.&#8221;</p>
<p><code><br />
function digitalstax_customizations_form_alter(&#038;$form, $form_state, $form_id) {<br />
  if(isset($form['body_field']['teaser_include'])) {<br />
    $form['body_field']['teaser_include']['#access'] = FALSE;<br />
  }<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://springfield.mowebdesigner.com/remove-split-summary-at-cursor-button-in-drupal/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
