WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
Sending Subscribed Users Full Text Of Post (4 posts)

  1. envano
    Member
    Posted 2 years ago #

    I'm looking to send subscribed users the full post version of our blog posts rather than excerpts. I used a tweak suggested in another support thread but that ended up crashing our site.

    If possible, could you point me to the line of code that I would need to change to send subscribed users the full post rather than the excerpt and also, possibly what would need to be changed on that line?

    I'm using version 7.2.

    Thanks for your help,

    -Neal

    http://wordpress.org/extend/plugins/subscribe2/

  2. Daiv Mowbray
    Member
    Posted 2 years ago #

    I think I can help with this:
    file: class-s2-core.php
    line: 1520 and 562, and 581
    $excerpt = $post->post_excerpt;
    the function then checks if excerpt is empty, and if it is it looks for a more tag in the content, then it removes any shortcodes then it cuts the excerpt to excerpt_length , then it spits out the excerpt.

    if you want to show all the content of the post, I would edit this,
    and change it to:
    $excerpt = $post->post_content;

    You will need to test and such,

    Although it doesn't make much sense, the mail is meant to be a teaser which if the reader wants to read all of the post they click the link.

    A better solution is to submit a feature request to the developer and make a donation for his efforts.

    BOL
    best of Luck

  3. mattyrob
    Member
    Posted 2 years ago #

    @Daiv,

    Your suggestions apply to the development version but not to 7.2. It would work but the settings for Registered users would not work correctly as anyone signing up to an excerpt email would actually get full text.

    The best place to make changes is at the end of the publish() function where groups of recipients are collected for each of the 4 subscribers types.

  4. envano
    Member
    Posted 2 years ago #

    Thanks for the responses. It looks like I can make some tweaks to lines 735 - 744 in subscribe2.php to accomplish this -

    $this->mail($recipients, $subject, $excerpt_body);
    
    // next we send plaintext full content emails
    $this->mail($this->get_registered("cats=$post_cats_string&format=post&author=$post->post_author"), $subject, $full_body);
    
    // next we send html excerpt content emails
    $this->mail($this->get_registered("cats=$post_cats_string&format=html_excerpt&author=$post->post_author"), $subject, $html_excerpt_body, 'html');
    
    // finally we send html full content emails
    $this->mail($this->get_registered("cats=$post_cats_string&format=html&author=$post->post_author"), $subject, $html_body, 'html');

    -Neal

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags