|
From: <cre...@us...> - 2007-09-08 20:15:32
|
Revision: 1733
http://frontierkernel.svn.sourceforge.net/frontierkernel/?rev=1733&view=rev
Author: creecode
Date: 2007-09-08 13:15:35 -0700 (Sat, 08 Sep 2007)
Log Message:
-----------
added template parmeter
Modified Paths:
--------------
ODBs/trunk/mainResponderRoot/mainResponder/discuss/cowSkullLink.fvc
Modified: ODBs/trunk/mainResponderRoot/mainResponder/discuss/cowSkullLink.fvc
===================================================================
--- ODBs/trunk/mainResponderRoot/mainResponder/discuss/cowSkullLink.fvc 2007-09-08 20:14:53 UTC (rev 1732)
+++ ODBs/trunk/mainResponderRoot/mainResponder/discuss/cowSkullLink.fvc 2007-09-08 20:15:35 UTC (rev 1733)
@@ -1,21 +1,33 @@
-FrontierVcsFile:1:scpt:mainResponder.discuss.cowSkullLink
+FrontierVcsFile:3:scpt:mainResponder.discuss.cowSkullLink
-\xC7Changes
- \xC7Thu, 04 Mar 1999 03:04:25 GMT by AR
- \xC7config.mainresponder.urls is no longer referenced - we look at the page table instead
-on cowSkullLink (linetext, msgnum) {
- local (picturelink = mainResponder.discuss.cowSkullImage ());
- local (pta = html.getPageTableAddress ());
- local (url = pta^.responderAttributes.urls^.discussMsgReader);
- local (htmltext = "", indentlevel = 0);
- on add (s) {
- htmltext = htmltext + string.filledString ("\t", indentlevel) + s + "\r"};
- add ("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"); indentlevel++;
- add ("<tr>"); indentlevel++;
- add ("<td>" + linetext + "</td>");
- add ("<td valign=\"top\" width=\"22\">" + "<a href=\"" + url + msgnum + "\">" + picturelink + "</a>" + "</td>");
- add ("</tr>"); indentlevel--;
- add ("</table>"); indentlevel--;
- return (htmltext)};
-\xC7bundle //test code
- \xC7dialog.alert (cowSkullLink ("blah blah blah", 716))
\ No newline at end of file
+on cowSkullLink ( lineText, msgNum, template = nil ) {
+
+ «Changes
+ «9/8/07; 12:59:51 PM by TAC
+ «added template parmeter
+ «3/3/99; 8:04:25 PM by AR
+ «config.mainresponder.urls is no longer referenced - we look at the page table instead
+ «??/??/?? by ???
+ «created
+
+ local ( pta = html.getPageTableAddress ( ) );
+
+ local ( htmlText = "" ); // , indentLevel = 0 )
+ local ( pictureLink = mainResponder.discuss.cowSkullImage ( pta ) );
+ local ( url = pta^.responderAttributes.urls^.discussMsgReader );
+
+ «on add ( s )
+ «htmlText = htmlText + ( string.filledString ( tab, indentLevel ) + s + "\r" );
+
+ if template == nil {
+ template = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r<tr>\r<td>\r[[lineText]]\r</td>\r<td valign=\"top\" width=\"22\">\r[[link]]\r</td>\r</tr>\r</table>\r"};
+
+ htmlText = string.replaceAll ( template, "[[lineText]]", lineText );
+ htmlText = string.replaceAll ( htmlText, "[[link]]", "<a href=\"" + url + msgNum + "\">" + pictureLink + "</a>" );
+
+ return ( htmlText )};
+
+«bundle // testing
+ «dialog.alert ( cowSkullLink ( "blah blah blah", 716 ) )
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|