Mailing list (newsletter) project

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
RickChase
Forum Newbie
Posts: 3
Joined: Mon Mar 15, 2004 8:00 pm

Mailing list (newsletter) project

Post by RickChase »

I am considering starting a new project for one of my sites, but would like to hear some feedback before I begin.

I am not even sure if this is possible, or how difficult it is to setup.

What I would like to do is send out a newsletter that only has a few lines of the actual article. In the newsletter will be links to the actual articles, which are actually all on one page. This page is also accessible through my site, and shows only the current version of the newsletter. Once a new newsletter has been sent out, the older one moves itself to the archives. Again, all archives are available through the website.

Where would I begin with such a project? Ultimately I see this having one admin area. I would put in the headlines, and the full article, and before the newsletter is sent PHP cuts the article down to whatever size I determine sends it out.

The big deal to me is to have the newsletter archive itself when a new one is sent out.

Any ideas??

Thank you,
Rick
Goowe
Forum Commoner
Posts: 94
Joined: Mon Mar 15, 2004 9:51 am
Location: Southeast Alaska

Post by Goowe »

Are you looking for ideas on sending out the newsletter to mass amounts of people at one time? Or just cutting down the size of the news article to make something like:
Are you looking for ideas on sending out the newsletter to mass amounts of people at one time? Or just cutting down the size of the ne...
RickChase
Forum Newbie
Posts: 3
Joined: Mon Mar 15, 2004 8:00 pm

Post by RickChase »

It's actually the automatic archiving of the old news pages that has me most baffled. I would like to just send out a new newsletter, have that populate the "news" section, and have the current "news" section move itself to the "archives".

Cutting the text down I can handle, and I think the mass-mailing I can handle, the auto-archiving is what's getting me right now.
Goowe
Forum Commoner
Posts: 94
Joined: Mon Mar 15, 2004 9:51 am
Location: Southeast Alaska

Post by Goowe »

The way I do it is by using a unix timestamp to show when the news was posted... I run a query to select all the news items, and then do an if statement like this...

Code: Select all

<?php
if((time()-$line['topic_time']) < (60*60*24*15))
?>
The above is within the while() statement for the mySQL query.

$line['topic_time'] is the unix timestamp for when the news article was posted and the (60*60*24*15) will cut down the news articles so it displays only ones posted within the last 15 days.

This isn't a very efficient way... but then for the archives you could have something like above but chang ethe less than sign to greater than, or display all the news articles (regardless of time posted).

Another way to do it would be like illusionist (sp) did in another topic where you order the news articles in the query by date posted descending and set the LIMIT to 1 or 2 so that way it only displays the 1 or 2 news articles that were last posted...

Sorry, hope this helps
RickChase
Forum Newbie
Posts: 3
Joined: Mon Mar 15, 2004 8:00 pm

Post by RickChase »

Goowe,

Fantastic suggestions!! Thank you for the ideas.

Thanks!
Goowe
Forum Commoner
Posts: 94
Joined: Mon Mar 15, 2004 9:51 am
Location: Southeast Alaska

Post by Goowe »

Good luck :wink: I'm super duper glad I could help... hollar if it doesn't work
Post Reply