Lyris Listmanager – Hacking the Web Frontend For Increased Functionality



Lyris Listmanager is a nice mailing list management system. However, there are a few features that are missing out of the frontend that make it hard to get by your day-to-day office job. Fortunately, most of it is written with TCL routines which are not encoded, which makes for easy updates to this code.

Of course this is not supported by Lyris and if you have problems with it after making your changes, don’t expect them to support it. Make backup of your files – in Linux this is /usr/local/lm

For this example, I’m going to add the Full Name field to survey results. By default, it shows the email address but not the name of the responding user.

Step 1:

Backup!

1
cp -R /usr/local/lm /usr/local/lm.bak

Step 2:

Open the file which holds the routine for the “Survey Details” page. This is in /htdocs/reports/surveys/.tml

1
vi /usr/local/lm/htdocs/reports/surveys/.tml

Step 3:

Modify the code to add in FullName:

In the routine surveyreports::page_all_answers

Change

1
2
3
4
5
set sql "SELECT lyrSurveyResponse.WebDocID, lyrSurveyResponseAnswers.ResponseID as ResponseID, lyrSurveyQuestions.UserQuestionNumber, lyrSurveyResponse.ResponseTime, lyrSurveyResponse.MemberID, lyrSurveyResponse.RespondingIP, lyrSurveyResponse.MailingID, lyrSurveyQuestions.QuestionText, lyrSurveyAnswers.AnswerText, lyrSurveyResponseAnswers.FreeFormAnswer, [dbinfo::members_name].[dbinfo::members_emailaddr]

to

set sql "SELECT lyrSurveyResponse.WebDocID, lyrSurveyResponseAnswers.ResponseID as ResponseID, lyrSurveyQuestions.UserQuestionNumber, lyrSurveyResponse.ResponseTime, lyrSurveyResponse.MemberID, lyrSurveyResponse.RespondingIP, lyrSurveyResponse.MailingID, lyrSurveyQuestions.QuestionText, lyrSurveyAnswers.AnswerText, lyrSurveyResponseAnswers.FreeFormAnswer, [dbinfo::members_name].[dbinfo::members_emailaddr] as EmailAddr, members_.fullname_ as FullName

Change

1
2
3
4
5
array set heading_labels "AnswerText {Answer} ResponseTime {Date} QuestionText {Question} EmailAddr {Email Address}"

to

array set heading_labels "AnswerText {Answer} ResponseTime {Date} QuestionText {Question} FullName {Full Name} EmailAddr {Email Address}"

Change

1
2
3
4
5
array set column_width "ResponseTime 15 QuestionText 25 AnswerText 25 EmailAddr 25 Action_ 10"

to

array set column_width "ResponseTime 15 QuestionText 25 AnswerText 10 FullName 15 EmailAddr 25 Action_ 10"

Change

1
2
3
4
5
set sortable {QuestionText AnswerText ResponseTime EmailAddr RespondingIP}

to

set sortable {QuestionText AnswerText ResponseTime FullName EmailAddr RespondingIP}

Save this file and that is it! You will now have full names in your survey responses.