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

          
* in my @ACTION_HANDLER_ACTION_PARAMS = ( -SCRIPT_NAME2 add => 
$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) = 
_rearrangeAsHash([
          
* also add -MESSAGE_FOOTER,
          
* Add the fallowing assingment #this creates the link with variables 
filled in.
          
* $body = $body."Click here to Reply 
http://computersystemconsulting.ca".$params->{-SCRIPT_NAME2}."?display_add_form=on&record_id=".$cgi->param('record_id')."&parent_id=".$cgi->param('parent_id')."&thread_id=".$cgi->param('thread_id');
          
* #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.