<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.2" -->
<rss version="0.92">
<channel>
	<title>Richard Castera</title>
	<link>http://www.richardcastera.com</link>
	<description>Application Developer/Designer</description>
	<lastBuildDate>Fri, 05 Mar 2010 15:37:48 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Drupal &#8211; Check if a User has a specific role</title>
		<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>
		<link>http://www.richardcastera.com/2010/03/05/drupal-check-if-a-user-has-a-specific-role/</link>
			</item>
	<item>
		<title>Drupal &#8211; Adding Javascript to your module</title>
		<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>
		<link>http://www.richardcastera.com/2010/03/04/drupal-adding-javascript-to-your-module/</link>
			</item>
	<item>
		<title>Drupal &#8211; Use hook_form_alter() to set redirect path on the form</title>
		<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>
		<link>http://www.richardcastera.com/2010/03/03/drupal-use-hook-form-alter-to-set-redirect-path-on-the-form/</link>
			</item>
	<item>
		<title>Excellent Analytics &#8211; Import Google Analytics into Excel</title>
		<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>
		<link>http://www.richardcastera.com/2010/03/02/excellent-analytics-import-google-analytics-into-excel/</link>
			</item>
	<item>
		<title>Wordpress &#8211; List Scheduled Posts</title>
		<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>
		<link>http://www.richardcastera.com/2010/03/01/wordpress-list-scheduled-posts/</link>
			</item>
	<item>
		<title>CSS &#8211; Cross Browser Opacity</title>
		<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>
		<link>http://www.richardcastera.com/2010/02/28/css-cross-browser-opacity/</link>
			</item>
	<item>
		<title>WordPress &#8211; Disable Auto Save</title>
		<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>
		<link>http://www.richardcastera.com/2010/02/25/wordpress-disable-auto-save/</link>
			</item>
	<item>
		<title>Prototype JS &#8211; Determine if an object exists in the page loaded</title>
		<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>
		<link>http://www.richardcastera.com/2010/02/24/prototype-js-determine-if-an-object-exists-in-the-page-loaded/</link>
			</item>
	<item>
		<title>Magento &#8211; Check if a User is logged in</title>
		<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>
		<link>http://www.richardcastera.com/2010/02/24/magento-check-if-a-user-is-logged-in/</link>
			</item>
	<item>
		<title>Magento &#8211; How to Display the Product SKU</title>
		<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>
		<link>http://www.richardcastera.com/2010/02/24/magento-how-to-display-the-product-sku/</link>
			</item>
</channel>
</rss>
