<?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>Richard Castera</title>
	<atom:link href="http://www.richardcastera.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardcastera.com</link>
	<description>Application Developer/Designer</description>
	<lastBuildDate>Fri, 05 Mar 2010 15:37:48 +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>Drupal &#8211; Check if a User has a specific role</title>
		<link>http://www.richardcastera.com/2010/03/05/drupal-check-if-a-user-has-a-specific-role/</link>
		<comments>http://www.richardcastera.com/2010/03/05/drupal-check-if-a-user-has-a-specific-role/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 15:37:48 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Resources]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1038</guid>
		<description><![CDATA[Here is a quick way to determine if a user has a specific role


&#60;?php
  // Bring the user object into scope.
  global $user;

  // Check to see if $user has the administrator user role.
  if (in_array('administrator', array_values($user-&#62;roles))) {
    // Do something.
  }
?&#62;
]]></description>
			<content:encoded><![CDATA[<p>Here is a quick way to determine if a user has a specific role</p>

<pre class="brush: php;">
&lt;?php
  // Bring the user object into scope.
  global $user;

  // Check to see if $user has the administrator user role.
  if (in_array('administrator', array_values($user-&gt;roles))) {
    // Do something.
  }
?&gt;
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/03/05/drupal-check-if-a-user-has-a-specific-role/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal &#8211; Adding Javascript to your module</title>
		<link>http://www.richardcastera.com/2010/03/04/drupal-adding-javascript-to-your-module/</link>
		<comments>http://www.richardcastera.com/2010/03/04/drupal-adding-javascript-to-your-module/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 15:32:42 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Resources]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1032</guid>
		<description><![CDATA[When creating your own Drupal module, you may need to add some styling or Javascript to improve the usability of your module. Here is how to do it.


drupal_add_js(drupal_get_path('module', 'MODULE_NAME') . '/common.js');


Similarly you can add CSS to your module as well

drupal_add_css(drupal_get_path('module', 'MODULE_NAME') . '/styles.css');
]]></description>
			<content:encoded><![CDATA[<p>When creating your own <a href="http://drupal.org" title="Drupal CMS" target="_blank">Drupal</a> module, you may need to add some styling or Javascript to improve the usability of your module. Here is how to do it.</p>

<pre class="brush: php;">
drupal_add_js(drupal_get_path('module', 'MODULE_NAME') . '/common.js');
</pre>

<p>Similarly you can add CSS to your module as well</p>
<pre class="brush: php;">
drupal_add_css(drupal_get_path('module', 'MODULE_NAME') . '/styles.css');
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/03/04/drupal-adding-javascript-to-your-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal &#8211; Use hook_form_alter() to set redirect path on the form</title>
		<link>http://www.richardcastera.com/2010/03/03/drupal-use-hook-form-alter-to-set-redirect-path-on-the-form/</link>
		<comments>http://www.richardcastera.com/2010/03/03/drupal-use-hook-form-alter-to-set-redirect-path-on-the-form/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 15:21:11 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Resources]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=952</guid>
		<description><![CDATA[One popular use of this hook is to change the destination of a form submission. Here is how it is accomplished:


&#60;?php
function YOURMODULE_form_alter($form_id, &#38;$form) {
  switch ($form['#id']) {
    case 'node-form':
       if ($form['type']['#value'] == 'story') {
         $form['#redirect'] = 'new/url';
 [...]]]></description>
			<content:encoded><![CDATA[<p>One popular use of this hook is to change the destination of a form submission. Here is how it is accomplished:</p>

<pre class="brush: php;">
&lt;?php
function YOURMODULE_form_alter($form_id, &amp;$form) {
  switch ($form['#id']) {
    case 'node-form':
       if ($form['type']['#value'] == 'story') {
         $form['#redirect'] = 'new/url';
       }
     break;
  }
}
?&gt;
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/03/03/drupal-use-hook-form-alter-to-set-redirect-path-on-the-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excellent Analytics &#8211; Import Google Analytics into Excel</title>
		<link>http://www.richardcastera.com/2010/03/02/excellent-analytics-import-google-analytics-into-excel/</link>
		<comments>http://www.richardcastera.com/2010/03/02/excellent-analytics-import-google-analytics-into-excel/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 15:00:23 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Web Resources]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=961</guid>
		<description><![CDATA[I ran into this nice Excel Plugin that lets you import web analytics data from Google Analytics into a spreadsheet. It&#8217;s an open source project and 100% free to download and use for individuals and businesses.

]]></description>
			<content:encoded><![CDATA[<p>I ran into this nice <a href="http://excellentanalytics.com/" title="Excellent Analytics - Import Google Analytics into Excel" target="_blank">Excel Plugin</a> that lets you import web analytics data from <a href="http://www.google.com/analytics/" title="Google Analytics" target="_blank">Google Analytics</a> into a spreadsheet. It&#8217;s an open source project and 100% free to download and use for individuals and businesses.</p>

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/FRsiAUtslx0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=sv_SE&#038;feature=player_embedded&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/FRsiAUtslx0&#038;color1=0xb1b1b1&#038;color2=0xcfcfcf&#038;hl=sv_SE&#038;feature=player_embedded&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/03/02/excellent-analytics-import-google-analytics-into-excel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress &#8211; List Scheduled Posts</title>
		<link>http://www.richardcastera.com/2010/03/01/wordpress-list-scheduled-posts/</link>
		<comments>http://www.richardcastera.com/2010/03/01/wordpress-list-scheduled-posts/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:53:28 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Resources]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1016</guid>
		<description><![CDATA[If you ever wanted to show you readers posts that are scheduled to be published, here&#8217;s how to do it.


&#60;?php
$result = new WP_Query('post_status=future&#38;order=DESC&#38;showposts=5');
if ($result-&#62;have_posts()) {
    while ($result-&#62;have_posts()) : $result-&#62;the_post(); ?&#62;
        &#60;?php the_title(); ?&#62;
    &#60;?php endwhile;
}
?&#62;
]]></description>
			<content:encoded><![CDATA[<p>If you ever wanted to show you readers posts that are scheduled to be published, here&#8217;s how to do it.</p>

<pre class="brush: php;">
&lt;?php
$result = new WP_Query('post_status=future&amp;order=DESC&amp;showposts=5');
if ($result-&gt;have_posts()) {
    while ($result-&gt;have_posts()) : $result-&gt;the_post(); ?&gt;
        &lt;?php the_title(); ?&gt;
    &lt;?php endwhile;
}
?&gt;
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/03/01/wordpress-list-scheduled-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS &#8211; Cross Browser Opacity</title>
		<link>http://www.richardcastera.com/2010/02/28/css-cross-browser-opacity/</link>
		<comments>http://www.richardcastera.com/2010/02/28/css-cross-browser-opacity/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 19:35:44 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Web Resources]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1044</guid>
		<description><![CDATA[A little hack to set Cross-Browser opacity.

.setOpacity {
      opacity: .75; /* Standard: FF gt 1.5, Opera, Safari */
      filter: alpha(opacity=75); /* IE lt 8 */
      -ms-filter: &#34;alpha(opacity=75)&#34;; /* IE 8 */
      -khtml-opacity: .75; /* Safari [...]]]></description>
			<content:encoded><![CDATA[<p>A little hack to set Cross-Browser opacity.</p>
<pre class="brush: css;">
.setOpacity {
      opacity: .75; /* Standard: FF gt 1.5, Opera, Safari */
      filter: alpha(opacity=75); /* IE lt 8 */
      -ms-filter: &quot;alpha(opacity=75)&quot;; /* IE 8 */
      -khtml-opacity: .75; /* Safari 1.x */
      -moz-opacity: .75; /* FF lt 1.5, Netscape */
}
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/02/28/css-cross-browser-opacity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Disable Auto Save</title>
		<link>http://www.richardcastera.com/2010/02/25/wordpress-disable-auto-save/</link>
		<comments>http://www.richardcastera.com/2010/02/25/wordpress-disable-auto-save/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 15:51:50 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1010</guid>
		<description><![CDATA[WordPress&#8217;s Auto-Save feature is a really nice but there are some drawbacks&#8230; this feature increases your database usage. So for those of you that are on really bad shared hosting accounts or just want to turn it off, here&#8217;s a quick way of doing it.

Open and insert the following line in your wp-config.php file.


define('WP_POST_REVISIONS', false);


Another [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org/" title="Wordpress" target="_blank">WordPress&#8217;s</a> Auto-Save feature is a really nice but there are some drawbacks&#8230; this feature increases your database usage. So for those of you that are on really bad shared hosting accounts or just want to turn it off, here&#8217;s a quick way of doing it.</p>

<p>Open and insert the following line in your wp-config.php file.</p>

<pre class="brush: php;">
define('WP_POST_REVISIONS', false);
</pre>

<p>Another method is to remove all of the entries from the database from time to time. You can do tun this query to do it::

<pre class="brush: sql;">
DELETE FROM wp_posts WHERE post_type = &quot;revision&quot;; 
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/02/25/wordpress-disable-auto-save/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototype JS &#8211; Determine if an object exists in the page loaded</title>
		<link>http://www.richardcastera.com/2010/02/24/prototype-js-determine-if-an-object-exists-in-the-page-loaded/</link>
		<comments>http://www.richardcastera.com/2010/02/24/prototype-js-determine-if-an-object-exists-in-the-page-loaded/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 02:41:56 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Prototype]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1003</guid>
		<description><![CDATA[I&#8217;m so use to using jQuery that I usually don&#8217;t have to look up documentation on how to use certain functions. They almost come naturally because it&#8217;s so English-like! Unfortunately Magento uses Prototype as it&#8217;s native choice of Javascript Frameworks. I sure wish they would have chosen jQuery! I think they would have more people [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m so use to using jQuery that I usually don&#8217;t have to look up documentation on how to use certain functions. They almost come naturally because it&#8217;s so English-like! Unfortunately <a href="http://www.magentocommerce.com/" title="Magento Commerce" target="_blank">Magento</a> uses <a href="http://www.prototypejs.org" title="Prototype" target="_blank">Prototype</a> as it&#8217;s native choice of Javascript Frameworks. I sure wish they would have chosen <a href="http://jquery.com" title="jQuery" target="_blank">jQuery</a>! I think they would have more people jumping on their platform. I&#8217;m sure they have a good choice for it. Anyway, here&#8217;s how to check:

<pre class="brush: jscript;">
if($('id_of_element') != undefined) {
    alert('Object exists.');
}
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/02/24/prototype-js-determine-if-an-object-exists-in-the-page-loaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; Check if a User is logged in</title>
		<link>http://www.richardcastera.com/2010/02/24/magento-check-if-a-user-is-logged-in/</link>
		<comments>http://www.richardcastera.com/2010/02/24/magento-check-if-a-user-is-logged-in/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 02:09:00 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=1000</guid>
		<description><![CDATA[You may want to check if a user is logged in with Magento, possibly to display a link or promotional item. Here&#8217;s how to do it:


&#60;?php
if ($this-&#62;helper('customer')-&#62;isLoggedIn()) {
    echo(&#34;Anonymous user&#34;);
}
else {
    echo(&#34;Authenticated user&#34;);
}
?&#62;

]]></description>
			<content:encoded><![CDATA[<p>You may want to check if a user is logged in with Magento, possibly to display a link or promotional item. Here&#8217;s how to do it:</p>

<pre class="brush: php;">
&lt;?php
if ($this-&gt;helper('customer')-&gt;isLoggedIn()) {
    echo(&quot;Anonymous user&quot;);
}
else {
    echo(&quot;Authenticated user&quot;);
}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/02/24/magento-check-if-a-user-is-logged-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento &#8211; How to Display the Product SKU</title>
		<link>http://www.richardcastera.com/2010/02/24/magento-how-to-display-the-product-sku/</link>
		<comments>http://www.richardcastera.com/2010/02/24/magento-how-to-display-the-product-sku/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 02:04:01 +0000</pubDate>
		<dc:creator>Richard</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.richardcastera.com/?p=997</guid>
		<description><![CDATA[Sometime you may need to display the product Sku on the category page. This is easily achieved:


&#60;?php echo($_product-&#62;getSku()); ?&#62;

]]></description>
			<content:encoded><![CDATA[<p>Sometime you may need to display the product Sku on the category page. This is easily achieved:</p>

<pre class="brush: php;">
&lt;?php echo($_product-&gt;getSku()); ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.richardcastera.com/2010/02/24/magento-how-to-display-the-product-sku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
