You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(447) |
Nov
(163) |
Dec
(57) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(172) |
Feb
|
Mar
(123) |
Apr
(64) |
May
(1) |
Jun
(278) |
Jul
(89) |
Aug
(97) |
Sep
(62) |
Oct
(53) |
Nov
(119) |
Dec
(60) |
| 2006 |
Jan
(76) |
Feb
(1094) |
Mar
(363) |
Apr
(163) |
May
(57) |
Jun
(43) |
Jul
(39) |
Aug
(15) |
Sep
(33) |
Oct
(62) |
Nov
(8) |
Dec
|
| 2007 |
Jan
(9) |
Feb
(34) |
Mar
(2) |
Apr
(14) |
May
(8) |
Jun
(40) |
Jul
(21) |
Aug
(1) |
Sep
(20) |
Oct
(15) |
Nov
(26) |
Dec
|
| 2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
|
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: creedon <icr...@us...> - 2005-12-11 08:08:39
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2675 Modified Files: install Log Message: in menu bundle added call so that updated menu would be added to system menu Index: install =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/install,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** install 26 Mar 2005 19:42:49 -0000 1.1.1.1 --- install 11 Dec 2005 08:08:31 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.install ! on install (f) { ÇInstall a tool, given the path to the tool's guest database. ÇTuesday, September 26, 2000 at 4:50:49 PM by JES ÇChanges: Ç06/24/02; 3:05:44 PM by JES ÇIf a Tool's suite has a localization sub-table, register the languages in the appropriate localization sub-table(s). Ç06/12/02; 12:13:04 AM by JES ÇInstall callbacks in the user.radio.callbacks table, if the Tool has callbacks at toolSuite.callbacks.radio, and user.radio.callbacks is defined. Ç03/07/02; 12:02:37 AM by JES ÇCall scheduler.monitorThreads after installing the Tool, to kick off its thread (if it exists). Ç12/01/01; 6:34:14 PM by JES ÇFixed a bug installing Tools windowTypes in the user.tools.windowTypes table. Ç11/30/01; 5:04:11 PM by JES ÇInstall windowTypes and noteTypes addresses inside a try statement, so that installation won't fail if there's already a table at the address. Ç11/29/01; 5:12:36 PM by JES ÇFixed a bug installing windowTypes. Ç11/26/01; 10:58:48 PM by JES ÇCall callbacks at user.tools.callbacks.beforeInstall with the path to the Tool database before installing the Tool. If the callback returns false, don't install the Tool. ÇCall callbacks at user.tools.callbacks.afterInstall with the address of the Tool's database, after installing the Tool. The return value is ignored. Ç10/07/01; 8:32:22 PM by JES ÇOnly create the user.tools.databases table for this tool if it's not already defined. Create user.tools.databases.[toolName].flEnabled if not already defined. Ç07/02/01; 2:54:03 AM by JES ÇInstall user windowTypes. Ç05/10/01; 4:52:47 PM by JES ÇIf this is a Macintosh, make sure that .root files have the correct type/creator codes. Ç04/28/01; 7:44:27 PM by JES ÇInstall the website framework site in a try block, because user.webserver.responders.websiteFramework may not exist. Ç12/26/00; 5:39:46 PM by PBS ÇRebuild the menubar, in case the Tool has a menu referenced in user.menus. Ç11/28/00; 12:30:13 by JES ÇCall playlist.init before installing tools. Call the tool's upgradeToTool script if flUpgradeToTool is true. Ç10/27/00; 2:39:32 PM by JES ÇMake sure the icons folder exists before attempting to write icons to disk. Ç10/18/00; 8:17:36 PM by JES ÇFixed a bug where a tool's icon files would not be written to disk. Ç10/03/00; 10:33:37 PM by PBS ÇFix for installing callbacks -- the parameters to table.assign were switched. Ç10/01/00; 1:16:35 AM by PBS ÇMinor cleanups. bundle { //run beforeInstall callbacks -- if any of the callbacks returns false, don't install the Tool local (adrcallbacks = @user.tools.callbacks.beforeInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (f) { //callback returned false -- don't install return (false)}}}}; //not installed Frontier.tools.init (); //11/28/00 JES if not defined ([f]) { if system.environment.isMac { //05/10/2001 JES: set type/creator if not (file.type (f) == 'TABL') { file.setType (f, 'TABL'); file.setCreator (f, 'LAND')}}; fileMenu.open (f, true)}; local (adrTool = @[f]); local (fname = file.fileFromPath (f)); local (name = Frontier.tools.cleanToolName (fname)); on getTable (itemName, adrAdrTable) { ÇReturn true if the table exists in the tool gdb and is non-empty. Return false otherwise. adrAdrTable^ gets the address of the table. local (adrTable = @adrTool^.[name + itemName]); if defined (adrTable^) { //does the item exist? if sizeOf (adrTable^) > 0 { //is the table non-empty? adrAdrTable^ = adrTable; return (true)}}; return (false)}; on installItem (adrTable, itemName, flCopy=false) { ÇInstall only if the item exists in the tool database. local (adrItem); if getTable (itemName, @adrItem) { if flCopy { table.assign (@adrTable^.[name], adrItem^)} else { table.assign (@adrTable^.[name], adrItem)}}}; installItem (@user.webserver.responders, "Responder", true); //true to make a copy installItem (@user.betty.rpcHandlers, "RpcHandlers"); installItem (@user.soap.rpcHandlers, "SoapHandlers"); installItem (@user.scheduler.threads, "Thread"); try { //websiteFramework responder might not be installed installItem (@user.webserver.responders.websiteFramework.data.docTree, "Website")}; bundle { //suite local (adrSuite); if getTable ("Suite", @adrSuite) { bundle { //background local (backgroundName = name); local (adrBackground = @adrSuite^.background); if defined (adrBackground^) { if defined (adrBackground^.everyMinute) { user.scheduler.everyMinute.[name] = @adrBackground^.everyMinute}; if defined (adrBackground^.everyHour) { user.scheduler.hourly.[name] = @adrBackground^.everyHour}; if defined (adrBackground^.everyNight) { user.scheduler.overnight.[name] = @adrBackground^.everyNight}}}; bundle { //callbacks local (adrCallbacks = @adrSuite^.callbacks); on installCallbacks (adrCallbacks, adrTable) { if defined (adrCallbacks^) { local (adr); for adr in adrTable { local (callbackName = nameOf (adr^)); if defined (adrCallbacks^.[callbackName]) { table.assign (@adr^.[name], @adrCallbacks^.[callbackName])}}}}; if defined (adrCallbacks^) { if system.environment.isPike { installCallbacks (@adrCallbacks^.fileMenu, @user.tools.commandCallbacks)}; if defined (user.radio.callbacks) { installCallbacks (@adrCallbacks^.radio, @user.radio.callbacks)}; installCallbacks (@adrCallbacks^.user, @user.callbacks); installCallbacks (@adrCallbacks^.ftp, @user.html.callbacks.fileWriters.ftp)}}; bundle { //menu local (adrMenu = @adrSuite^.menu); if defined (adrMenu^) { Frontier.tools.installSubMenu (adrMenu)}}; bundle { //localization local (adrLoc = @adrSuite^.localization); if defined (adrLoc^) { on installLocalizations (adrLocalizations, installIn) { local (adrlang); for adrlang in adrLocalizations { local (langName = nameOf (adrlang^)); if not defined (installIn^.[langName]) { installIn^.[langName] = adrlang}}}; if defined (radio.data.localization.languages) { if defined (adrLoc^.radio) { installLocalizations (@adrLoc^.radio, @radio.data.localization.languages)}}; if defined (mainResponder.localization.languages) { if defined (adrLoc^.mainResponder) { installLocalizations (@adrLoc^.mainResponder, @mainResponder.localization.languages)}}; if defined (manilaData.localization.languages) { if defined (adrLoc^.manila) { installLocalizations (@adrLoc^.manila, @manilaData.localization.languages)}}}}}}; bundle { //nodeTypes local (appFolder = file.folderFromPath (Frontier.getProgramPath ())); local (pc = file.getPathChar ()); local (iconsFolder = appFolder + "Appearance" + pc + "Icons" + pc); local (platform = "windows"); if system.environment.isMac { platform = "mac"}; on writeIcon (adrIconTable) { local (adrIcon = @adrIconTable^.[platform]); if defined (adrIcon^) { local (iconName = nameOf (parentOf (adrIconTable^)^)); local (fname = iconName); if system.environment.isWindows { fname = fname + ".bmp"}; local (f = iconsFolder + fname); file.sureFilePath (f); //JES 10/27/00: make sure the icons folder exists if not (file.exists (f)) { //write only if file does not exist if system.environment.isWindows { file.writeWholeFile (f, adrIcon^)}; if system.environment.isMac { //write to resource fork file.writeWholeFile (f, "", 'rsrc', 'RSED'); //type is resource, creator is ResEdit local (adrResource); for adrResource in adrIcon { //write each resource rez.putResource (f, getBinaryType (adrResource^), 128, adrResource)}}}}}; local (adrNodeTypes); if getTable ("NodeTypes", @adrNodeTypes) { for adr in adrNodeTypes { local (adrNodeType = @user.tools.nodeTypes.[nameOf (adr^)]); try { adrNodeType^ = adr}; if defined (adr^.icon) { writeIcon (@adr^.icon)}}}}; bundle { //windowTypes local (adrWindowTypes); if getTable ("WindowTypes", @adrWindowTypes) { for adr in adrWindowTypes { local (adrWindowType = @user.tools.windowTypes.[nameOf (adr^)]); try { adrWindowType^ = adr}}}}; bundle { //set up root updates prefs local (adrData); if getTable ("Data", @adrData) { local (adrVirginPrefs = @adrData^.initialRootUpdatesPrefs); if defined (adrVirginPrefs^) { local (tableName = fname); if string.lower (tableName) endsWith ".root" { tableName = string.popSuffix (tableName)}; local (adrTable = @user.rootUpdates.servers.[tableName]); if not defined (adrTable^) { new (tableType, adrTable)}; if not defined (adrTable^.autobackup) { adrTable^.autobackup = true}; if not defined (adrTable^.dbName) { adrTable^.dbName = fname}; if not defined (adrTable^.dialogs) { adrTable^.dialogs = true}; if not defined (adrTable^.lastUpdate) { if defined (adrData^.initialRootUpdatesPrefs.lastUpdate) { adrTable^.lastUpdate = adrVirginPrefs^.lastUpdate} else { adrTable^.lastUpdate = date (0)}}; if not defined (adrTable^.method) { if defined (adrVirginPrefs^.method) { adrTable^.method = adrVirginPrefs^.method} else { adrTable^.method = "mainResponder.subscriptions.update"}}; if not defined (adrTable^.openLog) { adrTable^.openLog = false}; if not defined (adrTable^.port) { if defined (adrVirginPrefs^.port) { adrTable^.port = adrVirginPrefs^.port} else { adrTable^.port = 80}}; if not defined (adrTable^.serialNum) { adrTable^.serialNum = 0}; if not defined (adrTable^.server) { adrTable^.server = adrVirginPrefs^.server}; if not defined (adrTable^.url) { if defined (adrVirginPrefs^.url) { adrTable^.url = adrVirginPrefs^.url} else { adrTable^.url = ""}}}}}; bundle { //save the fact that it's an installed tool local (adrTable = @user.tools.databases.[name]); if not defined (adrTable^) { new (tableType, adrTable)}; adrTable^.path = f; local (now = clock.now ()); adrTable^.lastModified = now; adrTable^.flInstalled = true; if not defined (adrtable^.flEnabled) { adrtable^.flEnabled = true}}; bundle { //store tool info in the temp table local (adrtempdata = @system.temp.Frontier.tools.[frontier.tools.cleanToolName (name)]); if not defined (adrtempdata^) { new (tableType, adrtempdata)}; if not defined (adrtempdata^.lastModified) { adrtempdata^.lastModified = file.modified (f)}; if defined ([name + "Info"]) { adrtempdata^.info = [name + "Info"]}; if defined ([name + "Website"]) { adrtempdata^.url = "/" + name + "/"}}; menus.buildMenuBar (); //PBS 12/26/00: a Tool may have a menu references in user.menus bundle { //run afterInstall callbacks -- the return value is ignored local (adrcallbacks = @user.tools.callbacks.afterInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (adrTool)}}}; //return value ignored scheduler.monitorThreads (); //start the Tool's thread immediately return (true)}; Çbundle //debugging Çinstall ("Backup:Radio UserLand:Tools:whoIs.root") \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.install ! on install (f) { ÇChanges Ç12/6/05; 10:51:10 AM by TAC Çin menu bundle added call so that updated menu would be added to system menu Ç2002 Ç06/24/02; 3:05:44 PM by JES ÇIf a Tool's suite has a localization sub-table, register the languages in the appropriate localization sub-table(s). Ç06/12/02; 12:13:04 AM by JES ÇInstall callbacks in the user.radio.callbacks table, if the Tool has callbacks at toolSuite.callbacks.radio, and user.radio.callbacks is defined. Ç03/07/02; 12:02:37 AM by JES ÇCall scheduler.monitorThreads after installing the Tool, to kick off its thread (if it exists). Ç2001 Ç12/01/01; 6:34:14 PM by JES ÇFixed a bug installing Tools windowTypes in the user.tools.windowTypes table. Ç11/30/01; 5:04:11 PM by JES ÇInstall windowTypes and noteTypes addresses inside a try statement, so that installation won't fail if there's already a table at the address. Ç11/29/01; 5:12:36 PM by JES ÇFixed a bug installing windowTypes. Ç11/26/01; 10:58:48 PM by JES ÇCall callbacks at user.tools.callbacks.beforeInstall with the path to the Tool database before installing the Tool. If the callback returns false, don't install the Tool. ÇCall callbacks at user.tools.callbacks.afterInstall with the address of the Tool's database, after installing the Tool. The return value is ignored. Ç10/07/01; 8:32:22 PM by JES ÇOnly create the user.tools.databases table for this tool if it's not already defined. Create user.tools.databases.[toolName].flEnabled if not already defined. Ç07/02/01; 2:54:03 AM by JES ÇInstall user windowTypes. Ç05/10/01; 4:52:47 PM by JES ÇIf this is a Macintosh, make sure that .root files have the correct type/creator codes. Ç04/28/01; 7:44:27 PM by JES ÇInstall the website framework site in a try block, because user.webserver.responders.websiteFramework may not exist. Ç2000 Ç12/26/00; 5:39:46 PM by PBS ÇRebuild the menubar, in case the Tool has a menu referenced in user.menus. Ç11/28/00; 12:30:13 by JES ÇCall playlist.init before installing tools. Call the tool's upgradeToTool script if flUpgradeToTool is true. Ç10/27/00; 2:39:32 PM by JES ÇMake sure the icons folder exists before attempting to write icons to disk. Ç10/18/00; 8:17:36 PM by JES ÇFixed a bug where a tool's icon files would not be written to disk. Ç10/03/00; 10:33:37 PM by PBS ÇFix for installing callbacks -- the parameters to table.assign were switched. Ç10/01/00; 1:16:35 AM by PBS ÇMinor cleanups. Ç9/26/00; 4:50:49 PM by JES Çcreated ÇInstall a tool, given the path to the tool's guest database. bundle { //run beforeInstall callbacks -- if any of the callbacks returns false, don't install the Tool local (adrcallbacks = @user.tools.callbacks.beforeInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (f) { //callback returned false -- don't install return (false)}}}}; //not installed Frontier.tools.init (); //11/28/00 JES if not defined ([f]) { if system.environment.isMac { //05/10/2001 JES: set type/creator if not (file.type (f) == 'TABL') { file.setType (f, 'TABL'); file.setCreator (f, 'LAND')}}; fileMenu.open (f, true)}; local (adrTool = @[f]); local (fname = file.fileFromPath (f)); local (name = Frontier.tools.cleanToolName (fname)); on getTable (itemName, adrAdrTable) { ÇReturn true if the table exists in the tool gdb and is non-empty. Return false otherwise. adrAdrTable^ gets the address of the table. local (adrTable = @adrTool^.[name + itemName]); if defined (adrTable^) { //does the item exist? if sizeOf (adrTable^) > 0 { //is the table non-empty? adrAdrTable^ = adrTable; return (true)}}; return (false)}; on installItem (adrTable, itemName, flCopy=false) { ÇInstall only if the item exists in the tool database. local (adrItem); if getTable (itemName, @adrItem) { if flCopy { table.assign (@adrTable^.[name], adrItem^)} else { table.assign (@adrTable^.[name], adrItem)}}}; installItem (@user.webserver.responders, "Responder", true); //true to make a copy installItem (@user.betty.rpcHandlers, "RpcHandlers"); installItem (@user.soap.rpcHandlers, "SoapHandlers"); installItem (@user.scheduler.threads, "Thread"); try { //websiteFramework responder might not be installed installItem (@user.webserver.responders.websiteFramework.data.docTree, "Website")}; bundle { //suite local (adrSuite); if getTable ("Suite", @adrSuite) { bundle { //background local (backgroundName = name); local (adrBackground = @adrSuite^.background); if defined (adrBackground^) { if defined (adrBackground^.everyMinute) { user.scheduler.everyMinute.[name] = @adrBackground^.everyMinute}; if defined (adrBackground^.everyHour) { user.scheduler.hourly.[name] = @adrBackground^.everyHour}; if defined (adrBackground^.everyNight) { user.scheduler.overnight.[name] = @adrBackground^.everyNight}}}; bundle { //callbacks local (adrCallbacks = @adrSuite^.callbacks); on installCallbacks (adrCallbacks, adrTable) { if defined (adrCallbacks^) { local (adr); for adr in adrTable { local (callbackName = nameOf (adr^)); if defined (adrCallbacks^.[callbackName]) { table.assign (@adr^.[name], @adrCallbacks^.[callbackName])}}}}; if defined (adrCallbacks^) { if system.environment.isPike { installCallbacks (@adrCallbacks^.fileMenu, @user.tools.commandCallbacks)}; if defined (user.radio.callbacks) { installCallbacks (@adrCallbacks^.radio, @user.radio.callbacks)}; installCallbacks (@adrCallbacks^.user, @user.callbacks); installCallbacks (@adrCallbacks^.ftp, @user.html.callbacks.fileWriters.ftp)}}; bundle { //menu local (adrMenu = @adrSuite^.menu); if defined (adrMenu^) { Frontier.tools.installSubMenu (adrMenu); menu.addSubMenu (@system.menus.menubar, "", @Frontier.tools.menu)}}; bundle { //localization local (adrLoc = @adrSuite^.localization); if defined (adrLoc^) { on installLocalizations (adrLocalizations, installIn) { local (adrlang); for adrlang in adrLocalizations { local (langName = nameOf (adrlang^)); if not defined (installIn^.[langName]) { installIn^.[langName] = adrlang}}}; if defined (radio.data.localization.languages) { if defined (adrLoc^.radio) { installLocalizations (@adrLoc^.radio, @radio.data.localization.languages)}}; if defined (mainResponder.localization.languages) { if defined (adrLoc^.mainResponder) { installLocalizations (@adrLoc^.mainResponder, @mainResponder.localization.languages)}}; if defined (manilaData.localization.languages) { if defined (adrLoc^.manila) { installLocalizations (@adrLoc^.manila, @manilaData.localization.languages)}}}}}}; bundle { //nodeTypes local (appFolder = file.folderFromPath (Frontier.getProgramPath ())); local (pc = file.getPathChar ()); local (iconsFolder = appFolder + "Appearance" + pc + "Icons" + pc); local (platform = "windows"); if system.environment.isMac { platform = "mac"}; on writeIcon (adrIconTable) { local (adrIcon = @adrIconTable^.[platform]); if defined (adrIcon^) { local (iconName = nameOf (parentOf (adrIconTable^)^)); local (fname = iconName); if system.environment.isWindows { fname = fname + ".bmp"}; local (f = iconsFolder + fname); file.sureFilePath (f); //JES 10/27/00: make sure the icons folder exists if not (file.exists (f)) { //write only if file does not exist if system.environment.isWindows { file.writeWholeFile (f, adrIcon^)}; if system.environment.isMac { //write to resource fork file.writeWholeFile (f, "", 'rsrc', 'RSED'); //type is resource, creator is ResEdit local (adrResource); for adrResource in adrIcon { //write each resource rez.putResource (f, getBinaryType (adrResource^), 128, adrResource)}}}}}; local (adrNodeTypes); if getTable ("NodeTypes", @adrNodeTypes) { for adr in adrNodeTypes { local (adrNodeType = @user.tools.nodeTypes.[nameOf (adr^)]); try { adrNodeType^ = adr}; if defined (adr^.icon) { writeIcon (@adr^.icon)}}}}; bundle { //windowTypes local (adrWindowTypes); if getTable ("WindowTypes", @adrWindowTypes) { for adr in adrWindowTypes { local (adrWindowType = @user.tools.windowTypes.[nameOf (adr^)]); try { adrWindowType^ = adr}}}}; bundle { //set up root updates prefs local (adrData); if getTable ("Data", @adrData) { local (adrVirginPrefs = @adrData^.initialRootUpdatesPrefs); if defined (adrVirginPrefs^) { local (tableName = fname); if string.lower (tableName) endsWith ".root" { tableName = string.popSuffix (tableName)}; local (adrTable = @user.rootUpdates.servers.[tableName]); if not defined (adrTable^) { new (tableType, adrTable)}; if not defined (adrTable^.autobackup) { adrTable^.autobackup = true}; if not defined (adrTable^.dbName) { adrTable^.dbName = fname}; if not defined (adrTable^.dialogs) { adrTable^.dialogs = true}; if not defined (adrTable^.lastUpdate) { if defined (adrData^.initialRootUpdatesPrefs.lastUpdate) { adrTable^.lastUpdate = adrVirginPrefs^.lastUpdate} else { adrTable^.lastUpdate = date (0)}}; if not defined (adrTable^.method) { if defined (adrVirginPrefs^.method) { adrTable^.method = adrVirginPrefs^.method} else { adrTable^.method = "mainResponder.subscriptions.update"}}; if not defined (adrTable^.openLog) { adrTable^.openLog = false}; if not defined (adrTable^.port) { if defined (adrVirginPrefs^.port) { adrTable^.port = adrVirginPrefs^.port} else { adrTable^.port = 80}}; if not defined (adrTable^.serialNum) { adrTable^.serialNum = 0}; if not defined (adrTable^.server) { adrTable^.server = adrVirginPrefs^.server}; if not defined (adrTable^.url) { if defined (adrVirginPrefs^.url) { adrTable^.url = adrVirginPrefs^.url} else { adrTable^.url = ""}}}}}; bundle { //save the fact that it's an installed tool local (adrTable = @user.tools.databases.[name]); if not defined (adrTable^) { new (tableType, adrTable)}; adrTable^.path = f; local (now = clock.now ()); adrTable^.lastModified = now; adrTable^.flInstalled = true; if not defined (adrtable^.flEnabled) { adrtable^.flEnabled = true}}; bundle { //store tool info in the temp table local (adrtempdata = @system.temp.Frontier.tools.[frontier.tools.cleanToolName (name)]); if not defined (adrtempdata^) { new (tableType, adrtempdata)}; if not defined (adrtempdata^.lastModified) { adrtempdata^.lastModified = file.modified (f)}; if defined ([name + "Info"]) { adrtempdata^.info = [name + "Info"]}; if defined ([name + "Website"]) { adrtempdata^.url = "/" + name + "/"}}; menus.buildMenuBar (); //PBS 12/26/00: a Tool may have a menu references in user.menus bundle { //run afterInstall callbacks -- the return value is ignored local (adrcallbacks = @user.tools.callbacks.afterInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (adrTool)}}}; //return value ignored scheduler.monitorThreads (); //start the Tool's thread immediately return (true)}; Çbundle //debugging Çinstall ("Backup:Radio UserLand:Tools:whoIs.root") \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-12-11 08:04:17
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1366 Modified Files: uninstall Log Message: update system menu Index: uninstall =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/uninstall,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** uninstall 26 Mar 2005 19:42:50 -0000 1.1.1.1 --- uninstall 11 Dec 2005 08:04:07 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.uninstall ! on uninstall (f) { ÇUn-install a tool, given the path to the tool's guest database. ÇTuesday, September 26, 2000 at 11:21:55 PM by JES ÇChanges: Ç06/24/02; 3:07:13 PM by JES ÇUn-register any languages which were installed by Frontier.tools.install, when the Tool was installed. Ç06/13/02; 3:40:42 PM by JES ÇUninstall the Tool's callbacks from user.radio.callbacks, if user.radio.callbacks is defined. Ç11/26/01; 11:01:34 PM by JES ÇCall callbacks at user.tools.callbacks.beforeUninstall with address of the Tool's database before uninstalling the Tool. If the callback returns false, don't uninstall the Tool. ÇCall callbacks at user.tools.callbacks.afterUninstall with the path to the Tool's database, after installing the Tool. The return value is ignored. Ç07/02/01; 2:56:01 AM by JES ÇUninstall windowTypes. Ç04/28/01; 7:44:21 PM by JES ÇUninstall the website framework site in a try block, because user.webserver.responders.websiteFramework may not exist. Ç10/01/00; 11:33:58 PM by PBS ÇMinor cleanups. local (adrTool = @[f]); bundle { //run beforeUninstall callbacks -- if any of the callbacks returns false, don't uninstall the Tool local (adrcallbacks = @user.tools.callbacks.beforeunInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (adrTool) { //callback returned false -- don't install return (false)}}}}; //not installed local (name = Frontier.tools.cleanToolName (file.fileFromPath (f))); on getTable (t) { local (adrTable = @adrTool^.[name + t]); return (adrTable)}; on unInstallAddressEntry (adrEntry, expectedAdr = nil) { if defined (adrEntry^) { if typeOf (adrEntry^) == addressType { delete (adrEntry); return (true)}}; return (false)}; on deleteFromTable (adrTable) { ÇDelete the item in the table, if it exists. if defined (adrTable^.[name]) { delete (@adrTable^.[name])}}; on deleteFromSubtables (adrTable) { ÇDelete from all the sub-tables of a table. Callbacks, for instance. local (adr); for adr in adrTable { deleteFromTable (adr)}}; deleteFromTable (@user.webserver.responders); deleteFromTable (@user.betty.rpcHandlers); deleteFromTable (@user.scheduler.threads); try { //websiteFramework responder might not be installed deleteFromTable (@user.webserver.responders.websiteFramework.data.docTree)}; deleteFromTable (@user.scheduler.everyMinute); deleteFromTable (@user.scheduler.hourly); deleteFromTable (@user.scheduler.overnight); deleteFromSubTables (@user.callbacks); if system.environment.isPike { deleteFromSubTables (@user.tools.commandCallbacks)}; if defined (user.radio.callbacks) { deleteFromSubTables (@user.radio.callbacks)}; deleteFromSubTables (@user.html.callbacks.fileWriters.ftp); Frontier.tools.uninstallSubMenu (name); //delete sub-menu from Tools menu bundle { //localizations on uninstallLocalization (adrTable) { local (adr); for adr in adrTable { if typeOf (adr^) == addressType { local (s = string (adr^)); local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith (file.getPathChar () + string.lower (file.fileFromPath (f))) { delete (adr)}}}}; if defined (radio.data.localization.languages) { uninstallLocalization (@radio.data.localization.languages)}; if defined (mainResponder.localization.languages) { uninstallLocalization (@mainResponder.localization.languages)}; if defined (manilaData.localization.languages) { uninstallLocalization (@manilaData.localization.languages)}}; bundle { //nodeTypes -- tricky -- we have to look for the expected file name local (adr); for adr in @user.tools.nodeTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this nodetype bundle { //windowTypes -- almost exactly like nodeTypes local (adr); for adr in @user.tools.windowTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this windowType bundle { //set to uninstalled if defined (user.tools.databases.[name]) { user.tools.databases.[name].flInstalled = false}}; bundle { //adjust the Tools table at temp.Frontier.tools.[name] if defined (system.temp.Frontier.tools.[name].url) { delete (@system.temp.Frontier.tools.[name].url)}}; bundle { //run afterUninstall callbacks -- the return value is ignored local (adrcallbacks = @user.tools.callbacks.afterUninstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (f)}}}; //return value ignored return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.uninstall ! on uninstall (f) { ÇChanges Ç12/9/05; 10:15:17 AM by TAC Çupdate system menu Ç06/24/02; 3:07:13 PM by JES ÇUn-register any languages which were installed by Frontier.tools.install, when the Tool was installed. Ç06/13/02; 3:40:42 PM by JES ÇUninstall the Tool's callbacks from user.radio.callbacks, if user.radio.callbacks is defined. Ç2001 Ç11/26/01; 11:01:34 PM by JES ÇCall callbacks at user.tools.callbacks.beforeUninstall with address of the Tool's database before uninstalling the Tool. If the callback returns false, don't uninstall the Tool. ÇCall callbacks at user.tools.callbacks.afterUninstall with the path to the Tool's database, after installing the Tool. The return value is ignored. Ç07/02/01; 2:56:01 AM by JES ÇUninstall windowTypes. Ç04/28/01; 7:44:21 PM by JES ÇUninstall the website framework site in a try block, because user.webserver.responders.websiteFramework may not exist. Ç10/01/00; 11:33:58 PM by PBS ÇMinor cleanups. Ç9/26/00; 11:21:55 PM by JES Çcreated ÇUn-install a tool, given the path to the tool's guest database. local (adrTool = @[f]); bundle { //run beforeUninstall callbacks -- if any of the callbacks returns false, don't uninstall the Tool local (adrcallbacks = @user.tools.callbacks.beforeunInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (adrTool) { //callback returned false -- don't install return (false)}}}}; //not installed local (name = Frontier.tools.cleanToolName (file.fileFromPath (f))); on getTable (t) { local (adrTable = @adrTool^.[name + t]); return (adrTable)}; on unInstallAddressEntry (adrEntry, expectedAdr = nil) { if defined (adrEntry^) { if typeOf (adrEntry^) == addressType { delete (adrEntry); return (true)}}; return (false)}; on deleteFromTable (adrTable) { ÇDelete the item in the table, if it exists. if defined (adrTable^.[name]) { delete (@adrTable^.[name])}}; on deleteFromSubtables (adrTable) { ÇDelete from all the sub-tables of a table. Callbacks, for instance. local (adr); for adr in adrTable { deleteFromTable (adr)}}; deleteFromTable (@user.webserver.responders); deleteFromTable (@user.betty.rpcHandlers); deleteFromTable (@user.scheduler.threads); try { //websiteFramework responder might not be installed deleteFromTable (@user.webserver.responders.websiteFramework.data.docTree)}; deleteFromTable (@user.scheduler.everyMinute); deleteFromTable (@user.scheduler.hourly); deleteFromTable (@user.scheduler.overnight); deleteFromSubTables (@user.callbacks); if system.environment.isPike { deleteFromSubTables (@user.tools.commandCallbacks)}; if defined (user.radio.callbacks) { deleteFromSubTables (@user.radio.callbacks)}; deleteFromSubTables (@user.html.callbacks.fileWriters.ftp); bundle { // menu Frontier.tools.uninstallSubMenu (name); //delete sub-menu from Tools menu menu.addSubMenu (@system.menus.menubar, "", @Frontier.tools.menu)}; bundle { //localizations on uninstallLocalization (adrTable) { local (adr); for adr in adrTable { if typeOf (adr^) == addressType { local (s = string (adr^)); local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith (file.getPathChar () + string.lower (file.fileFromPath (f))) { delete (adr)}}}}; if defined (radio.data.localization.languages) { uninstallLocalization (@radio.data.localization.languages)}; if defined (mainResponder.localization.languages) { uninstallLocalization (@mainResponder.localization.languages)}; if defined (manilaData.localization.languages) { uninstallLocalization (@manilaData.localization.languages)}}; bundle { //nodeTypes -- tricky -- we have to look for the expected file name local (adr); for adr in @user.tools.nodeTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this nodetype bundle { //windowTypes -- almost exactly like nodeTypes local (adr); for adr in @user.tools.windowTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this windowType bundle { //set to uninstalled if defined (user.tools.databases.[name]) { user.tools.databases.[name].flInstalled = false}}; bundle { //adjust the Tools table at temp.Frontier.tools.[name] if defined (system.temp.Frontier.tools.[name].url) { delete (@system.temp.Frontier.tools.[name].url)}}; bundle { //run afterUninstall callbacks -- the return value is ignored local (adrcallbacks = @user.tools.callbacks.afterUninstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (f)}}}; //return value ignored return (true)} \ No newline at end of file |
|
From: Karsten W. <kar...@us...> - 2005-12-05 21:49:29
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22133 Modified Files: strings.c Log Message: mac osx utf fixes Index: strings.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/strings.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** strings.c 5 Dec 2005 20:50:52 -0000 1.7 --- strings.c 5 Dec 2005 21:49:20 -0000 1.8 *************** *** 2344,2350 **** long lentext = gethandlesize (h); ! sethandlesize (h, lentext + 1); ! (*h) [lentext] = '\0'; TECCreateConverter (&converter, inputcharset, outputcharset); --- 2344,2350 ---- long lentext = gethandlesize (h); ! // sethandlesize (h, lentext + 1); ! // (*h) [lentext] = '\0'; TECCreateConverter (&converter, inputcharset, outputcharset); |
|
From: creedon <icr...@us...> - 2005-12-05 21:11:43
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13448 Modified Files: tableformats.c Log Message: use maxtablecols for column number setting and checking instead of hard coded value Index: tableformats.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tableformats.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tableformats.c 11 Jan 2005 22:48:11 -0000 1.4 --- tableformats.c 5 Dec 2005 21:11:28 -0000 1.5 *************** *** 651,655 **** hf = *hformats; /*copy into register*/ ! (**hf).ctcols = 3; //(**hf).defaultcolwidth = (r.right - r.left) / fixedctcols; /*arrgh: slight bias to 3-col tables*/ --- 651,655 ---- hf = *hformats; /*copy into register*/ ! (**hf).ctcols = maxtablecols; /* 2005-10-03 creedon - in case more columns are added, just one place to change*/ //(**hf).defaultcolwidth = (r.right - r.left) / fixedctcols; /*arrgh: slight bias to 3-col tables*/ *************** *** 1110,1116 **** #ifdef fldebug ! if ((**hf).ctcols != 3) { // assert ((**hf).ctcols == 3); // report it ! (**hf).ctcols = 3; // fix it } #endif --- 1110,1117 ---- #ifdef fldebug ! /* 2005-10-03 creedon: in case more columns are added, just one place to change */ ! if ((**hf).ctcols != maxtablecols) { // assert ((**hf).ctcols == 3); // report it ! (**hf).ctcols = maxtablecols; // fix it } #endif |
|
From: creedon <icr...@us...> - 2005-12-05 21:07:58
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12279 Modified Files: tabledisplay.c Log Message: closing comment for tableupdate function was incorrect Index: tabledisplay.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/tabledisplay.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tabledisplay.c 11 Jan 2005 22:48:11 -0000 1.4 --- tabledisplay.c 5 Dec 2005 21:07:50 -0000 1.5 *************** *** 370,374 **** #endif ! } /*browserupdate*/ --- 370,374 ---- #endif ! } /* tableupdate */ |
|
From: Karsten W. <kar...@us...> - 2005-12-05 20:51:03
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8226 Modified Files: strings.c Log Message: mac os x utf conversion fixes Index: strings.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/strings.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** strings.c 11 Jan 2005 22:48:10 -0000 1.6 --- strings.c 5 Dec 2005 20:50:52 -0000 1.7 *************** *** 2337,2375 **** static void converttextencoding (Handle h, Handle hresult, long inputcharset, long outputcharset) { - - TECObjectRef converter; - ByteCount ctorigbytes, ctoutputbytes, ctflushedbytes; - long sizeoutputbuffer; - long lentext = gethandlesize (h); ! sethandlesize (h, lentext + 1); ! (*h) [lentext] = '\0'; ! ! TECCreateConverter (&converter, inputcharset, outputcharset); ! ! sizeoutputbuffer = lentext * 2; ! ! if (sizeoutputbuffer < 32) /*docs say use 32 minimum*/ ! sizeoutputbuffer = 32; ! ! sethandlesize (hresult, sizeoutputbuffer); ! ! if (((*h) [0] == '\xFF') || ((*h) [0] == '\xEF')) /*pop byte order mark*/ ! ! pullfromhandle (h, 0, 3, NULL); ! ! lentext = gethandlesize (h); ! ! TECConvertText (converter, *h, lentext, &ctorigbytes, *hresult, sizeoutputbuffer, &ctoutputbytes); ! ! TECFlushText (converter, *hresult, sizeoutputbuffer, &ctflushedbytes); ! ! TECDisposeConverter (converter); ! ! sethandlesize (hresult, ctoutputbytes + ctflushedbytes); ! ! sethandlesize (hresult, gethandlesize (hresult) - 1); /*pop trailing terminator*/ ! } /*converttextencoding*/ --- 2337,2402 ---- static void converttextencoding (Handle h, Handle hresult, long inputcharset, long outputcharset) { ! TECObjectRef converter; ! ByteCount ctorigbytes, ctoutputbytes, ctflushedbytes; ! long sizeoutputbuffer; ! long pullBytes = 0; ! long lentext = gethandlesize (h); ! sethandlesize (h, lentext + 1); ! ! (*h) [lentext] = '\0'; ! ! TECCreateConverter (&converter, inputcharset, outputcharset); ! ! sizeoutputbuffer = lentext * 2; ! ! if (sizeoutputbuffer < 32) /*docs say use 32 minimum*/ ! sizeoutputbuffer = 32; ! ! sethandlesize (hresult, sizeoutputbuffer); ! ! // 2005-08-26 --- kw better bytemark detecting ! // see http://en.wikipedia.org/wiki/Byte_Order_Mark ! if (inputcharset == 0x08000100) // we handle utf-8 input ! { ! if ( (*h) [0] == '\xEF' ! && (*h) [1] == '\xBB' ! && (*h) [2] == '\xBF') ! pullBytes = 3; ! } ! else ! { ! if (inputcharset == kTextEncodingUnicodeDefault) // utf-16 ! { ! if ( ( (*h) [0] == '\xEF' ! && (*h) [1] == '\xFF') ! || ( (*h) [0] == '\xFF' ! && (*h) [1] == '\xFE')) ! pullBytes = 2; ! } ! } ! ! //old code ! // if (((*h) [0] == '\xFF') || ((*h) [0] == '\xEF')) /*pop byte order mark*/ ! // pullfromhandle (h, 0, 3, NULL); ! ! if (pullBytes > 0) ! pullfromhandle (h, 0, pullBytes, NULL); ! ! lentext = gethandlesize (h); ! ! TECConvertText (converter, *h, lentext, &ctorigbytes, *hresult, sizeoutputbuffer, &ctoutputbytes); ! ! TECFlushText (converter, *hresult, sizeoutputbuffer, &ctflushedbytes); ! ! TECDisposeConverter (converter); ! ! sethandlesize (hresult, ctoutputbytes + ctflushedbytes); ! ! // kwchange 2005-05-23 --- commented out to see if this is the missing trailing char bug ! // kwchange 2005-05-27 --- ran this the last week and have no complains ! //sethandlesize (hresult, gethandlesize (hresult) - 1); /*pop trailing terminator*/ ! } /*converttextencoding*/ *************** *** 2402,2414 **** #ifdef MACVERSION ! ! if (((*h) [0] == '\xFF') || ((*h) [0] == '\xEF')) /*pop byte order mark*/ pullfromhandle (h, 0, 2, NULL); ! if ((*h) [0] != '\0') insertinhandle (h, 0, NULL, 1); ! converttextencoding (h, hresult, kTextEncodingUnicodeDefault, kTextEncodingWindowsLatin1); --- 2429,2442 ---- #ifdef MACVERSION ! /* ! if (((*h) [0] == '\xFF') || ((*h) [0] == '\xEF')) /#pop byte order mark#/ pullfromhandle (h, 0, 2, NULL); ! ! // why do we need a string starting with a 0??? if ((*h) [0] != '\0') insertinhandle (h, 0, NULL, 1); ! */ converttextencoding (h, hresult, kTextEncodingUnicodeDefault, kTextEncodingWindowsLatin1); |
|
From: Karsten W. <kar...@us...> - 2005-12-05 20:36:24
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5523 Modified Files: wpengine.c Log Message: carbon printing Index: wpengine.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/wpengine.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wpengine.c 24 Jan 2005 03:54:37 -0000 1.8 --- wpengine.c 5 Dec 2005 20:36:16 -0000 1.9 *************** *** 1929,1933 **** //we have trouble here. Paige expects a GrafPort, I will have to //decide how to fix this when I get to the engine. ! pgInitDevice (&ws_globals, shellprintinfo.printport, 0, &wpprintdevice); #endif --- 1929,1934 ---- //we have trouble here. Paige expects a GrafPort, I will have to //decide how to fix this when I get to the engine. ! return(false); ! // pgInitDevice (&ws_globals, shellprintinfo.printport, 0, &wpprintdevice); #endif *************** *** 1957,1960 **** --- 1958,1965 ---- */ + /* kw - 2005-12-05 remove this after print error correction */ + #if TARGET_API_MAC_CARBON == 1 + return (false); + #else register hdlwprecord hwp = wpdata; long nextpos = 0; *************** *** 1977,1980 **** --- 1982,1986 ---- return (nextpos > 0); + #endif } /*wpprint*/ |
|
From: Karsten W. <kar...@us...> - 2005-12-05 20:34:07
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5101 Modified Files: shellprint.c Log Message: carbon printing Index: shellprint.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/shellprint.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shellprint.c 11 Jan 2005 22:48:10 -0000 1.4 --- shellprint.c 5 Dec 2005 20:33:56 -0000 1.5 *************** *** 40,61 **** #include "shellprint.h" - #ifdef MACVERSION ! CGrafPtr currentprintport = NULL; ! #if TARGET_API_MAC_CARBON ! #define iPrAbort kPMCancel ! #endif #endif [...1595 lines suppressed...] ! ! popport (); ! ! (*shellglobals.endprintroutine) (); ! ! shellpopglobals (); ! ! exit: ! ! PrClose (); currentprintport = NULL; return (fl); + } /*shellprint*/ + # endif + #endif + |
|
From: Karsten W. <kar...@us...> - 2005-12-05 20:33:31
|
Update of /cvsroot/frontierkernel/Frontier/Common/headers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5025 Modified Files: shellprint.h Log Message: carbon printing Index: shellprint.h =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/headers/shellprint.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shellprint.h 11 Jan 2005 22:48:02 -0000 1.4 --- shellprint.h 5 Dec 2005 20:33:21 -0000 1.5 *************** *** 31,59 **** typedef struct typrintinfo { ! Rect margins; /*the margins we're enforcing to calculate paperrect*/ ! Rect paperrect; ! ! long scaleMult; ! ! long scaleDiv; ! short ctpages; /*the number of pages in the document being printed*/ ! #if MACVERSION ! ! #if TARGET_API_MAC_CARBON == 1 ! GrafPtr printport; ! PMPrintSession printhandle; ! PMPageFormat pageformat; ! PMPrintSettings printsettings; ! Rect pagerect; ! #else ! ! TPPrPort printport; ! ! THPrint printhandle; /*a handle to the machine's print record*/ ! #endif ! #endif #ifdef WIN95VERSION --- 31,67 ---- typedef struct typrintinfo { ! /*the margins we're enforcing to calculate paperrect*/ ! Rect ! margins, ! paperrect; ! long ! scaleMult, ! scaleDiv; ! /*the number of pages in the document being printed*/ ! short ctpages; ! #if MACVERSION ! ! # if TARGET_API_MAC_CARBON == 1 ! ! GrafPtr printport; ! PMPrintSession printhandle; ! PMPrintSession printDefaultSession; /* kw added 2005-06 */ ! PMPageFormat pageformat; ! PMPrintSettings printsettings; ! PMRect pagerect; ! ! # else ! Rect pagerect; ! ! TPPrPort printport; ! ! /*a handle to the machine's print record*/ ! THPrint printhandle; ! ! # endif ! #endif #ifdef WIN95VERSION |
|
From: creedon <icr...@us...> - 2005-11-27 04:41:57
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/data/standardMacros/spamFreeMailto In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12451 Modified Files: form Log Message: changes for xhtml compliance Index: form =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/data/standardMacros/spamFreeMailto/form,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** form 26 Mar 2005 19:43:05 -0000 1.1.1.1 --- form 27 Nov 2005 04:41:42 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.html.data.standardMacros.spamFreeMailto.form ! on form (serverName, serverUrl, adrGetRecipientCallback, adrGetRecipientNameCallback, cookieName="spamFreeMailForm", prompt=nil, promptWithReferer=nil, namePrompt="Your name", mailAddressPrompt="Mail address", urlPrompt="URL", messagePrompt="Message", submitButtonText="Submit", checkboxLabel=nil, textBelowForm=nil, template=nil, templateWithReferer=nil, subjectTemplate=nil, adrLogCallback=nil, pageTitle="Mail a note to {username}", confirmPageTitle="Mail was sent to {username}") { ÇChanges Ç4/20/03; 6:35:04 PM by JES ÇFactored from radioCommunityServerSuite.spamFreeMailTo.form. ÇOriginal change notes: Ç3/17/02; 6:42:41 PM by JES ÇWhen sending mail, include a link to this community server, instead of to radio.userland.com. Ç2/2/02; 9:19:47 AM by DW Ç1. If the user's browser supports the "referer" feature (some don't or some have bugs) we include a third link in the email we send, a pointer to the page the user came from. This lets you know which post they were responding to when they clicked on the mailto icon. Ç2. There's one fewer line between the header and the body of the message. There were three before, now there are two. Ç3. The Important notes section at the bottom of the page links to this page. Ç4. The site title and description now describe this application. For some reason in the past it said something about static site stats. Another experiment in human perception, while working on it I didn't even see it, nor did any users complain about this most obvious mistake. Ç5. The title on the page you see after the mail has been sent makes sense. It says that Mail Was Sent, it used to prompt you to send a mail. Oooops. Ç1/24/02; 12:54:50 PM by DW ÇMake the cookie live longer. Add a send-to-self checkbox. Ç1/19/02; 11:22:56 AM by DW ÇCreated. bundle { //get default templates if not specified if prompt == nil { prompt = string (html.data.standardMacros.spamFreeMailto.data.prompt)}; if promptWithReferer == nil { promptWithReferer = string (html.data.standardMacros.spamFreeMailto.data.promptWithReferer)}; if checkboxLabel == nil { checkboxLabel = string (html.data.standardMacros.spamFreeMailto.data.checkToCopySelf)}; if textBelowForm == nil { textBelowForm = string (html.data.standardMacros.spamFreeMailto.data.textBelowForm)}; if template == nil { template = string (html.data.standardMacros.spamFreeMailto.data.template)}; if templateWithReferer == nil { templateWithReferer = string (html.data.standardMacros.spamFreeMailto.data.templateWithReferer)}; if subjectTemplate == nil { subjectTemplate = string (html.data.standardMacros.spamFreeMailto.data.subjectTemplate)}}; local (pta = html.getpagetableaddress ()); local (args); bundle { //get args new (tabletype, @args); if defined (pta^.searchargs) { if pta^.searchargs != "" { webserver.parseargs (pta^.searchargs, @args)}}}; local (htmltext = "", indentlevel = 0); on add (s) { htmltext = htmltext + (string.filledstring ("\t", indentlevel) + s + "\r");}; local (recipient = adrGetRecipientCallback^ (args.usernum)); local (recipientName = adrGetRecipientNameCallback^ (args.usernum)); Çscratchpad.params = pta^ local (title); if pta^.method == "POST" { local (postargs); new (tabletype, @postargs); webserver.parseargs (pta^.requestbody, @postargs); Çscratchpad.postargs = postargs; edit (@scratchpad.postargs) bundle { //set cookie pta^.responseHeaders.["Set-Cookie"] = cookieName + "=" + string.urlEncode (postargs.name + "\r" + postargs.mail + "\r" + postargs.url) + ";path=/;expires=Mon, 01 Apr 2030 07:00:00 GMT"}; local (referer = ""); if defined (postargs.referer) { referer = postargs.referer; template = templateWithReferer}; local (body = string.replaceAll (template, "\r", "\r\n")); bundle { //do string replacements local (t); new (tableType, @t); t.name = postargs.name; t.server = serverName; t.text = postargs.text; t.userUrl = postargs.url; t.serverUrl = serverUrl; t.refererUrl = referer; body = string.multipleReplaceAll (body, @t, false, "{", "}")}; local (subject = string.replace (subjectTemplate, "{name}", postargs.name, false)); try { local (cc = ""); if defined (postargs.ccSelf) { cc = postargs.mail}; tcp.sendmail (recipient, subject, body, postargs.mail, cc:cc); add ("Your mail was sent on " + clock.now () + ".")} else { add ("There was an error sending the mail: " + tryerror)}; title = string.replaceAll (confirmPageTitle, "{username}", recipientName)} else { local (name = "", mail = "", url = "http://", referer=""); //default values bundle { //process cookie if present try { local (s = string.urlDecode (pta^.requestHeaders.cookies.[cookieName])); name = string.nthfield (s, "\r", 1); mail = string.nthfield (s, "\r", 2); url = string.nthfield (s, "\r", 3)}}; bundle { //get referer from request headers if defined (pta^.requestHeaders.referer) { referer = pta^.requestHeaders.referer}; if defined (args.referer) { if args.referer == false { referer = ""} else { //a url referer = args.referer}}}; bundle { //add explanatory message local (s = prompt); if sizeOf (referer) > 0 { s = promptWithReferer}; bundle { //do replacements local (t); new (tableType, @t); t.username = recipientName; t.referer = referer; s = string.multipleReplaceAll (s, @t, false, "{", "}")}; add (s)}; add ("<form method=\"POST\">"); indentlevel++; add ("<table cellspacing=\"10\" cellpadding=\"0\">"); indentlevel++; on addrow (label, name, value="") { add ("<tr><td>" + label + ":</td><td valign=\"top\"><input type=\"text\" name=\"" + name + "\" size=\"55\" maxlength=\"255\" value=\"" + value + "\"></td>")}; if sizeOf (referer) > 0 { add ("<input type=\"hidden\" name=\"referer\" value=\"" + referer + "\">")}; addrow (namePrompt, "name", name); addrow (mailAddressPrompt, "mail", mail); addrow (urlPrompt, "url", url); add ("<tr><td valign=\"top\">" + messagePrompt + ":</td><td><textarea name=\"text\" cols=\"60\" rows=\"10\"></textarea></td></tr>"); bundle { //add Manila checkbox local (checked = "xxx"); if true { checked = "xxx checked"}; add ("<tr><td> </td><td><input type=\"checkbox\" name=\"ccSelf\" value=" + checked + "> " + checkboxLabel + "</td></tr>")}; add ("</table>"); indentlevel--; add ("<p>" + textBelowForm + "</p>"); add ("<br><input type=\"submit\" name=\"submit\" value=\"" + submitButtonText + "\">"); add ("</form>"); indentlevel--; title = string.replaceAll (pageTitle, "{username}", recipientName)}; pta^.title = title; return (htmltext)}; Çbundle //test code Çhtml.setPageTableAddress (@workspace.pt) Çform ("My Site", "http://foo.com/", @msg, @msg) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.html.data.standardMacros.spamFreeMailto.form ! on form (serverName, serverUrl, adrGetRecipientCallback, adrGetRecipientNameCallback, cookieName="spamFreeMailForm", prompt=nil, promptWithReferer=nil, namePrompt="Your name", mailAddressPrompt="Mail address", urlPrompt="URL", messagePrompt="Message", submitButtonText="Submit", checkboxLabel=nil, textBelowForm=nil, template=nil, templateWithReferer=nil, subjectTemplate=nil, adrLogCallback=nil, pageTitle="Mail a note to {username}", confirmPageTitle="Mail was sent to {username}") { ÇChanges Ç11/26/05; 7:16:45 PM by TAC Çreworked the add Manila checkbox code a bit so that checked is checked="checked" for XHTML Çclose tr tag in addrow hander Çmoved hidden input referer outside of table tag, it was inside but not in a td tag which is incorrect for XHTML Çclose input and br tags Çlowercase pta^.method check Çlowercase form method post Ç4/20/03; 6:35:04 PM by JES ÇFactored from radioCommunityServerSuite.spamFreeMailTo.form. ÇOriginal change notes: Ç3/17/02; 6:42:41 PM by JES ÇWhen sending mail, include a link to this community server, instead of to radio.userland.com. Ç2/2/02; 9:19:47 AM by DW Ç1. If the user's browser supports the "referer" feature (some don't or some have bugs) we include a third link in the email we send, a pointer to the page the user came from. This lets you know which post they were responding to when they clicked on the mailto icon. Ç2. There's one fewer line between the header and the body of the message. There were three before, now there are two. Ç3. The Important notes section at the bottom of the page links to this page. Ç4. The site title and description now describe this application. For some reason in the past it said something about static site stats. Another experiment in human perception, while working on it I didn't even see it, nor did any users complain about this most obvious mistake. Ç5. The title on the page you see after the mail has been sent makes sense. It says that Mail Was Sent, it used to prompt you to send a mail. Oooops. Ç1/24/02; 12:54:50 PM by DW ÇMake the cookie live longer. Add a send-to-self checkbox. Ç1/19/02; 11:22:56 AM by DW ÇCreated. bundle { //get default templates if not specified if prompt == nil { prompt = string (html.data.standardMacros.spamFreeMailto.data.prompt)}; if promptWithReferer == nil { promptWithReferer = string (html.data.standardMacros.spamFreeMailto.data.promptWithReferer)}; if checkboxLabel == nil { checkboxLabel = string (html.data.standardMacros.spamFreeMailto.data.checkToCopySelf)}; if textBelowForm == nil { textBelowForm = string (html.data.standardMacros.spamFreeMailto.data.textBelowForm)}; if template == nil { template = string (html.data.standardMacros.spamFreeMailto.data.template)}; if templateWithReferer == nil { templateWithReferer = string (html.data.standardMacros.spamFreeMailto.data.templateWithReferer)}; if subjectTemplate == nil { subjectTemplate = string (html.data.standardMacros.spamFreeMailto.data.subjectTemplate)}}; local (pta = html.getpagetableaddress ()); local (args); bundle { //get args new (tabletype, @args); if defined (pta^.searchargs) { if pta^.searchargs != "" { webserver.parseargs (pta^.searchargs, @args)}}}; local (htmltext = "", indentlevel = 0); on add (s) { htmltext = htmltext + (string.filledstring ("\t", indentlevel) + s + "\r");}; local (recipient = adrGetRecipientCallback^ (args.usernum)); local (recipientName = adrGetRecipientNameCallback^ (args.usernum)); Çscratchpad.params = pta^ local (title); if string.lower (pta^.method) == "post" { local (postargs); new (tabletype, @postargs); webserver.parseargs (pta^.requestbody, @postargs); Çscratchpad.postargs = postargs; edit (@scratchpad.postargs) bundle { //set cookie pta^.responseHeaders.["Set-Cookie"] = cookieName + "=" + string.urlEncode (postargs.name + "\r" + postargs.mail + "\r" + postargs.url) + ";path=/;expires=Mon, 01 Apr 2030 07:00:00 GMT"}; local (referer = ""); if defined (postargs.referer) { referer = postargs.referer; template = templateWithReferer}; local (body = string.replaceAll (template, "\r", "\r\n")); bundle { //do string replacements local (t); new (tableType, @t); t.name = postargs.name; t.server = serverName; t.text = postargs.text; t.userUrl = postargs.url; t.serverUrl = serverUrl; t.refererUrl = referer; body = string.multipleReplaceAll (body, @t, false, "{", "}")}; local (subject = string.replace (subjectTemplate, "{name}", postargs.name, false)); try { local (cc = ""); if defined (postargs.ccSelf) { cc = postargs.mail}; tcp.sendmail (recipient, subject, body, postargs.mail, cc:cc); add ("Your mail was sent on " + clock.now () + ".")} else { add ("There was an error sending the mail: " + tryerror)}; title = string.replaceAll (confirmPageTitle, "{username}", recipientName)} else { local (name = "", mail = "", url = "http://", referer=""); //default values bundle { //process cookie if present try { local (s = string.urlDecode (pta^.requestHeaders.cookies.[cookieName])); name = string.nthfield (s, "\r", 1); mail = string.nthfield (s, "\r", 2); url = string.nthfield (s, "\r", 3)}}; bundle { //get referer from request headers if defined (pta^.requestHeaders.referer) { referer = pta^.requestHeaders.referer}; if defined (args.referer) { if args.referer == false { referer = ""} else { //a url referer = args.referer}}}; bundle { //add explanatory message local (s = prompt); if sizeOf (referer) > 0 { s = promptWithReferer}; bundle { //do replacements local (t); new (tableType, @t); t.username = recipientName; t.referer = referer; s = string.multipleReplaceAll (s, @t, false, "{", "}")}; add (s)}; add ("<form action=\"\" method=\"post\">"); indentlevel++; add ("<table cellspacing=\"10\" cellpadding=\"0\">"); indentlevel++; on addrow (label, name, value="") { add ("<tr><td>" + label + ":</td><td valign=\"top\"><input type=\"text\" name=\"" + name + "\" size=\"55\" maxlength=\"255\" value=\"" + value + "\" /></td></tr>")}; addrow (namePrompt, "name", name); addrow (mailAddressPrompt, "mail", mail); addrow (urlPrompt, "url", url); add ("<tr><td valign=\"top\">" + messagePrompt + ":</td><td><textarea name=\"text\" cols=\"60\" rows=\"10\"></textarea></td></tr>"); bundle { //add Manila checkbox Çlocal (checked = "xxx") if true { checked = " checked=\"checked\""}; add ("<tr><td> </td><td><input type=\"checkbox\" name=\"ccSelf\" value=\"xxx\"" + checked + " /> " + checkboxLabel + "</td></tr>")}; add ("</table>"); indentlevel--; add ("<p>" + textBelowForm + "</p>"); if sizeOf (referer) > 0 { add ("<input type=\"hidden\" name=\"referer\" value=\"" + referer + "\" />")}; add ("<br /><input type=\"submit\" name=\"submit\" value=\"" + submitButtonText + "\" />"); add ("</form>"); indentlevel--; title = string.replaceAll (pageTitle, "{username}", recipientName)}; pta^.title = title; return (htmltext)}; Çbundle //test code Çhtml.setPageTableAddress (@workspace.pt) Çform ("My Site", "http://foo.com/", @msg, @msg) \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-11-27 02:10:47
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16879 Modified Files: listThreads Log Message: changes for xhtml compliance Index: listThreads =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss/listThreads,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** listThreads 26 Mar 2005 21:45:36 -0000 1.1.1.1 --- listThreads 27 Nov 2005 02:10:37 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.discuss.listThreads ! on listThreads (d, bgColor="ivory", otherColor="beige", tableWidth=425, pta=nil, headerColor="black", headerTextColor=nil, cssPrefix="", threadAliveDays=5, threadActiveDays=1, adrTemplate=nil, adrItemTemplate=nil, adrTemplateHeader=nil, adrTemplateFooter=nil, activeThreadIcon=nil, inactiveThreadIcon=nil, userIcon=nil, adrInDgCallback=nil, flUseMappedMemberKeys=false) { ÇList current discussion threads Ç10/09/00; 7:59:29 PM by JES ÇChanges: Ç9/24/04; 3:27:18 AM by JES ÇCall string.ellipsize instead of the locally declared shortenString. Shorten subjects to 60 characters instead of to 35 characters. Ç4/18/03; 5:26:51 PM by JES ÇNew optional parameter, flUseMappedMemberKeys -- if true, we use the newer style numeric member keys instead of the older email address style member keys. Ç10/3/02; 2:33:49 AM by JES ÇAdded preliminary support for the {fullSubject} psuedo-macro. Ç4/4/02; 12:55:24 AM by JES ÇNew optional paramter, adrInDgCallback. Passed to mainResponder.discuss.getThreadData. Ç1/25/02; 6:04:26 PM by PBS ÇPerformance enhancement in the local "add" routine -- add a trailing semicolon; use parentheses to get the expression in x = x + y form (which is optimized by the kernel). Ç10/17/01; 10:43:48 AM by PBS ÇDon't use IP address when constructing the URL to a built-in icon. This fixes a bug with servers that have multiple IP addresses. Ç9/26/01; 6:32:45 PM by PBS ÇPass adrMembers to mainResponder.members routines for performance enhancement. Ç??? by JES ÇAdded template support. if pta == nil { pta = html.getPageTableAddress ()}; local (adrData = mainResponder.discuss.openRoot (pta)); local (adrCal = @adrData^.calendar); local (adrMsgs = @adrData^.messages); local (htmlText = ""); local (i, j); local (membershipGroup = pta^.responderAttributes.defaultMembershipGroup); local (msgReaderUrl = pta^.responderAttributes.urls^.discussMsgReader); if not (msgReaderUrl endsWith "$") { msgReaderUrl = msgReaderUrl + "$"}; local (flCss = (cssPrefix != "")); //if true, emit CSS classes, otherwise don't local (yr = date.year (d), mo = date.month (d), day = date.day (d)); // the year, month and day which save state for the thread-reader local (template, itemTemplate, templateHeader, templateFooter); local (adrMembers = mainResponder.members.getMembershipTable (membershipGroup)); //PBS 09/26/01: get adrMembers, address of membership group local (nameTable); new (tableType, @nameTable); on add (s) { htmlText = htmlText + (s + "\r");}; on td (s, align="", class="", height="", bgcolor="", fontColor="") { local (fontClass = ""); if (flCss) and (class != "") { class = cssPrefix + class; fontClass = " class=\"" + class + "Font\""; class = " class=\"" + class + "\""}; if height != "" { height = " height=\"" + height + "\""}; if align != "" { align = " " + align}; if bgcolor != "" { bgcolor = " " + bgcolor}; add ("<td nowrap" + align + " valign=\"middle\"" + class + height + bgcolor + "><font size=\"-1\"" + fontClass + fontColor + "> " + s + " </font></td>")}; Çon shortenString (s, maxLen=35) Çif defined (string.ellipsize) Çreturn (string.ellipsize (s, maxLen)) Çif sizeOf (s) > maxLen Çreturn (string.mid (s, 1, maxLen - 3) + "...") Çreturn (s) local (activeThreadImgUrl, inactiveThreadImgUrl, threadStatusIconWidth = 17, threadStatusIconHeight = 14); local (userIconUrl, userIconHeight = 16, userIconWidth = 16); bundle { // build image data for topic status icons and dailyLink icon Çlocal (myDottedId = tcp.myDottedId ()) Çlocal (myDottedId = tcp.dns.getMyDottedId ()) //PBS 09/26/01: Çlocal (myPort = user.inetd.config.http.port) Çlocal (portString = "") Çif myPort != 80 ÇportString = ":" + myPort Çlocal (resourcesUrl = "http://" + myDottedId + portString + "/mainResponderResources/") local (resourcesUrl = "/mainResponderResources/"); //PBS 10/16/01: don't use IP address activeThreadImgUrl = resourcesUrl + "icons/folder.open2"; inactiveThreadImgUrl = resourcesUrl + "icons/folder2"; userIconUrl = resourcesUrl + "icons/user"; if inactiveThreadIcon == nil { inactiveThreadIcon = "<img src=\"" + inactiveThreadImgUrl + "\" height=\"" + threadStatusIconHeight + "\" width=\"" + threadStatusIconWidth + "\" border=\"0\" alt=\"inactiveThread\">"}; if activeThreadIcon == nil { activeThreadIcon = "<img src=\"" + activeThreadImgUrl + "\" height=\"" + threadStatusIconHeight + "\" width=\"" + threadStatusIconWidth + "\" border=\"0\" alt=\"activeThread\">"}; if userIcon == nil { userIcon = "<img src=\"" + userIconUrl + "\" height=\"" + userIconHeight + "\" width=\"" + userIconWidth + "\" border=\"0\" alt=\"user\">"}}; bundle { // get templates bundle { // get the header if typeOf (adrTemplateHeader) == addressType and defined (adrTemplateHeader^) { templateHeader = string (adrTemplateHeader^)} else { if flCss { templateHeader = "<table cellpadding=\"0\" cellspacing=\"1\" border=\"0\" class=\"" + cssPrefix + "Table\">"} else { templateHeader = "<table cellpadding=\"0\" cellspacing=\"1\" border=\"0\">"}}; templateHeader = string.trimWhiteSpace (templateHeader)}; bundle { // get the template if typeOf (adrTemplate) == addressType and defined (adrTemplate^) { template = string (adrTemplate^)} else { on addToTemplate (s) { template = template + s + "\r"}; if flCss { addToTemplate ("<tr bgcolor=\"{headerColor}\" class=\"" + cssPrefix + "SeparatorRow\">"); addToTemplate ("<td colspan=\"6\" height=\"28\" width=\"100%\">"); addToTemplate ("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>"); addToTemplate ("<td> <font color=\"{headerTextColor}\" class=\"" + cssPrefix + "SeparatorFont\"><b>Recent Topics</b></font></td>"); addToTemplate ("<td align=\"right\"><a href=\"{dayListUrl}\" style=\"color: {headerTextColor};\"><font size=\"-1\" color=\"{headerTextColor}\" class=\"" + cssPrefix + "DayLinkFont\">Chronological View</font></a> </td>"); addToTemplate ("</tr></table>"); addToTemplate ("</td>"); addToTemplate ("</tr>"); addToTemplate ("<tr bgcolor=\"{bgcolor}\" class=\"" + cssPrefix + "TitleRow\">"); addToTemplate ("<td nowrap align=\"center\" height=\"28\" class=\"" + cssPrefix + "StatusIconTitle\"> </td>"); addToTemplate ("<td nowrap class=\"" + cssPrefix + "MessageLinkTitle\"> <b>Topic</b> </td>"); addToTemplate ("<td nowrap class=\"" + cssPrefix + "AuthorTitle\"> <b>Originator</b> </td>"); addToTemplate ("<td nowrap align=\"right\" class=\"" + cssPrefix + "CountMessagesTitle\"> <b>Msgs</b> </td>"); addToTemplate ("<td nowrap align=\"right\" class=\"" + cssPrefix + "CountReadsTitle\"> <b>Reads</b> </td>"); addToTemplate ("<td nowrap align=\"right\" class=\"" + cssPrefix + "PostedTitle\"> <b>Last Post</b> </td>")} else { addToTemplate ("<tr bgcolor=\"{headerColor}\">"); addToTemplate ("<td colspan=\"6\" height=\"28\" width=\"100%\">"); addToTemplate ("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>"); addToTemplate ("<td> <font color=\"{headerTextColor}\"><b>Recent Topics</b></font></td>"); addToTemplate ("<td align=\"right\"><a href=\"{dayListUrl}\" style=\"color: {headerTextColor};\"><font size=\"-1\" color=\"{headerTextColor}\">Chronological View</font></a> </td>"); addToTemplate ("</tr></table>"); addToTemplate ("</td>"); addToTemplate ("</tr>"); addToTemplate ("<tr bgcolor=\"{bgcolor}\">"); addToTemplate ("<td nowrap align=\"center\" height=\"28\"> </td>"); addToTemplate ("<td nowrap> <b>Topic</b> </td>"); addToTemplate ("<td nowrap> <b>Originator</b> </td>"); addToTemplate ("<td nowrap align=\"right\"> <b>Msgs</b> </td>"); addToTemplate ("<td nowrap align=\"right\"> <b>Reads</b> </td>"); addToTemplate ("<td nowrap align=\"right\"> <b>Last Post</b> </td>")}; addToTemplate ("</tr>"); addToTemplate ("{messageList}")}; template = string.trimWhiteSpace (template)}; bundle { // get the item template if typeOf (adrItemTemplate) == addressType and defined (adrItemTemplate^) { itemTemplate = string (adrItemTemplate^)} else { on addToItemTemplate (s) { itemTemplate = itemTemplate + s + "\r"}; if flCss { addToItemTemplate ("<tr bgcolor=\"{bgcolor}\" class=\"" + cssPrefix + "MessageRow\">"); addToItemTemplate ("<td nowrap align=\"center\" height=\"28\" class=\"" + cssPrefix + "StatusIcon\"> <a href=\"{messageUrl}\">{statusIcon}</a> </td>"); addToItemTemplate ("<td nowrap class=\"" + cssPrefix + "MessageLink\"> <a href=\"{messageUrl}\">{subject}</a> </td>"); addToItemTemplate ("<td nowrap class=\"" + cssPrefix + "Author\"> {author} </td>"); addToItemTemplate ("<td nowrap align=\"right\" class=\"" + cssPrefix + "CountMessages\"> {messageCount} </td>"); addToItemTemplate ("<td nowrap align=\"right\" class=\"" + cssPrefix + "CountReads\"> {readCount} </td>"); addToItemTemplate ("<td nowrap align=\"right\" class=\"" + cssPrefix + "Posted\"> {lastPostTime} </td>")} else { addToItemTemplate ("<tr bgcolor=\"{bgcolor}\">"); addToItemTemplate ("<td nowrap align=\"center\" height=\"28\"> <a href=\"{messageUrl}\">{statusIcon}</a> </td>"); addToItemTemplate ("<td nowrap> <a href=\"{messageUrl}\">{subject}</a> </td>"); addToItemTemplate ("<td nowrap> {author} </td>"); addToItemTemplate ("<td nowrap align=\"right\"> {messageCount} </td>"); addToItemTemplate ("<td nowrap align=\"right\"> {readCount} </td>"); addToItemTemplate ("<td nowrap align=\"right\"> {lastPostTime} </td>")}; addToItemTemplate ("</tr>")}; itemTemplate = string.trimWhiteSpace (itemTemplate)}; bundle { // get the footer if typeOf (adrTemplateFooter) == addressType and defined (adrTemplateFooter^) { templateFooter = string (adrTemplateFooter^)} else { templateFooter = "</table>"}; templateFooter = string.trimWhiteSpace (templateFooter)}}; bundle { // replace color macros in the templates template = string.replaceAll (template, "{bgColor}", otherColor, false); template = string.replaceAll (template, "{headerColor}", headerColor, false); template = string.replaceAll (template, "{headerTextColor}", headerTextColor, false); itemTemplate = string.replaceAll (itemTemplate, "{bgColor}", otherColor, false); itemTemplate = string.replaceAll (itemTemplate, "{headerColor}", headerColor, false); itemTemplate = string.replaceAll (itemTemplate, "{headerTextColor}", headerTextColor, false); templateHeader = string.replaceAll (templateHeader, "{bgColor}", otherColor, false); templateHeader = string.replaceAll (templateHeader, "{headerColor}", headerColor, false); templateHeader = string.replaceAll (templateHeader, "{headerTextColor}", headerTextColor, false); templateFooter = string.replaceAll (templateFooter, "{bgColor}", otherColor, false); templateFooter = string.replaceAll (templateFooter, "{headerColor}", headerColor, false); templateFooter = string.replaceAll (templateFooter, "{headerTextColor}", headerTextColor, false)}; add (templateHeader); local (msgData); // a temporary table for storing thread-message data mainResponder.discuss.getThreadData (@msgData, d, threadAliveDays, pta, adrInDgCallback); local (ct = sizeOf (msgData), oldestActiveThreadDate); oldestActiveThreadDate = date (clock.now () - (3600 * 24 * threadActiveDays)); local (listHtml); for i = ct downTo 1 { local (s = itemTemplate, adrMsgData = @msgData[i]); bundle { // replace messageUrl local (messageUrl = msgReaderUrl + adrMsgData^.adrThread^.msgNum + "?mode=topic&y=" + yr + "&m=" + mo + "&d=" + day); s = string.replaceAll (s, "{messageUrl}", messageUrl, false)}; bundle { // replace statusIcon if adrMsgData^.lastPost < oldestActiveThreadDate { // inactive thread s = string.replaceAll (s, "{statusIcon}", inactiveThreadIcon, false)} else { // active thread s = string.replaceAll (s, "{statusIcon}", activeThreadIcon, false)}}; bundle { // replace authorIcon s = string.replaceAll (s, "{authorIcon}", userIcon, false)}; bundle { // replace subject Çs = string.replaceAll (s, "{subject}", shortenString (adrMsgData^.adrThread^.subject), false) s = string.replaceAll (s, "{subject}", string.ellipsize (adrMsgData^.adrThread^.subject, 60), false)}; bundle { // replace fullSubject s = string.replaceAll (s, "{fullSubject}", string.replaceAll (adrMsgData^.adrThread^.subject, "\"", """))}; bundle { // replace author local (author = mainResponder.members.linkToMember (membershipGroup, adrMsgData^.adrThread^.member, hideEmail: true, adrMembers:adrMembers, useMap:flUseMappedMemberKeys)); s = string.replaceAll (s, "{author}", author, false)}; bundle { // add msg count s = string.replaceAll (s, "{messageCount}", adrMsgData^.msgCount, false)}; bundle { // add read count s = string.replaceAll (s, "{readCount}", adrMsgData^.adrThread^.ctReads, false)}; bundle { // add last post date s = string.replaceAll (s, "{lastPostTime}", adrMsgData^.lastPost, false)}; bundle { // add post date s = string.replaceAll (s, "{postTime}", adrMsgData^.adrThread^.postTime, false)}; listHtml = listHtml + s}; bundle { // process the main template htmlText = templateHeader + template + templateFooter; bundle { // replace dayListUrl local (linkToDay = false, isLastDay = false); local (dateLinkUrl = pta^.urls^.discussHomePage); linkToDay = defined (adrCal^.[date.year (d)].[string.padWithZeros (date.month (d), 2)].[string.padWithZeros (date.day (d), 2)]); bundle { // is this the last day in the calendar? local (lastDate = mainResponder.calendar.getLastDay (adrCal)); isLastDay = (lastDate == date.set (date.day (d), date.month (d), date.year (d), 0, 0, 0))}; if linkToDay and (not isLastDay) { dateLinkUrl = dateLinkUrl + "$" + date.year (d) + "/" + string.padWithZeros (date.month (d), 2) + "/" + string.padWithZeros (date.day (d), 2)}; dateLinkUrl = dateLinkUrl + "?mode=day&y=" + yr + "&m=" + mo + "&d=" + day; htmlText = string.replaceAll (htmlText, "{dayListUrl}", dateLinkUrl, false)}; bundle { // replace date htmlText = string.replaceAll (htmlText, "{date}", mainResponder.localization.longDateString (d, pta), false)}; bundle { // replace messageList htmlText = string.replaceAll (htmlText, "{messageList}", listHtml, false)}}; Çadd (templateFooter) return (htmlText)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.discuss.listThreads ! on listThreads (d, bgColor="ivory", otherColor="beige", tableWidth=425, pta=nil, headerColor="black", headerTextColor=nil, cssPrefix="", threadAliveDays=5, threadActiveDays=1, adrTemplate=nil, adrItemTemplate=nil, adrTemplateHeader=nil, adrTemplateFooter=nil, activeThreadIcon=nil, inactiveThreadIcon=nil, userIcon=nil, adrInDgCallback=nil, flUseMappedMemberKeys=false) { ÇChanges Ç11/25/05; 7:10:53 PM by TAC Çchanged nowrap to nowrap=\"nowrap\" for XHTML compatibility Çchange & to & for day link and message urls Ç9/24/04; 3:27:18 AM by JES ÇCall string.ellipsize instead of the locally declared shortenString. Shorten subjects to 60 characters instead of to 35 characters. Ç4/18/03; 5:26:51 PM by JES ÇNew optional parameter, flUseMappedMemberKeys -- if true, we use the newer style numeric member keys instead of the older email address style member keys. Ç2002 Ç10/3/02; 2:33:49 AM by JES ÇAdded preliminary support for the {fullSubject} psuedo-macro. Ç4/4/02; 12:55:24 AM by JES ÇNew optional paramter, adrInDgCallback. Passed to mainResponder.discuss.getThreadData. Ç1/25/02; 6:04:26 PM by PBS ÇPerformance enhancement in the local "add" routine -- add a trailing semicolon; use parentheses to get the expression in x = x + y form (which is optimized by the kernel). Ç10/17/01; 10:43:48 AM by PBS ÇDon't use IP address when constructing the URL to a built-in icon. This fixes a bug with servers that have multiple IP addresses. Ç9/26/01; 6:32:45 PM by PBS ÇPass adrMembers to mainResponder.members routines for performance enhancement. Ç??? by JES ÇAdded template support. Ç10/09/00; 7:59:29 PM by JES ÇList current discussion threads if pta == nil { pta = html.getPageTableAddress ()}; local (adrData = mainResponder.discuss.openRoot (pta)); local (adrCal = @adrData^.calendar); local (adrMsgs = @adrData^.messages); local (htmlText = ""); local (i, j); local (membershipGroup = pta^.responderAttributes.defaultMembershipGroup); local (msgReaderUrl = pta^.responderAttributes.urls^.discussMsgReader); if not (msgReaderUrl endsWith "$") { msgReaderUrl = msgReaderUrl + "$"}; local (flCss = (cssPrefix != "")); //if true, emit CSS classes, otherwise don't local (yr = date.year (d), mo = date.month (d), day = date.day (d)); // the year, month and day which save state for the thread-reader local (template, itemTemplate, templateHeader, templateFooter); local (adrMembers = mainResponder.members.getMembershipTable (membershipGroup)); //PBS 09/26/01: get adrMembers, address of membership group local (nameTable); new (tableType, @nameTable); on add (s) { htmlText = htmlText + (s + "\r");}; on td (s, align="", class="", height="", bgcolor="", fontColor="") { local (fontClass = ""); if (flCss) and (class != "") { class = cssPrefix + class; fontClass = " class=\"" + class + "Font\""; class = " class=\"" + class + "\""}; if height != "" { height = " height=\"" + height + "\""}; if align != "" { align = " " + align}; if bgcolor != "" { bgcolor = " " + bgcolor}; add ("<td nowrap=\"nowrap\"" + align + " valign=\"middle\"" + class + height + bgcolor + "><font size=\"-1\"" + fontClass + fontColor + "> " + s + " </font></td>")}; Çon shortenString (s, maxLen=35) Çif defined (string.ellipsize) Çreturn (string.ellipsize (s, maxLen)) Çif sizeOf (s) > maxLen Çreturn (string.mid (s, 1, maxLen - 3) + "...") Çreturn (s) local (activeThreadImgUrl, inactiveThreadImgUrl, threadStatusIconWidth = 17, threadStatusIconHeight = 14); local (userIconUrl, userIconHeight = 16, userIconWidth = 16); bundle { // build image data for topic status icons and dailyLink icon Çlocal (myDottedId = tcp.myDottedId ()) Çlocal (myDottedId = tcp.dns.getMyDottedId ()) //PBS 09/26/01: Çlocal (myPort = user.inetd.config.http.port) Çlocal (portString = "") Çif myPort != 80 ÇportString = ":" + myPort Çlocal (resourcesUrl = "http://" + myDottedId + portString + "/mainResponderResources/") local (resourcesUrl = "/mainResponderResources/"); //PBS 10/16/01: don't use IP address activeThreadImgUrl = resourcesUrl + "icons/folder.open2"; inactiveThreadImgUrl = resourcesUrl + "icons/folder2"; userIconUrl = resourcesUrl + "icons/user"; if inactiveThreadIcon == nil { inactiveThreadIcon = "<img src=\"" + inactiveThreadImgUrl + "\" height=\"" + threadStatusIconHeight + "\" width=\"" + threadStatusIconWidth + "\" border=\"0\" alt=\"inactiveThread\">"}; if activeThreadIcon == nil { activeThreadIcon = "<img src=\"" + activeThreadImgUrl + "\" height=\"" + threadStatusIconHeight + "\" width=\"" + threadStatusIconWidth + "\" border=\"0\" alt=\"activeThread\">"}; if userIcon == nil { userIcon = "<img src=\"" + userIconUrl + "\" height=\"" + userIconHeight + "\" width=\"" + userIconWidth + "\" border=\"0\" alt=\"user\">"}}; bundle { // get templates bundle { // get the header if typeOf (adrTemplateHeader) == addressType and defined (adrTemplateHeader^) { templateHeader = string (adrTemplateHeader^)} else { if flCss { templateHeader = "<table cellpadding=\"0\" cellspacing=\"1\" border=\"0\" class=\"" + cssPrefix + "Table\">"} else { templateHeader = "<table cellpadding=\"0\" cellspacing=\"1\" border=\"0\">"}}; templateHeader = string.trimWhiteSpace (templateHeader)}; bundle { // get the template if typeOf (adrTemplate) == addressType and defined (adrTemplate^) { template = string (adrTemplate^)} else { on addToTemplate (s) { template = template + s + "\r"}; if flCss { addToTemplate ("<tr bgcolor=\"{headerColor}\" class=\"" + cssPrefix + "SeparatorRow\">"); addToTemplate ("<td colspan=\"6\" height=\"28\" width=\"100%\">"); addToTemplate ("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>"); addToTemplate ("<td> <font color=\"{headerTextColor}\" class=\"" + cssPrefix + "SeparatorFont\"><b>Recent Topics</b></font></td>"); addToTemplate ("<td align=\"right\"><a href=\"{dayListUrl}\" style=\"color: {headerTextColor};\"><font size=\"-1\" color=\"{headerTextColor}\" class=\"" + cssPrefix + "DayLinkFont\">Chronological View</font></a> </td>"); addToTemplate ("</tr></table>"); addToTemplate ("</td>"); addToTemplate ("</tr>"); addToTemplate ("<tr bgcolor=\"{bgcolor}\" class=\"" + cssPrefix + "TitleRow\">"); addToTemplate ("<td nowrap=\"nowrap\" align=\"center\" height=\"28\" class=\"" + cssPrefix + "StatusIconTitle\"> </td>"); addToTemplate ("<td nowrap=\"nowrap\" class=\"" + cssPrefix + "MessageLinkTitle\"> <b>Topic</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" class=\"" + cssPrefix + "AuthorTitle\"> <b>Originator</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" align=\"right\" class=\"" + cssPrefix + "CountMessagesTitle\"> <b>Msgs</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" align=\"right\" class=\"" + cssPrefix + "CountReadsTitle\"> <b>Reads</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" align=\"right\" class=\"" + cssPrefix + "PostedTitle\"> <b>Last Post</b> </td>")} else { addToTemplate ("<tr bgcolor=\"{headerColor}\">"); addToTemplate ("<td colspan=\"6\" height=\"28\" width=\"100%\">"); addToTemplate ("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr>"); addToTemplate ("<td> <font color=\"{headerTextColor}\"><b>Recent Topics</b></font></td>"); addToTemplate ("<td align=\"right\"><a href=\"{dayListUrl}\" style=\"color: {headerTextColor};\"><font size=\"-1\" color=\"{headerTextColor}\">Chronological View</font></a> </td>"); addToTemplate ("</tr></table>"); addToTemplate ("</td>"); addToTemplate ("</tr>"); addToTemplate ("<tr bgcolor=\"{bgcolor}\">"); addToTemplate ("<td nowrap=\"nowrap\" align=\"center\" height=\"28\"> </td>"); addToTemplate ("<td nowrap=\"nowrap\"> <b>Topic</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\"> <b>Originator</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" align=\"right\"> <b>Msgs</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" align=\"right\"> <b>Reads</b> </td>"); addToTemplate ("<td nowrap=\"nowrap\" align=\"right\"> <b>Last Post</b> </td>")}; addToTemplate ("</tr>"); addToTemplate ("{messageList}")}; template = string.trimWhiteSpace (template)}; bundle { // get the item template if typeOf (adrItemTemplate) == addressType and defined (adrItemTemplate^) { itemTemplate = string (adrItemTemplate^)} else { on addToItemTemplate (s) { itemTemplate = itemTemplate + s + "\r"}; if flCss { addToItemTemplate ("<tr bgcolor=\"{bgcolor}\" class=\"" + cssPrefix + "MessageRow\">"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"center\" height=\"28\" class=\"" + cssPrefix + "StatusIcon\"> <a href=\"{messageUrl}\">{statusIcon}</a> </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" class=\"" + cssPrefix + "MessageLink\"> <a href=\"{messageUrl}\">{subject}</a> </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" class=\"" + cssPrefix + "Author\"> {author} </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"right\" class=\"" + cssPrefix + "CountMessages\"> {messageCount} </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"right\" class=\"" + cssPrefix + "CountReads\"> {readCount} </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"right\" class=\"" + cssPrefix + "Posted\"> {lastPostTime} </td>")} else { addToItemTemplate ("<tr bgcolor=\"{bgcolor}\">"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"center\" height=\"28\"> <a href=\"{messageUrl}\">{statusIcon}</a> </td>"); addToItemTemplate ("<td nowrap=\"nowrap\"> <a href=\"{messageUrl}\">{subject}</a> </td>"); addToItemTemplate ("<td nowrap=\"nowrap\"> {author} </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"right\"> {messageCount} </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"right\"> {readCount} </td>"); addToItemTemplate ("<td nowrap=\"nowrap\" align=\"right\"> {lastPostTime} </td>")}; addToItemTemplate ("</tr>")}; itemTemplate = string.trimWhiteSpace (itemTemplate)}; bundle { // get the footer if typeOf (adrTemplateFooter) == addressType and defined (adrTemplateFooter^) { templateFooter = string (adrTemplateFooter^)} else { templateFooter = "</table>"}; templateFooter = string.trimWhiteSpace (templateFooter)}}; bundle { // replace color macros in the templates template = string.replaceAll (template, "{bgColor}", otherColor, false); template = string.replaceAll (template, "{headerColor}", headerColor, false); template = string.replaceAll (template, "{headerTextColor}", headerTextColor, false); itemTemplate = string.replaceAll (itemTemplate, "{bgColor}", otherColor, false); itemTemplate = string.replaceAll (itemTemplate, "{headerColor}", headerColor, false); itemTemplate = string.replaceAll (itemTemplate, "{headerTextColor}", headerTextColor, false); templateHeader = string.replaceAll (templateHeader, "{bgColor}", otherColor, false); templateHeader = string.replaceAll (templateHeader, "{headerColor}", headerColor, false); templateHeader = string.replaceAll (templateHeader, "{headerTextColor}", headerTextColor, false); templateFooter = string.replaceAll (templateFooter, "{bgColor}", otherColor, false); templateFooter = string.replaceAll (templateFooter, "{headerColor}", headerColor, false); templateFooter = string.replaceAll (templateFooter, "{headerTextColor}", headerTextColor, false)}; add (templateHeader); local (msgData); // a temporary table for storing thread-message data mainResponder.discuss.getThreadData (@msgData, d, threadAliveDays, pta, adrInDgCallback); local (ct = sizeOf (msgData), oldestActiveThreadDate); oldestActiveThreadDate = date (clock.now () - (3600 * 24 * threadActiveDays)); local (listHtml); for i = ct downTo 1 { local (s = itemTemplate, adrMsgData = @msgData[i]); bundle { // replace messageUrl local (messageUrl = msgReaderUrl + adrMsgData^.adrThread^.msgNum + "?mode=topic&y=" + yr + "&m=" + mo + "&d=" + day); s = string.replaceAll (s, "{messageUrl}", messageUrl, false)}; bundle { // replace statusIcon if adrMsgData^.lastPost < oldestActiveThreadDate { // inactive thread s = string.replaceAll (s, "{statusIcon}", inactiveThreadIcon, false)} else { // active thread s = string.replaceAll (s, "{statusIcon}", activeThreadIcon, false)}}; bundle { // replace authorIcon s = string.replaceAll (s, "{authorIcon}", userIcon, false)}; bundle { // replace subject Çs = string.replaceAll (s, "{subject}", shortenString (adrMsgData^.adrThread^.subject), false) s = string.replaceAll (s, "{subject}", string.ellipsize (adrMsgData^.adrThread^.subject, 60), false)}; bundle { // replace fullSubject s = string.replaceAll (s, "{fullSubject}", string.replaceAll (adrMsgData^.adrThread^.subject, "\"", """))}; bundle { // replace author local (author = mainResponder.members.linkToMember (membershipGroup, adrMsgData^.adrThread^.member, hideEmail: true, adrMembers:adrMembers, useMap:flUseMappedMemberKeys)); s = string.replaceAll (s, "{author}", author, false)}; bundle { // add msg count s = string.replaceAll (s, "{messageCount}", adrMsgData^.msgCount, false)}; bundle { // add read count s = string.replaceAll (s, "{readCount}", adrMsgData^.adrThread^.ctReads, false)}; bundle { // add last post date s = string.replaceAll (s, "{lastPostTime}", adrMsgData^.lastPost, false)}; bundle { // add post date s = string.replaceAll (s, "{postTime}", adrMsgData^.adrThread^.postTime, false)}; listHtml = listHtml + s}; bundle { // process the main template htmlText = templateHeader + template + templateFooter; bundle { // replace dayListUrl local (linkToDay = false, isLastDay = false); local (dateLinkUrl = pta^.urls^.discussHomePage); linkToDay = defined (adrCal^.[date.year (d)].[string.padWithZeros (date.month (d), 2)].[string.padWithZeros (date.day (d), 2)]); bundle { // is this the last day in the calendar? local (lastDate = mainResponder.calendar.getLastDay (adrCal)); isLastDay = (lastDate == date.set (date.day (d), date.month (d), date.year (d), 0, 0, 0))}; if linkToDay and (not isLastDay) { dateLinkUrl = dateLinkUrl + "$" + date.year (d) + "/" + string.padWithZeros (date.month (d), 2) + "/" + string.padWithZeros (date.day (d), 2)}; dateLinkUrl = dateLinkUrl + "?mode=day&y=" + yr + "&m=" + mo + "&d=" + day; htmlText = string.replaceAll (htmlText, "{dayListUrl}", dateLinkUrl, false)}; bundle { // replace date htmlText = string.replaceAll (htmlText, "{date}", mainResponder.localization.longDateString (d, pta), false)}; bundle { // replace messageList htmlText = string.replaceAll (htmlText, "{messageList}", listHtml, false)}}; Çadd (templateFooter) return (htmlText)} \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-11-26 19:37:59
|
Update of /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9631 Modified Files: readMessage renderOneMessage newMessageForm cowSkullImage Log Message: changes for xhtml compliance Index: renderOneMessage =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss/renderOneMessage,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** renderOneMessage 26 Mar 2005 21:45:43 -0000 1.1.1.1 --- renderOneMessage 26 Nov 2005 19:37:51 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.discuss.renderOneMessage ! on renderOneMessage (adrMsgTable, adrTemplate, flShowAuthor=true, flShowPostTime=true, flShowReadCount=true, flShowResponseCount=true, flShowEnclosures=true, flShowResponseForm=true, flShowCowSkullLink=false, editPageUrl="", adrData=nil, bgColor="ivory", otherColor="beige", headerColor="black", headerTextColor="ivory", adrGetBodyCallback=nil, adrGetTimeCallback=nil, cssPrefix="", y=nil, m=nil, d=nil, defaultMode="day", responseItemTemplate=nil, responseListHeader=nil, responseListFooter=nil, responseIndentTemplate=nil, responseSubThreadStartTemplate=nil, responseSubThreadEndTemplate=nil, pta=nil, userIcon=nil, adrInDgCallback=nil, depthToExpandResponses=0, flResponsesInChronologicalOrder=false, responseFullItemTemplate=nil, flUseMappedMemberKeys=false) { ÇRender a single message in a thread, flowing through a template if specified. Ç10/11/00; 10:30:27 PM by JES ÇChanges: Ç4/8/03; 11:43:18 PM by JES ÇAdded support for the {ipAddress} pseudo-macro in the template. Ç4/4/02; 1:07:05 AM by JES ÇNew optional parameter, adrInDgCallback, is the address of a callback which determines whether a message should be included in the rendering. If the callback returns true, add the message. If it returns false, don't add the message. ÇMore new optional params: depthToExpandResponses, flResponsesInChronologicalOrder and responseFullItemTemplate, used for displaying the full text of responses in the response list. These support the Slashdot-style discussion group renderings. Ç10/18/01; 11:11:11 AM by PBS ÇDon't use IP address when constructing URLs to built-in icons. Fixes a bug with machines with multiple IP addresses. Ç11/21/00; 6:04:09 PM by PBS ÇUse new bottleneck for displaying edit message in Pike button. Ç10/18/00; 10:48:50 PM by JES ÇCommented out code that adds the Edit in Frontier button. Ç10/14/00; 2:29:42 PM by JES ÇAdded 'in response to xxx' to the msg number when rendered in a template. Ç10/13/00; 12:05:00 AM by JES ÇAdded support for template-based rendering. bundle { // get pta, adrData, y, m and d if pta == nil { pta = html.getPageTableAddress ()}; if adrData == nil { adrData = mainResponder.discuss.openRoot (pta)}; if y == nil { y = date.year ()}; if m == nil { m = date.month ()}; if d == nil { d = date.day ()}}; bundle { //increment read stats on the top message adrMsgTable^.ctReads++; config.mainResponder.stats.ctDiscussionGroupReads++}; local (flMember = defined (pta^.adrMemberInfo)); local (membershipGroup = pta^.responderAttributes.defaultMembershipGroup); local (flCss = (cssPrefix != "")); local (msgReaderUrl = pta^.urls^.discussMsgReader); if not (msgReaderUrl endsWith "$") { msgReaderUrl = msgReaderUrl + "$"}; on buildSearchArgs (adrArgTable) { local (ct = sizeOf (adrArgTable^), i, s = "?"); for i = 1 to ct { s = s + nameOf (adrArgTable^[i]) + "=" + adrArgTable^[i] + "&"}; s = string.mid (s, 1, sizeOf (s) - 1); return (s)}; local (mode, thisModeSearchArgs, otherModeSearchArgs, replyToThisSearchArgs, flShowResponses=true); bundle { // get the mode, and the search args for preserving and switching the mode local (searchArgs = "", argTable); new (tableType, @argTable); bundle { //parse search args if defined (pta^.searchArgs) { searchArgs = pta^.searchArgs}; webserver.parseArgs (searchArgs, @argTable)}; if not defined (argTable.mode) { argTable.mode = defaultMode}; bundle { //user-specifiable search args if defined (argTable.showResponses) { flShowResponses = boolean (argTable.showResponses)}; if defined (argTable.expandToDepth) { depthToExpandResponses = number (argTable.expandToDepth)}; if defined (argTable.newestFirst) { flResponsesInChronologicalOrder = not boolean (argTable.newestFirst)}}; bundle { //this mode search args argTable.mode = string.lower (argTable.mode); mode = argTable.mode; thisModeSearchArgs = buildSearchArgs (@argTable)}; bundle { //reply to this search args local (replyArgsTable = argTable); replyArgsTable.showResponses = false; replyToThisSearchArgs = buildSearchArgs (@replyArgsTable)}; bundle { //other mode search args local (otherModeArgsTable = argTable); if otherModeArgsTable.mode == "day" { otherModeArgsTable.mode = "topic"} else { otherModeArgsTable.mode = "day"}; otherModeSearchArgs = buildSearchArgs (@otherModeArgsTable)}}; local (htmltext); local (msgnum = adrMsgTable^.msgnum); local (template); if adrTemplate != nil { template = string (adrTemplate^)}; local (userIconUrl, userIconHeight = 16, userIconWidth = 16); local (internalLinkImgUrl, internalLinkImgWidth = 11, internalLinkImgHeight = 9, internalLinkUrl); bundle { // build image data for internal link arrows and message status icons Çlocal (myDottedId = tcp.myDottedId ()) Çlocal (myPort = user.inetd.config.http.port) Çlocal (portString = "") Çif myPort != 80 ÇportString = ":" + myPort Çlocal (resourcesUrl = "http://" + myDottedId + portString + "/mainResponderResources/") local (resourcesUrl = "/mainResponderResources/"); internalLinkImgUrl = resourcesUrl + "icons/leftArrow"; internalLinkUrl = pta^.responderAttributes.urls^.discussMsgReader; if not (internalLinkUrl endsWith '$') { internalLinkUrl = internalLinkUrl + "$"}; ÇinternalLinkUrl = internalLinkUrl + msgNum + "#" userIconUrl = resourcesUrl + "icons/user"; ÇmsgIconUrl = resourcesUrl + "icons/message" if userIcon == nil { userIcon = "<img src=\"" + userIconUrl + "\" height=\"" + userIconHeight + "\" width=\"" + userIconWidth + "\" border=\"0\" alt=\"user\">"}}; local (cowskullImg = mainResponder.discuss.cowSkullImage (pta), cowskullLink); bundle { // get the cowskull link html cowskullLink = "<a href=\"" + pta^.responderAttributes.urls^.discussMsgReader + msgNum + otherModeSearchArgs + "\">" + cowskullImg + "</a>"}; on add (s) { htmlText = htmlText + s}; on countResponses (adrMsgTable) { // count all the responses in a thread local (responseCount); local (i, ct = sizeOf (adrMsgTable^.responses)); responseCount = ct; for i = 1 to ct { local (adrResponse = @adrData^.messages.[string.padWithZeros (adrMsgTable^.responses[i], 7)]); if sizeOf (adrResponse^.responses) { responseCount = responseCount + countResponses (adrResponse)}}; return (responseCount)}; on getBody (adrMsgTable) { // get the body of the message, calling callbacks if necessary local (body, flCallbackReturnedBody = false); if adrGetBodyCallback != nil { body = adrGetBodyCallback^ (adrMsgTable); if body != "" { Çadd (body) flCallbackReturnedBody = true}}; if not flCallbackReturnedBody { bundle { //PBS 10/20/99: if an image is attached to this message, display it above the body if defined (adrMsgTable^.image) { if defined (pta^.responderAttributes.urls^.imageViewer) { //must be defined: it's the link to the imageViewer script ÇThe imageViewer script takes a msgNum as pathArgs and displays the picture attached to that dg message. body = body + mainResponder.discuss.buildImageTag (adrMsgTable^.msgNum); body = body + "<p>"}}}; if typeOf (adrMsgTable^.body) == outlineType { //outlines get passed through an outline renderer local (oldRenderOutlineWith = nil); if defined (pta^.renderOutlineWith) { oldRenderOutlineWith = pta^.renderOutlineWith}; if defined (pta^.renderDiscussOutlinesWith) { pta^.renderOutlineWith = pta^.renderDiscussOutlinesWith}; if defined (pta^.flReadMessageProcessMacros) and pta^.flReadMessageProcessMacros { try {body = body + html.processMacros (html.tenderRender (@adrMsgTable^.body), false, pta)}} else { if defined (pta^.flReadMessageExpandUrls) and not pta^.flReadMessageExpandUrls { try {body = body + html.tenderRender (@adrMsgTable^.body)}} else { //default, original behavior try {body = body + html.expandURLs (html.tenderRender (@adrMsgTable^.body))}}}; if oldRenderOutlineWith != nil { pta^.renderOutlineWith = oldRenderOutlineWith}} else { //it's not an outline local (s = string (adrMsgTable^.body)); s = string.replaceAll (s, "\n", ""); //2/15/99 DW, inside <pre>s these cause extra line-skips if not (defined (pta^.flReadMessageAutoParagraphs)) or pta^.flReadMessageAutoParagraphs { s = string.replaceAll (s, "\r\r", "\r\r<p>")}; if not (defined (pta^.flReadMessageProcessMacros)) or pta^.flReadMessageProcessMacros { s = html.processMacros (s, false, pta)}; body = body + s}}; return (body)}; on getEditButtons () { //add Edit button (or buttons) to the page local (s, editableInFrontier = false); Çs = s + "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"white\"><tr>" Çif defined (pta^.adrMemberInfo^.isFrontierSixAlpha) //edit in Frontier button Çlocal (url = pta^.responderAttributes.urls^.discussEditInFrontier + msgNum) Ç ÇBuild the Edit in Frontier button. Çs = s + "<td valign=\"baseline\">" Çs = s + "<form method=\"POST\" action=\"" + url + "\">" Çs = s + "<input name=\"msgnum\" type=\"hidden\" value=\"" + msgNum + "\">" Çs = s + " <input type=\"submit\" value=\"" + mainResponder.getString ("discuss.editInFrontier") + "\">" Çs = s + "</form>" Çs = s + "</td>" Ç ÇeditableInFrontier = true bundle { //edit in web browser button if editPageURL == "" { editPageURL = pta^.responderAttributes.urls^.discussEditInBrowser}; Çs = s + "<td valign=\"baseline\">" s = s + "<form method=\"POST\" action=\"" + editPageURL + msgNum + "\">"; s = s + "<input name=\"msgnum\" type=\"hidden\" value=\"" + msgNum + "\">"; local (buttonValue = " " + mainResponder.getString ("discuss.editThisPage") + " "); if editableInFrontier { buttonValue = mainResponder.getString ("discuss.editInBrowser"); //change button name from Edit this Page to Edit in Browser s = s + " "}; s = s + " <input type=\"submit\" value=\"" + buttonValue + "\">"; s = s + "</form>"; };Çs = s + "</td>" bundle { //PBS 01/13/00: Add the Edit in Pike button Çif defined (pta^.responderAttributes.urls^.editInPike) ÇPike support is a feature not of mainResponder but of Manila. However, this script, which displays the discussion group messages and the Edit this Page button, needs to be Pike-aware enough to display the Pike button. Çif manilaSuite.pike.memberHasPike (pta) Çlocal (editInPikeUrl = pta^.responderAttributes.urls^.editInPike) Çif not (editInPikeUrl endsWith "$") ÇeditInPikeUrl = editInPikeUrl + "$" ÇeditInPikeUrl = editInPikeUrl + msgNum Çlocal (adrSite = pta^.adrSiteRootTable) Çlocal (adrMember = pta^.adrMemberInfo) Ç Çs = s + "<td valign=\"baseline\">" Çs = s + " " + manilaSuite.pike.pikeButton (editInPikeUrl, adrMsgTable, adrMember, adrSite, true, mainResponder.getString ("discuss.editThisStoryInPikeOutline"), pta) //true because this is a message Çs = s + "</td>" s = s + " " + manilaSuite.pike.editMessageButton (adrMsgTable, pta:pta)}; //PBS 11/21/00: use new bottleneck for displaying edit message in Pike button Çs = s + "</tr></table>" return (s)}; on getTopicMsgTable () { local (nomad = adrMsgTable); while nomad^.inResponseTo > 0 { Çnomad = @adrData^.messages.[string.padWithZeros (nomad^.inResponseTo, 7)] nomad = mainResponder.discuss.getMessageTable (nomad^.inResponseTo, pta, adrData)}; return (nomad)}; on getNextMsgNum () { local (lastMsgNum = adrData^.prefs.nextMsgNum - 1); local (nomad, nextMsgNum = msgNum + 1); while nextMsgNum <= lastMsgNum { nomad = mainResponder.discuss.getMessageTable (nextMsgNum, pta, adrData); if not (mainResponder.discuss.isMessageDeleted (nextMsgNum, nomad, pta:pta)) { if adrInDgCallback == nil { return (nextMsgNum)} else { local (adrmsg = mainResponder.discuss.getMessageTable (nextMsgNum, pta)); if adrInDgCallback^ (adrmsg) { return (nextMsgNum)}}}; nextMsgNum++}; return (0)}; on getPrevMsgNum () { local (nomad, prevMsgNum = msgNum - 1); while prevMsgNum > 0 { nomad = mainResponder.discuss.getMessageTable (prevMsgNum, pta, adrData); if not (mainResponder.discuss.isMessageDeleted (prevMsgNum, nomad, pta:pta)) { if adrInDgCallback == nil { return (prevMsgNum)} else { local (adrmsg = mainResponder.discuss.getMessageTable (prevMsgNum, pta)); if adrInDgCallback^ (adrmsg) { return (prevMsgNum)}}}; prevMsgNum--}; return (prevMsgNum)}; on obscureEmail (s, link=false) { if s contains '@' { local (part1 = string.nthField (s, '@', 1)); local (part2 = string.nthField (s, '@', 2)); if link { return ("<a href=\"mailto:" + s + "\">" + part1 + "@" + part2[1] + "...</a>")} else { return (part1 + "@" + part2[1] + "...")}}; return (s)}; if mainResponder.discuss.isMessageDeleted (msgNum, adrMsgTable, pta) { return ("")}; bundle { //calculate enclosure and edit buttons display flags flShowEnclosures = flShowEnclosures and (defined (adrMsgTable^.enclosureAddress) and (adrMsgTable^.enclosureAddress != "")); flShowEditButtons = (flMember and (mainResponder.discuss.memberCanEdit (adrMsgTable, pta^.adrMemberInfo, pta)))}; if adrTemplate == nil { //render the message in default fashion bundle { //add member, internal link, read count and date if flCss { // the header row and cell add ("<tr class=\"" + cssPrefix + "HeaderRow\">"); add ("<td class=\"" + cssPrefix + "AuthorCell\">")} else { add ("<tr><td>")}; bundle { // the header table add ("<table bgcolor=\"" + othercolor + "\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>"); if flShowAuthor { add (mainResponder.members.linkToMember (membershipGroup, adrMsgTable^.member, hideEmail: true, useMap:flUseMappedMemberKeys))} else { add (" ")}; bundle { // add internal link add ("<a name=\"" + msgNum + "\"> </a>"); add ("<a href=\"" + internalLinkUrl + msgNum + "?y=" + y + "&m=" + m + "&d=" + d + "\" title=\"Permanent link to this message in archives.\">"); add ("<img src=\"" + internalLinkImgUrl + "\" height=\"" + internalLinkImgHeight + "\" width=\"" + internalLinkImgWidth + "\" border=\"0\" alt=\"blueArrow\"></a>")}; if flShowReadCount or flShowResponseCount { local (s = " ("); if flShowReadCount { s = s + adrMsgTable^.ctReads + " read"; if adrMsgTable^.ctReads != 1 { s = s + "s"}; if flShowResponseCount { s = s + ", "}}; if flShowResponseCount { local (responses = countResponses (adrMsgTable)); s = s + responses + " response"; if responses != 1 { s = s + "s"}}; s = s + ")"; add ("<font size=\"-1\">" + s + "</font>")}; add ("</td>"); if flCss { // the post time cell and font add ("<td class=\"" + cssPrefix + "DateCell\" align=\"right\"><font size=\"-1\">")} else { add ("<td align=\"right\" width=\"100%\"><font size=\"-1\">")}; if flShowPostTime { local (postTime = adrMsgTable^.postTime); if adrGetTimeCallback != nil { postTime = adrGetTimeCallback^ (postTime)}; add (mainResponder.localization.abbrevDateString (postTime, pta) + " " + mainResponder.localization.timeString (postTime, pta))} else { add (" ")}; add ("</font></td>"); add ("</table>")}; add ("</td></tr>"); };Çadd ("</font></td></tr>") bundle { //add the body of the message if flCss { // the row and cell containing the body of the message add ("<tr bgcolor=\"white\" class=\"" + cssPrefix + "BodyRow\">"); add ("<td class=\"" + cssPrefix + "BodyCell\">")} else { add ("<tr bgcolor=\"white\"><td>")}; bundle { // the body table add ("<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>"); add (getBody (adrMsgTable)); if flShowEditButtons { add (getEditButtons ())}; if flShowCowSkullLink { //add cowskull link to standard msgReader page ÇThe cowskull link is a link to the discussion group interface version of this page. add ("<p>" + cowskullLink + "</p>")}; add ("</td></tr></table>")}; add ("</td></tr>")}} else { //flow the message through the template, and add it local (s = template, lowerTemplate = string.lower (template)); bundle { // replace bgcolor, headerColor and headerTextColor s = string.replaceAll (s, "{bgcolor}", otherColor, false); s = string.replaceAll (s, "{headerColor}", headerColor, false); s = string.replaceAll (s, "{headerTextColor}", headerTextColor, false)}; bundle { // replace author local (memberLink = mainResponder.members.linkToMember (membershipGroup, adrMsgTable^.member, hideEmail: true, useMap:flUseMappedMemberKeys)); s = string.replaceAll (s, "{author}", memberLink, false)}; bundle { // replace authorIcon s = string.replaceAll (s, "{authorIcon}", userIcon, false)}; bundle { // replace subject s = string.replaceAll (s, "{subject}", adrMsgTable^.subject, false)}; bundle { // replace topic link -- this does a mode flip local (topicLink, topicMsgTable = getTopicMsgTable ()); topicLink = "<a href=\"" + msgReaderUrl + topicMsgTable^.msgNum + otherModeSearchArgs + "\""; if flCss { topicLink = topicLink + " class=\"" + cssPrefix + "TopicLink\""}; topicLink = topicLink + ">" + topicMsgTable^.subject + "</a>"; s = string.replaceAll (s, "{topicLink}", topicLink, false)}; bundle { // replace messageNumberLink -- this doea a mode flip local (msgNumLink = "<a href=\"" + msgReaderUrl + msgNum + otherModeSearchArgs + "\""); if flCss { msgNumLink = msgNumLink + " class=\"" + cssPrefix + "MessageNumberLink\""}; msgNumLink = msgNumLink + ">" + msgNum + "</a>"; s = string.replaceAll (s, "{messageNumberLink}", msgNumLink, false)}; bundle { // replace inResponseToLink local (inResponseToLink); if adrMsgTable^.inResponseTo > 0 { local (replacementTable); new (tableType, @replacementTable); replacementTable.msglink = "<a href=\"" + msgReaderUrl + adrMsgTable^.inResponseTo + thisModeSearchArgs + "\">" + adrMsgTable^.inResponseTo + "</a>"; inResponseToLink = mainResponder.getString ("discuss.inResponseTo", @replacementTable, pta: pta)} else { inResponseToLink = mainResponder.getString ("discuss.topMsgInThread", pta: pta)}; s = string.replaceAll (s, "{inResponseToLink}", inResponseToLink, false)}; bundle { // replace previousMessageLink local (prevMsgNum = getPrevMsgNum (), msgNumLink = ""); if prevMsgNum { msgNumLink = "<a href=\"" + msgReaderUrl + prevMsgNum + thisModeSearchArgs + "\""; if flCss { msgNumLink = msgNumLink + " class=\"" + cssPrefix + "PreviousMessageLink\""}; msgNumLink = msgNumLink + ">" + prevMsgNum + "</a>"}; s = string.replaceAll (s, "{previousMessageLink}", msgNumLink, false)}; bundle { // replace nextMessageLink local (nextMsgNum = getNextMsgNum (), msgNumLink = ""); if nextMsgNum { msgNumLink = "<a href=\"" + msgReaderUrl + nextMsgNum + thisModeSearchArgs + "\""; if flCss { msgNumLink = msgNumLink + " class=\"" + cssPrefix + "NextMessageLink\""}; msgNumLink = msgNumLink + ">" + nextMsgNum + "</a>"}; s = string.replaceAll (s, "{nextMessageLink}", msgNumLink, false)}; bundle { // replace postTime local (d = adrMsgTable^.postTime); if adrGetTimeCallback != nil { d = adrGetTimeCallback^ (d)}; s = string.replaceAll (s, "{postTime}", d, false)}; bundle { // replace readCount s = string.replaceAll (s, "{readCount}", adrMsgTable^.ctReads, false)}; bundle { // replace response count if lowerTemplate contains "{responsecount}" { // this may be time-consuming if there are lots of responses s = string.replaceAll (s, "{responseCount}", countResponses (adrMsgTable), false)}}; bundle { // replace editLink if flShowEditButtons { s = string.replaceAll (s, "{editLink}", getEditButtons (), false)} else { // replace with the empty string s = string.replaceAll (s, "{editLink}", "", false)}}; bundle { // replace discussLink -- this is the cowskull, and it's a mode flip if flShowCowSkullLink { s = string.replaceAll (s, "{discussLink}", cowskullLink, false)} else { // replace with the empty string s = string.replaceAll (s, "{discussLink}", "", false)}}; bundle { // replace internal link local (internalLink); internalLink = internalLink + "<a name=\"" + msgNum + "\"> </a>"; internalLink = internalLink + "<a href=\"" + internalLinkUrl + msgNum + "?y=" + y + "&m=" + m + "&d=" + d + "\" title=\"Permanent link to this message in archives.\">"; internalLink = internalLink + "<img src=\"" + internalLinkImgUrl + "\" height=\"" + internalLinkImgHeight + "\" width=\"" + internalLinkImgWidth + "\" border=\"0\" alt=\"blueArrow\"></a>"; s = string.replaceAll (s, "{internalLink}", internalLink, false)}; bundle { // replace responseList if lowerTemplate contains "{responselist}" { // short circuit if the template doesn't include a responseList macro because it may be time-consuming local (responseList = ""); if flShowResponses { bundle { // set default templates, headers, etc. ÇIt's not ideal, but we check to see if the value of mini-templates equals nil, and also that the type == typeOf (nil). That way we can tell the difference between the empty string and not having passed in a value. This is because the empty string equals nil, but its type is stringType, not typeOf (nil) if responseListHeader == nil and typeOf (responseListHeader) == typeOf (nil) { responseListHeader = "<p><hr><b>" + mainResponder.getString ("discuss.thereAreResponsesToThisMsg") + "</b></p>"}; if responseSubThreadStartTemplate == nil and typeOf (responseSubThreadStartTemplate) == typeOf (nil) { responseSubThreadStartTemplate = "<ul>"}; if responseSubThreadEndTemplate == nil and typeOf (responseSubThreadEndTemplate) == typeOf (nil) { responseSubThreadEndTemplate = "</ul>"}; if responseItemTemplate == nil and typeOf (responseItemTemplate) == typeOf (nil) { responseItemTemplate = "<li><p><a href=\"{responseUrl}\">{responseSubject}</a>, {responseAuthor}, {responsePostTime}</p></li>"}; if responseFullItemTemplate == nil and typeOf (responseFullItemTemplate) == typeOf (nil) { responseFullItemTemplate = responseItemTemplate}}; local (stack = {}); // keep track of which messages have been added to aviod infinite recursion on addResponses (adrItem, level = 0) { local (adrTable, msgNum, responseMember, i, ct = sizeOf (adrItem^.responses), itemHtml); local (flFullMessage = level <= (depthToExpandResponses - 1) ); //level is zero-based but the pref is 1-based if not flFullMessage { //add threadSubStartTemplate responseList = responseList + responseSubThreadStartTemplate}; on addResponse () { msgNum = adrItem^.responses [i]; if stack contains msgNum { //avoid infinite recursion continue; }; adrTable = mainResponder.discuss.getMessageTable (msgNum, pta, adrData); if not defined (adrTable^) { continue}; local (flAddMessage = not mainResponder.discuss.isMessageDeleted (msgNum, adrTable, pta) ); Çif flAddMessage Çif adrInDgCallback != nil ÇflAddMessage = adrInDgCallback^ (adrTable) if flAddMessage { responseMember = mainResponder.members.getMemberName (membershipGroup, adrTable^.member); if flFullMessage { itemHtml = responseFullItemTemplate; if string.lower (responseFullItemTemplate) contains "{responsetext}" { //bump read count adrTable^.ctReads++; config.mainResponder.stats.ctDiscussionGroupReads++}; itemHtml = string.replaceAll (itemHtml, "{responseText}", adrTable^.body, false)} else { itemHtml = responseItemTemplate; itemHtml = string.replaceAll (itemHtml, "{responseText}", "", false)}; itemHtml = string.replaceAll (itemHtml, "{replyUrl}", msgReaderUrl + msgNum + replyToThisSearchArgs, false); itemHtml = string.replaceAll (itemHtml, "{responseUrl}", msgReaderUrl + msgNum + thisModeSearchArgs, false); itemHtml = string.replaceAll (itemHtml, "{responseSubject}", adrTable^.subject, false); itemHtml = string.replaceAll (itemHtml, "{responseAuthor}", obscureEmail (responseMember), false); itemHtml = string.replaceAll (itemHtml, "{responsePostTime}", mainResponder.localization.dateTimeString (adrTable^.postTime, pta: pta), false); itemHtml = string.replaceAll (itemHtml, "{responseMessageNumber}", adrTable^.msgNum, false); if responseIndentTemplate != "" { // work around kernel bug on windows: string.filledString ("", n) == crash. responseList = responseList + string.filledString (responseIndentTemplate, level)}; responseList = responseList + itemHtml; if sizeof (adrTable^.responses) > 0 { stack = stack + {adrTable^.msgNum}; addResponses (adrTable, level + 1); delete (@stack [sizeof (stack)])}}}; if flResponsesInChronologicalOrder { for i = 1 to ct { addResponse ()}} else { for i = ct downTo 1 { addResponse ()}}; if not flFullMessage { //add subThreadEntTemplate responseList = responseList + responseSubThreadEndTemplate}; }; if sizeOf (adrMsgTable^.responses) { responseList = responseListHeader; addResponses (adrMsgTable); //it's recursive responseList = responseList + responseListFooter}}; s = string.replaceAll (s, "{responseList}", responseList, false)}}; bundle { // replace messageText s = string.replaceAll (s, "{messageText}", getBody (adrMsgTable), false)}; bundle { // replace responseForm local (responseForm = "", responseFormHeader = "<p><hr>", responseFormFooter = ""); if flMember and flShowResponseForm { local (subject = adrMsgTable^.subject); if not (string.lower (subject) beginswith string.lower (string.trimWhiteSpace (mainResponder.getString ("discuss.rePrefix")))) { subject = mainResponder.getString ("discuss.rePrefix") + subject}; local (subjectprompt, buttontext, bodyprompt); subjectprompt = mainResponder.getString ("discuss.responseSubjectPrompt"); buttontext = mainResponder.getString ("discuss.postResponseButtonText"); bodyprompt = mainResponder.getString ("discuss.responseBodyPrompt"); responseForm = responseFormHeader + mainResponder.discuss.newMessageForm (msgNum, subject, subjectprompt, buttontext, bodyprompt: bodyprompt, pta:pta) + responseFormFooter}; s = string.replaceAll (s, "{responseForm}", responseForm, false)}; bundle { // 11/03/00 JES: replace enclosureLink if flShowEnclosures { local (viewingUrl = pta^.responderAttributes.urls^.discussEnclosureViewer + msgNum); local (listingLink = "<a href=\"" + viewingUrl + "\">" + mainResponder.getString ("discuss.viewEnclosure") + "</a>"); local (fatPageLink = "<a href=\"" + pta^.responderAttributes.urls^.discussEnclosureDownloader + msgNum + "\">" + mainResponder.getString ("discuss.fatPageEnclosure") + "</a>"); local (rpcLink = "<a href=\"" + pta^.responderAttributes.urls^.discussEnclosureRPCer + msgNum + "\">" + mainResponder.getString ("discuss.RPCenclosure") + "</a>"); s = string.replaceAll (s, "{enclosureLink}", listingLink + ", " + fatPageLink + ", " + rpcLink, false)} else { s = string.replaceAll (s, "{enclosureLink}", "", false)}}; bundle { //replace ipAddress local (ipAddress = ""); if defined (adrMsgTable^.ipAddress) { ipAddress = adrMsgTable^.ipAddress}; s = string.replaceAll (s, "{ipAddress}", ipAddress, false)}; add (s)}; bundle { //set member info ÇFor every member, store the highest message read for the current discussion group. ÇFirst make sure the discussionGroupInfo table exists for this member, then make sure there's a table for this dg, then set highestMessageRead for this dg for this member. if flMember { //is this a member? local (adrMember = pta^.adrMemberInfo); if not defined (adrMember^.discussionGroupInfo) { new (tabletype, @adrmember^.discussionGroupInfo)}; local (rootName = nameOf (adrData^)); local (adrTable = @adrMember^.discussionGroupInfo.[rootName]); if not defined (adrTable^) { new (tableType, adrTable)}; if not defined (adrTable^.highestMessageRead) { adrTable^.highestMessageRead = 0}; if msgNum > adrTable^.highestMessageRead { adrTable^.highestMessageRead = msgNum}}}; return (htmltext)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.discuss.renderOneMessage ! on renderOneMessage (adrMsgTable, adrTemplate, flShowAuthor=true, flShowPostTime=true, flShowReadCount=true, flShowResponseCount=true, flShowEnclosures=true, flShowResponseForm=true, flShowCowSkullLink=false, editPageUrl="", adrData=nil, bgColor="ivory", otherColor="beige", headerColor="black", headerTextColor="ivory", adrGetBodyCallback=nil, adrGetTimeCallback=nil, cssPrefix="", y=nil, m=nil, d=nil, defaultMode="day", responseItemTemplate=nil, responseListHeader=nil, responseListFooter=nil, responseIndentTemplate=nil, responseSubThreadStartTemplate=nil, responseSubThreadEndTemplate=nil, pta=nil, userIcon=nil, adrInDgCallback=nil, depthToExpandResponses=0, flResponsesInChronologicalOrder=false, responseFullItemTemplate=nil, flUseMappedMemberKeys=false) { ÇChanges Ç11/24/05; 11:32:06 AM by TAC Çclose input, hr, and p tags Çlowercase form method POST for xhtml compatibility Ç10/9/03; 5:03:32 PM by TAC Çlocalize date time Ç4/8/03; 11:43:18 PM by JES ÇAdded support for the {ipAddress} pseudo-macro in the template. Ç4/4/02; 1:07:05 AM by JES ÇNew optional parameter, adrInDgCallback, is the address of a callback which determines whether a message should be included in the rendering. If the callback returns true, add the message. If it returns false, don't add the message. ÇMore new optional params: depthToExpandResponses, flResponsesInChronologicalOrder and responseFullItemTemplate, used for displaying the full text of responses in the response list. These support the Slashdot-style discussion group renderings. Ç10/18/01; 11:11:11 AM by PBS ÇDon't use IP address when constructing URLs to built-in icons. Fixes a bug with machines with multiple IP addresses. Ç2000 Ç11/21/00; 6:04:09 PM by PBS ÇUse new bottleneck for displaying edit message in Pike button. Ç10/18/00; 10:48:50 PM by JES ÇCommented out code that adds the Edit in Frontier button. Ç10/14/00; 2:29:42 PM by JES ÇAdded 'in response to xxx' to the msg number when rendered in a template. Ç10/13/00; 12:05:00 AM by JES ÇAdded support for template-based rendering. Ç10/11/00; 10:30:27 PM by JES ÇRender a single message in a thread, flowing through a template if specified. bundle { // get pta, adrData, y, m and d if pta == nil { pta = html.getPageTableAddress ()}; if adrData == nil { adrData = mainResponder.discuss.openRoot (pta)}; if y == nil { y = date.year ()}; if m == nil { m = date.month ()}; if d == nil { d = date.day ()}}; bundle { //increment read stats on the top message adrMsgTable^.ctReads++; config.mainResponder.stats.ctDiscussionGroupReads++}; local (flMember = defined (pta^.adrMemberInfo)); local (membershipGroup = pta^.responderAttributes.defaultMembershipGroup); local (flCss = (cssPrefix != "")); local (msgReaderUrl = pta^.urls^.discussMsgReader); if not (msgReaderUrl endsWith "$") { msgReaderUrl = msgReaderUrl + "$"}; on buildSearchArgs (adrArgTable) { local (ct = sizeOf (adrArgTable^), i, s = "?"); for i = 1 to ct { s = s + nameOf (adrArgTable^[i]) + "=" + adrArgTable^[i] + "&"}; s = string.mid (s, 1, sizeOf (s) - 1); return (s)}; local (mode, thisModeSearchArgs, otherModeSearchArgs, replyToThisSearchArgs, flShowResponses=true); bundle { // get the mode, and the search args for preserving and switching the mode local (searchArgs = "", argTable); new (tableType, @argTable); bundle { //parse search args if defined (pta^.searchArgs) { searchArgs = pta^.searchArgs}; webserver.parseArgs (searchArgs, @argTable)}; if not defined (argTable.mode) { argTable.mode = defaultMode}; bundle { //user-specifiable search args if defined (argTable.showResponses) { flShowResponses = boolean (argTable.showResponses)}; if defined (argTable.expandToDepth) { depthToExpandResponses = number (argTable.expandToDepth)}; if defined (argTable.newestFirst) { flResponsesInChronologicalOrder = not boolean (argTable.newestFirst)}}; bundle { //this mode search args argTable.mode = string.lower (argTable.mode); mode = argTable.mode; thisModeSearchArgs = buildSearchArgs (@argTable)}; bundle { //reply to this search args local (replyArgsTable = argTable); replyArgsTable.showResponses = false; replyToThisSearchArgs = buildSearchArgs (@replyArgsTable)}; bundle { //other mode search args local (otherModeArgsTable = argTable); if otherModeArgsTable.mode == "day" { otherModeArgsTable.mode = "topic"} else { otherModeArgsTable.mode = "day"}; otherModeSearchArgs = buildSearchArgs (@otherModeArgsTable)}}; local (htmltext); local (msgnum = adrMsgTable^.msgnum); local (template); if adrTemplate != nil { template = string (adrTemplate^)}; local (userIconUrl, userIconHeight = 16, userIconWidth = 16); local (internalLinkImgUrl, internalLinkImgWidth = 11, internalLinkImgHeight = 9, internalLinkUrl); bundle { // build image data for internal link arrows and message status icons Çlocal (myDottedId = tcp.myDottedId ()) Çlocal (myPort = user.inetd.config.http.port) Çlocal (portString = "") Çif myPort != 80 ÇportString = ":" + myPort Çlocal (resourcesUrl = "http://" + myDottedId + portString + "/mainResponderResources/") local (resourcesUrl = "/mainResponderResources/"); internalLinkImgUrl = resourcesUrl + "icons/leftArrow"; internalLinkUrl = pta^.responderAttributes.urls^.discussMsgReader; if not (internalLinkUrl endsWith '$') { internalLinkUrl = internalLinkUrl + "$"}; ÇinternalLinkUrl = internalLinkUrl + msgNum + "#" userIconUrl = resourcesUrl + "icons/user"; ÇmsgIconUrl = resourcesUrl + "icons/message" if userIcon == nil { userIcon = "<img src=\"" + userIconUrl + "\" height=\"" + userIconHeight + "\" width=\"" + userIconWidth + "\" border=\"0\" alt=\"user\">"}}; local (cowskullImg = mainResponder.discuss.cowSkullImage (pta), cowskullLink); bundle { // get the cowskull link html cowskullLink = "<a href=\"" + pta^.responderAttributes.urls^.discussMsgReader + msgNum + otherModeSearchArgs + "\">" + cowskullImg + "</a>"}; on add (s) { htmlText = htmlText + s}; on countResponses (adrMsgTable) { // count all the responses in a thread local (responseCount); local (i, ct = sizeOf (adrMsgTable^.responses)); responseCount = ct; for i = 1 to ct { local (adrResponse = @adrData^.messages.[string.padWithZeros (adrMsgTable^.responses[i], 7)]); if sizeOf (adrResponse^.responses) { responseCount = responseCount + countResponses (adrResponse)}}; return (responseCount)}; on getBody (adrMsgTable) { // get the body of the message, calling callbacks if necessary local (body, flCallbackReturnedBody = false); if adrGetBodyCallback != nil { body = adrGetBodyCallback^ (adrMsgTable); if body != "" { Çadd (body) flCallbackReturnedBody = true}}; if not flCallbackReturnedBody { bundle { //PBS 10/20/99: if an image is attached to this message, display it above the body if defined (adrMsgTable^.image) { if defined (pta^.responderAttributes.urls^.imageViewer) { //must be defined: it's the link to the imageViewer script ÇThe imageViewer script takes a msgNum as pathArgs and displays the picture attached to that dg message. body = body + mainResponder.discuss.buildImageTag (adrMsgTable^.msgNum); body = body + "<p />"}}}; if typeOf (adrMsgTable^.body) == outlineType { //outlines get passed through an outline renderer local (oldRenderOutlineWith = nil); if defined (pta^.renderOutlineWith) { oldRenderOutlineWith = pta^.renderOutlineWith}; if defined (pta^.renderDiscussOutlinesWith) { pta^.renderOutlineWith = pta^.renderDiscussOutlinesWith}; if defined (pta^.flReadMessageProcessMacros) and pta^.flReadMessageProcessMacros { try {body = body + html.processMacros (html.tenderRender (@adrMsgTable^.body), false, pta)}} else { if defined (pta^.flReadMessageExpandUrls) and not pta^.flReadMessageExpandUrls { try {body = body + html.tenderRender (@adrMsgTable^.body)}} else { //default, original behavior try {body = body + html.expandURLs (html.tenderRender (@adrMsgTable^.body))}}}; if oldRenderOutlineWith != nil { pta^.renderOutlineWith = oldRenderOutlineWith}} else { //it's not an outline local (s = string (adrMsgTable^.body)); s = string.replaceAll (s, "\n", ""); //2/15/99 DW, inside <pre>s these cause extra line-skips if not (defined (pta^.flReadMessageAutoParagraphs)) or pta^.flReadMessageAutoParagraphs { s = string.replaceAll (s, "\r\r", "\r\r<p />")}; if not (defined (pta^.flReadMessageProcessMacros)) or pta^.flReadMessageProcessMacros { s = html.processMacros (s, false, pta)}; body = body + s}}; return (body)}; on getEditButtons () { //add Edit button (or buttons) to the page local (s, editableInFrontier = false); Çs = s + "<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" bgcolor=\"white\"><tr>" Çif defined (pta^.adrMemberInfo^.isFrontierSixAlpha) //edit in Frontier button Çlocal (url = pta^.responderAttributes.urls^.discussEditInFrontier + msgNum) Ç ÇBuild the Edit in Frontier button. Çs = s + "<td valign=\"baseline\">" Çs = s + "<form method=\"POST\" action=\"" + url + "\">" Çs = s + "<input name=\"msgnum\" type=\"hidden\" value=\"" + msgNum + "\">" Çs = s + " <input type=\"submit\" value=\"" + mainResponder.getString ("discuss.editInFrontier") + "\">" Çs = s + "</form>" Çs = s + "</td>" Ç ÇeditableInFrontier = true bundle { //edit in web browser button if editPageURL == "" { editPageURL = pta^.responderAttributes.urls^.discussEditInBrowser}; Çs = s + "<td valign=\"baseline\">" s = s + "<form method=\"post\" action=\"" + editPageURL + msgNum + "\">"; s = s + "<input name=\"msgnum\" type=\"hidden\" value=\"" + msgNum + "\" />"; local (buttonValue = " " + mainResponder.getString ("discuss.editThisPage") + " "); if editableInFrontier { buttonValue = mainResponder.getString ("discuss.editInBrowser"); //change button name from Edit this Page to Edit in Browser s = s + " "}; s = s + " <input type=\"submit\" value=\"" + buttonValue + "\" />"; s = s + "</form>"; };Çs = s + "</td>" bundle { //PBS 01/13/00: Add the Edit in Pike button Çif defined (pta^.responderAttributes.urls^.editInPike) ÇPike support is a feature not of mainResponder but of Manila. However, this script, which displays the discussion group messages and the Edit this Page button, needs to be Pike-aware enough to display the Pike button. Çif manilaSuite.pike.memberHasPike (pta) Çlocal (editInPikeUrl = pta^.responderAttributes.urls^.editInPike) Çif not (editInPikeUrl endsWith "$") ÇeditInPikeUrl = editInPikeUrl + "$" ÇeditInPikeUrl = editInPikeUrl + msgNum Çlocal (adrSite = pta^.adrSiteRootTable) Çlocal (adrMember = pta^.adrMemberInfo) Ç Çs = s + "<td valign=\"baseline\">" Çs = s + " " + manilaSuite.pike.pikeButton (editInPikeUrl, adrMsgTable, adrMember, adrSite, true, mainResponder.getString ("discuss.editThisStoryInPikeOutline"), pta) //true because this is a message Çs = s + "</td>" s = s + " " + manilaSuite.pike.editMessageButton (adrMsgTable, pta:pta)}; //PBS 11/21/00: use new bottleneck for displaying edit message in Pike button Çs = s + "</tr></table>" return (s)}; on getTopicMsgTable () { local (nomad = adrMsgTable); while nomad^.inResponseTo > 0 { Çnomad = @adrData^.messages.[string.padWithZeros (nomad^.inResponseTo, 7)] nomad = mainResponder.discuss.getMessageTable (nomad^.inResponseTo, pta, adrData)}; return (nomad)}; on getNextMsgNum () { local (lastMsgNum = adrData^.prefs.nextMsgNum - 1); local (nomad, nextMsgNum = msgNum + 1); while nextMsgNum <= lastMsgNum { nomad = mainResponder.discuss.getMessageTable (nextMsgNum, pta, adrData); if not (mainResponder.discuss.isMessageDeleted (nextMsgNum, nomad, pta:pta)) { if adrInDgCallback == nil { return (nextMsgNum)} else { local (adrmsg = mainResponder.discuss.getMessageTable (nextMsgNum, pta)); if adrInDgCallback^ (adrmsg) { return (nextMsgNum)}}}; nextMsgNum++}; return (0)}; on getPrevMsgNum () { local (nomad, prevMsgNum = msgNum - 1); while prevMsgNum > 0 { nomad = mainResponder.discuss.getMessageTable (prevMsgNum, pta, adrData); if not (mainResponder.discuss.isMessageDeleted (prevMsgNum, nomad, pta:pta)) { if adrInDgCallback == nil { return (prevMsgNum)} else { local (adrmsg = mainResponder.discuss.getMessageTable (prevMsgNum, pta)); if adrInDgCallback^ (adrmsg) { return (prevMsgNum)}}}; prevMsgNum--}; return (prevMsgNum)}; on obscureEmail (s, link=false) { if s contains '@' { local (part1 = string.nthField (s, '@', 1)); local (part2 = string.nthField (s, '@', 2)); if link { return ("<a href=\"mailto:" + s + "\">" + part1 + "@" + part2[1] + "...</a>")} else { return (part1 + "@" + part2[1] + "...")}}; return (s)}; if mainResponder.discuss.isMessageDeleted (msgNum, adrMsgTable, pta) { return ("")}; bundle { //calculate enclosure and edit buttons display flags flShowEnclosures = flShowEnclosures and (defined (adrMsgTable^.enclosureAddress) and (adrMsgTable^.enclosureAddress != "")); flShowEditButtons = (flMember and (mainResponder.discuss.memberCanEdit (adrMsgTable, pta^.adrMemberInfo, pta)))}; if adrTemplate == nil { //render the message in default fashion bundle { //add member, internal link, read count and date if flCss { // the header row and cell add ("<tr class=\"" + cssPrefix + "HeaderRow\">"); add ("<td class=\"" + cssPrefix + "AuthorCell\">")} else { add ("<tr><td>")}; bundle { // the header table add ("<table bgcolor=\"" + othercolor + "\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>"); if flShowAuthor { add (mainResponder.members.linkToMember (membershipGroup, adrMsgTable^.member, hideEmail: true, useMap:flUseMappedMemberKeys))} else { add (" ")}; bundle { // add internal link add ("<a name=\"" + msgNum + "\"> </a>"); add ("<a href=\"" + internalLinkUrl + msgNum + "?y=" + y + "&m=" + m + "&d=" + d + "\" title=\"Permanent link to this message in archives.\">"); add ("<img src=\"" + internalLinkImgUrl + "\" height=\"" + internalLinkImgHeight + "\" width=\"" + internalLinkImgWidth + "\" border=\"0\" alt=\"blueArrow\"></a>")}; if flShowReadCount or flShowResponseCount { local (s = " ("); if flShowReadCount { s = s + adrMsgTable^.ctReads + " read"; if adrMsgTable^.ctReads != 1 { s = s + "s"}; if flShowResponseCount { s = s + ", "}}; if flShowResponseCount { local (responses = countResponses (adrMsgTable)); s = s + responses + " response"; if responses != 1 { s = s + "s"}}; s = s + ")"; add ("<font size=\"-1\">" + s + "</font>")}; add ("</td>"); if flCss { // the post time cell and font add ("<td class=\"" + cssPrefix + "DateCell\" align=\"right\"><font size=\"-1\">")} else { add ("<td align=\"right\" width=\"100%\"><font size=\"-1\">")}; if flShowPostTime { local (postTime = adrMsgTable^.postTime); if adrGetTimeCallback != nil { postTime = adrGetTimeCallback^ (postTime)}; add (mainResponder.localization.abbrevDateString (postTime, pta) + " " + mainResponder.localization.timeString (postTime, pta))} else { add (" ")}; add ("</font></td>"); add ("</table>")}; add ("</td></tr>"); };Çadd ("</font></td></tr>") bundle { //add the body of the message if flCss { // the row and cell containing the body of the message add ("<tr bgcolor=\"white\" class=\"" + cssPrefix + "BodyRow\">"); add ("<td class=\"" + cssPrefix + "BodyCell\">")} else { add ("<tr bgcolor=\"white\"><td>")}; bundle { // the body table add ("<table cellpadding=\"5\" cellspacing=\"0\" border=\"0\" width=\"100%\"><tr><td>"); add (getBody (adrMsgTable)); if flShowEditButtons { add (getEditButtons ())}; if flShowCowSkullLink { //add cowskull link to standard msgReader page ÇThe cowskull link is a link to the discussion group interface version of this page. add ("<p>" + cowskullLink + "</p>")}; add ("</td></tr></table>")}; add ("</td></tr>")}} else { //flow the message through the template, and add it local (s = template, lowerTemplate = string.lower (template)); bundle { // replace bgcolor, headerColor and headerTextColor s = string.replaceAll (s, "{bgcolor}", otherColor, false); s = string.replaceAll (s, "{headerColor}", headerColor, false); s = string.replaceAll (s, "{headerTextColor}", headerTextColor, false)}; bundle { // replace author local (memberLink = mainResponder.members.linkToMember (membershipGroup, adrMsgTable^.member, hideEmail: true, useMap:flUseMappedMemberKeys)); s = string.replaceAll (s, "{author}", memberLink, false)}; bundle { // replace authorIcon s = string.replaceAll (s, "{authorIcon}", userIcon, false)}; bundle { // replace subject s = string.replaceAll (s, "{subject}", adrMsgTable^.subject, false)}; bundle { // replace topic link -- this does a mode flip local (topicLink, topicMsgTable = getTopicMsgTable ()); topicLink = "<a href=\"" + msgReaderUrl + topicMsgTable^.msgNum + otherModeSearchArgs + "\""; if flCss { topicLink = topicLink + " class=\"" + cssPrefix + "TopicLink\""}; topicLink = topicLink + ">" + topicMsgTable^.subject + "</a>"; s = string.replaceAll (s, "{topicLink}", topicLink, false)}; bundle { // replace messageNumberLink -- this doea a mode flip local (msgNumLink = "<a href=\"" + msgReaderUrl + msgNum + otherModeSearchArgs + "\""); if flCss { msgNumLink = msgNumLink + " class=\"" + cssPrefix + "MessageNumberLink\""}; msgNumLink = msgNumLink + ">" + msgNum + "</a>"; s = string.replaceAll (s, "{messageNumberLink}", msgNumLink, false)}; bundle { // replace inResponseToLink local (inResponseToLink); if adrMsgTable^.inResponseTo > 0 { local (replacementTable); new (tableType, @replacementTable); replacementTable.msglink = "<a href=\"" + msgReaderUrl + adrMsgTable^.inResponseTo + thisModeSearchArgs + "\">" + adrMsgTable^.inResponseTo + "</a>"; inResponseToLink = mainResponder.getString ("discuss.inResponseTo", @replacementTable, pta: pta)} else { inResponseToLink = mainResponder.getString ("discuss.topMsgInThread", pta: pta)}; s = string.replaceAll (s, "{inResponseToLink}", inResponseToLink, false)}; bundle { // replace previousMessageLink local (prevMsgNum = getPrevMsgNum (), msgNumLink = ""); if prevMsgNum { msgNumLink = "<a href=\"" + msgReaderUrl + prevMsgNum + thisModeSearchArgs + "\""; if flCss { msgNumLink = msgNumLink + " class=\"" + cssPrefix + "PreviousMessageLink\""}; msgNumLink = msgNumLink + ">" + prevMsgNum + "</a>"}; s = string.replaceAll (s, "{previousMessageLink}", msgNumLink, false)}; bundle { // replace nextMessageLink local (nextMsgNum = getNextMsgNum (), msgNumLink = ""); if nextMsgNum { msgNumLink = "<a href=\"" + msgReaderUrl + nextMsgNum + thisModeSearchArgs + "\""; if flCss { msgNumLink = msgNumLink + " class=\"" + cssPrefix + "NextMessageLink\""}; msgNumLink = msgNumLink + ">" + nextMsgNum + "</a>"}; s = string.replaceAll (s, "{nextMessageLink}", msgNumLink, false)}; bundle { // replace postTime local (d = adrMsgTable^.postTime); if adrGetTimeCallback != nil { d = adrGetTimeCallback^ (d)}; d = mainResponder.localization.dateTimeString (d, pta); s = string.replaceAll (s, "{postTime}", d, false)}; bundle { // replace readCount s = string.replaceAll (s, "{readCount}", adrMsgTable^.ctReads, false)}; bundle { // replace response count if lowerTemplate contains "{responsecount}" { // this may be time-consuming if there are lots of responses s = string.replaceAll (s, "{responseCount}", countResponses (adrMsgTable), false)}}; bundle { // replace editLink if flShowEditButtons { s = string.replaceAll (s, "{editLink}", getEditButtons (), false)} else { // replace with the empty string s = string.replaceAll (s, "{editLink}", "", false)}}; bundle { // replace discussLink -- this is the cowskull, and it's a mode flip if flShowCowSkullLink { s = string.replaceAll (s, "{discussLink}", cowskullLink, false)} else { // replace with the empty string s = string.replaceAll (s, "{discussLink}", "", false)}}; bundle { // replace internal link local (internalLink); internalLink = internalLink + "<a name=\"" + msgNum + "\"> </a>"; internalLink = internalLink + "<a href=\"" + internalLinkUrl + msgNum + "?y=" + y + "&m=" + m + "&d=" + d + "\" title=\"Permanent link to this message in archives.\">"; internalLink = internalLink + "<img src=\"" + internalLinkImgUrl + "\" height=\"" + internalLinkImgHeight + "\" width=\"" + internalLinkImgWidth + "\" border=\"0\" alt=\"blueArrow\"></a>"; s = string.replaceAll (s, "{internalLink}", internalLink, false)}; bundle { // replace responseList if lowerTemplate contains "{responselist}" { // short circuit if the template doesn't include a responseList macro because it may be time-consuming local (responseList = ""); if flShowResponses { bundle { // set default templates, headers, etc. ÇIt's not ideal, but we check to see if the value of mini-templates equals nil, and also that the type == typeOf (nil). That way we can tell the difference between the empty string and not having passed in a value. This is because the empty string equals nil, but its type is stringType, not typeOf (nil) if responseListHeader == nil and typeOf (responseListHeader) == typeOf (nil) { responseListHeader = "<p><hr /><b>" + mainResponder.getString ("discuss.thereAreResponsesToThisMsg") + "</b></p>"}; if responseSubThreadStartTemplate == nil and typeOf (responseSubThreadStartTemplate) == typeOf (nil) { responseSubThreadStartTemplate = "<ul>"}; if responseSubThreadEndTemplate == nil and typeOf (responseSubThreadEndTemplate) == typeOf (nil) { responseSubThreadEndTemplate = "</ul>"}; if responseItemTemplate == nil and typeOf (responseItemTemplate) == typeOf (nil) { responseItemTemplate = "<li><p><a href=\"{responseUrl}\">{responseSubject}</a>, {responseAuthor}, {responsePostTime}</p></li>"}; if responseFullItemTemplate == nil and typeOf (responseFullItemTemplate) == typeOf (nil) { responseFullItemTemplate = responseItemTemplate}}; local (stack = {}); // keep track of which messages have been added to aviod infinite recursion on addResponses (adrItem, level = 0) { local (adrTable, msgNum, responseMember, i, ct = sizeOf (adrItem^.responses), itemHtml); local (flFullMessage = level <= (depthToExpandResponses - 1) ); //level is zero-based but the pref is 1-based if not flFullMessage { //add threadSubStartTemplate responseList = responseList + responseSubThreadStartTemplate}; on addResponse () { msgNum = adrItem^.responses [i]; if stack contains msgNum { //avoid infinite recursion continue; }; adrTable = mainResponder.discuss.getMessageTable (msgNum, pta, adrData); if not defined (adrTable^) { continue}; local (flAddMessage = not mainResponder.discuss.isMessageDeleted (msgNum, adrTable, pta) ); Çif flAddMessage Çif adrInDgCallback != nil ÇflAddMessage = adrInDgCallback^ (adrTable) if flAddMessage { responseMember = mainResponder.members.getMemberName (membershipGroup, adrTable^.member); if flFullMessage { itemHtml = responseFullItemTemplate; if string.lower (responseFullItemTemplate) contains "{responsetext}" { //bump read count adrTable^.ctReads++; config.mainResponder.stats.ctDiscussionGroupReads++}; itemHtml = string.replaceAll (itemHtml, "{responseText}", adrTable^.body, false)} else { itemHtml = responseItemTemplate; itemHtml = string.replaceAll (itemHtml, "{responseText}", "", false)}; itemHtml = string.replaceAll (itemHtml, "{replyUrl}", msgReaderUrl + msgNum + replyToThisSearchArgs, false); itemHtml = string.replaceAll (itemHtml, "{responseUrl}", msgReaderUrl + msgNum + thisModeSearchArgs, false); itemHtml = string.replaceAll (itemHtml, "{responseSubject}", adrTable^.subject, false); itemHtml = string.replaceAll (itemHtml, "{responseAuthor}", obscureEmail (responseMember), false); itemHtml = string.replaceAll (itemHtml, "{responsePostTime}", mainResponder.localization.dateTimeString (adrTable^.postTime, pta: pta), false); itemHtml = string.replaceAll (itemHtml, "{responseMessageNumber}", adrTable^.msgNum, false); if responseIndentTemplate != "" { // work around kernel bug on windows: string.filledString ("", n) == crash. responseList = responseList + string.filledString (responseIndentTemplate, level)}; responseList = responseList + itemHtml; if sizeof (adrTable^.responses) > 0 { stack = stack + {adrTable^.msgNum}; addResponses (adrTable, level + 1); delete (@stack [sizeof (stack)])}}}; if flResponsesInChronologicalOrder { for i = 1 to ct { addResponse ()}} else { for i = ct downTo 1 { addResponse ()}}; if not flFullMessage { //add subThreadEntTemplate responseList = responseList + responseSubThreadEndTemplate}; }; if sizeOf (adrMsgTable^.responses) { responseList = responseListHeader; addResponses (adrMsgTable); //it's recursive responseList = responseList + responseListFooter}}; s = string.replaceAll (s, "{responseList}", responseList, false)}}; bundle { // replace messageText s = string.replaceAll (s, "{messageText}", getBody (adrMsgTable), false)}; bundle { // replace responseForm local (responseForm = "", responseFormHeader = "<p /><hr />", responseFormFooter = ""); if flMember and flShowResponseForm { local (subject = adrMsgTable^.subject); if not (string.lower (subject) beginswith string.lower (string.trimWhiteSpace (mainResponder.getString ("discuss.rePrefix")))) { subject = mainResponder.getString ("discuss.rePrefix") + subject}; local (subjectprompt, buttontext, bodyprompt); subjectprompt = mainResponder.getString ("discuss.responseSubjectPrompt"); buttontext = mainResponder.getString ("discuss.postResponseButtonText"); bodyprompt = mainResponder.getString ("discuss.responseBodyPrompt"); responseForm = responseFormHeader + mainResponder.discuss.newMessageForm (msgNum, subject, subjectprompt, buttontext, bodyprompt: bodyprompt, pta:pta) + responseFormFooter}; s = string.replaceAll (s, "{responseForm}", responseForm, false)}; bundle { // 11/03/00 JES: replace enclosureLink if flShowEnclosures { local (viewingUrl = pta^.responderAttributes.urls^.discussEnclosureViewer + msgNum); local (listingLink = "<a href=\"" + viewingUrl + "\">" + mainResponder.getString ("discuss.viewEnclosure") + "</a>"); local (fatPageLink = "<a href=\"" + pta^.responderAttributes.urls^.discussEnclosureDownloader + msgNum + "\">" + mainResponder.getString ("discuss.fatPageEnclosure") + "</a>"); local (rpcLink = "<a href=\"" + pta^.responderAttributes.urls^.discussEnclosureRPCer + msgNum + "\">" + mainResponder.getString ("discuss.RPCenclosure") + "</a>"); s = string.replaceAll (s, "{enclosureLink}", listingLink + ", " + fatPageLink + ", " + rpcLink, false)} else { s = string.replaceAll (s, "{enclosureLink}", "", false)}}; bundle { //replace ipAddress local (ipAddress = ""); if defined (adrMsgTable^.ipAddress) { ipAddress = adrMsgTable^.ipAddress}; s = string.replaceAll (s, "{ipAddress}", ipAddress, false)}; add (s)}; bundle { //set member info ÇFor every member, store the highest message read for the current discussion group. ÇFirst make sure the discussionGroupInfo table exists for this member, then make sure there's a table for this dg, then set highestMessageRead for this dg for this member. if flMember { //is this a member? local (adrMember = pta^.adrMemberInfo); if not defined (adrMember^.discussionGroupInfo) { new (tabletype, @adrmember^.discussionGroupInfo)}; local (rootName = nameOf (adrData^)); local (adrTable = @adrMember^.discussionGroupInfo.[rootName]); if not defined (adrTable^) { new (tableType, adrTable)}; if not defined (adrTable^.highestMessageRead) { adrTable^.highestMessageRead = 0}; if msgNum > adrTable^.highestMessageRead { adrTable^.highestMessageRead = msgNum}}}; return (htmltext)} \ No newline at end of file Index: cowSkullImage =================================================================== RCS file: /cvsroot/frontierkernel/odbs/mainResponderRoot/mainResponder/discuss/cowSkullImage,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** cowSkullImage 26 Mar 2005 21:45:33 -0000 1.1.1.1 --- cowSkullImage 26 Nov 2005 19:37:51 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:mainResponder.discuss.cowSkullImage ! on cowSkullImage (pta=nil) { ÇDisplay a cow skull image. ÇCow skulls signify a link to the discussion group interface version of a page. ÇChanges: Ç12/8/98; 6:52:33 AM by DW ÇThis code was appearing all over the place. ÇThu, 04 Mar 1999 03:07:08 GMT by AR Çconfig.mainResponder.urls is no longer referenced -- look at the page table instead. ÇMon, Aug 2, 1999 at 3:40:25 PM by PBS ÇNew optional pta parameter. Ç12/17/99; 11:36:58 AM by PBS ÇYou can over-ride the default cow skull image with a cowSkullImage item in the page table. Among other things, this allows Manila sites to replace the cow skull image with their own image or text. if pta == nil { pta = html.getPageTableAddress ()}; if defined (pta^.cowSkullImage) { //PBS 12/17/99: one may over-ride the default cow skull image return (string (pta^.cowSkullImage))}; return ("<img src=\"" + pta^.responderAttributes.urls^.imageCowSkull + "\" height=\"18\" width=\"22\" border=\"0\" alt=\"\">")} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:mainResponder.discuss.cowSkullImage ! on cowSkullImage (pta=nil) { ÇChanges Ç11/20/05; 11:13:53 A... [truncated message content] |
|
From: creedon <icr...@us...> - 2005-11-26 19:23:44
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/editor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7467 Modified Files: get Log Message: removed wrap attribute from textarea tag, depreciated Index: get =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/html/editor/get,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** get 26 Mar 2005 19:43:11 -0000 1.1.1.1 --- get 26 Nov 2005 19:23:35 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.html.editor.get ! on get (msgText="", fieldName="body", rows=9, pta=nil, toolabrImgUrl="/mainresponderResources/toolbars/htmlEditor", cols=70, baseUrl="/mainresponderResources/toolbars/mozillaEditor/", formName="editPostForm", adrLanguageTable=nil) { ÇAdd the HTML Editor buttons and scripts. Ç02/14/00; 9:13:54 AM by PBS ÇChanges: Ç8/5/03; 5:02:19 PM by JES ÇNew optional parameter, baseUrl, used for supporting the Mozilla rich text editor. ÇNew optional parameter, formName, used for supporting the Mozilla rich text editor. Ç1/26/02; 2:40:38 AM by JES ÇAdded optional parameter, cols -- default is 70. Specifies the width of the editing box. Ç12/05/01; 11:11:47 AM by JES ÇRespect the rows parameter when returning the WYSIWYG editor. Ç08/31/01; 6:44:23 PM by JES ÇFactored code that finds the editor name to html.editor.getEditingTool. ÇReturn a <textarea>-based editor if the given editor is not defined. Ç08/31/01; 2:17:42 AM by JES ÇNew optional parameter: toolabrImgUrl, specifies the URL of an image to use for the WYSIWYG toolbar. Ç01/04/01; 12:43:36 AM by JES ÇAdapted from mainResponder.discuss.getHtmlEditor Ç10/03/00; 10:14:26 PM by JES ÇNo longer necessary to put JavaScript in head portion of page. Ç10/03/00; 2:08:12 PM by PBS ÇSupport choice of editors -- WYSIWYG, HTML Tags, None. Ç10/02/00; 6:03:52 PM by JES ÇReturn the WYSIWYG HTML editor instead of the older DHTML editor. Use the editor with MSIE4 as well as MSIE5 Ç4/10/00; 6:26:41 PM by JES ÇLocalized -- gets the editor itself using mainResponder.getString if pta == nil { pta = html.getPageTableAddress ()}; Çworkspace.pt = pta^; edit (@workspace.pt) //debugging local (editTool = html.editor.getEditingTool (pta)); local (adrEditor = @html.editor.[editTool]); //default to the built-in English if adrLanguageTable != nil { if defined (adrLanguageTable^.data.[editTool]) { adrEditor = @adrLanguageTable^.data.[editTool]}}; if not defined (adrEditor^) { //return a <textarea> return ("<textarea name=\"" + fieldName + "\" rows=\"" + rows + "\" cols=\"" + cols + "\" wrap=\"soft\">" + msgText + "</textarea>")}; pta^.adrEditingTool = adrEditor; if string.lower (nameOf (adrEditor^)) endswith "mozilla" { msgText = string.replaceAll (msgText, "\r\n", "\r"); if msgText contains "\r\r" { msgText = string.replaceAll (msgText, "\r\r", "<br><br>")}}; local (s = string (adrEditor^)); s = string.replace (s, "[[messageText]]", msgText); s = string.replaceAll (s, "[[fieldName]]", fieldName); s = string.replace (s, "[[rows]]", rows); s = string.replace (s, "[[cols]]", cols); s = string.replace (s, "[[heightPixels]]", ((rows * 17) + 50)); s = string.replace (s, "[[toolbarImgUrl]]", toolabrImgUrl); s = string.replaceAll (s, "[[baseUrl]]", baseUrl, false); s = string.replaceAll (s, "[[formName]]", formName, false); return (s)}; Çbundle //testing Çop.newOutlineObject (html.editor.get ("Initial HTML text...", "itemtext", 9, @workspace.pt, radio.images.systemImageUrl ("toolbars/htmlEditor")), @workspace.htmlEditor) Çedit (@workspace.htmlEditor) \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.html.editor.get ! on get (msgText="", fieldName="body", rows=9, pta=nil, toolabrImgUrl="/mainresponderResources/toolbars/htmlEditor", cols=70, baseUrl="/mainresponderResources/toolbars/mozillaEditor/", formName="editPostForm", adrLanguageTable=nil) { ÇChanges Ç11/24/05; 6:33:45 PM by TAC Çremoved wrap attribute from textarea tag, depreciated Ç8/5/03; 5:02:19 PM by JES ÇNew optional parameter, baseUrl, used for supporting the Mozilla rich text editor. ÇNew optional parameter, formName, used for supporting the Mozilla rich text editor. Ç1/26/02; 2:40:38 AM by JES ÇAdded optional parameter, cols -- default is 70. Specifies the width of the editing box. Ç2001 Ç12/05/01; 11:11:47 AM by JES ÇRespect the rows parameter when returning the WYSIWYG editor. Ç08/31/01; 6:44:23 PM by JES ÇFactored code that finds the editor name to html.editor.getEditingTool. ÇReturn a <textarea>-based editor if the given editor is not defined. Ç08/31/01; 2:17:42 AM by JES ÇNew optional parameter: toolabrImgUrl, specifies the URL of an image to use for the WYSIWYG toolbar. Ç01/04/01; 12:43:36 AM by JES ÇAdapted from mainResponder.discuss.getHtmlEditor Ç2000 Ç10/03/00; 10:14:26 PM by JES ÇNo longer necessary to put JavaScript in head portion of page. Ç10/03/00; 2:08:12 PM by PBS ÇSupport choice of editors -- WYSIWYG, HTML Tags, None. Ç10/02/00; 6:03:52 PM by JES ÇReturn the WYSIWYG HTML editor instead of the older DHTML editor. Use the editor with MSIE4 as well as MSIE5 Ç4/10/00; 6:26:41 PM by JES ÇLocalized -- gets the editor itself using mainResponder.getString Ç02/14/00; 9:13:54 AM by PBS ÇAdd the HTML Editor buttons and scripts. if pta == nil { pta = html.getPageTableAddress ()}; Çworkspace.pt = pta^; edit (@workspace.pt) //debugging local (editTool = html.editor.getEditingTool (pta)); local (adrEditor = @html.editor.[editTool]); //default to the built-in English if adrLanguageTable != nil { if defined (adrLanguageTable^.data.[editTool]) { adrEditor = @adrLanguageTable^.data.[editTool]}}; if not defined (adrEditor^) { //return a <textarea> return ("<textarea name=\"" + fieldName + "\" rows=\"" + rows + "\" cols=\"" + cols + "\">" + msgText + "</textarea>")}; pta^.adrEditingTool = adrEditor; if string.lower (nameOf (adrEditor^)) endswith "mozilla" { msgText = string.replaceAll (msgText, "\r\n", "\r"); if msgText contains "\r\r" { msgText = string.replaceAll (msgText, "\r\r", "<br><br>")}}; local (s = string (adrEditor^)); s = string.replace (s, "[[messageText]]", msgText); s = string.replaceAll (s, "[[fieldName]]", fieldName); s = string.replace (s, "[[rows]]", rows); s = string.replace (s, "[[cols]]", cols); s = string.replace (s, "[[heightPixels]]", ((rows * 17) + 50)); s = string.replace (s, "[[toolbarImgUrl]]", toolabrImgUrl); s = string.replaceAll (s, "[[baseUrl]]", baseUrl, false); s = string.replaceAll (s, "[[formName]]", formName, false); return (s)}; Çbundle //testing Çop.newOutlineObject (html.editor.get ("Initial HTML text...", "itemtext", 9, @workspace.pt, radio.images.systemImageUrl ("toolbars/htmlEditor")), @workspace.htmlEditor) Çedit (@workspace.htmlEditor) \ No newline at end of file |
|
From: creedon <icr...@us...> - 2005-11-25 22:45:57
|
Update of /cvsroot/frontierkernel/odbs/prefsRoot/prefsSuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30926 Modified Files: browser Log Message: change method post check to use flPost, lowercase form method post changed checked to checked=\"checked\" for XHTML compatibility close p and input tags added support for optional wizard outline formname attribute, if defined the HTML form generated will use this attribute for the name, if not defined then use panelTitle Index: browser =================================================================== RCS file: /cvsroot/frontierkernel/odbs/prefsRoot/prefsSuite/browser,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** browser 28 Jul 2005 06:59:33 -0000 1.2 --- browser 25 Nov 2005 22:45:49 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:scpt:prefsSuite.browser ! on browser (flSignupForm=false, flIncludeTitle=true, adrSignupCallback=nil, inputPanel=nil, action=nil, adrError=nil, flHandleRequiredFields=true, pta=nil, flRequiresRedo=false, flSetTitle=true, separatorColor=nil, separatorTextColor=nil) { ÇChanges Ç2005 Ç7/27/05; 7:03:00 PM by TAC Çreworked 4/18/04; 7:58:37 PM code for upload a picture or any kind of file ÇPNG support Çstore height and width of pictures we recognize Ç2004 Ç4/18/04; 7:58:37 PM by TAC Çupload any kind of file, need to add interface to link to file Ç2003 Ç7/14/03; 5:24:12 PM by JES ÇAdded support for includeItem callback. Called with the value of the adr attribute of a prefs item, if the callback returns false, the item is skipped. Ç7/10/03; 11:26:22 PM by TAC Çdisplay picture, code looks for displayPicture attribute; if false don't display; default is true, contructs url that points into pta^.responderAttributes.urls^.prefsHome + "picture"; expects script to be there to deal with picture request Ç2002 Ç1/25/02; 6:11:51 PM by PBS ÇPerformance enhancements in the local "add" routine -- add a trailing semicolon; use parentheses to get the expression in x = x + y form (which is optimized by the kernel). Ç1/21/02; 9:00:32 PM by PBS ÇBug fix -- if a title is empty, the item is supposed to span both columns. This feature had been broken. Ç2000 Ç11/25/00; 8:23:57 PM by PBS ÇIf the title of an item is "", don't add a colon. This way we don't get colons before edit-in-Pike buttons. Ç03/31/00; 5:08:00 PM by PBS ÇWhen a sign-up form includes a picture, sometimes the browser would send empty data which got interpreted as a Frontier table. Then when building the form an implicit attempt was made to coerce the table to a string, which failed. Ç1999 Ç11/16/1999; 10:09:08 AM by AR ÇPurged all instances of xml.getAddressList in favor of our own looping code so that this script will work with arbitrarily deeply nested table structures. Ç10/30/99; 12:10:59 PM by PBS ÇImplemented workaround for 302 FOUND browser bug when redirecting to the same page you just posted to. Now the redirect happens to a different URL. If you were on a $panelName URL, you're redirected to a $panelNum URL, and vice versa. Ç10/30/99; 12:02:48 AM by PBS ÇManila sites need to be able to specify the color of separators and the text inside. If colors are not specified, the default is black for the separator and pta^.bgcolor for the text inside. Ç9/22/99; 8:39:27 PM by DW ÇWe used to always generate a form with an enctype="multipart/form-data" in its header. Now we only do so if the form contains a picture, or if there is a panel attribute named multiPart with a value of true. So in most circumstances we will not have a multipart form, in the past we would *always* have a multipart form. Ç9/16/99; 9:47:26 AM by DW ÇAdded link attribute on items, if present, the whole item links to the URL provided in the attribute. Search for "linkattribute" for implementation. Ç9/13/99; 12:37:43 PM by PBS ÇSign-ups and changed passwords weren't getting propagated. Now they are. Ç9/8/99; 12:40:57 AM by PBS ÇIf this is a sign up form, check that the two passwords match before creating the membership record. There was a bug -- the passwords might not match, but a membership record that didn't include a password would be created. Then the person signing up has no password -- but they can't sign up again because they're now a member. Ç8/19/99; 2:23:47 PM by PBS ÇNew optional parameter flSetTitle. If false, prefsSuite.browser does not set pta^.title, so the calling page can use a different title than the title of the panel. This was needed for the store -- which uses one panel for all order forms, but the titles are different depending on whether you're at the standard page or the Academic page. ÇDefault is standard behavior -- prefsSuite.browser sets pta^.title automatically. Ç8/18/99; 7:59:48 PM by PBS ÇIf you place a | character in a title, it will be replaced by a <br> tag so the title will wrap to the next line. Ç8/17/99; 11:24:53 AM by PBS ÇThe sendRpcMessages routine was moved to the top level of prefsSuite. The routine in this script now calls prefsSuite.sendRpcMessages. ÇThis was done so prefs broadcasting could happen outside of the context of this script or the page rendering process, so other scripts could broadcast prefs at will. Ç8/15/99; 3:59:30 PM by PBS ÇflRequiresRedo is no an optional parameter: if true, then the values will be taked from the post args. Ç8/14/99; 9:12:40 PM by PBS ÇMake sure content-type is defined before checking its value. This was causing errors with some browser on the main prefs page. Ç8/13/99; 3:53:13 PM by PBS ÇNew optional parameter pta. (Useful when debugging, also a small optimization.) Ç8/10/99; 10:24:06 PM by PBS ÇIf the person signing up uses an email address of an existing member, the error is reported in red text, and the user has a chance to re-fill out the form or go to the sign up page. ÇCheck that config.prefsServer.prefsDistributorFolder exists, so machines that aren't prefs distributors can run this script without generating errors. Ç8/10/99; 6:27:53 PM by PBS ÇNew parameter, flHandleRequiredFields, allows one to disable the automatic handling of required fields. Ç7/28/99; 9:05:00 by RAB Çadded action parameter Çadded adrError parameter Ç7/27/99; 17:35:00 by RAB ÇIf you specify a null title, then the field spans 2 columns. ÇAdded new pref alignNonRequired which keeps the titles better aligned Ç7/12/99; 2:59:44 by PBS ÇSupport for default values. An item can have a default attribute. If the item is not already in the user's member record, or it's a sign up form, then the item will get this default value. ÇAs in: <item title="Formatted in HTML?" type="boolean" adr="bulletins.inHtml" default="true"> Ç7/8/99; 10:03:09 AM by DW ÇImplement the XML-RPC-based prefs distribution system. Ç7/6/99; 8:41:39 AM by DW ÇAllow the pathargs to be a non-numeric string, it can contain the name of the panel, we'll transition to this form of pointing because it allows us to move things around. Ç6/27/99; 7:05:00 PM by RAB ÇSupport for static fields. ÇSupport for hidden fields. ÇSupport for checkbox fields. ÇOptional parameter for inputPanel number (rather then pathArgs) Ç6/12/99; 3:35:03 PM by PBS ÇSupport for required fields. ÇIf an item in the XML outline has a required="true" attribute, then it's a required field. ÇThe system will prompt you to enter any required fields you didn't enter. Ç6/5/99; 1:51:25 AM by PBS ÇadrSignupCallback is the address of a callback to be used when handling the POST request from a signup form. ÇThe callback is called after the POST args are processed, but before the form is built. ÇIf the callback returns anything but "", then the results of the callback are displayed in the page rather than the form. ÇThe callback thus has the chance to send email, for instance, when adding a member. And it has the chance to build a welcome page. Ç6/4/99; 4:15:27 PM by PBS ÇIf it's a signup form, and the member already exists, it's an error. ÇText in separators is now bold. Ç6/3/99; 12:37:55 PM by DW ÇAdded optional boolean parameter, flSignupForm, defaults false. If true, we don't require that pta^.adrmemberinfo be defined. ÇAdded optional boolean parameter, flIncludeTitle, defaults true. If false, we don't include the title, assume the page already has a title. Ç6/4/99; 10:38:22 AM by DW ÇAdd separator <item>s, that allow the author to separate items into groups. ÇAllow <item>s to be required, if the value has not been set, reject the submission. if pta == nil { pta = html.getPageTableAddress ()}; local (adrWizard = pta^.wizard); local (adrCallbacks = @adrwizard^.callbacks, flCallbacks = defined (adrCallbacks^)); local (pathArgs = pta^.pathArgs); local (pageName = nameOf (pta^.adrobject^)); Çlocal (flRequiresRedo = false) //it becomes true if required fields were missing local (emptyList = {}); local (flOneRequired = false); if adrError != nil { adrError^ = false}; local (rpcParamTable); new (tabletype, @rpcParamTable); on addPrefToRpcParamTable (partialaddress, adrval) { //7/8/99; 10:03:09 AM by DW if typeof (adrval^) == tabletype { local (i, adrItem); for i = 1 to sizeof (adrval^) { adrItem = @adrval^ [i]; if typeof (adrItem^) == binarytype { adrItem^ = base64.encode (adrItem^, infinity)}}}; rpcParamTable.[partialaddress] = adrval^}; on sendRpcMessages () { if defined (pta^.adrMemberInfo) { //PBS 9/2/99: this person may not be a member prefsSuite.sendRpcMessages (@rpcParamTable, pta^.adrMemberInfo)}; //PBS 8/17/99: routine moved to top level of prefsSuite Çlocal (xmltext) Çbundle //build the XML representation Çon add (s) Çxmltext = xmltext + s + "\r" Çadd ("<?xml version=\"1.0\"?>") Çadd ("<prefsUpdate>") Çadd ("<group>" + "default" + "</group>") Çadd ("<memberKey>" + nameof (pta^.adrmemberinfo^) + "</memberKey>") Çadd ("<value>" + xml.coercions.frontierValueToTaggedText (@rpcParamTable, 0) + "</value>") Çadd ("</prefsUpdate>") Çbundle //write the file Çif defined (config.prefsServer.prefsDistributorFolder) //PBS 8/10/99: make sure this machine is a prefs distributor Çlocal (folder = config.prefsServer.prefsDistributorFolder) Çloop //get a unique name, write the file Çlocal (f = folder + clock.ticks () + ".xml") Çfile.surefilepath (f) Çif not file.exists (f) Çfile.writewholefile (f, xmltext) Çbreak ÇprefsSuite.init () Çlocal (i, ct = sizeof (config.prefsServer.subscribers), adrsubscriber) Çlocal (params = {"default", nameof (pta^.adrmemberinfo^), rpcParamTable}) Çfor i = 1 to ct Çadrsubscriber = @config.prefsServer.subscribers [i] Çbetty.rpc.client (nameof (adrsubscriber^), adrsubscriber^.port, adrsubscriber^.procedureName, @params, rpcpath:adrsubscriber^.rpcPath, flAsynch:true) Ç<panel title="Register"> Ç<description>This is an experimental feature. If you have a server that can do something interesting with preferences, and if your server can receive XML-RPC messages, you can hook into the preference system at UserLand.Com. We need three pieces of information: a domain name for your server (an IP address will also work), the port that server is running on, and the name of the XML-RPC procedure you want us to call. This routine will be called every time every user updates, so please don't register unless you're serious.</description> Ç<item title="Domain" type="string" adr="prefsRpcHandler.domain"/> Ç<item title="Port" type="string" adr="prefsRpcHandler.port"/> Ç<item title="Procedure name" type="string" adr="prefsRpcHandler.procedureName"/> Ç</panel> return (true)}; local (htmlText = "", indentLevel = 0); on add (s) { htmlText = htmlText + (string.filledString ("\t", indentLevel) + s + "\r");}; prefsSuite.compileIfDirty (); //compile the XML if needed local (panelNum, adrPanel); bundle { //get the number of the panel, the address of its descriptor in the XML structure, set flPrivate page attribute if inputPanel != nil { //caller supplied the panel num panelNum = number (inputPanel); local (i, ctpanels = 0, adrItem, adrtable = @adrWizard^.structure [1]); for i = 1 to sizeOf (adrtable^) { adrItem = @adrtable^[i]; if xml.convertToDisplayName (nameOf (adrItem^)) == "panel" { ++ctpanels; if ctpanels == panelNum { //found it! adrPanel = adrItem; break}}}; if ctpanels < panelNum { scripterror ("Can't display the panel because the wizard doesn't have a panel #" + panelNum + ".")}} else { panelNum = prefsSuite.pathArgsToPanelNum (pathargs, @adrpanel)}; local (flPrivate = false); try { flPrivate = boolean (xml.getAttribute (adrPanel, "private")^)}; pta^.flPrivate = flPrivate}; local (panelTitle, description); bundle { //get the title and description panelTitle = xml.getAttribute (adrPanel, "title")^; if flSetTitle { //PBS 8/19/99: if flSetTitle is false, then the calling page is responsible for setting pta^.title pta^.title = panelTitle}; description = xml.getValue (adrPanel, "description"); description = string.replaceAll (description, "\t", ""); description = string.replaceAll (description, "\r", "<p>")}; on getPrefAddress (partialAddress) { //takes a partial address, returns an address into user's member table local (nomad = pta^.adrMemberInfo, s); loop { if not (partialAddress contains ".") { nomad = @nomad^.[partialAddress]; break}; s = string.nthField (partialAddress, '.', 1); nomad = @nomad^.[s]; if not defined (nomad^) { new (tableType, nomad)}; partialAddress = string.delete (partialAddress, 1, sizeOf (s) + 1)}; return (nomad)}; if pta^.method == "POST" { //PBS 6/12/99: check that required fields are non-empty if flHandleRequiredFields { //PBS 8/10/99: required fields handling can be turned off local (i, adrOneItem, emptyFieldNames = {}); for i = 1 to sizeOf (adrPanel^) { //check whether there are required fields that have not been filled out adrOneItem = @adrPanel^ [i]; if xml.convertToDisplayName (nameOf (adrOneItem^)) == "item" { local (flRequired = false); try { flRequired = boolean (xml.getAttributeValue (adrOneItem, "required"))}; if flRequired { //make sure it exists and is non-empty local (adr = xml.getAttributeValue (adrOneItem, "adr"), flEmpty = false); if not defined (pta^.postArgs.[adr]) { flEmpty = true} else { if sizeOf (pta^.postArgs.[adr]) == 0 { flEmpty = true}}; if flEmpty { emptyFieldNames = emptyFieldNames + xml.getAttributeValue (adrOneItem, "title")}}}}; if emptyFieldNames != {} { //if the emptyFieldNames list contains items, then display errors local (errorMessage = "Please enter the required field"); local (i, ctEmpties); bundle { //build the top error message ctEmpties = sizeOf (emptyFieldNames); if sizeOf (emptyFieldNames) > 1 { errorMessage = errorMessage + "s"}; errorMessage = errorMessage + " "; for i = 1 to sizeOf (emptyFieldNames) { errorMessage = errorMessage + "<b>" + emptyFieldNames [i] + "</b>"; if i < ctEmpties { if ctEmpties > 2 { errorMessage = errorMessage + ", "} else { errorMessage = errorMessage + " "}; if ctEmpties == 2 or i == ctEmpties - 1 { errorMessage = errorMessage + "and "}}}; if ctEmpties < 2 { errorMessage = errorMessage + "."} //" is required." else { errorMessage = errorMessage + "."}; //" are required." add ("<font color=\"red\">" + errorMessage + "</font>")}; flRequiresRedo = true; if adrError != nil { //PBS 8/9/99 -- adrError is optional: make sure it's not nil before trying to deference it. adrError^ = true}}}}; if pta^.method == "POST" and not flRequiresRedo { //process the POSTed data scratchpad.postargs = pta^.postargs; edit (@scratchpad.postargs); ÇCreate a new membership table if needed. if not defined (pta^.adrMemberInfo) and flSignupForm { if defined (pta^.postArgs.["personalInfo.email"]) { local (memberKey = pta^.postArgs.["personalInfo.email"]); try { //validate the email address mainResponder.members.validMailAddress (memberKey)} else { scriptError ("Can't create a membership record because the email address is invalid.")}; local (adrMember = mainResponder.members.getMemberTable (pta^.defaultMembershipGroup, memberKey)); if not defined (adrMember^) { ÇFirst check the password. PBS 9/7/99 if defined (pta^.postArgs.["scratchpassword1"]) { if defined (pta^.postArgs.["scratchpassword2"]) { if pta^.postArgs.["scratchpassword1"] != pta^.postArgs.["scratchpassword2"] { add ("<p><font color=\"red\">Can't sign you up because the two passwords you entered do not match.</font>"); flRequiresRedo = true}}}; if not flRequiresRedo { new (tableType, adrMember); pta^.adrMemberInfo = adrMember; pta^.memberGroupName = pta^.defaultMembershipGroup}} else { //PBS 6/4/99: member already exists, it's an error flRequiresRedo = true; add ("<font color=\"red\">Can't sign up \"" + memberKey + "\" because \"" + memberKey + "\" is already a member.</font>"); if defined (pta^.urls^.memberLogon) { add ("<p><font color=\"red\">If you want to login, even if you forgot your password, go to the " + html.getLink ("Login", pta^.urls^.memberLogon) + " page.</font>")}}}}; if not flRequiresRedo { //PBS 8/10/99: it may have been set false, even though it was false when entering this block local (refreshAfterPost = false); if defined (pta^.postargs.refreshAfterPost) { refreshAfterPost = true; delete (@pta^.postargs.refreshAfterPost)}; local (adrtable = @pta^.postargs, ct = sizeof (adrtable^), i, adrItem, val); for i = 1 to ct { adrItem = @adrtable^ [i]; local (nomad); if defined (pta^.adrMemberInfo) { nomad = pta^.adrMemberInfo}; local (partialaddress = nameof (adrItem^), s); if partialaddress beginswith "scratchpassword" { if partialaddress == "scratchpassword1" { local (otherpassword = adrtable^.["scratchpassword2"]); if adrtable^.["scratchpassword1"] != otherpassword { scriptError ("Can't set the password because the two passwords you entered are not equal.")}; if not (otherpassword == "") { pta^.adrmemberinfo^.password = otherpassword; addPrefToRpcParamTable ("password", @pta^.adrmemberinfo^.password ); //PBS 9/13/99: propagate passwords local (mailaddress = nameof (pta^.adrmemberinfo^)); mainresponder.members.setcookie (mailaddress, otherpassword)}}} else { on setValueCallback (adrval) { //5/22/99; 8:46:15 AM by DW if flcallbacks { local (adrcallback = @adrcallbacks^.setValue); if defined (adrcallback^) { adrcallback^ (partialaddress, adrval)}}; addPrefToRpcParamTable (partialaddress, adrval)}; //7/8/99; 10:03:09 AM by DW //PBS 9/13/99: promoted this line if defined (pta^.adrMemberInfo) { nomad = getPrefAddress (partialaddress); if typeof (adrItem^) == tabletype { //it's a multi-part object local (datasize = sizeof (adrItem^.data)); local (contentType); if defined (adrItem^.["Content-Type"]) { //PBS 8/14/99: make sure Content-Type is defined before checking its value contentType = string.lower (adrItem^.["Content-Type"])}; if datasize > 0 { //this is what you get if you don't specify a file bundle { // 7/27/05; 7:01:15 PM by TAC - upload a picture or any kind of file; GIF, JPEG, and PNG pictures are recognized local (bt = "data"); // binary type, default if contentType beginswith "image" { local (maxbytes = pta^.wizard^.prefs.maxPictureBytes); if datasize > maxbytes { scriptError ("Can't accept the file because it is too large. Maximum is " + string.kBytes (maxbytes) + ".")}; bundle { // get and set height and width of the image local (hwList); if contentType == "image/gif" { hwList = html.getGifHeightWidth (@adrItem^.data)}; if contentType == "image/jpeg" { hwList = html.getJpegHeightWidth (@adrItem^.data)}; if contentType == "image/png" { hwList = html.getPngHeightWidth (@adrItem^.data)}; if hwList != nil { adrItem^.height = hwList [1]; adrItem^.width = hwList [2]}}} else { if defined (pta^.wizard^.prefs.maxFileBytes) { local { maxBytes = pta^.wizard^.prefs.maxFileBytes}; if dataSize > maxBytes { scriptError ("Can't accept the file because it is too large. Maximum is " + string.kBytes (maxBytes) + ".")}}}; adrItem^.data = binary (adrItem^.data); try { // set the binary type bt = user.webserver.prefs.MIME2Binary.[contentType]}; setBinaryType (@adrItem^.data, bt); nomad^ = adrItem^; //copy the table into storage setValueCallback (adrItem)}; Çbundle // old code Çif not contentType beginswith "image" ÇscriptError ("Can't accept the file because it is not an image.") Çlocal (maxbytes = pta^.wizard^.prefs.maxPictureBytes) Çif datasize > maxbytes ÇscriptError ("Can't accept the file because it is too large. Maximum is " + string.kBytes (maxbytes) + ".") Çbundle //set the type attribute of the data Çlocal (bt = nil) Çif contentType == "image/gif" Çbt = "GIFf" Çif contentType == "image/jpeg" Çbt = "JPEG" Çif bt != nil ÇadrItem^.data = binary (adrItem^.data) ÇsetBinaryType (@adrItem^.data, bt) Çnomad^ = adrItem^ //copy the table into storage ÇsetValueCallback (adrItem)}} else { val = adrItem^; if (val == "true") or (val == "false") { val = boolean (val)}; nomad^ = val; setValueCallback (@val)}}}}; sendRpcMessages (); //7/8/99; 10:03:09 AM by DW if refreshAfterPost { ÇPBS 10/30/99: redirect to a different URL by choosing an alternate pathArgs form. ÇIf number, use title; if title, use number. ÇThis works around the 302 FOUND Netscape browser bug. local (panelIdentifier, newPathArgs); try { panelIdentifier = number (pta^.pathArgs); newPathArgs = string.innerCaseName (panelTitle)} else { newPathArgs = panelNum}; Çmainresponder.redirect (pta^.uri + "$" + pta^.pathargs) mainresponder.redirect (pta^.uri + "$" + newPathArgs)}; ÇCall the signup callback, if applicable. PBS 6/5/99 ÇThe signup callback can send email and do similar operations. ÇIf it returns an empty string, then build the form as normal. ÇIf it returns text, then return that text -- the signup callback can control what gets displayed on the page. if flSignupForm and adrSignupCallback != nil { htmlText = adrSignupCallback^ (); if htmlText != "" { return (htmlText)}}}}; bundle { //add the form with the items local (flRequiresMultiPart = false); try {flRequiresMultiPart = boolean (xml.getattribute (adrpanel, "multiPart"))^}; //multiPart attribute is optional if action == nil { action = pagename + "$" + panelnum}; add ("<form name=\"" + paneltitle + "\" action=\"" + action + "\" method=\"POST\"<<xxx>>>"); indentlevel++; bundle { //add hidden item if it has refreshAfterPost attribute try { local (refreshAfterPost = boolean (xml.getattribute (adrpanel, "refreshAfterPost")^)); if refreshAfterPost { add ("<input type=\"hidden\" name=\"refreshAfterPost\" value=\"1\">")}}}; if flIncludeTitle { add ("<h2>" + paneltitle + "</h2>")}; add (description + "<p>"); add ("<table cellpadding=\"7\" cellspacing=\"0\" border=\"0\">"); indentlevel++; local (flShowSubmitButton = false); local (i, adrItem, adr, title, type, popuptext, linkattribute, defaultvalue, flspan, ixitem = 0); for i = 1 to sizeOf (adrPanel^) { adrItem = @adrPanel^ [i]; adr = ""; if xml.convertToDisplayName (nameOf (adrItem^)) == "item" { ixitem++; flShowSubmitButton = true; defaultValue = ""; //PBS 7/12/99: clear out previous default value bundle { //set title title = xml.getattribute (adrItem, "title")^; local (flAddColon = true); if title endswith "?" { flAddColon = false}; if string.trimWhiteSpace (title) == "" { flAddColon = false}; if flAddColon { title = title + ":"}}; type = string.lower (xml.getattribute (adrItem, "type")^); //types are unicase try {adr = xml.getattribute (adrItem, "adr")^}; //adr attribute is optional, for example separators don't have adrs if adr != "" { //JES 7/14/: call callbacks if they exist -- determine if this item should be included if flCallbacks { if defined (adrCallbacks^.includeItem) { try { if not adrCallbacks^.includeItem (adr) { continue}}}}}; if type == "separator" { //very special case if separatorColor == nil { //PBS 10/30/99: Manila sites need to be able to specify separator and separator text color separatorColor = "black"}; if separatorTextColor == nil { separatorTextColor = pta^.bgcolor}; add ("<tr><td colspan=\"2\"><table cellpadding=\"2\" cellspacing=\"0\" width=\"100%\"><tr>"); indentlevel++; add ("<td bgcolor=\"" + separatorColor + "\"><font color=\"" + separatorTextColor + "\"><b>" + title + "</b></font></td>"); //PBS 6/4/99: text in separators is bold add ("</tr></table></td></tr>"); indentlevel--; continue}; bundle { //get popuptext if it's present try { popuptext = xml.getvalue (adrItem, "popuptext")} else { popuptext = ""}}; bundle { //get link attribute if it's present try { linkattribute = xml.getattribute (adrItem, "link")^} else { linkattribute = ""}}; add ("<tr>"); indentlevel++; ÇIf this is a re-do, and this is an empty required field, then ask the user to fill it in. Çif flRequiresRedo and emptyList contains adrItem Çlocal (fieldName = xml.getAttribute (adrItem, "title")^) Çadd ("<td colspan=\"2\"><font color=\"red\"><b>" + fieldName + "</b> is empty. Please fill it in.</font></td></tr>") Çadd ("<tr>") bundle { //set defaultvalue if flRequiresRedo { //PBS 6/12/99: get the value from the POST args if it's a redo defaultValue = pta^.postArgs.[adr]} else { ÇHandle default values. PBS 7/12/99 try { defaultValue = xml.getAttributeValue (adrItem, "default")}; //PBS 7/12/99: get default value from outline if not flSignupForm { if defined (pta^.adrMemberInfo) { with pta^.adrmemberinfo^ { Çdefaultvalue = "" try { local (adrobject = getPrefAddress (adr)); if typeof (adrobject^) == tabletype { //it's a multi-part object defaultvalue = adrobject^.filename} else { defaultvalue = adrobject^}}; bundle { //5/22/99; 7:31:16 AM by DW, call the callback if one is present if flcallbacks { local (adrcallback = @adrcallbacks^.getValue); if defined (adrcallback^) { defaultvalue = adrcallback^ (adr, defaultvalue)}}}}}}}}; //adr is the partial address, the callback should be a big case statement, based on which value is being asked for bundle { //add title local (s); if popuptext != "" { local (shortaddress = panelnum + "," + ixitem); local (href = "href=\"JavaScript: newWindow=openWin( '" + adrwizard^.prefs.popupPageName + "$" + shortaddress + "', 'prefsPopup', '" + string (adrwizard^.prefs.popupWindowAttributes) + "' );newWindow.focus()\""); s = "<a " + href + " title=\"" + string.firstsentence (popuptext) + "..\">" + title + "</a>"} else { Çif string.lower (type) == "picture" Çlocal (s = "<a href=\"" + adrwizard^.prefs.picturePageName + "$" + adr + "\">" + title + "</a>") Çadd ("<td valign=\"top\">" + s + "</td>") if linkattribute != "" { s = "<a href=\"" + linkattribute + "\">" + title + "</a>"} else { s = title}}; s = string.replaceAll (s, "|", "<br><font color=\"" + pta^.bgcolor + "\">*</font> "); //PBS 8/18/99: replace | with <br> local (flRequired = false); try { flRequired = boolean (xml.getAttributeValue (adrItem, "required"))}; if flRequired and not (flRequiresRedo and not (emptyList contains adrItem)) and flHandleRequiredFields { //PBS 8/10/99: required fields handling can be turned off s = "<b><font color=\"red\">*</font></b> " + s; flOneRequired = true} else { if defined (adrwizard^.prefs.alignNonRequired) and adrwizard^.prefs.alignNonRequired { s = "<b><font color=\"" + pta^.bgColor + "\">*</font></b> " + s}}; if title == "" { //PBS 01/21/02: no title wanted? (the bug was -- it was checking if title == ":") flspan = true} else { add ("<td valign=\"top\">" + s + "</td>"); flspan=false}}; if flspan { add ("<td colspan=\"2\">"); indentlevel++} else { add ("<td>"); indentlevel++}; case type { "string" { local (size = adrwizard^.prefs.stringDefaultSize, maxlength = adrwizard^.prefs.stringDefaultMaxLength); try {size = xml.getattribute (adrItem, "size")^}; try {maxlength = xml.getattribute (adrItem, "maxlength")^}; add ("<input type=\"text\" name=\"" + adr + "\" size=\"" + size + "\" maxlength=\"" + maxlength + "\" value=\"" + defaultvalue + "\">")}; "static" { ÇAdd the hidden field so the value is processed with the form, add just the defualt value as the static display. add (defaultvalue); add ("<input type=\"hidden\" name=\"" + adr + "\" value=\"" + defaultvalue + "\">")}; "hidden" { ÇAdd the hidden field so the value is processed with the form. add ("<input type=\"hidden\" name=\"" + adr + "\" value=\"" + defaultvalue + "\">")}; "popup" { Ç<SELECT name="state"> Ç<OPTION>Select a state Ç<OPTION VALUE="AL">Alabama Ç<OPTION VALUE="AK">Alaska Ç<OPTION VALUE="AZ">Arizona Ç<OPTION VALUE="AR">Arkansas Ç</SELECT> add ("<select name=\"" + adr + "\">"); indentlevel++; local (i, adroption, title, value, s); for i = 1 to sizeOf (adrItem^) { adroption = @adrItem^ [i]; if xml.convertToDisplayName (nameOf (adroption^)) == "option" { title = xml.getattribute (adroption, "title")^; value = xml.getattribute (adroption, "value")^; s = ""; if defaultvalue == value { s = " selected"}; add ("<option value=\"" + value + "\"" + s + ">" + title + "</option>")}}; add ("</select>"); indentlevel--}; "color" { //7/13/99; 11:34:37 PM by DW add ("<select name=\"" + adr + "\">"); indentlevel++; local (adrtable = @system.verbs.colors, i, ct = sizeof (adrtable^)); for i = 1 to ct { onecolor = nameof (adrtable^ [i]); s = ""; if defaultvalue == onecolor { s = " selected"}; add ("<option value=\"" + onecolor + "\"" + s + ">" + onecolor + "</option>")}; add ("</select>"); indentlevel--}; "password" { local (size = adrwizard^.prefs.passwordDefaultSize, maxlength = adrwizard^.prefs.passwordDefaultMaxLength); try {size = xml.getattribute (adrItem, "size")^}; try {maxlength = xml.getattribute (adrItem, "maxlength")^}; add ("<input type=\"password\" name=\"" + adr + "\" size=\"" + size + "\" maxlength=\"" + maxlength + "\" value=\"" + defaultvalue + "\">")}; "text" { local (rows = adrwizard^.prefs.textDefaultRows, cols = adrwizard^.prefs.textDefaultCols); try {rows = xml.getattribute (adrItem, "rows")^}; try {cols = xml.getattribute (adrItem, "cols")^}; add ("<textarea name=\"" + adr + "\" rows=\"" + rows + "\" cols=\"" + cols + "\" wrap=\"soft\">" + defaultvalue + "</textarea>")}; "boolean" { Çtemp.ddx2 = boolean (defaultvalue) Çtemp.ddxstring = defaultvalue on addradio (val, flchecked, linetext) { local (s = "<input type=\"radio\" name=\"" + adr + "\" value=" + val); if flchecked { s = s + " checked"}; add (s + ">" + linetext)}; addradio ("true", boolean (defaultvalue), "Yes"); addradio ("false", !boolean (defaultvalue), "No"); Çadd ("<input type=\"radio\" name=\"" + adr + "\" value=" + "1 checked" + ">" + "Yes") };Çadd ("<input type=\"radio\" name=\"" + adr + "\" value=\"" + "0" + "\">" + "No") "checkbox" { add ("<input type=\"checkbox\" name=\"" + adr + "\" value=\"" + defaultvalue + "\">")}; "picture" { flRequiresMultiPart = true; if typeOf (defaultValue) == tableType { //PBS 03/30/00: if defaultvalue is a table, set it to "", fixes an error message on sign-up table.assign (@defaultValue, "")}; if defined (pta^.adrMemberInfo) and not (flSignUpForm) { // Thu, Jul 10, 2003 at 11:26:22 PM by TAC - display picture local (adrObject = getPrefAddress (adr)); if defined (adrObject^) { local { flDisplayPicture = true}; try { flDisplayPicture = xml.getAttribute (adrItem, "displayPicture")^}; if flDisplayPicture { local (imgTag = "<img src=\""); local (url = pta^.responderAttributes.urls^.prefsHome + "picture$" + adr); imgTag = imgTag + url + "\" "; try { // defensive imgTag = imgTag + "height=\"" + adrObject^.height + "\" "}; try { // defensive imgTag = imgTag + "width=\"" + adrObject^.width + "\" "}; imgTag = imgTag + "border=\"0\" "; imgTag = imgTag + "alt=\"" + adrObject^.filename + "\">"; add (imgTag + "\r<br/>\r<br/>")}}}; add ("<input name=\"" + adr + "\" type=\"file\" size=\"40\" value=\"" + defaultvalue + "\">")}; "file" { // 4/18/04; 7:58:37 PM by TAC - upload any kind of file flRequiresMultiPart = true; Çif typeOf (defaultValue) == tableType //PBS 03/30/00: if defaultvalue is a table, set it to "", fixes an error message on sign-up Çtable.assign (@defaultValue, "") add ("<input name=\"" + adr + "\" type=\"file\" size=\"40\" value=\"" + defaultvalue + "\">")}; "custom" { if flcallbacks { //allow application to do object rendering local (adrcallback = @adrcallbacks^.customRenderer); if defined (adrcallback^) { add (adrcallback^ (adr, defaultvalue, adrItem))}} //send the partial address, the default value, and the address of the XML table of the object being rendered else { add (" ")}}} else { add (" ")}; add ("</td>"); indentlevel--; add ("</tr>"); indentlevel--}}; add ("<tr>"); indentlevel++; add ("<td> </td>"); bundle { //add Submit button local (s = " "); if flShowSubmitButton { //if all there is is text on the page, no need to put a submit item on the page s = "<input type=\"submit\" value=\" " + "Submit" + " \">"}; add ("<td align=\"right\">" + s + "</td>")}; add ("</tr>"); indentlevel--; add ("</table>"); indentlevel--; add ("</form>"); indentlevel--; if flOneRequired and not flRequiresRedo { //add note about required fields if flHandleRequiredFields { //PBS 8/10/99: required fields handling can be turned off Çadd ("Required fields are marked with <b><font color=\"red\">*</font></b>") htmlText = "Required fields are marked with <b><font color=\"red\">*</font></b>" + htmlText}}; bundle { //do the enctype substitution local (pattern = "<<xxx>>"); if flRequiresMultiPart { htmltext = string.replace (htmltext, pattern, "enctype=\"multipart/form-data\"")} else { htmltext = string.replace (htmltext, pattern, "")}}}; return (htmlText)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:prefsSuite.browser ! on browser (flSignupForm=false, flIncludeTitle=true, adrSignupCallback=nil, inputPanel=nil, action=nil, adrError=nil, flHandleRequiredFields=true, pta=nil, flRequiresRedo=false, flSetTitle=true, separatorColor=nil, separatorTextColor=nil) { ÇChanges Ç2005 Ç11/25/05; 10:24:11 AM by TAC Çchange method post check to use flPost, lowercase form method post Çchanged checked to checked=\"checked\" for XHTML compatibility Çclose p and input tags Çadded support for optional wizard outline formname attribute, if defined the HTML form generated will use this attribute for the name, if not defined then use panelTitle Ç7/27/05; 7:03:00 PM by TAC Çreworked 4/18/04; 7:58:37 PM code for upload a picture or any kind of file ÇPNG support Çstore height and width of pictures we recognize Ç2004 Ç4/18/04; 7:58:37 PM by TAC Çupload any kind of file, need to add interface to link to file Ç2003 Ç7/14/03; 5:24:12 PM by JES ÇAdded support for includeItem callback. Called with the value of the adr attribute of a prefs item, if the callback returns false, the item is skipped. Ç7/10/03; 11:26:22 PM by TAC Çdisplay picture, code looks for displayPicture attribute; if false don't display; default is true, contructs url that points into pta^.responderAttributes.urls^.prefsHome + "picture"; expects script to be there to deal with picture request Ç2002 Ç1/25/02; 6:11:51 PM by PBS ÇPerformance enhancements in the local "add" routine -- add a trailing semicolon; use parentheses to get the expression in x = x + y form (which is optimized by the kernel). Ç1/21/02; 9:00:32 PM by PBS ÇBug fix -- if a title is empty, the item is supposed to span both columns. This feature had been broken. Ç2000 Ç11/25/00; 8:23:57 PM by PBS ÇIf the title of an item is "", don't add a colon. This way we don't get colons before edit-in-Pike buttons. Ç03/31/00; 5:08:00 PM by PBS ÇWhen a sign-up form includes a picture, sometimes the browser would send empty data which got interpreted as a Frontier table. Then when building the form an implicit attempt was made to coerce the table to a string, which failed. Ç1999 Ç11/16/1999; 10:09:08 AM by AR ÇPurged all instances of xml.getAddressList in favor of our own looping code so that this script will work with arbitrarily deeply nested table structures. Ç10/30/99; 12:10:59 PM by PBS ÇImplemented workaround for 302 FOUND browser bug when redirecting to the same page you just posted to. Now the redirect happens to a different URL. If you were on a $panelName URL, you're redirected to a $panelNum URL, and vice versa. Ç10/30/99; 12:02:48 AM by PBS ÇManila sites need to be able to specify the color of separators and the text inside. If colors are not specified, the default is black for the separator and pta^.bgcolor for the text inside. Ç9/22/99; 8:39:27 PM by DW ÇWe used to always generate a form with an enctype="multipart/form-data" in its header. Now we only do so if the form contains a picture, or if there is a panel attribute named multiPart with a value of true. So in most circumstances we will not have a multipart form, in the past we would *always* have a multipart form. Ç9/16/99; 9:47:26 AM by DW ÇAdded link attribute on items, if present, the whole item links to the URL provided in the attribute. Search for "linkattribute" for implementation. Ç9/13/99; 12:37:43 PM by PBS ÇSign-ups and changed passwords weren't getting propagated. Now they are. Ç9/8/99; 12:40:57 AM by PBS ÇIf this is a sign up form, check that the two passwords match before creating the membership record. There was a bug -- the passwords might not match, but a membership record that didn't include a password would be created. Then the person signing up has no password -- but they can't sign up again because they're now a member. Ç8/19/99; 2:23:47 PM by PBS ÇNew optional parameter flSetTitle. If false, prefsSuite.browser does not set pta^.title, so the calling page can use a different title than the title of the panel. This was needed for the store -- which uses one panel for all order forms, but the titles are different depending on whether you're at the standard page or the Academic page. ÇDefault is standard behavior -- prefsSuite.browser sets pta^.title automatically. Ç8/18/99; 7:59:48 PM by PBS ÇIf you place a | character in a title, it will be replaced by a <br> tag so the title will wrap to the next line. Ç8/17/99; 11:24:53 AM by PBS ÇThe sendRpcMessages routine was moved to the top level of prefsSuite. The routine in this script now calls prefsSuite.sendRpcMessages. ÇThis was done so prefs broadcasting could happen outside of the context of this script or the page rendering process, so other scripts could broadcast prefs at will. Ç8/15/99; 3:59:30 PM by PBS ÇflRequiresRedo is no an optional parameter: if true, then the values will be taked from the post args. Ç8/14/99; 9:12:40 PM by PBS ÇMake sure content-type is defined before checking its value. This was causing errors with some browser on the main prefs page. Ç8/13/99; 3:53:13 PM by PBS ÇNew optional parameter pta. (Useful when debugging, also a small optimization.) Ç8/10/99; 10:24:06 PM by PBS ÇIf the person signing up uses an email address of an existing member, the error is reported in red text, and the user has a chance to re-fill out the form or go to the sign up page. ÇCheck that config.prefsServer.prefsDistributorFolder exists, so machines that aren't prefs distributors can run this script without generating errors. Ç8/10/99; 6:27:53 PM by PBS ÇNew parameter, flHandleRequiredFields, allows one to disable the automatic handling of required fields. Ç7/28/99; 9:05:00 by RAB Çadded action parameter Çadded adrError parameter Ç7/27/99; 17:35:00 by RAB ÇIf you specify a null title, then the field spans 2 columns. ÇAdded new pref alignNonRequired which keeps the titles better aligned Ç7/12/99; 2:59:44 by PBS ÇSupport for default values. An item can have a default attribute. If the item is not already in the user's member record, or it's a sign up form, then the item will get this default value. ÇAs in: <item title="Formatted in HTML?" type="boolean" adr="bulletins.inHtml" default="true"> Ç7/8/99; 10:03:09 AM by DW ÇImplement the XML-RPC-based prefs distribution system. Ç7/6/99; 8:41:39 AM by DW ÇAllow the pathargs to be a non-numeric string, it can contain the name of the panel, we'll transition to this form of pointing because it allows us to move things around. Ç6/27/99; 7:05:00 PM by RAB ÇSupport for static fields. ÇSupport for hidden fields. ÇSupport for checkbox fields. ÇOptional parameter for inputPanel number (rather then pathArgs) Ç6/12/99; 3:35:03 PM by PBS ÇSupport for required fields. ÇIf an item in the XML outline has a required="true" attribute, then it's a required field. ÇThe system will prompt you to enter any required fields you didn't enter. Ç6/5/99; 1:51:25 AM by PBS ÇadrSignupCallback is the address of a callback to be used when handling the POST request from a signup form. ÇThe callback is called after the POST args are processed, but before the form is built. ÇIf the callback returns anything but "", then the results of the callback are displayed in the page rather than the form. ÇThe callback thus has the chance to send email, for instance, when adding a member. And it has the chance to build a welcome page. Ç6/4/99; 4:15:27 PM by PBS ÇIf it's a signup form, and the member already exists, it's an error. ÇText in separators is now bold. Ç6/3/99; 12:37:55 PM by DW ÇAdded optional boolean parameter, flSignupForm, defaults false. If true, we don't require that pta^.adrmemberinfo be defined. ÇAdded optional boolean parameter, flIncludeTitle, defaults true. If false, we don't include the title, assume the page already has a title. Ç6/4/99; 10:38:22 AM by DW ÇAdd separator <item>s, that allow the author to separate items into groups. ÇAllow <item>s to be required, if the value has not been set, reject the submission. if pta == nil { pta = html.getPageTableAddress ()}; local (adrWizard = pta^.wizard); local (adrCallbacks = @adrwizard^.callbacks, flCallbacks = defined (adrCallbacks^)); local (pathArgs = pta^.pathArgs); local (pageName = nameOf (pta^.adrobject^)); Çlocal (flRequiresRedo = false) //it becomes true if required fields were missing local (emptyList = {}); local (flOneRequired = false); local (flPost = string.lower (pta^.method) == "post"); if adrError != nil { adrError^ = false}; local (rpcParamTable); new (tabletype, @rpcParamTable); on addPrefToRpcParamTable (partialaddress, adrval) { //7/8/99; 10:03:09 AM by DW if typeof (adrval^) == tabletype { local (i, adrItem); for i = 1 to sizeof (adrval^) { adrItem = @adrval^ [i]; if typeof (adrItem^) == binarytype { adrItem^ = base64.encode (adrItem^, infinity)}}}; rpcParamTable.[partialaddress] = adrval^}; on sendRpcMessages () { if defined (pta^.adrMemberInfo) { //PBS 9/2/99: this person may not be a member prefsSuite.sendRpcMessages (@rpcParamTable, pta^.adrMemberInfo)}; //PBS 8/17/99: routine moved to top level of prefsSuite Çlocal (xmltext) Çbundle //build the XML representation Çon add (s) Çxmltext = xmltext + s + "\r" Çadd ("<?xml version=\"1.0\"?>") Çadd ("<prefsUpdate>") Çadd ("<group>" + "default" + "</group>") Çadd ("<memberKey>" + nameof (pta^.adrmemberinfo^) + "</memberKey>") Çadd ("<value>" + xml.coercions.frontierValueToTaggedText (@rpcParamTable, 0) + "</value>") Çadd ("</prefsUpdate>") Çbundle //write the file Çif defined (config.prefsServer.prefsDistributorFolder) //PBS 8/10/99: make sure this machine is a prefs distributor Çlocal (folder = config.prefsServer.prefsDistributorFolder) Çloop //get a unique name, write the file Çlocal (f = folder + clock.ticks () + ".xml") Çfile.surefilepath (f) Çif not file.exists (f) Çfile.writewholefile (f, xmltext) Çbreak ÇprefsSuite.init () Çlocal (i, ct = sizeof (config.prefsServer.subscribers), adrsubscriber) Çlocal (params = {"default", nameof (pta^.adrmemberinfo^), rpcParamTable}) Çfor i = 1 to ct Çadrsubscriber = @config.prefsServer.subscribers [i] Çbetty.rpc.client (nameof (adrsubscriber^), adrsubscriber^.port, adrsubscriber^.procedureName, @params, rpcpath:adrsubscriber^.rpcPath, flAsynch:true) Ç<panel title="Register"> Ç<description>This is an experimental feature. If you have a server that can do something interesting with preferences, and if your server can receive XML-RPC messages, you can hook into the preference system at UserLand.Com. We need three pieces of information: a domain name for your server (an IP address will also work), the port that server is running on, and the name of the XML-RPC procedure you want us to call. This routine will be called every time every user updates, so please don't register unless you're serious.</description> Ç<item title="Domain" type="string" adr="prefsRpcHandler.domain"/> Ç<item title="Port" type="string" adr="prefsRpcHandler.port"/> Ç<item title="Procedure name" type="string" adr="prefsRpcHandler.procedureName"/> Ç</panel> return (true)}; local (htmlText = "", indentLevel = 0); on add (s) { htmlText = htmlText + (string.filledString ("\t", indentLevel) + s + "\r");}; prefsSuite.compileIfDirty (); //compile the XML if needed local (panelNum, adrPanel); bundle { //get the number of the panel, the address of its descriptor in the XML structure, set flPrivate page attribute if inputPanel != nil { //caller supplied the panel num panelNum = number (inputPanel); local (i, ctpanels = 0, adrItem, adrtable = @adrWizard^.structure [1]); for i = 1 to sizeOf (adrtable^) { adrItem = @adrtable^[i]; if xml.convertToDisplayName (nameOf (adrItem^)) == "panel" { ++ctpanels; if ctpanels == panelNum { //found it! adrPanel = adrItem; break}}}; if ctpanels < panelNum { scripterror ("Can't display the panel because the wizard doesn't have a panel #" + panelNum + ".")}} else { panelNum = prefsSuite.pathArgsToPanelNum (pathargs, @adrpanel)}; local (flPrivate = false); try { flPrivate = boolean (xml.getAttribute (adrPanel, "private")^)}; pta^.flPrivate = flPrivate}; local (panelTitle, description, formName); bundle { //get the title and description panelTitle = xml.getAttribute (adrPanel, "title")^; if flSetTitle { //PBS 8/19/99: if flSetTitle is false, then the calling page is responsible for setting pta^.title pta^.title = panelTitle}; description = xml.getValue (adrPanel, "description"); description = string.replaceAll (description, "\t", ""); description = string.replaceAll (description, "\r", "<p />"); bundle { // 11/25/05; 11:09:01 AM by TAC - formName try { formName = xml.getValue (adrPanel, "formname")} else { formName = string.innerCaseName (panelTitle)}}}; on getPrefAddress (partialAddress) { //takes a partial address, returns an address into user's member table local (nomad = pta^.adrMemberInfo, s); loop { if not (partialAddress contains ".") { nomad = @nomad^.[partialAddress]; break}; s = string.nthField (partialAddress, '.', 1); nomad = @nomad^.[s]; if not defined (nomad^) { new (tableType, nomad)}; partialAddress = string.delete (partialAddress, 1, sizeOf (s) + 1)}; return (nomad)}; if flPost { //PBS 6/12/99: check that required fields are non-empty if flHandleRequiredFields { //PBS 8/10/99: required fields handling can be turned off local (i, adrOneItem, emptyFieldNames = {}); for i = 1 to sizeOf (adrPanel^) { //check whether there are required fields that have not been filled out adrOneItem = @adrPanel^ [i]; if xml.convertToDisplayName (nameOf (adrOneItem^)) == "item" { local (flRequired = false); try { flRequired = boolean (xml.getAttributeValue (adrOneItem, "required"))}; if flRequired { //make sure it exists and is non-empty local (adr = xml.getAttributeValue (adrOneItem, "adr"), flEmpty = false); if not defined (pta^.postArgs.[adr]) { flEmpty = true} else { if sizeOf (pta^.postArgs.[adr]) == 0 { flEmpty = true}}; if flEmpty { emptyFieldNames = emptyFieldNames + xml.getAttributeValue (adrOneItem, "title")}}}}; if emptyFieldNames != {} { //if the emptyFieldNames list contains items, then display errors local (errorMessage = "Please enter the required field"); local (i, ctEmpties); bundle { //build the top error message ctEmpties = sizeOf (emptyFieldNames); if sizeOf (emptyFieldNames) > 1 { errorMessage = errorMessage + "s"}; errorMessage = errorMessage + " "; for i = 1 to sizeOf (emptyFieldNames) { errorMessage = errorMessage + "<b>" + emptyFieldNames [i] + "</b>"; if i < ctEmpties { if ctEmpties > 2 { errorMessage = errorMessage + ", "} else { errorMessage = errorMessage + " "}; if ctEmpties == 2 or i == ctEmpties - 1 { errorMessage = errorMessage + "and "}}}; if ctEmpties < 2 { errorMessage = errorMessage + "."} //" is required." else { errorMessage = errorMessage + "."}; //" are required." add ("<font color=\"red\">" + errorMessage + "</font>")}; flRequiresRedo = true; if adrError != nil { //PBS 8/9/99 -- adrError is optional: make sure it's not nil before trying to deference it. adrError^ = true}}}}; if flPost and not flRequiresRedo { //process the POSTed data Çscratchpad.postargs = pta^.postargs; edit (@scratchpad.postargs) ÇCreate a new membership table if needed. if not defined (pta^.adrMemberInfo) and flSignupForm { if defined (pta^.postArgs.["personalInfo.email"]) { local (memberKey = pta^.postArgs.["personalInfo.email"]); try { //validate the email address mainResponder.members.validMailAddress (memberKey)} else { scriptError ("Can't create a membership record because the email address is invalid.")}; local (adrMember = mainResponder.members.getMemberTable (pta^.defaultMembershipGroup, memberKey)); if not defined (adrMember^) { ÇFirst check the password. PBS 9/7/99 if defined (pta^.postArgs.["scratchpassword1"]) { if defined (pta^.postArgs.["scratchpassword2"]) { if pta^.postArgs.["scratchpassword1"] != pta^.postArgs.["scratchpassword2"] { add ("<p /><font color=\"red\">Can't sign you up because the two passwords you entered do not match.</font>"); flRequiresRedo = true}}}; if not flRequiresRedo { new (tableType, adrMember); pta^.adrMemberInfo = adrMember; pta^.memberGroupName = pta^.defaultMembershipGroup}} else { //PBS 6/4/99: member already exists, it's an error flRequiresRedo = true; add ("<font color=\"red\">Can't sign up \"" + memberKey + "\" because \"" + memberKey + "\" is already a member.</font>"); if defined (pta^.urls^.memberLogon) { add ("<p /><font color=\"red\">If you want to login, even if you forgot your password, go to the " + html.getLink ("Login", pta^.urls^.memberLogon) + " page.</font>")}}}}; if not flRequiresRedo { //PBS 8/10/99: it may have been set false, even though it was false when entering this block local (refreshAfterPost = false); if defined (pta^.postargs.refreshAfterPost) { refreshAfterPost = true; delete (@pta^.postargs.refreshAfterPost)}; local (adrtable = @pta^.postargs, ct = sizeof (adrtable^), i, adrItem, val); for i = 1 to ct { adrItem = @adrtable^ [i]; local (nomad); if defined (pta^.adrMemberInfo) { nomad = pta^.adrMemberInfo}; local (partialaddress = nameof (adrItem^), s); if partialaddress beginswith "scratchpassword" { if partialaddress == "scratchpassword1" { local (otherpassword = adrtable^.["scratchpassword2"]); if adrtable^.["scratchpassword1"] != otherpassword { scriptError ("Can't set the password because the two passwords you entered are not equal.")}; if not (otherpassword == "") { pta^.adrmemberinfo^.password = otherpassword; addPrefToRpcParamTable ("password", @pta^.adrmemberinfo^.password ); //PBS 9/13/99: propagate passwords local (mailaddress = nameof (pta^.adrmemberinfo^)); mainresponder.members.setcookie (mailaddress, otherpassword)}}} else { on setValueCallback (adrval) { //5/22/99; 8:46:15 AM by DW if flcallbacks { local (adrcallback = @adrcallbacks^.setValue); if defined (adrcallback^) { adrcallback^ (partialaddress, adrval)}}; addPrefToRpcParamTable (partialaddress, adrval)}; //7/8/99; 10:03:09 AM by DW //PBS 9/13/99: promoted this line if defined (pta^.adrMemberInfo) { nomad = getPrefAddress (partialaddress); if typeof (adrItem^) == tabletype { //it's a multi-part object local (datasize = sizeof (adrItem^.data)); local (contentType); if defined (adrItem^.["Content-Type"]) { //PBS 8/14/99: make sure Content-Type is defined before checking its value contentType = string.lower (adrItem^.["Content-Type"])}; if datasize > 0 { //this is what you get if you don't specify a file bundle { // 7/27/05; 7:01:15 PM by TAC - upload a picture or any kind of file; GIF, JPEG, and PNG pictures are recognized local (bt = "data"); // binary type, default if contentType beginswith "image" { local (maxbytes = pta^.wizard^.prefs.maxPictureBytes); if datasize > maxbytes { scriptError ("Can't accept the file because it is too large. Maximum is " + string.kBytes (maxbytes) + ".")}; bundle { // get and set height and width of the image local (hwList); if contentType == "image/gif" { hwList = html.getGifHeightWidth (@adrItem^.data)}; if contentType == "image/jpeg" { hwList = html.getJpegHeightWidth (@adrItem^.data)}; if contentType == "image/png" { hwList = html.getPngHeightWidth (@adrItem^.data)}; if hwList != nil { adrItem^.height = hwList [1]; adrItem^.width = hwList [2]}}} else { if defined (pta^.wizard^.prefs.maxFileBytes) { local { maxBytes = pta^.wizard^.prefs.maxFileBytes}; if dataSize > maxBytes { scriptError ("Can't accept the file because it is too large. Maximum is " + string.kBytes (maxBytes) + ".")}}}; adrItem^.data = binary (adrItem^.data); try { // set the binary type bt = user.webserver.prefs.MIME2Binary.[contentType]}; setBinaryType (@adrItem^.data, bt); nomad^ = adrItem^; //copy the table into storage setValueCallback (adrItem)}; Çbundle // old code Çif not contentType beginswith "image" ÇscriptError ("Can't accept the file because it is not an image.") Çlocal (maxbytes = pta^.wizard^.prefs.maxPictureBytes) Çif datasize > maxbytes ÇscriptError ("Can't accept the file because it is too large. Maximum is " + string.kBytes (maxbytes) + ".") Çbundle //set the type attribute of the data Çlocal (bt = nil) Çif contentType == "image/gif" Çbt = "GIFf" Çif contentType == "image/jpeg" Çbt = "JPEG" Çif bt != nil ÇadrItem^.data = binary (adrItem^.data) ÇsetBinaryType (@adrItem^.data, bt) Çnomad^ = adrItem^ //copy the table into storage ÇsetValueCallback (adrItem)}}}}}} else { val = adrItem^; if (val == "true") or (val == "false") { val = boolean (val)}; nomad^ = val; setValueCallback (@val)}}}}; sendRpcMessages (); //7/8/99; 10:03:09 AM by DW if refreshAfterPost { ÇPBS 10/30/99: redirect to a different URL by choosing an alternate pathArgs form. ÇIf number, use title; if title, use number. ÇThis works around the 302 FOUND Netscape browser bug. local (panelIdentifier, newPathArgs); try { panelIdentifier = number (pta^.pathArgs); newPathArgs = string.innerCaseName (panelTitle)} else { newPathArgs = panelNum}; Çmainresponder.redirect (pta^.uri + "$" + pta^.pathargs) mainresponder.redirect (pta^.uri + "$" + newPathArgs)}; ÇCall the signup callback, if applicable. PBS 6/5/99 ÇThe signup callback can send email and do similar operations. ÇIf it returns an empty string, then build the form as normal. ÇIf it returns text, then return that text -- the signup callback can control what gets displayed on the page. if flSignupForm and adrSignupCallback != nil { htmlText = adrSignupCallback^ (); if htmlText != "" { return (htmlText)}}}}; bundle { //add the form with the items local (flRequiresMultiPart = false); try {flRequiresMultiPart = boolean (xml.getattribute (adrpanel, "multiPart"))^}; //multiPart attribute is optional if action == nil { action = pagename + "$" + panelnum}; add ("<form name=\"" + formName + "\" action=\"" + action + "\" method=\"post\"<<xxx>>>"); indentlevel++; bundle { //add hidden item if it has refreshAfterPost attribute try { local (refreshAfterPost = boolean (xml.getattribute (adrpanel, "refreshAfterPost")^)); if refreshAfterPost { add ("<input type=\"hidden\" name=\"refreshAfterPost\" value=\"1\" />")}}}; if flIncludeTitle { add ("<h2>" + panelTitle + "</h2>")}; add (description + "<p />"); add ("<table cellpadding=\"7\" cellspacing=\"0\" border=\"0\">"); indentlevel++; local (flShowSubmitButton = false); local (i, adrItem, adr, title, type, popuptext, linkattribute, defaultvalue, flspan, ixitem = 0); for i = 1 to sizeOf (adrPanel^) { adrItem = @adrPanel^ [i]; adr = ""; if xml.convertToDisplayName (nameOf (adrItem^)) == "item" { ixitem++; flShowSubmitButton = true; defaultVal... [truncated message content] |
|
From: creedon <icr...@us...> - 2005-11-18 21:59:51
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/commercial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3568/commercial Removed Files: callInstallApp compileDocs createDocOutline createInstallFile enterAppName importAeteInfo installApp menu newMenubar parseAete version Log Message: replaced by aeTerminology Suite --- newMenubar DELETED --- --- callInstallApp DELETED --- --- installApp DELETED --- --- menu DELETED --- --- compileDocs DELETED --- --- version DELETED --- --- enterAppName DELETED --- --- parseAete DELETED --- --- importAeteInfo DELETED --- --- createDocOutline DELETED --- --- createInstallFile DELETED --- |
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/commercial/newTable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3568/commercial/newTable Removed Files: bringToFront isRunning launch openDocument printDocument quit Log Message: replaced by aeTerminology Suite --- quit DELETED --- --- bringToFront DELETED --- --- launch DELETED --- --- openDocument DELETED --- --- isRunning DELETED --- --- printDocument DELETED --- |
|
From: creedon <icr...@us...> - 2005-11-18 21:00:45
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23370 Added Files: appIdStyle parseAetr installMenu newDesktopScriptInstaller suiteName init menu initializeNewTerminologyTable callbackLoop getAetr readMe newAppsTableItem newAppsTableItemInstaller Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: parseAetr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: getAetr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: newAppsTableItemInstaller --- (This appears to be a binary file; contents omitted.) --- NEW FILE: newAppsTableItem --- (This appears to be a binary file; contents omitted.) --- NEW FILE: menu --- FrontierVcsFile:1:mbar:suites.aeTerminology.menu AAEFAQAAAukAAQAAAAAAAAAAAAAAKwADA/0E/QAAAAAAAAZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgArAAMBvQJHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAADEAAABPQAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAvxuVSb+jZIsAAATDAAABpwG/Am8DQExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAYWVUZXJtaW5vbG9neQ0JTmV3IGFwcHMgVGFibGUgSXRlbS4uLg0JLQ0JPSBzdWl0ZXMuYWVUZXJtaW5vbG9neS5tZW51Q29tbWFuZHMubGF1bmNoQXBwbGljYXRpb24gKCkNCT0gc3VpdGVzLmFlVGVybWlub2xvZ3kubWVudUNvbW1hbmRzLm5ld0Rlc2t0b3BTY3JpcHRJbnN0YWxsZXIgKCkNCT0gc3VpdGVzLmFlVGVybWlub2xvZ3kubWVudUNvbW1hbmRzLmltcG9ydEFldHIgKCkNCS0NCU9wZW4gYXBwcyBUYWJsZQ0JU2V0IEN1cnJlbnQgYXBwcyBUYWJsZQ0JLQ0JUmVhZCBNZQ0JLQ0JRWRpdA0JCVN1aXRlDQkJTWVudQ0JCXVzZXIuYWVUZXJtaW5vbG9neQ2AAAAAAAAAAAAAAAoAAAAAAAACFL2MAAAAAAAAAAAAAAAKAAAAAAAAAhS9lAAAAAAACgAAAAAAAAIUvZwAAAAAAAoAAAAAAAACFL2oAAAAAAAAAAAAAAAKAAAAAAAAAUZnwAAAAAAACgAAAAAAAAFGbDgAAAAAAAAAAAAAAAoAAAAAAAABRmxkAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAASfoqAAAAAAACgAAAAAAAAEn6TgAAAAAAAoAAAAAAAABJ+k8AAIAAAAGAAAAIgAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAvxuYWr9pyNMAAAARAQABpwG/Am8DQExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAYWVUZXJtaW5vbG9neS5uZXdBcHBzVGFibGVJdGVtICgpDYAAAAAAAAACAAAABgAAADQAAAIAAA8GR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAL8b1Ci/acjaAAAAEQEAAacBvwJvA0BMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAGFwcC5zdGFydCAoQFt0ZW1wLmFlVGVybWlub2xvZ3kuYXBwc1RhYmxlSXRlbU5hbWVdKQ2AAAAAAAAAAgAAADwAAAGhAAcCAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAC/G/lZv2nI4AAAAB8BAAGnAb8CbwNATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABDaGFuZ2VzDQk4LzcvMDU7IDU6NTQ6MjQgUE0gYnkgVEFDDQkJbWlub3IgdHdlYWtzIGZvciBzY3JpcHQgZm9ybWF0DQ1sb2NhbCAoZmlsZU5hbWUgPSB0ZW1wLmFlVGVybWlub2xvZ3kuYXBwc1RhYmxlSXRlbU5hbWUgKyAiLmZ0ZHMiLCBwYXRoID0gZmlsZU5hbWUpDQ1pZiBmaWxlLnB1dEZpbGVEaWFsb2cgKCJTYXZlIG5ldyBEZXNrdG9wIFNjcmlwdCBJbnN0YWxsZXIgd2hlcmU/IiwgQHBhdGgpDQlsb2NhbCAoaW5mb1RhYmxlID0gQHN5c3RlbS52ZXJicy5hcHBzLlt0ZW1wLmFlVGVybWlub2xvZ3kuYXBwc1RhYmxlSXRlbU5hbWVdLmFwcEluZm8pDQkNCWFlVGVybWlub2xvZ3kubmV3RGVza3RvcFNjcmlwdEluc3RhbGxlciAodGVtcC5hZVRlcm1pbm9sb2d5LmFwcHNUYWJsZUl0ZW1OYW1lLCBpbmZvVGFibGVeLmlkLCBwYXRoKQ2EAAAAAAAAAAAAAAAAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAAAAAgAAAFoAAAJJAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAC/HCWVv6NlJQAAACYAAAGnAb8CbwNATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABDaGFuZ2VzDQkxMS8xNi8wNTsgMTE6MDQ6MzQgUE0gYnkgVEFDDQkJY2hhbmdlIHBhcnNlQWV0ZSB0byBwYXJzZUFldHINDWlmIGRpYWxvZy50d29XYXkgKCJSZXBsYWNlIEFwcGxlRXZlbnQgVGVybWlub2xvZ3kgRXh0ZW5zaW9uIGluZm9ybWF0aW9uIGZvciAiICsgdGVtcC5hZVRlcm1pbm9sb2d5LmFwcHNUYWJsZUl0ZW1OYW1lICsgIj8iLCAiTm8iLCAiWWVzIikNCXJldHVybiAoZmFsc2UpDQ1sb2NhbCAoYWRyQXBwc1RhYmxlSXRlbSA9IEBzeXN0ZW0udmVyYnMuYXBwcy5bdGVtcC5hZVRlcm1pbm9sb2d5LmFwcHNUYWJsZUl0ZW1OYW1lXSkNbG9jYWwgKHBhdGggPSBhZHJBcHBzVGFibGVJdGVtXi5hcHBJbmZvLnBhdGgpDQ1pZiBub3QgKGZpbGUuZXhpc3RzIChwYXRoKSkNCWlmIG5vdCAoZmlsZS5nZXRGaWxlRGlhbG9nICgiU2VsZWN0IHRoZSBhcHBsaWNhdGlvbiBmcm9tIHdoaWNoIHRvIGltcG9ydCB0aGUgdGVybWlub2xvZ3kuLi4iLCAgQHBhdGgsIGFlVGVybWlub2xvZ3kuZGF0YS5hcHBUeXBlcykpDQkJcmV0dXJuIChmYWxzZSkNDWFlVGVybWlub2xvZ3kucGFyc2VBZXRyIChwYXRoLCBhZHJBcHBzVGFibGVJdGVtKQ2EAAAAAAAAAAAAAAAAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAAAAAgAAAAYAAAAaAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAZUAAC/G6JZvxuicAAAAA8AAAGnAb8CbwNATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABlZGl0IChAc3lzdGVtLnZlcmJzLmFwcHMpDYAAAAAAAAACAAAAZgAAAbcAAAIAAA8GR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAL8cBrq/l36wAAAAFgAAAacBvwJvA0BMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAENoYW5nZXMNCTExLzkvMDU7IDEwOjIyOjMwIEFNIGJ5IFRBQw0JCXVzZSBuYW1lT2YgdG8gZ3JhYiB0YWJsZSBuYW1lDQk4LzEzLzA1OyA4OjEyOjA3IFBNIGJ5IFRBQw0JCWNoYW5nZWQgY29tcGFyaXNvbiBvZiBhZHIgcGFyZW50IGZyb20gc3RyaW5nIGJhc2VkIHRvIGFkZHJlc3MgYmFzZWQNCTgvNy8wNTsgNjo0MzoyOSBQTSBieSBUQUMNCQljcmVhdGVkDQ1sb2NhbCAoYWRyID0gdGFibGUuZ2V0Q3Vyc29yQWRkcmVzcyAoKSkNDWlmIHBhcmVudE9mIChhZHJeKSA9PSBAc3lzdGVtLnZlcmJzLmFwcHMNCWxvY2FsIChzID0gIiIpDQkNCWlmIG5vdCAoZGVmaW5lZCAodGVtcC5hZVRlcm1pbm9sb2d5KSkNCQluZXcgKHRhYmxlVHlwZSwgQHRlbXAuYWVUZXJtaW5vbG9neSkNCQ0JdGVtcC5hZVRlcm1pbm9sb2d5LmFwcHNUYWJsZUl0ZW1OYW1lID0gbmFtZU9mIChhZHJeKQ2EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAACAAAAAAAAAAgAAAAYAAAAdAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAC/G5VJv2nJAAAAABABAAGnAb8CbwNATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABlZGl0IChAYWVUZXJtaW5vbG9neS5yZWFkTWUpDYAAAAAAAAACAAAABgAAABYAAAIAAA8GR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAL8blUm/ackCAAAAEAEAAacBvwJvA0BMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAGVkaXQgKEBhZVRlcm1pbm9sb2d5KQ2AAAAAAAAAAgAAAAYAAAAbAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAC/G5VJv2nJAgAAABABAAGnAb8CbwNATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABlZGl0IChAYWVUZXJtaW5vbG9neS5tZW51KQ2AAAAAAAAAAgAAAAYAAAAbAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAC/KMmzv2nJBwAAAAwBAAGnAb8CbwNATEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABlZGl0IChAdXNlci5hZVRlcm1pbm9sb2d5KQ2AAAAAAAA= --- NEW FILE: installMenu --- (This appears to be a binary file; contents omitted.) --- NEW FILE: suiteName --- FrontierVcsFile:1:TEXT:suites.aeTerminology.suiteName aeTerminology --- NEW FILE: init --- (This appears to be a binary file; contents omitted.) --- NEW FILE: appIdStyle --- (This appears to be a binary file; contents omitted.) --- NEW FILE: newDesktopScriptInstaller --- (This appears to be a binary file; contents omitted.) --- NEW FILE: initializeNewTerminologyTable --- (This appears to be a binary file; contents omitted.) --- NEW FILE: readMe --- FrontierVcsFile:1:optx:suites.aeTerminology.readMe This is the aeTerminology suite. Created by Thomas A. Creedon <icr...@ya...>. Based on the DuckTape Tool v0.5 by Sean Elfstrom < sel...@im... >. The aeTerminology Suite imports AppleEvent Terminology Resource information. Menu Commands New apps Table Item... Create a new item in the apps table for an application you select. Launch Application for ... Launch an application associated with the current apps table. This menu item will be inactive until a new apps table item has been created or the Set Current apps Table menu item is selected from the aeTerminology menu. New Desktop Script Installer for ... Create a new Desktop Script installer for the current apps table. This menu item will be inactive until a new apps table item has been created or the Set Current apps Table menu item is selected from the aeTerminology menu. Replace Terminology for ... Replace the AETE information for the current apps table. This menu item will be inactive until a new apps table item has been created or the Set Current apps Table menu item is selected from the aeTerminology menu. Open apps Table Open the table at system.verbs.apps Set Current apps Table Allows you to set which apps table some of the menu items in the aeTerminology menu will apply. Select one of the items in the system.verbs.apps table and then use this command. 8/8/05; 12:28:58 PM by TAC - this could be expressed more clearly, I think. Read Me This outline! Edit Suite Open the table for this suite. Menu Open the menu for this suite. user.aeTerminology Open the user table for this suite. Changes 2005 Nov 18 2005 moved Load an osax command to its final home Database > AppleScripts > Load and osax Load an osax... Load an osax into a table at system.extensions. This is an example command to show how aeTerminology can be used by other scripts to import AETE information and have it end up where ever the script writer wants it to go. There currently seems to be a bug in the kernel that prevents the user from being able to open file packages such as newer style OS X osaxen with the open dialog even though osax has been specified as a file type. As a workaround you can hold down the shift key when selecting this command shich will then allow you to select any file. Navigate carefully! change other occurrences of aete to aetr where appropiate change name of script parseAete to parseAetr change name of script getAete to getAetr (Apple Event Terminology Resource), generalized behavior to get both aete and aetu resources Nov 11 2005 set current apps table at end of creating new apps table item fixed a bug in the Set Current apps Table menu item, names with periods was fouling things up changed name of suite from DuckTape to aeTerminology Sep 15 2005 added support for user.aeTerminology.callbacks.afterAppInfoInitialized can load aete from file data fork added an example Load osax command created aeTerminology.installMenu created aeTerminology.initializeNewTerminologyTable reorg the code a bit for suites.aeTerminology.getAete changed name of menu item from Replace AppleEvent Terminology Extension Information... to Replace Terminology... holding shift key when creating a new apps table item allows user to see all file types added support for user.aeTerminology.callbacks.afterParseAete removed support for skipping class/id when parsing events added support for user.aeTerminology.eventInformationTableName, 'defs" is default Aug 21 2005 removed Desktop Script Installer fixed bug when creating new apps table items, if user.prefs.search.regularexpression was true then weird find and replaces would happen Aug 18 2005 added support for skipping class/id when parsing events, user.aeTerminology.skipOnParse.[class].[id], value is nil bring about window to front, give user indication of progress added edit user.aeTerminology menu item to menu added support for user.aeTerminology.appIdStyle, three styles are currently supported; ".appInfo.id", ".id", and "string4", default is ".appInfo.id" added support for user.aeTerminology.flUseEventInformationTable, true is use eventInformation table; false don't use, default is true Aug 15 2005 made a Desktop Script Installer to help with installation Aug 14 2005 i made two improvements to the new apps table items process there was a bug in that some items were still being created in the top level table even when items were supposed to be put in the eventInformation table It was possible to create a conflict when creating a new table. Here is an example, when I tried creating a table for Mail.app named Mail, it conflicted with suites.mail. I put a check and warning in to notify the user of this kind of situation. Aug 8 2005 initial version Notes In the data table for the Suite I have a table named DuckTapeRootLeftovers, which contains left overs from Sean's DuckTape Tool. In addition there is a table named commercialSuiteReference, which is a reference copy of the current version of the commercial suite as it exists on SourceForge at this time (Aug 8 2005), just in case you've modified your local copy. --- NEW FILE: callbackLoop --- (This appears to be a binary file; contents omitted.) |
|
From: creedon <icr...@us...> - 2005-11-18 21:00:35
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/menuCommands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23320 Added Files: importAetr launchApplication newDesktopScriptInstaller Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: launchApplication --- (This appears to be a binary file; contents omitted.) --- NEW FILE: newDesktopScriptInstaller --- (This appears to be a binary file; contents omitted.) --- NEW FILE: importAetr --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/data/DuckTapeRootLeftovers/DuckTapeSuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23281 Added Files: createGlue isApp compileDocs createDocOutline menu importAeteInfo Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: createGlue --- (This appears to be a binary file; contents omitted.) --- NEW FILE: isApp --- FrontierVcsFile:1:scpt:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeSuite.isApp on isApp (theFile) { if DuckTapeData.appTypes contains file.type (theFile) { return (true)} else { return (false)}} --- NEW FILE: menu --- FrontierVcsFile:1:mbar:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeSuite.menu AAEFAQAAAdMAAQAAAAAAAAAAAAACfwHvA7oE2gAAAAAAAAZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgArAAMBjwJnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAABoAAAAgwAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAuUdjcb8cPc8AAACFAAABUgG/AhoDQExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAARHVja1RhcGUNCUVudGVyIHlvdXIgQXBw1XMgTmFtZckNCU9wZW4gVGFibGUgJiBNZW51DQktDQlFeHBvcnQgSW5zdGFsbCBGaWxlyQ0JLQ0JPSJMYXVuY2ggIiArIHRlbXAuYXBwbmFtZQ0JLQ0JSW1wb3J0ICdhZXRlJyBJbmZvyQ2AAAAAAAAAAAAAAAoAAAAAAAABD+FUAAAAAAAKAAAAAAAAAQ/hWAAAAAAAAAAAAAAACgAAAAAAAAEP4VwAAAAAAAAAAAAAAAoAAAAAAAABD+FoAAAAAAAAAAAAAAAKAAAAAAAAAQ/h5AACAAAABgAAAAEAAAIAAA8GR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAKT3sle/G5hUAAAANgAAAIwAfwFUAgBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAA2AAAAAAAAAAgAAAFoAAAGrAAwCAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAACAAIAAAAAAACkQdLDuUeHEQAAAD4BAACxALYBLgHJTEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAABsb2NhbCAoYWRyVGFibGUgPSBAc3lzdGVtLnZlcmJzLmFwcHMuW3RlbXAuYXBwbmFtZV0pDWlmIG5vdCBkZWZpbmVkIChhZHJUYWJsZV4pDQlzY3JpcHRFcnJvciAoIlVzZSB0aGUgRW50ZXIgeW91ciBBcHAncyBOYW1lIGNvbW1hbmQgZmlyc3QuIikNDWVkaXQgKGFkclRhYmxlKQ0NaWYgYWRyVGFibGVeLmFwcEluZm8uc2hhcmVkTWVudXMNCWxvY2FsIChpZCA9IGFkclRhYmxlXi5hcHBJbmZvLmlkKQ0JbG9jYWwgKGFkciA9IEBzeXN0ZW0ubWVudXMuc2hhcmVkTWVudXMuW2lkXSkNCWlmIGRlZmluZWQgKGFkcl4pDQkJZWRpdCAoYWRyKQ0JZWxzZQ0JCWlmIGRpYWxvZy5jb25maXJtICgiQ3JlYXRlIGEgbmV3IHNoYXJlZCBtZW51IGZvciAiICsgdGVtcC5hcHBuYW1lICsgIj8iKQ0JCQluZXcgKG1lbnViYXJUeXBlLCBhZHIpDQkJCWVkaXQgKGFkcikNgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAgAAAAAAAAAIAAAAGAAAAAQAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAApAwRN78b+msAAABhAAAAsQC2AS4ByUxBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAADYAAAAAAAAACAAAABgAAAAEAAAIAAA8GR2VuZXZhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAKUoyCq/G9QQAAAALAAAAJYAfwFeAgBMQU5E////////AAAAAAAAbWFjIAAAAAAAAAAAAAAAAA2AAAAAAAAAAgAAAAYAAAABAAACAAAPBkdlbmV2YQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAACkDBE3vxwlngAAAGcAAACxALYBLgHJTEFORP///////wAAAAAAAG1hYyAAAAAAAAAAAAAAAAANgAAAAAAA --- NEW FILE: compileDocs --- (This appears to be a binary file; contents omitted.) --- NEW FILE: importAeteInfo --- (This appears to be a binary file; contents omitted.) --- NEW FILE: createDocOutline --- (This appears to be a binary file; contents omitted.) |
|
From: creedon <icr...@us...> - 2005-11-18 21:00:25
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/data/userCallbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23201 Added Files: afterParseAetr Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: afterParseAetr --- FrontierVcsFile:1:tabl:suites.aeTerminology.data.userCallbacks.afterParseAetr |
|
From: creedon <icr...@us...> - 2005-11-18 21:00:16
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/data/userCallbacks/afterAppInfoInitialized In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23022 Added Files: setOsaxIdToLand Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: setOsaxIdToLand --- (This appears to be a binary file; contents omitted.) |
|
From: creedon <icr...@us...> - 2005-11-18 21:00:03
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/data/DuckTapeRootLeftovers/DuckTapeData In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22980 Added Files: newMenubar Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: newMenubar --- FrontierVcsFile:1:mbar:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeData.newMenubar AAEFAQAAAckAAQAAAAAAAAAAAAABaAFkAhIDHAAAAAAAAAZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgBhAHMBRwF8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAABeAAAAgwAAAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAprz+rrDzmKoAAADDAAABWQF/AiEDAExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAU2NyaXB0cw0JQWJvdXQgdGhlIFNjcmlwdHMgTWVudckNCS0NCVNhbXBsZSBTY3JpcHQgIzENCVNhbXBsZSBTY3JpcHQgIzINCVNhbXBsZSBTY3JpcHQgIzMNCS0NCUVkaXQgU2hhcmVkIE1lbnUNCUVkaXQgU2NyaXB0cyBUYWJsZQ2AAAAAAAAAAAAAAAoAAAAAAAAGzp3oAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACk0AAAAAAAAAAAAAAAAAAApUAAAAAAAAAAAAAAIAAAAYAAAAqgABAgAADwZHZW5ldmEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAAAAAAAAAAGVAAAprz/H62FeQAAAAAnAAABWQF/AiEDAExBTkT///////8AAAAAAABtYWMgAAAAAAAAAAAAAAAAbG9jYWwgKGFwcG5hbWUgPSBzeXMuZnJvbnRtb3N0QXBwICgpKQ1Gcm9udGllci5icmluZ1RvRnJvbnQgKCkNZGlhbG9nLm5vdGlmeSAoIlRoaXMgbWVudSBjb250YWlucyBzY3JpcHRzIHdyaXR0ZW4gd2l0aCBVc2VyTGFuZCBGcm9udGllci4iKQ1zeXMuYnJpbmdBcHBUb0Zyb250IChhcHBuYW1lKQ2AAAAAAACAAAAAAACAAAAAAACAAAAAAAA= |
|
From: creedon <icr...@us...> - 2005-11-18 20:59:59
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/data/DuckTapeRootLeftovers/DuckTapeInfo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22948 Added Files: version name releaseDate authorEmail description homePageUrl stampedTime releaseNotes author Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: releaseDate --- FrontierVcsFile:1:date:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.releaseDate 7/2/02; 2:04:33 PM --- NEW FILE: description --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.description My updated suites.commercial, modified for Mac OS X --- NEW FILE: author --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.author Sean Elfstrom --- NEW FILE: releaseNotes --- FrontierVcsFile:1:optx:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.releaseNotes 0.4 Fri, Dec 6, 2002 at 9:09:37 AM by SE found another "string4" coercion that needed to be made 0.5 Tue, Dec 10, 2002 at 3:38:21 PM by SE workaround for special case of FileMaker Pro 6 having an event named "eventInfo". This should be investigated further, but I wanted to get a quick fix out ASAP --- NEW FILE: authorEmail --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.authorEmail sel...@im... --- NEW FILE: version --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.version 0.5 --- NEW FILE: homePageUrl --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.homePageUrl --- NEW FILE: stampedTime --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.stampedTime Tue, Dec 10, 2002 at 3:37:28 PM by SE --- NEW FILE: name --- FrontierVcsFile:1:TEXT:suites.aeTerminology.data.DuckTapeRootLeftovers.DuckTapeInfo.name DuckTape |
|
From: creedon <icr...@us...> - 2005-11-18 20:59:54
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/utilities In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22933 Added Files: getObjectmodelTableTerminology Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: getObjectmodelTableTerminology --- (This appears to be a binary file; contents omitted.) |
|
From: creedon <icr...@us...> - 2005-11-18 20:59:52
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/suites/aeTerminology/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22924 Added Files: afterAppInfoInitialized Log Message: merge from branch commercial_suite_project-branch --- NEW FILE: afterAppInfoInitialized --- FrontierVcsFile:1:tabl:suites.aeTerminology.callbacks.afterAppInfoInitialized |