eXtropia: the open web technology company
Technology | Support | Tutorials | Development | About Us | Users | Contact Us
Development resources
 ::   WebWare 2.1 (Perl)
 ::   WebWare 2.0 (Java)
 ::   Cool hacks
cool hacks
Direct Reply Link in BBS Email  

Shanta McBain sent in the following hack...

How do I add a Link so a Forum user, getting Forum Post in their email, may reply directly by clicking a link in the Email?

This requires the following changes to two files in the BBS System.

1. bbs.cgi

$CGI->script_name(), This passess the script name to the action handler.
* -MESSAGE_FOOTER => $footer, #define $footer with any data you want I 
put this at the top of the file in my porting setup.

* Porting Setup

2. ProcessAddAction.pm

* Pick up the value in by adding -SCRIPT_NAME2, To my ($params) = 
* also add -MESSAGE_FOOTER,
* Add the fallowing assingment #this creates the link with variables 
filled in.
* $body = $body."Click here to Reply 
* #Add any additioal info to the footer. This add the text you put into 
the footer variable in the setup file. $body = 
$body.$params->{-MESSAGE_FOOTER}; my $body = $rh_record->{'body'}; Above 
the mail prams $app->sendMail(( -MAIL_CONFIG_PARAMS => 
$params->{-MAIL_CONFIG_PARAMS}, -BODY => $body, @$mail_send_params )); }

3. You may what to add your domain to a variable pasted to the ActionHandler as well.

There are some improvements that I am working on. One is to put most of the text of the footer into a modifed BBSEmailView.ttml and only pass the email address for subscribe, unsibscrobe, and the address for the WebForm for doing the same. This will keep the app generic yet minimize non changing data in the setupfile.