Accessing fields of nodes

In the devel execute php code block, I wrote the code below:

$nodes = node_load_multiple(NULL, array('type' => 'job_ad'));
$node = array_slice($nodes,0,1);
field_get_items('node', $node, 'field_description');

I want to get a field from a node with a certain type, somehow the third line gives me the errors below:

    Notice: Trying to get property of non-object in entity_extract_ids() (line 7355 of E:\wamp\www\mtprot\includes\common.inc).
    Notice: Undefined index: field_name in field_language() (line 276 of E:\wamp\www\mtprot\modules\field\field.multilingual.inc).
    Notice: Undefined index: field_name in field_language() (line 276 of E:\wamp\www\mtprot\modules\field\field.multilingual.inc).
    Notice: Undefined index: field_name in field_language() (line 276 of E:\wamp\www\mtprot\modules\field\field.multilingual.inc).
    Notice: Undefined index: field_name in field_language() (line 276 of E:\wamp\www\mtprot\modules\field\field.multilingual.inc).
    Notice: Undefined index: field_name in field_language() (line 276 of E:\wamp\www\mtprot\modules\field\field.multilingual.inc).
    Notice: Undefined index: field_name in field_language() (line 276 of E:\wamp\www\mtprot\modules\field\field.multilingual.inc).

Looking through the documentation I believe this should work, is there something with language settings that I missed?

How to substitute icons/images for taxonomy tags in 7.x?

I am making a DVD review site for a TV series. Recurring characters will be tagged in each post, and rather than just have text links for their names, I would like to have a row of icons. The alt text for the icon should ideally be the name of the character (which is to say, the taxonomy term) and when clicked, the icon should act as a link to the taxonomy page for that term.

In D7 Panels - Variants - Selection Rules - PHP Code : Cannot seem to properly reference CCk field values

Am trying to create a variant in Panels 3 on D7 that would activate if the value of field_myfield in my content type is equal to 'bicycle.'

Have spent hours looking through forums and issue queues and Google, but all of the following suggestions don't seem to work:
= = = = =
The following code returns errors
"Notice: Undefined offset: 0 in eval()..."
"Notice: Trying to get property of non-object in eval()..."

How to set a select fields default value using hook_form_alter

Hi,
I am trying to use hook_form_alter to change my forms default values which was created in views. I am successful at changing the buttons label but when I try to change the select fields then it does not seem to work.

What am I doing wrong ? I can't seem to figure it out.

Need basic help styling the css of my content area

Hey everyone I just had a quick question about the css for my website.. I purchased a theme online and it works well for the most part however I am trying to style the content area used for the body of my articles. I was messing with it yesterday and actually made it look pretty good with h1 andh2 styling, body styles, and spacing etc... however it wasn't until after I finished styling that I realized I changed the css of other h2 area and the line spacing of other pages as well.

Use Drupals password hash in PHP-script for new custom user?

Hi everybody,

As some of you may know, I'm migrating a, rather big, Custom PHP-site to Drupal 7 and I've gone a long way since I started. I made my own PHP-scripts for the migration of the old data and have now come to the part where I need to create new users.

Everything except the password for the users is done and I need some help with it.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x