<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>systemBash &#187; TCL</title>
	<atom:link href="http://systembash.com/tags/code-samples/tcl/feed/" rel="self" type="application/rss+xml" />
	<link>http://systembash.com</link>
	<description>Technology and System Administration</description>
	<lastBuildDate>Sat, 12 May 2012 13:13:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Lyris Listmanager &#8211; Hacking the Web Frontend For Increased Functionality</title>
		<link>http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/</link>
		<comments>http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 14:27:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[TCL]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Web Frontend For Increased Functionality Lyris]]></category>

		<guid isPermaLink="false">http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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. </p>
<p>Of course this is not supported by Lyris and if you have problems with it after making your changes, don&#8217;t expect them to support it. Make backup of your files &#8211; in Linux this is /usr/local/lm</p>
<p>For this example, I&#8217;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.</p>
<h2>Step 1:</h2>
<p>Backup!</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cp -R /usr/local/lm /usr/local/lm.bak</div></td></tr></tbody></table></div>
<h2>Step 2:</h2>
<p>Open the file which holds the routine for the &#8220;Survey Details&#8221; page. This is in <lyris install location>/htdocs/reports/surveys/.tml</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">vi /usr/local/lm/htdocs/reports/surveys/.tml</div></td></tr></tbody></table></div>
<h2>Step 3:</h2>
<p>Modify the code to add in FullName:</p>
<p>In the routine surveyreports::page_all_answers</p>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set sql &quot;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]<br />
<br />
to<br />
<br />
set sql &quot;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</div></td></tr></tbody></table></div>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">array set heading_labels &quot;AnswerText {Answer} ResponseTime {Date} QuestionText {Question} EmailAddr {Email Address}&quot;<br />
<br />
to<br />
<br />
array set heading_labels &quot;AnswerText {Answer} ResponseTime {Date} QuestionText {Question} FullName {Full Name} EmailAddr {Email Address}&quot;</div></td></tr></tbody></table></div>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">array set column_width &quot;ResponseTime 15 QuestionText 25 AnswerText 25 EmailAddr 25 Action_ 10&quot;<br />
<br />
to<br />
<br />
array set column_width &quot;ResponseTime 15 QuestionText 25 AnswerText 10 FullName 15 EmailAddr 25 Action_ 10&quot;</div></td></tr></tbody></table></div>
<p>Change</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">set sortable {QuestionText AnswerText ResponseTime EmailAddr RespondingIP}<br />
<br />
to<br />
<br />
set sortable {QuestionText AnswerText ResponseTime FullName EmailAddr RespondingIP}</div></td></tr></tbody></table></div>
<p>Save this file and that is it! You will now have full names in your survey responses.</p>
]]></content:encoded>
			<wfw:commentRss>http://systembash.com/content/lyris-listmanager-hacking-the-web-frontend-for-increased-functionality/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 15/22 queries in 0.005 seconds using disk: basic

Served from: systembash.com @ 2012-05-23 23:26:36 -->
