Home › Forums › Newsletter Plugin Support › Email Template with full content not 100%width
- This topic has 1 reply, 2 voices, and was last updated 9 years, 2 months ago by
Stefano.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
March 10, 2014 at 11:06 am #10658
user0815
ParticipantHi,
sorry for my bad english. I hope you could help me. Thanks for the great Plugin.
i would designed a theme with full content of one Blogpost. But the font are not the same and the table width to big.
Here you could find the theme.php:<?php global $newsletter; // Newsletter object global $post; // Current post managed by WordPress /* * Some variabled are prepared by Newsletter Plus and are available inside the theme, * for example the theme options used to build the email body as configured by blog * owner. * * $theme_options - is an associative array with theme options: every option starts * with "theme_" as required. See the theme-options.php file for details. * Inside that array there are the autmated email options as well, if needed. * A special value can be present in theme_options and is the "last_run" which indicates * when th automated email has been composed last time. Is should be used to find if * there are now posts or not. * * $is_test - if true it means we are composing an email for test purpose. */ // This array will be passed to WordPress to extract the posts $filters = array(); // Maximum number of post to retrieve $filters['showposts'] = (int) $theme_options['theme_max_posts']; if ($filters['showposts'] == 0) $filters['showposts'] = 10; // Include only posts from specified categories. Do not filter per category is no // one category has been selected. if (is_array($theme_options['theme_categories'])) { $filters['cat'] = implode(',', $theme_options['theme_categories']); } // Retrieve the posts asking them to WordPress $posts = get_posts($filters); // Styles $color = $theme_options['theme_color']; if (empty($color)) $color = '#777'; $font = $theme_options['theme_font']; $font_size = $theme_options['theme_font_size']; ?> <!DOCTYPE html> <html> <head> <title></title> <style> * { font-family: <?php echo $font; ?>; font-size: <?php echo $font_size; ?>; } </style> </head> <body style="font:normal 11px helvetica,sans-serif;"> <table style="background-color: #ffffff; width: 600px; background-position: initial initial; background-repeat: initial initial;" border="0" cellspacing="0" cellpadding="0" align="center"> <tbody> <tr> <td style="color: #9ab; font: normal 11px helvetica,sans-serif; text-align: center; padding: 10px 0 20px 0;"> <p>Dieser Newsletter wird an {email} gesendet, da Sie sich auf die dipixelprinter.de dafür eingetragen und dies auch bestätigt haben. <a href="https://www.dipixelprinter.de/dpxp/{profile_url}">Klicken Sie hier um Ihre Emailadresse zu ändern oder sich auszutragen.</a></p> <p><strong>Sollten Sie Schwierigkeiten haben, diesen Newsletter anzusehen, können Sie <a href="https://www.dipixelprinter.de/dpxp/{email_url}">hier die online</a> Version abrufen.</strong></p> </td> </tr> <tr> <td><img src="<?php echo $theme_url; ?>/bg_header_email.gif" alt=""> <br><br><img src="https://www.dipixelprinter.de/dpxp/l/logod400px.png" alt=""></td> </tr> <tr> <td style="border:1px dotted #e1e2e3;border-top:none;border-bottom:3px solid #e1e2e3;background:#ffffff"> <table width="600px" align="center" border="0" cellpadding="20" cellspacing="0"> <tr> <td style="background:#ffffff"> <p style="color: #456; font-family: arial,sans-serif; font-size: 24px; line-height: 1.2; margin: 15px 0; padding: 0;"><font size="2"><font color="#445566" face="verdana, geneva"><span style="line-height: 15.600000381469727px;">Liebe Kunden, liebe Freunde,</span></font><font style="color: #445566; font-family: arial, sans-serif; font-size: 24px; line-height: 1.2;" face="verdana,geneva"><br /></font></font></p> <p style="color: #456; font-family: arial,sans-serif; font-size: 24px; line-height: 1.2; margin: 15px 0; padding: 0;"><font size="2" face="verdana,geneva">heute erreicht Sie wieder unser aktueller Newsletter. Wir informieren Sie hier über Neuigkeiten rund um unser Fotolabor, versorgen Sie mit Tipps & Tricks und berichten Interessantes aus der Fotowelt.</font></p> <table style="width: 600px; color: #456; font: normal 12px/1.5em helvetica,sans-serif; margin: 15px 0 0 0; padding: 0 0 15px 0; border-bottom: 1px dotted #e1e2e3;"> <?php foreach ($posts as $post) { setup_postdata($post); $image = nt_post_image(get_the_ID()); ?> <table style="width: 600px;color:#456;font:normal 12px/1.5em helvetica,sans-serif;margin:15px 0 0 0;padding:0 0 15px 0;border-bottom:1px dotted #e1e2e3"> <tbody><tr> <td style="width: 600px;padding:0 10px 0 0;vertical-align:top"> <p style="font-family:arial,sans-serif;color:#456;font-size:20px;line-height:22px;margin:0;padding:0"><strong><a target="_tab" href="<?php echo get_permalink(); ?>" style="color:#456;text-decoration:none" target="_blank"><?php the_title(); ?></a></strong></p> <p><?php the_content(); ?>. </p> </td> </tr> </tbody></table> <br> <?php } ?> <br><br> <?php if (!isset($theme_options['theme_social_disable'])) { ?> <tr> <td style="font:normal 11px helvetica,sans-serif;"> <?php include WP_PLUGIN_DIR . '/newsletter/emails/themes/default/social.php'; ?> </td> </tr> <?php } ?> </table> <table width="100%" align="center" border="0" cellpadding="20" cellspacing="0"> <tr> <td style="background:#ffffff"> <h3 style="margin: 0px; padding: 0px 0px 5px; border: 0px; outline: 0px; font-size: 18px; vertical-align: baseline; background-color: transparent; color: #333333; line-height: 1em; font-weight: normal; font-family: Avenir, Arial, sans-serif;"> </h3> <h3 style="margin: 0px; padding: 0px 0px 5px; border: 0px; outline: 0px; font-size: 18px; vertical-align: baseline; background-color: transparent; color: #333333; line-height: 1em; font-weight: normal; font-family: Avenir, Arial, sans-serif;">Öffnungszeiten und Kontakt</h3> <div style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-size: 14px; vertical-align: baseline; background-color: transparent; color: #666666; font-family: Avenir, Arial, sans-serif; line-height: 21px;"> <p style="margin: 0px; padding: 0px 0px 10px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; line-height: 20px;"><font size="2">Montag bis Freitag von 9:00 bis 19:00 Uhr, Samstag 10:00Uhr bis 16:00Uhr</font></p> <p style="margin: 0px; padding: 0px 0px 10px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; line-height: 20px;"><font size="2">dipixelprinter richter + bogatzki GdBR</font></p> <p style="margin: 0px; padding: 0px 0px 10px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; line-height: 20px;"><font size="2">Bergheimer Str. 34, 69115 Heidelberg, +49 6221 16 00 24</font></p> <p style="margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: baseline; background-color: transparent; line-height: 20px;"><font size="2">www.dipixelprinter.de</font><br /><font size="2">info@dipixelprinter.de</font></p> </div> <p style="color: #456; font-family: arial,sans-serif; font-size: 12px; line-height: 1.6em; font-style: italic; margin: 0 0 15px 0; padding: 0;"> </p> <p style="color: #456; font-family: arial,sans-serif; font-size: 12px; line-height: 1.6em; font-style: italic; margin: 0 0 15px 0; padding: 0;">Um Ihre Newsletteranmeldung zu verwalten, <a style="color: #1155cc;" href="https://www.dipixelprinter.de/dpxp/{profile_url}" target="_blank"><u>klicken Sie bitte hier.</u></a></p> </td> </tr> </tbody> </table> </td> </tr> </body> </html>
March 28, 2014 at 6:54 pm #10831Stefano
KeymasterProbably the problem is the content of the specific post not fitting the 600px. Does the post contain some bug images?
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.