Post Closed as "unclear what you're asking" by user10041, Mołot, Krishna Mohan, Scott Joudry, tenken
2 Formatted code
source | link

Could you please advice how to set additional CSS class for the comment block using Drupal hook. I'd like to paint the author and date of the comment with green color if the author of comment is not the author of a node.

Something like

function custom_form_alter(&$form, $form_state, $form_id) {

function custom_form_alter(&$form, $form_state, $form_id) {

    if ($author_comment_id !== $author_node_id) {

        $form['#attributes']['class'][] = 'add-class';
    }
}

}

The problem is that I don't see the #attributes for comment block via dsm ($form). Maybe I'm using the wrong hook? Is there any different way to achive this?

Could you please help?

Could you please advice how to set additional CSS class for the comment block using Drupal hook. I'd like to paint the author and date of the comment with green color if the author of comment is not the author of a node.

Something like

function custom_form_alter(&$form, $form_state, $form_id) {

if ($author_comment_id !== $author_node_id) {

    $form['#attributes']['class'][] = 'add-class';
}

}

The problem is that I don't see the #attributes for comment block via dsm ($form). Maybe I'm using the wrong hook? Is there any different way to achive this?

Could you please help?

Could you please advice how to set additional CSS class for the comment block using Drupal hook. I'd like to paint the author and date of the comment with green color if the author of comment is not the author of a node.

Something like

function custom_form_alter(&$form, $form_state, $form_id) {

    if ($author_comment_id !== $author_node_id) {

        $form['#attributes']['class'][] = 'add-class';
    }
}

The problem is that I don't see the #attributes for comment block via dsm ($form). Maybe I'm using the wrong hook? Is there any different way to achive this?

Could you please help?

1
source | link

Set CSS class for the comment block

Could you please advice how to set additional CSS class for the comment block using Drupal hook. I'd like to paint the author and date of the comment with green color if the author of comment is not the author of a node.

Something like

function custom_form_alter(&$form, $form_state, $form_id) {

if ($author_comment_id !== $author_node_id) {

    $form['#attributes']['class'][] = 'add-class';
}

}

The problem is that I don't see the #attributes for comment block via dsm ($form). Maybe I'm using the wrong hook? Is there any different way to achive this?

Could you please help?