Round Rock / Austin, Texas
Drupal Web Developer

Drupal 7

Error message

  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6656 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home/thefoxes/foxwebdevelopment.com/includes/common.inc).

How to Check if a CCK Field Exists on a Node

Getting 'index not defined' errors because you're trying to use a field that may not exist or have a value on a node? Here's a way to check to make sure the node has a value for the field before trying to actually do something with the field.

View Article

How to Print CCK Fields in Custom node Templates (node--custom.tpl.php)

If you have a custom node template such as node--news.tpl.php and want to print out values of the fields there are a few ways to do this, depeding on what all you want to be rendored.

The two I use most often are:

1) The simplest way, which gives you all the wrapper classes:

        <?php print render($content['my_custom_field']); ?>

2) The more custom way, which gives JUST the raw value, without any of the extra divs around it. 

        <?php print $node->my_custom_field['und'][0]['value']; ?>

You can also use this method if you want to grab another element of the field.  For instance, if the field you are printing is an image field and you only want the image path you can use:

View Article

Want to Control the Thumbnail and Text when you Post or Share Something to Facebook?

Use the Facebook Debug Tool
First, check to see what FB is seeing by using their Debug Tool:

https://developers.facebook.com/tools/debug/og/object/

* Note: I definitely saw caching issues so be sure to click the "Fetch" button often.

 

For the Title and Text:
Use Drupal modules such as "Page Title" and "Metatag" to give you greater control over the <title> and description tags.  Those are what Facebook uses to display the headline and intro text.

 

Control Facebook Thumbnail Default
View Article

Troubleshooting Tip: Superfish Dropdown Menu Not Working

1) Make sure you have the superfish library installed at /sites/all/libraries/superfish

2) Adjust the jquery version you are using to be 1.7.  This is under /admin/config/development/jquery_update

Drupal Superfish Dropdown Not Working
View Article

Adjusting Cache and Performance Settings in Drupal 7

In Drupal 7 you can configure performance and cache settings under /admin/config/development/performance

drupal 7 performance settings configuration
View Article

Printing CCK Fields in Custom node.tpl.php Files

To let Drupal handle all the wrappers and formatting, use this:

    print render($content['field_fancy_title']);

 

To print the raw, untouched value, use this:

    print $content['field_fancy_title']['#items']['0']['value'];

View Article

Print only the Body field in Drupal 7


print $node->body['und'][0]['value'];

or try

print render($content['body']);

View Article

How to Add Google Fonts to Drupal Theme

Drupal themes are a little special in that you have to take special steps to add tags or code to the <head> tag of your html.  If you want to include a Google Font to your theme the most efficient way to do this is to add this code snippet to your theme's template.php file:

 

function yourthemename_preprocess_html(&$variables) {
   drupal_add_css('http://fonts.googleapis.com/css?family=Alegreya', array('group' => CSS_THEME));
}

Reference Link for more details: http://www.webomelette.com/drupal-google-web-fonts

View Article

2014 is here, and so is OutragousOutfitters.net!

What a sweet way to break in the new year! Happy Go Live Day to OutragousOutfitters.net! This is my newest Drupal 7 site built for a Meng & Company client.

The site has a full photo gallery with fun Hunting and Fishing photos as well as a simple way for the client to embed YouTube videos.

Visit the site at www.OutrageousOutfitters.net.

Website for Hunting and Fishing: OutrageousOutfitters.net
View Article

OutdoorPatriot.com is Bigger, Badder, Faster, and all-around Spiffier!

The day John Meng of Meng & Company has been waiting for.... the Outdoor Patriot re-design has launched!

This was an especially fun project because it was not only a "face-lift" with lots of new functionality but it was also a conversion from Drupal 6 to Drupal 7.  It definitely took some trial and error (and some extra cups of coffee) but the Drupal upgrade was a success!

This is a Social Media rich site with a Blog, Daily News, eNews, Podcasts, RSS Feed, and Facebook and Twitter integration.  It also accepts payments via PayPal.

Visit the site at www.OutdoorPatriot.com

Upgrade from Drupal 6 to Drupal 7: OutdoorPatriot.com
View Article

Pages