osCmax v2.5 User Manual
Results 1 to 5 of 5

WYSIWYG Newsletter ignores Text formatting?

This is a discussion on WYSIWYG Newsletter ignores Text formatting? within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; I'm still trying to send html newsletters properly, and am having some problems. No matter what I try, I cannot ...

      
  1. #1
    New Member
    Join Date
    Jun 2004
    Posts
    15
    Rep Power
    0


    Default WYSIWYG Newsletter ignores Text formatting?

    I'm still trying to send html newsletters properly, and am having some problems. No matter what I try, I cannot get any sort of text formatting to happen, i.e., if I set fonts to Verdana, they will automatically be changed to Times, and any CSS I try to enter manually is completely ignored. The html and WYSIWYG stuff is all turned on. I can get images to show up, but changing a font is a complete bust, and CSS sure would be nice. Has ANYONE had success with this??

  2. #2
    New Member
    Join Date
    Jun 2004
    Posts
    15
    Rep Power
    0


    Default

    Almost got it, the broken formatting was coming from CSS that wasn't being included in the head tags. BUT there is still one big problem: WYSIWYG is still inserting <br> tags EVERYWHERE, seemingly after every tag. I know I can't be the only one, and darned if I can find it with the search, so if you have a thread for me, fire away...

  3. #3
    New Member
    Join Date
    Feb 2005
    Posts
    15
    Rep Power
    0


    Default

    I am also having a problem with the <br> tag being inserted into my html newsletters. Can anyone help?

  4. #4
    New Member
    Join Date
    Feb 2005
    Posts
    15
    Rep Power
    0


    Default

    I found that everytime you enter a return in your html code the emailer inserts a <br> tag. To solve this problem I made my html email then got rid of all the returns so it was one long running line of code. I've tested it a couple times and it is working for me, I'm interested to see if it fixes other peoples issues.

    Example:
    <html>
    <body>
    <a href="#">link</a>
    <p>
    <img src="#">
    </p>
    </body>
    </html>

    This would be changed to one continuous line:
    <html><body><a href="#">link</a><p><img src="#"></p></body></html>

  5. #5
    Lurker
    Join Date
    Sep 2004
    Posts
    1
    Rep Power
    0


    Default <br> making newsletters useless!!

    I've been having the same problem, with a &lt;br> tag being inserted to replace newlines in the actual html. The resulting emails had loads of whitespace. You can get rid of the problem by editing the file:
    catalog\admin\includes\classes\email.php

    Change the add_html function so that it no longer calls the tep_convert_linefeeds function with the HTML:


    function add_html($html, $text = NULL, $images_dir = NULL) {
    // $this->html = tep_convert_linefeeds(array("\r\n", "\n", "\r"), '&lt;br>', $html);
    $this->html = $html;
    $this->html_text = tep_convert_linefeeds(array("\r\n", "\n", "\r"), $this->lf, $text);

    if (isset($images_dir)) $this->find_html_images($images_dir);
    }

    You may also want to change the preview page and confirm send pages so that they you can view the email as it will be sent. Just remove the calls to 'nl2br' in newsletter.php and newsletters.php:

    catalog\admin\includes\modules\newsletters\newslet ter.php:
    change nl2br($this->content) to $this->content

    catalog\admin\newsletters.php:
    change nl2br($nInfo->content) to $nInfo->content

    I hope this is helpful!

Similar Threads

  1. Remove newsletter
    By code_renegade in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 02-04-2006, 10:00 PM
  2. Conditional formatting in header.php file
    By ReginaStelling in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 08-03-2004, 11:08 AM
  3. Welcome Newsletter
    By bobbiejames in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-14-2004, 07:41 AM
  4. Newsletter / Emails
    By peterb in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 07-01-2003, 09:54 AM
  5. HTML Newsletter
    By adrenalinez in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-29-2003, 09:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •