Hi,
I use of simplenews (http://drupal.org/project/simplenews) module for handling newsletters in my site. I would like to remove Subscribe and Unsubscribe options from newsletter block. Does someone know a way to theme newsletter block and remove these options.

I like my newsletter block apeear like this:http://drupal.org/files/issues/newsletter_example.png

Regards

Comments

Mamouri’s picture

Does somebody here? (;

introfini’s picture

make template.php with:

function phptemplate_sn_form($tid, $sub=1, $unsub=1, $email='') {

return _phptemplate_callback('sn_form',array('tid'=>$tid,'sub'=>$sub,'unsub'=>$unsub,'email'=>$email));
}

and sn_form.tpl.php with:

<?php

$sn_form = '<div class="sn-block">';
$form['sn_email_'.$tid] = array(
      '#type' => 'textfield',
      '#size' => 15,
      '#maxlength' => 128,
      '#default_value' => 'inserir email',
      '#attributes' => array('onclick' => "if(this.value=='inserir email')this.value=''",'onblur'=>"if(this.value=='')this.value='inserir email'")
);
       $form['sn_subscribe_'.$tid] = array(
      '#type' => 'hidden',
      '#value' => 'Subscribe',
          );
    $submit = t('OK');
    $form['sn_'.$tid] = array(
    '#name' => 'sn_'.$tid,
    '#type' => 'submit',
    '#value' => $submit,
  );
  $sn_form .= drupal_get_form('theme_sn_form', $form);
    $sn_form .= '</div>';
  print $sn_form;
  ?>

introfini
onossocasamento.pt

José Fernandes
Bloomidea

mac_perlinski’s picture

I have tried to change the database structure for sn, and modify the code of simple news module but i think its not the best solution. Any other ideas how to add extra fields to simplenews ex. First name, Last name, etc.?

--
kindest regards
Mac