Gossamer Forum
Home : Products : DBMan : Customization :

Yet Another Mod I'm Too Stupid To Write Myself

Quote Reply
Yet Another Mod I'm Too Stupid To Write Myself
Hi,

Please don't take this the wrong way, this is not me looking for someone to do work for me or whining for a new mod, just had an idea and was wondering how popular it might be...

I have DBMAN storing baseball articles, and there's an author's email address field for each record...I'm using the "Send Email" mod so people can click on a link and fill out a form to email the author...anyway, I was wondering if there was anyway to sort of "mark" that email they send to the author so the author getting the feedback can know which article the comments are in reference to...

...for example, they'd just enter their comments, but the script would place something like this before them:

Feedback from someone@somedomain.com
Some Article Title - 01-Jan-2000

? Smile

Chris
"Can't write Perl, but still has the gall to post a bunch of mod ideas."
Quote Reply
Re: Yet Another Mod I'm Too Stupid To Write Myself In reply to
I just want to be sure we're talking about the same mod. Are you talking about the Private Mailer mod (the one at http://www.jpdeni.com/...Mods/spam_buster.txt )?

If so, you can change the way the email message is set up.

Go to sub send_email (which you would have added to your db.cgi file).

After

Code:
print MAIL "Subject: $in{'subject'}\n\n";
print MAIL "-" x 75 . "\n\n";

add

Code:
$date = &get_date;
print MAIL "Feedback from $in{'email'}\n";
print MAIL "$rec{'Article Title'} - $date\n";

You can add anything you want from the original record, using the $rec{'FieldName'} variable.


------------------
JPD






Quote Reply
Re: Yet Another Mod I'm Too Stupid To Write Myself In reply to
Wow, the most amazing thing happened!

First I tried your code, but got an Internal Server Error...but then I thought that I really ought to look it over closely, there could be a character missing or something...sure enough, there were quotes (") missing around this line (not your fault, but I guess using the code you gave me required this change):

Code:
print MAIL $in{'emailmessage'};

My thinking is that before this was the only thing contained in the email message...but now with more things in there it needed the quotes there, so now it looks like this

Code:
print MAIL "$in{'emailmessage'}";

I see what you mean Carol when you say you didn't really learn Perl, you just got into this script...I myself am becoming obsessed with it! I'm amazed more and more everyday by all the little changes that can be made (like this one) to improve this database...it can be a totally simple little thing or a massively powerful tool that can be customized to your needs in almost anyway thanks to generous people like you.

If you'll exscuse me now I have to go celebrate figuring out something for myself for the first time ever when it comes to this script...if only I could figure out how to get my bloated head through the doorway... Smile

Chris
Quote Reply
Re: Yet Another Mod I'm Too Stupid To Write Myself In reply to
 Smile

I'm not really sure why you needed the quotes, but if that's what does it, then great. I probably should go change the mod.

Congratulations, Chris!


------------------
JPD