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!

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

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
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

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

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

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.

2 comments

Comments are closed.

You May Also Like

The Ultimate Guide to DVD Encoding with Handbrake

It’s no secret that I’m a huge fan of Handbrake. After committing to copying my DVD collection to my storage array, I’ve tried and tested just about all software out there for converting video to H.264 with an emphasis on quality and speed. Many software packages have problems with quality or desynchronized audio, Handbrake is my hands-down favorite when it comes down to converting video — and that includes both free and commercial software. One of the complaints I hear about Handbrake is that there are too many options. Well, the good news for someone looking for simplicity is that the built-in presets mostly take care of them for you. And for anyone who likes to dive into the nitty gritty of video compression, it also allows for a lot of tweaking to get the most out of your movie while maintaining small file sizes and high quality. Read on for my full guide to Handbrake features.

Google Adds Two-Factor Authentication To Google Apps (For Real, This Time)

I’m not trying to say I had anything to do with Google…

Find Out If A Twitter Username Exists Using PHP/JSON

I’ve been trying to grab a Twitter screenname that people continually register…

Adding Random Quotes to the Bash Login Screen

According to “official” system administrator rules and guidelines you shouldn’t be adding…