Chronological sorting that what I thought, the only way to handle it based
on replies, is to add handler either to subject or to the body, but subject
will not be modified bt list users (normally they wouldn't bother to put
something like [REPLY-10]) so what we can do is to use first like of the
email as service line. So if post was made at the forum the first line for
new post would be like [FORUM 9999-467-0] where '9999' mean ID of the forum
tipic, '467' meas the id of the question (the wor) and "0" means that this
is first post to the topic. Then if this is a reply we would have something
like [FORUM 9999-470-2] so we know there was 2 replies already to the topic
and if we get reply for the list we would add it after the 3rd row for posts
list. And finally if email has no first row with our data then it means it
is its list post so we would look for the first occurance of it and do
thepost based on encoding. If there is no occurance then chek if we fave
topic started (some ppl kill history) if topic present just add the post
chronologically. If there is no post w/ such subject and there is no [FORUM
] then create new topic in the forum
What do you think?
_____
From: Imran K [mailto:gururug at gmail dot com]
Sent: Monday, January 08, 2007 11:24 PM
To: Alex M
Subject: Re: [m0n0wall-dev] RE: [Forged Sender] RE: [m0n0wall] Re: why dont
we have forum?
We may need to think about how the emails are going to be sorted
heirarchically in the forum.
Unless its pure chronological, emails are not going to contain thier
appropriate sub areas. One basic solution is to put all new comments from
email into a "list" forum category.
Cheers
On 1/9/07, Imran K <gururug at gmail dot com> wrote:
Thanks
On 1/9/07, Alex M < <mailto:radiussupport at lrcommunications dot net>
radiussupport at lrcommunications dot net> wrote:
Ok here is link to the forum software that Mono will use.
http://www.simplemachines.org/
Also, I did minimal edit to your script to show date as mysql datetime
stamp...
_____
From: Imran K [mailto:gururug at gmail dot com]
Sent: Monday, January 08, 2007 7:08 PM
To: Alex M
Subject: Re: [m0n0wall-dev] RE: [Forged Sender] RE: [m0n0wall] Re: why dont
we have forum?
This is what I am getting at my end (see attachment)
On 1/9/07, Imran K <gururug at gmail dot com> wrote:
Up to the stage where I check the email against forum db.
Am going to need a test db for this, do you have;
-an sql dump of the db schema with some sample data in it?
-forum source would also be nice? :) but not absolutly required now.
SIDENOTE (Are we sure we want to delete after adding to db or is there a
chance we may be better off moving to another folder for
recordkeeping(backup) purposes?
Cheers
On 1/9/07, Imran K <gururug at gmail dot com> wrote:
Great, will take a look, here's where i'm up to with the code, probrably
need to check the formatting of body?
###################################################################
<?php
// setup access vars
$popserver = 'localhost';
$popuser = 'wulf';
$poppwd = 'joseph107';
// connect to server
$mailbox = imap_open("{".$popserver."/pop3/notls:110}INBOX", $popuser,
$poppwd ) or die("unable to connect pop3 server: " . imap_last_error());
// how many new messages?
$mno = imap_num_msg($mailbox);
// make sure that we have new messages
if ($mno == 0) {
die("no new messages");
exit();
}
echo "you have $mno messages\n";
// loop for messages
for ($i = 1; $i <= $mno; ++$i) {
$header = imap_header($mailbox, $i);
// set some output vars
$email = "{$header->from[0]->mailbox}@{$header->from[0]->host}";
$body = imap_body($mailbox, $i);
$tstamp = date("jS F Y", $header->udate);
$subject = $header->Subject;
// Format Output
echo " Message: $i\n";
echo " Timestamp: $tstamp\n";
echo " From: $email\n";
echo " Subject: $subject.\n";
echo " Message: $body.\n";
}
// close server conn
imap_close($mailbox);
// fin
?>
On 1/9/07, Alex M <radiussupport at lrcommunications dot net> wrote:
--
IK
--
IK |