Here's a patch to allow for some theming of the block created by the module.

Comments

brenda003’s picture

StatusFileSize
new386 bytes

Sorry, should've cleaned that up before posting it.

konsumer’s picture

Great idea. Doesn't it need more stuff then this, like calling theme in constant_contact_block(), instead of drupal_get_form() directly?

brenda003’s picture

Well, it's drupal_render rather than drupal_get_form. It's seeing the theme function automatically. This works for me, as a simple way to override it in template.php - I'm able to use something like:

function phptemplate_constant_contact_block_form($form) {
  global $user;

  drupal_render($form[0]);

  $output = '<div id="newsletter-block">';
  $output .= '<div id="email_text"></div>';
  $output .= '<div style="margin-bottom: 16px">';
  if ($form['email']) {
    $output .= drupal_render($form['email']);
  }
  else {
    $output .= '<div class="user-email">'. $user->mail .'</div>';
  }
  $output .= drupal_render($form[1]);

  $output .= drupal_render($form);
  $output .= '</div></div>';

  return $output;
}

etc...

konsumer’s picture

cool. I didn't know it was so simple. I'll apply to CVS. Thanks.

konsumer’s picture

Status: Needs review » Reviewed & tested by the community
konsumer’s picture

Status: Reviewed & tested by the community » Fixed

Applied to CVS and forgot to update ticket. thanks brenda003

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.