WordPress.org

Support

Support » Plugins and Hacks » Wysija newsletters archiving

Wysija newsletters archiving

  • matby2k4

    @matby2k4

    Hi all,

    I am in the process of producing a wordpress site for a customer and they want to be able to ping out newsletter easily from the dashboard using ‘drag and drop.’All well and simple using the wysija plugin BUT the issue i am having is that they want some sort of archiving system for these newsletters so that the viewer can look up previous newsletters which have been sent out on the website.

    I was wondering if anyone has any ideas of how i will go about this. maybe there is a Plugin?

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • AJ

    @permaculturetreegeek

    I’m working on this also…
    So far here’s what I have:
    Using the ‘view the html version’ of the newsletter link you can include a single newsletter in a page template like this:

    <?php
    
    /**
     * Returns the body content of the specified HTML file.
     * Strips everything outside the body tag.
     * @param string $filename
     * @return string
     */
    function getbody($filename) {
      $file = file_get_contents($filename);
    
      $bodypattern = ".*<body>";
      $bodyendpattern = "</body>.*";
      $noheader = eregi_replace($bodypattern, "", $file);
      $noheader = eregi_replace($bodyendpattern, "", $noheader);
      return $noheader;
    }
    ?>
    
    <?PHP  echo getbody("yoursiteure.com/?wysija-page=1&controller=email&action=view&email_id=3&wysijap=subscriptions");
     ?>

    The next step is to create a loop that cycles through the ’email_id=’ checks for something there and returns them consecutively. In my case I would like to return the latest one in full and list links to the rest.

    I’m not great at php, anyone have any suggestions?

    AJ

    @permaculturetreegeek

    On second thought… an easier approach for a Wysija newsletter archive.

    I decided instead to create the post category ‘Newsletter’, then set Wysija to automatically send when a new post is published in that category.

    I then created a custom page template for that category so it shows the full content for the most recent Newsletter post and excerpts for the rest.

    The cool thing is that multiple newsletter categories can be created to match multiple lists and with custom page templates each one can have an archive.

    Sooo much simpler than messing around the code…

    please permaculturetreegeek, how did you set Wysija to automatically send when a new post is published in that category?

    I’m traing to use wysija solution [wysija_archive] with no result 🙁

    thanks

    AJ

    @permaculturetreegeek

    When you create a newsletter/email the option to send automatically is the first radio option. When you get to the next screen edit the automatic latest content and select your category.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Wysija newsletters archiving’ is closed to new replies.
Skip to toolbar