Gossamer Forum
Home : Products : DBMan : Customization :

Does this mod exist?

Quote Reply
Does this mod exist?
I havent been able to locate any info on it, so Im not even sure if it has been created or anyone has tried it, but is there a mod that any visitor to the site can sign up with their email address to be notified when new ads are added with the info they are looking for? Such as ebay has a notification system so if you are looking for computers for example, you will get an automatic email with links to the records when someone ads an auction for computers? I have a classified ad system on half of my site and I would like for visitors to enter their email address and maybe a keyword (?) and then when anyone enters a classified ad that contains that particular keyword, the visitor will be notified.

Hope this makes sense. Has anyone tried this? Or would you know how to do it? Im assuming it needs a few new subs for the form, success, failure, etc. plus info in db.cgi, but I havent the slighest idea how to start it.

Thanks! Smile
Quote Reply
Re: [wdu2002] Does this mod exist? In reply to
Check out this thread which may help:

Selective Emailing of Records ?
jamesamorris 27-Feb-2002
http://gossamer-threads.com/p/184466

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Does this mod exist? In reply to
Thanks Lois, thats exactly what I was looking for. Smile
Quote Reply
Re: [LoisC] Does this mod exist? In reply to
Hi Lois, or anyone else....can you help me real quick with this code?

I copied and pasted this off of that thread that you posted for the auto notify, but when I add the following code to my db.cgi file, I get an internal server error, so Im assuming its a syntax error somewhere. The OP got this to work on their script, but I get an error, not sure why...



Code:
sub mail_to_notifys {
my (%rec) = &get_record($in{$db_key});
my $location = $rec{'Location'};
my $keyword = $rec{'Keyword'};
my $emailnum = 2;
my $locationnum = 3;
my $keywordnum = 4;

my (@email); open(DB,"<$db_file_mail")||&cgierr("cant open notifys file:$!");

while (my $line = <DB>){ chomp($line);
my @line = &split_decode($line);

if(($line[$locationnum] eq $location)&&($line[$keywordnum] eq $keyword)){

push (@email,$line[$emailnum]);
}
}
close(DB);

my $text = qq|TEST $rec{'Location'},$rec{'Keyword'}|;
foreach my $email (@email){ open (SENDMAIL, "$mailprog") || &cgierr("unable to open mail program");
print SENDMAIL <<"EOF";

From:webmaster\@wdu.net
To: $email Subject: Ad Notification

An ad(s) that matches your criteria was posted.\n

$text

EOF
close(SENDMAIL) or warn "sendmail didnt close nicely";
}
}

Thanks!!!!
Quote Reply
Re: [wdu2002] Does this mod exist? In reply to
Can anyone help with this code? Not sure why it isnt working since it came directly from another thread. Crazy