Helpful Docs to read before posting: (All Docs) | Config Docs | General FAQ | Mailing List Sending FAQ | Error FAQ

Why'd you put Opener Image at the top?

Have a comment to make about Dada Mail? Good? Bad? Something needs work? Let's here it:

Why'd you put Opener Image at the top?

Postby knotworking » Thu Sep 08, 2011 6:47 am

Love the program. I upgraded from a prehistoric version to Pro yesterday, boy things have come a long way!

The only gripe I have is where the open tracker image is in the body of the html email message. Why is it prepended to the message, not appended? It creates blank space at the top of all my mailings. Even more unattractive, in Thunderbird (mail client) a broken image graphic is displayed for a second or two at the top for the spacer image (it disappears after that but, the blank space is still there). I found the spacer image insert in the .pm file and added height="1" width="1" which at least makes the broken graphic smaller.

How hard would it be to move the spacer image to the bottom of all messages? I don't mind hacking, it just didn't seem all that easy from what I could see (the <body> tag seemed to be involved with the image insert).
knotworking
 
Posts: 13
Joined: Thu Sep 08, 2011 5:55 am

Re: Why'd you put Opener Image at the top?

Postby justin » Thu Sep 08, 2011 1:40 pm

The only gripe I have is where the open tracker image is in the body of the html email message. Why is it prepended to the message, not appended?


Dunno! Has been a while since that feature was added,

How hard would it be to move the spacer image to the bottom of all messages? I don't mind hacking, it just didn't seem all that easy from what I could see (the <body> tag seemed to be involved with the image insert).


You probably want to find these lines:

Code: Select all
sub _add_opener_image {

   my $self    = shift;
   my $content = shift;
   
   # body tags will now be on their own line, regardless.
   $content =~ s/(\<body.*?\>|<\/body\>)/\n$1\n/gi;
   
   my $img_opener_code = '<!--open_img--><img src="' . $DADA::Config::PROGRAM_URL . '/spacer_image/<!-- tmpl_var list_settings.list -->/<!-- tmpl_var message_id -->/spacer.png" /><!--/open_img-->';

   $content =~ s/(\<body.*?\>)/$1\n$img_opener_code/i;
   
   return $content;

}


In the, "dada/DADA/App/FormatMessages.pm" file and change them around to something like,

Code: Select all
sub _add_opener_image {

   my $self    = shift;
   my $content = shift;
   
   # body tags will now be on their own line, regardless.
   # $content =~ s/(\<body.*?\>|<\/body\>)/\n$1\n/gi;
   
   my $img_opener_code = '<!--open_img--><img src="' . $DADA::Config::PROGRAM_URL . '/spacer_image/<!-- tmpl_var list_settings.list -->/<!-- tmpl_var message_id -->/spacer.png" width="1" height="1" /><!--/open_img-->';

   $content =~ s/\<\/body.*?\>/$img_opener_code\<\/body\>/i;
   
   return $content;

}




(untested)

I'll open up a bug about it, though
User avatar
justin
 
Posts: 5380
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: Why'd you put Opener Image at the top?

Postby knotworking » Sat Sep 10, 2011 5:37 am

Tested now, works as expected. Thanks!
knotworking
 
Posts: 13
Joined: Thu Sep 08, 2011 5:55 am


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

Loading