space Baylys
Just practicing to pass the Turing test.
space
space
space
space
Developer for Hire!
space
addedValues Plugin
space

Home

What's new

Bayly.Root

Cornershop Plugin

Career

edutools Root

Enhancements

Interests

linguist Plugin

Manila

Patches

space

mainresponder

space
space

adminSite

calendar

controlpanel

discuss

space
space

editmessageForm

newMessageForm

postEditedMessage

space

getFileMimeType

members

parseMultipart

respond

subscriptions

space

manilaData

manilamacros

manilaSuite

system

Patches by Group

Papers

Sales

Sign My Guestbook

User(land) Relations.

Contact Address

Search Baylys

urlchains

space
Join Now
Login
space space space

mainresponder.discuss.editmessageForm

Increase the size (maximum length) of the subject field in the edit Message form from 40 (60) to 70 (100).

on editMessageForm (msgNum, flLinkToReferer=false, flShowFileList=false, flShowFileUpload=false, fileprompt=nil, subjectPrompt=nil, bodyPrompt=nil, actionURL="", flLimitSubjectLength=true)
  «Display the edit message form.
  «Changes:
 unaltered lines omitted
 
  local (pta = html.getPageTableAddress ())
  «workspace.pt = pta^; edit (@workspace.pt) //debugging
  local (htmlText = "", indentLevel = 0)
  local (flWysEditor = false, flTagEditor = true)
  bundle //figure out which editing tool is preferred
 
  on add (s)
 unaltered lines omitted
 
  on translateToEntities (s)
 unaltered lines omitted
 
  local (flOpml = false)
  local (adrMsg = mainResponder.discuss.getMessageTable (msgNum, pta:pta))
  local (s = string (adrMsg^.body))
  «bundle //PBS 12/14/00: if this was edited in Radio, return the OPML
  bundle //PBS 05/23/01: if this was edited in Radio, present a warning
  s = translateToEntities (s) //PBS 01/31/00: convert quotes, ampersands, and left carets to HTML entities.
  local (editorText = mainResponder.discuss.getHtmlEditor (s, pta))
 
  if not (mainResponder.discuss.memberCanEdit (adrMsg, pta^.adrMemberInfo)) //PBS 6/9/99
 unaltered lines omitted
  «if string.lower (adrMsg^.member) != string.lower (nameOf (pta^.adrmemberinfo^))
 unaltered lines omitted
 
  local (enctypeAttrib = "")
  if flShowFileUpload
 unaltered lines omitted
  if actionURL == ""
 unaltered lines omitted
 
  if (editorText == "") or (flTagEditor)
 unaltered lines omitted
  else
  if flWysEditor
  try
 unaltered lines omitted
  else
  log.add(tryError, "DABdebug") «08/03/10, 14:09:29 by DAB
  add ("<form name=\"editMessageForm\" method=\"POST\"" + enctypeAttrib + " action=\"" + actionURL + "\" onsubmit=\"setMode(true);document.editMessageForm.body.value = document.frames('idEdit').document.body.innerHTML;\">"); indentLevel++
  add ("<input type=\"hidden\" name=\"body\">")
  add ("<input type=\"hidden\" name=\"msgNum\" value=\"" + msgNum + "\">")
 
  if flLinkToReferer
 unaltered lines omitted
  if flShowFileUpload
 unaltered lines omitted
  if flShowFileList
 unaltered lines omitted
 
  «Subject prompt.
  local (subject = adrMsg^.subject)
  subject = translateToEntities (subject) //PBS 01/31/00: convert quotes, ampersands, and left carets to HTML entities.
  if subjectprompt == nil //JES 04/10/00: get the default subjectprompt
 unaltered lines omitted
  if flLimitSubjectLength
 unaltered lines omitted
  else //no subject length limit
 unaltered lines omitted
 
  «PBS 02/15/00: possibly add the HTML editor buttons and menus.
  if bodyprompt == nil //JES 04/10/00: get the default bodyprompt
 unaltered lines omitted
  if editorText == ""
 unaltered lines omitted
  else //add the HTML editor
 unaltered lines omitted
 
  if flOpml //PBS 12/14/00: let mainResponder know that it's an OPML document
 unaltered lines omitted
 
  add ("<p><input type=\"submit\" value=\"" + mainResponder.getString ("discuss.postChangesButtonText") + "\">")
  add ("</form>"); indentLevel--
 
  return (htmlText)
«bundle //test code
  «html.setPageTableAddress (@workspace.pt)
  «editMessageForm (22, subjectPrompt:"Subject", bodyPrompt:"Body")
  «html.deletePageTableAddress ()

Relative to Frontier version 9.7b10