I am not sure whether I should split this message into several... I'll start like this and see what the feedback is :)

I did some playing around with the simplenews module.

1) CENTRALIZE several newsletters
I added a third option to the simplenews_block() function, which is $op='all'
This prints ALL possible newsletters in one single block, and for each there's a subscribe button (i did not go as far as having a single submit button and checkboxes for the different newsletters, that should not be that difficult either but needs to touch also and simplenews_menu() and maybe simplenews_process_subscription().

This is my current additional code (only a draft):

  if ($op == 'all') {
  	// list all the newsletters
	$tree = taxonomy_get_tree(simplenews_get_vid());
	if ($tree) {
	$block['content'] = '<p>Stay informed! Be up to date! Subscribe to our newsletters!</p>';
	foreach ($tree as $newsletter) {
			$delta = 'newsletter-'.$newsletter->tid;
			$result = simplenews_block('view', $delta, NULL);
			$title = t('Newsletter: %title', array('%title' => theme('placeholder', $newsletter->name)));
			$block['content'].= "<div class=\"newsletter-node-block\"><h2>$title</h2>".$result['content']."</div>";
		}
	}
	else
	$block['content'] = '<p>Sorry, we have no newsletters currently available</p>';
	return $block;
  }

2) ALLOWS subscriptions independently from the BLOCK visibility
i do not use the automatic block from simplenews, since I print them all out together, in a node (so that they have a page for themselves, which looks better in my theme) where a snippet prints out the block.
The newsletter blocks are thus disabled.
So I was going completely CRAZY because the subscription was not working!
I could not understand why it was not getting the subscriptions...
until I found out in simplenews_menu() that there is a check for the existence of an ENABLED block:
"SELECT DISTINCT(delta) FROM {blocks} WHERE module = '%s' AND status = %d"
This does not make much sense to me... I would rather have a specific additional check whether a newsletter is enabled or not, than have the same field specifying wheter the block is visible (interface) or the newsletter is enabled (functionality).

Other little things:
3) Subscription Form
The label "E-mail: youremail" for logged-in users is outside the form; i did not study enough the drupal form apis yet, but I'd rather have it inside otherwise it limits the things you can do with CSS

for the rest, I love this module, and think with little improvements it could become totally cool!

cheers,
Stefano

Comments

monkeybeach’s picture

Hi Stefano,

Gotta agree with you on all three points.

In addition I'd like to see much easier control over the HTML of the various states the subscription form can be in (logged in, not logged in) as I've just spent ages using str_replace in my templates to try and take control back from the module as to how the form presents.

Not sure how possible this is with the block based system Drupal uses though.

sutharsan’s picture

Status: Active » Fixed

Solutions for 2 and 3 offered including more control over block content via theming. See http://drupal.org/node/55446

Anonymous’s picture

Status: Fixed » Closed (fixed)