These instructions were posted in another thread but I am posting them here, again, in order that I will receive the email concerning the mod instead of someone else receiving the email. This mod allows the user to decide whether or not he/she wants to receive Email from the admin concerning the link being added or modified.
This is a mult-step process.
1. In links.def, change the ReceiveMail field to optional by changing the following:
isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes'
);
to read:
isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0
);
2. In add.html and modify.html, add something like this to the add/modify form (I have it at the end of the form):
Receive Email:
</td><td>
If you do not want to receive email about changes<br>that may affect this resource, select "No"<br>
<input type="radio" name="ReceiveMail" value="Yes" checked> Yes
<input type="radio" name="ReceiveMail" value="No"> No
</td></tr></table>
3. In add_error.html and modify_error.html, include the following for the form (I added it at the end):
If you do not want to receive email about changes<br>that may affect this resource, select "No"<br>
<%radio_button%><br>
</td></tr></table>
For non-templates, the changes in step 2 should be made to sub site_html_add_form and sub site_html_modify_form in site_html.pl while step 3 should be made to sub site_html_add_failure and sub site_html_modify_failure in site_html.pl (except that you use $radio_button, not <%radio_button%> ).
4. In sub site_html_add_failure and sub site_html_modify_failure, site_html_templates.pl or site_html.pl, add the following after my ($errormsg) = shift;:
if ($in{'ReceiveMail'} eq "Yes") {
$radio_button = qq|<input type="radio" name="ReceiveMail" value="Yes" checked> <b>Yes</b>
<input type="radio" name="ReceiveMail" value="No"> <b>No</b>|;
}
else {
$radio_button = qq|<input type="radio" name="ReceiveMail" value="Yes"> <b>Yes</b>
<input type="radio" name="ReceiveMail" value="No" checked> <b>No</b>|;
}
Please post any questions or problem reports concerning this mod in this thread or by sending me email. Thanks.
------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
This is a mult-step process.
1. In links.def, change the ReceiveMail field to optional by changing the following:
Code:
%add_system_fields = ( isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes'
);
to read:
Code:
%add_system_fields = ( isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0
);
2. In add.html and modify.html, add something like this to the add/modify form (I have it at the end of the form):
Code:
</td></tr><tr><td> Receive Email:
</td><td>
If you do not want to receive email about changes<br>that may affect this resource, select "No"<br>
<input type="radio" name="ReceiveMail" value="Yes" checked> Yes
<input type="radio" name="ReceiveMail" value="No"> No
</td></tr></table>
3. In add_error.html and modify_error.html, include the following for the form (I added it at the end):
Code:
</td><td> If you do not want to receive email about changes<br>that may affect this resource, select "No"<br>
<%radio_button%><br>
</td></tr></table>
For non-templates, the changes in step 2 should be made to sub site_html_add_form and sub site_html_modify_form in site_html.pl while step 3 should be made to sub site_html_add_failure and sub site_html_modify_failure in site_html.pl (except that you use $radio_button, not <%radio_button%> ).
4. In sub site_html_add_failure and sub site_html_modify_failure, site_html_templates.pl or site_html.pl, add the following after my ($errormsg) = shift;:
Code:
my $radio_button; if ($in{'ReceiveMail'} eq "Yes") {
$radio_button = qq|<input type="radio" name="ReceiveMail" value="Yes" checked> <b>Yes</b>
<input type="radio" name="ReceiveMail" value="No"> <b>No</b>|;
}
else {
$radio_button = qq|<input type="radio" name="ReceiveMail" value="Yes"> <b>Yes</b>
<input type="radio" name="ReceiveMail" value="No" checked> <b>No</b>|;
}
Please post any questions or problem reports concerning this mod in this thread or by sending me email. Thanks.
------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/