Support » Plugin: Subscribe2 » [Plugin: Subscribe2] Ugly excerpt

Viewing 2 replies - 1 through 2 (of 2 total)
  • @flemmingbjerke,

    It’s not working as you are stripping them out before they are added. They are added in the mail() function in the subscribe2 code on line 387:
    $message = wordwrap(strip_tags($message), 80, "\n");

    Try replacing this with:
    $message = strip_tags($message);

    Thank you very much, Matty. It helped.

    But, now the width in of each line is app. 50 character. Has this something to do with how wordpress produces excerpts to subscribe2? This 50 line limit should be removed before the wordwrap to 80 chars is used. Else, the excerpt becomes really ugly.

    I have made some changes to make the excerpts nicer. This is of course a matter of taste … except that the headline is not emphasised, which makes it more difficult to spot the headline.

    I am using plaintext notifications, therefore, to underline the headline, I changed line 3795 to:
    $message_post .= $post_title . "\n=====================================================";
    And the same for the following line. Similar may be done for html.

    In order to retain double new lines, I have changed ‘|\s+|’ in line 703, 704, 3868 and 3869 to ‘ +’. E.g. line 703:
    $excerpt = preg_replace(' +', ' ', $excerpt);
    Particularly, the original lines 3868 and 3869 make it impossible to tweak the format of the excerpts in a nice way because all double new lines is removed. Also when inserted in the settings new post text area! I think another solution to this should be figured out.

    Thinking about it, I think the best would be to split up the excerpt so that {POST} gives the excerpt text only. (And stop using {POSTTIME}). Then, the user must find out how to place and format {TITLE},{TIME},{PERMALINK}, etc. That would give optimal opportunities for formatting the excerpts in the settings’ new post text area. (If line 3868 and 3869 is changed.)

    Subscribe2 is great 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Subscribe2] Ugly excerpt’ is closed to new replies.