openfirst-cvscommit Mailing List for openFIRST (Page 87)
Brought to you by:
xtimg
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(41) |
Jun
(210) |
Jul
(39) |
Aug
(153) |
Sep
(147) |
Oct
(173) |
Nov
(81) |
Dec
(163) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(33) |
Feb
(18) |
Mar
|
Apr
(62) |
May
|
Jun
(100) |
Jul
(38) |
Aug
(58) |
Sep
(1) |
Oct
|
Nov
(25) |
Dec
(172) |
2005 |
Jan
(31) |
Feb
(12) |
Mar
(67) |
Apr
(92) |
May
(247) |
Jun
(34) |
Jul
(36) |
Aug
(192) |
Sep
(15) |
Oct
(42) |
Nov
(92) |
Dec
(4) |
2006 |
Jan
|
Feb
(21) |
Mar
|
Apr
|
May
|
Jun
(53) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(4) |
May
|
Jun
(15) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dav...@us...> - 2003-08-20 07:10:03
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/js In directory sc8-pr-cvs1:/tmp/cvs-serv6641/js Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/js added to the repository |
From: <dav...@us...> - 2003-08-20 06:12:20
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/custom/templates In directory sc8-pr-cvs1:/tmp/cvs-serv6825/templates Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/custom/templates added to the repository |
From: <dav...@us...> - 2003-08-20 05:48:44
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/custom/templates In directory sc8-pr-cvs1:/tmp/cvs-serv6847 Added Files: t3.php t2.php t1.php Log Message: initial upload --- NEW FILE: t3.php --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Loading Template...</title> </head> <body onload="window.dialogArguments._onload(window);"> <strong>Template 3</strong><br> <table border="1" bgcolor="#ff0000"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table> </body> </html> --- NEW FILE: t2.php --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Loading Template...</title> </head> <body onload="window.dialogArguments._onload(window);"> <strong>Template 2</strong><br> <table border="1" bgcolor="#0000ff"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table> </body> </html> --- NEW FILE: t1.php --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Loading Template...</title> </head> <body onload="window.dialogArguments._onload(window);"> <strong>Template 1</strong><br> <? for($i=0;$i<200;$i++) { ?> <table border="1" bgcolor="#008000"> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table> <? } ?> </body> </html> |
From: <dav...@us...> - 2003-08-20 05:47:03
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/images In directory sc8-pr-cvs1:/tmp/cvs-serv6620/images Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/images added to the repository |
From: <dav...@us...> - 2003-08-20 05:21:34
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/modules In directory sc8-pr-cvs1:/tmp/cvs-serv6672/modules Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/modules added to the repository |
From: <dav...@us...> - 2003-08-20 04:30:56
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg In directory sc8-pr-cvs1:/tmp/cvs-serv7362 Added Files: DHTMLEditor Info.txt Log Message: initial upload --- NEW FILE: DHTMLEditor Info.txt --- (This appears to be a binary file; contents omitted.) |
From: <dav...@us...> - 2003-08-20 04:30:22
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/dialog In directory sc8-pr-cvs1:/tmp/cvs-serv6496/dialog Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/dialog added to the repository |
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/gecko/dev In directory sc8-pr-cvs1:/tmp/cvs-serv7583 Added Files: Text Color.htm Midas Specification.htm Midas Demo.htm Converting an app using document_designMode from IE to Midas.htm .DS_Store Log Message: initial upload --- NEW FILE: Text Color.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0051)http://www.mozilla.org/editor/midasdemo/colors.html --> <HTML><HEAD><TITLE>Text Color</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <SCRIPT> function selectColor(color) { parent.document.getElementById("edit").contentDocument.execCommand(parent.command, false, color); parent.document.getElementById("colorpalette").style.visibility="hidden"; parent.document.getElementById("edit").contentWindow.focus(); } function InitColorPalette() { if (document.getElementsByTagName) var x = document.getElementsByTagName('TD'); else if (document.all) var x = document.all.tags('TD'); for (var i=0;i<x.length;i++) { x[i].onmouseover = over; x[i].onmouseout = out; x[i].onclick = click; } } function over() { this.style.border='2px dotted white'; } function out() { this.style.border='1px solid gray'; } function click() { selectColor(this.id); } </SCRIPT> <META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD> <BODY bgColor=white onload=InitColorPalette()> <TABLE cellSpacing=1 cellPadding=1 border=1> <TBODY> <TR> <TD id=#FFFFFF width=20 bgColor=#ffffff height=20><IMG height=1 width=1></TD> <TD id=#FFCCCC width=20 bgColor=#ffcccc height=20><IMG height=1 width=1></TD> <TD id=#FFCC99 width=20 bgColor=#ffcc99 height=20><IMG height=1 width=1></TD> <TD id=#FFFF99 width=20 bgColor=#ffff99 height=20><IMG height=1 width=1></TD> <TD id=#FFFFCC width=20 bgColor=#ffffcc height=20><IMG height=1 width=1></TD> <TD id=#99FF99 width=20 bgColor=#99ff99 height=20><IMG height=1 width=1></TD> <TD id=#99FFFF width=20 bgColor=#99ffff height=20><IMG height=1 width=1></TD> <TD id=#CCFFFF width=20 bgColor=#ccffff height=20><IMG height=1 width=1></TD> <TD id=#CCCCFF width=20 bgColor=#ccccff height=20><IMG height=1 width=1></TD> <TD id=#FFCCFF width=20 bgColor=#ffccff height=20><IMG height=1 width=1></TD></TR> <TR> <TD id=#CCCCCC width=20 bgColor=#cccccc height=20><IMG height=1 width=1></TD> <TD id=#FF6666 width=20 bgColor=#ff6666 height=20><IMG height=1 width=1></TD> <TD id=#FF9966 width=20 bgColor=#ff9966 height=20><IMG height=1 width=1></TD> <TD id=#FFFF66 width=20 bgColor=#ffff66 height=20><IMG height=1 width=1></TD> <TD id=#FFFF33 width=20 bgColor=#ffff33 height=20><IMG height=1 width=1></TD> <TD id=#66FF99 width=20 bgColor=#66ff99 height=20><IMG height=1 width=1></TD> <TD id=#33FFFF width=20 bgColor=#33ffff height=20><IMG height=1 width=1></TD> <TD id=#66FFFF width=20 bgColor=#66ffff height=20><IMG height=1 width=1></TD> <TD id=#9999FF width=20 bgColor=#9999ff height=20><IMG height=1 width=1></TD> <TD id=#FF99FF width=20 bgColor=#ff99ff height=20><IMG height=1 width=1></TD></TR> <TR> <TD id=#C0C0C0 width=20 bgColor=#c0c0c0 height=20><IMG height=1 width=1></TD> <TD id=#FF0000 width=20 bgColor=#ff0000 height=20><IMG height=1 width=1></TD> <TD id=#FF9900 width=20 bgColor=#ff9900 height=20><IMG height=1 width=1></TD> <TD id=#FFCC66 width=20 bgColor=#ffcc66 height=20><IMG height=1 width=1></TD> <TD id=#FFFF00 width=20 bgColor=#ffff00 height=20><IMG height=1 width=1></TD> <TD id=#33FF33 width=20 bgColor=#33ff33 height=20><IMG height=1 width=1></TD> <TD id=#66CCCC width=20 bgColor=#66cccc height=20><IMG height=1 width=1></TD> <TD id=#33CCFF width=20 bgColor=#33ccff height=20><IMG height=1 width=1></TD> <TD id=#6666CC width=20 bgColor=#6666cc height=20><IMG height=1 width=1></TD> <TD id=#CC66CC width=20 bgColor=#cc66cc height=20><IMG height=1 width=1></TD></TR> <TR> <TD id=#999999 width=20 bgColor=#999999 height=20><IMG height=1 width=1></TD> <TD id=#CC0000 width=20 bgColor=#cc0000 height=20><IMG height=1 width=1></TD> <TD id=#FF6600 width=20 bgColor=#ff6600 height=20><IMG height=1 width=1></TD> <TD id=#FFCC33 width=20 bgColor=#ffcc33 height=20><IMG height=1 width=1></TD> <TD id=#FFCC00 width=20 bgColor=#ffcc00 height=20><IMG height=1 width=1></TD> <TD id=#33CC00 width=20 bgColor=#33cc00 height=20><IMG height=1 width=1></TD> <TD id=#00CCCC width=20 bgColor=#00cccc height=20><IMG height=1 width=1></TD> <TD id=#3366FF width=20 bgColor=#3366ff height=20><IMG height=1 width=1></TD> <TD id=#6633FF width=20 bgColor=#6633ff height=20><IMG height=1 width=1></TD> <TD id=#CC33CC width=20 bgColor=#cc33cc height=20><IMG height=1 width=1></TD></TR> <TR> <TD id=#666666 width=20 bgColor=#666666 height=20><IMG height=1 width=1></TD> <TD id=#990000 width=20 bgColor=#990000 height=20><IMG height=1 width=1></TD> <TD id=#CC6600 width=20 bgColor=#cc6600 height=20><IMG height=1 width=1></TD> <TD id=#CC9933 width=20 bgColor=#cc9933 height=20><IMG height=1 width=1></TD> <TD id=#999900 width=20 bgColor=#999900 height=20><IMG height=1 width=1></TD> <TD id=#009900 width=20 bgColor=#009900 height=20><IMG height=1 width=1></TD> <TD id=#339999 width=20 bgColor=#339999 height=20><IMG height=1 width=1></TD> <TD id=#3333FF width=20 bgColor=#3333ff height=20><IMG height=1 width=1></TD> <TD id=#6600CC width=20 bgColor=#6600cc height=20><IMG height=1 width=1></TD> <TD id=#993399 width=20 bgColor=#993399 height=20><IMG height=1 width=1></TD></TR> <TR> <TD id=#333333 width=20 bgColor=#333333 height=20><IMG height=1 width=1></TD> <TD id=#660000 width=20 bgColor=#660000 height=20><IMG height=1 width=1></TD> <TD id=#993300 width=20 bgColor=#993300 height=20><IMG height=1 width=1></TD> <TD id=#996633 width=20 bgColor=#996633 height=20><IMG height=1 width=1></TD> <TD id=#666600 width=20 bgColor=#666600 height=20><IMG height=1 width=1></TD> <TD id=#006600 width=20 bgColor=#006600 height=20><IMG height=1 width=1></TD> <TD id=#336666 width=20 bgColor=#336666 height=20><IMG height=1 width=1></TD> <TD id=#000099 width=20 bgColor=#000099 height=20><IMG height=1 width=1></TD> <TD id=#333399 width=20 bgColor=#333399 height=20><IMG height=1 width=1></TD> <TD id=#663366 width=20 bgColor=#663366 height=20><IMG height=1 width=1></TD></TR> <TR> <TD id=#000000 width=20 bgColor=#000000 height=20><IMG height=1 width=1></TD> <TD id=#330000 width=20 bgColor=#330000 height=20><IMG height=1 width=1></TD> <TD id=#663300 width=20 bgColor=#663300 height=20><IMG height=1 width=1></TD> <TD id=#663333 width=20 bgColor=#663333 height=20><IMG height=1 width=1></TD> <TD id=#333300 width=20 bgColor=#333300 height=20><IMG height=1 width=1></TD> <TD id=#003300 width=20 bgColor=#003300 height=20><IMG height=1 width=1></TD> <TD id=#003333 width=20 bgColor=#003333 height=20><IMG height=1 width=1></TD> <TD id=#000066 width=20 bgColor=#000066 height=20><IMG height=1 width=1></TD> <TD id=#330099 width=20 bgColor=#330099 height=20><IMG height=1 width=1></TD> <TD id=#330033 width=20 bgColor=#330033 height=20><IMG height=1 width=1></TD></TR></TBODY></TABLE></BODY></HTML> --- NEW FILE: Midas Specification.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0045)http://www.mozilla.org/editor/midas-spec.html --> <HTML><HEAD><TITLE>Midas Specification</TITLE> <META http-equiv=content-type content="text/html; charset=ISO-8859-1"> <META content="Kathleen Brade" name=author><LINK href="Midas Specification-Dateien/persistent-style.css" type=text/css rel=stylesheet><LINK href="../images/mozilla-16.png" type=image/png rel=icon> <META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD> <BODY> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=bannercell vAlign=top><A class=bannerlink href="http://www.mozilla.org/"><IMG class=mozillaorgbanner height=58 alt="" src="Midas Specification-Dateien/mozilla-banner.gif" width=600> </A></TD></TR></TBODY></TABLE> <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0> <TBODY> <TR> <TD vAlign=top> <TABLE class=outersidebar border=0> <TBODY> <TR> <TD class=bordercell vAlign=top> <TABLE class=middlesidebar cellSpacing=3 border=0> <TBODY> <TR> <TD class=titlecell vAlign=top> <TABLE class=innersidebar cellSpacing=3 cellPadding=0 border=0> <TBODY> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/"><B>The Mozilla<BR>Organization</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/mozorg.html">At A Glance</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/feedback.html">Feedback</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/get-involved.html">Get Involved</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/community.html">Newsgroups</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/MPL/">License Terms</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/catalog/"><B>Developer Docs</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/roadmap.html">Roadmap</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/projects/">Projects</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/ports/">Ports</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/owners.html">Module Owners</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/hacking/">Hacking</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/source.html">Get the Source</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/build/">Build It</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/quality/"><B>Testing</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/releases/">Download</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://bugzilla.mozilla.org/enter_bug.cgi?format=guided">Report A Bug</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/bugs/">Bugzilla</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/quality/bug-writing-guidelines.html">Bug Writing</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/tools.html"><B>Tools</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://lxr.mozilla.org/seamonkey/">View Source</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey">Tree Status</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=day&mindate=&maxdate=&cvsroot=%2Fcvsroot">New Checkins</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://bugzilla.mozilla.org/">Submit A Bug</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/faq.html"><B>FAQ</B></A></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/search.html"><B>Search</B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD> <TD vAlign=top>Last revised: November 15, 2002<BR><BR>Midas is rich text editing controls for a document.<BR><BR> <H1>Enabling Midas:</H1> <DIV style="MARGIN-LEFT: 40px">Given a document, you can add the attribute "designMode" and set it to "on" to get an editable document. For example, in JavaScript, if you have an iframe with an id of 'edit', you can get its contentDocument and set designMode to "on" like this:<BR> <DIV style="MARGIN-LEFT: 40px"><CODE>document.getElementById("edit").contentDocument.designMode="on";</CODE> </DIV><BR>Right now, you can't completely turn off editing by setting designMode to "off." Setting designMode to "off" will prevent certain operations from being handled but typing and other actions are still possible.<BR></DIV><BR> <H1>Invoking Commands:</H1> <H2>execCommand<BR></H2> <DIV style="MARGIN-LEFT: 40px">Given a document that has Midas enabled, you can invoke specific commands on the document by calling execCommand with 3 parameters. For example, in JavaScript, if you have an editable document, you can invoke the bold command by calling this:<BR> <DIV style="MARGIN-LEFT: 40px"><CODE>editableDocument.execCommand("Bold", false, null); </CODE></DIV>Notes: If you haven't set designMode to "On", you will get an error. This could also happen if you call execCommand with the wrong document.<BR><BR>There are 3 required parameters for execCommand:<BR> <OL> <LI>command string <LI>boolean flag for showing UI <LI>value string </LI></OL>The first parameter is a string which contains the command. The second parameter is a boolean flag. If it is set to true, you will get an error (NS_ERROR_NOT_IMPLEMENTED). The third parameter is a string which is the value. Some commands will require details such as the particular size you want to set when setting a font size.<BR><BR>The section on Supported Commands will document each command and any corresponding values needed.<BR></DIV> <DIV style="MARGIN-LEFT: 40px"></DIV><BR> <H2>queryCommandEnabled</H2> <BLOCKQUOTE>This command operates on the editable document. There is one required parameter (the command string). The result is a boolean which is true if the command is can be done given the current selection and/or caret position. The result is false if the command should not be invoked (execCommand) given the current selection and/or caret position. <BR></BLOCKQUOTE><BR> <H2>queryCommandState</H2> <BLOCKQUOTE>xxx<BR></BLOCKQUOTE><BR> <H2>queryCommandValue</H2> <BLOCKQUOTE>xxx<BR></BLOCKQUOTE><BR> <H1>Supported Commands:</H1> <DIV style="MARGIN-LEFT: 40px">The following list of commands is presented in alphabetical order. The commands may be mixed case or whatever makes your code more readable.<BR><BR> <TABLE style="WIDTH: 100%; TEXT-ALIGN: left" cellSpacing=2 cellPadding=2 border=1> <TBODY> <TR> <TD style="VERTICAL-ALIGN: top">command<BR></TD> <TD style="VERTICAL-ALIGN: top">value<BR></TD> <TD style="VERTICAL-ALIGN: top">explanation / behavior<BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">backcolor<BR></TD> <TD style="VERTICAL-ALIGN: top">????<BR></TD> <TD style="VERTICAL-ALIGN: top">This command is untested right now.<BR>This command will set the background color of the document.</TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">bold<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">If there is no selection, the insertion point will set bold for subsequently typed characters. <BR><BR>If there is a selection and all of the characters are already bold, the bold will be removed. Otherwise, all selected characters will become bold.<BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">copy<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">If there is a selection, this command will copy the selection to the clipboard. If there isn't a selection, nothing will happen.<BR><BR>note: the shortcut key will automatically trigger this command (typically accel-C)<BR></TD></TR> <TR> <TD vAlign=top>createlink<BR></TD> <TD vAlign=top>url (href)<BR></TD> <TD vAlign=top>This command will not do anything if no selection is made. If there is a selection, a link will be inserted around the selection with the url parameter as the href of the link.<BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">cut<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">If there is a selection, this command will copy the selection to the clipboard and remove the selection from the edit control. If there isn't a selection, nothing will happen.<BR><BR>note: the shortcut key will automatically trigger this command (typically accel-X)<BR></TD></TR> <TR> <TD vAlign=top>delete<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top>This command will delete all text and objects that are selected.<BR></TD></TR> <TR> <TD vAlign=top>fontname<BR></TD> <TD vAlign=top>????<BR></TD> <TD vAlign=top>This command will set the fontface for a selection or at the insertion point if there is no selection.<BR></TD></TR> <TR> <TD vAlign=top>fontsize<BR></TD> <TD vAlign=top>????<BR></TD> <TD vAlign=top>This command will set the fontsize for a selection or at the insertion point if there is no selection.<BR></TD></TR> <TR> <TD vAlign=top>forecolor<BR></TD> <TD vAlign=top>????<BR></TD> <TD vAlign=top>This command is untested right now.<BR>This command will set the text color of the selection or at the insertion point.<BR></TD></TR> <TR> <TD vAlign=top>formatblock<BR></TD> <TD vAlign=top>????<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD vAlign=top>heading<BR></TD> <TD vAlign=top>????<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">indent<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">Indent the block where the caret is located.<BR></TD></TR> <TR> <TD vAlign=top>inserthorizontalrule<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top>This command will insert a horizontal rule (line) at the insertion point.<BR><BR>Does it delete the selection?<BR></TD></TR> <TR> <TD vAlign=top>insertimage<BR></TD> <TD vAlign=top>url (src)<BR></TD> <TD vAlign=top>This command will insert an image (referenced by url) at the insertion point.<BR><BR>Does it delete the selection?<BR></TD></TR> <TR> <TD vAlign=top>insertorderedlist<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD vAlign=top>insertunorderedlist<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">italic<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">If there is no selection, the insertion point will set italic for subsequently typed characters. <BR><BR>If there is a selection and all of the characters are already italic, the italic will be removed. Otherwise, all selected characters will become italic.</TD></TR> <TR> <TD vAlign=top>justifycenter<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD vAlign=top>justifyfull<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD vAlign=top>justifyleft<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD vAlign=top>justifyright<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">outdent<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">Outdent the block where the caret is located. If the block is not indented prior to calling outdent, nothing will happen.<BR><BR>note: is an error thrown if no outdenting is done?<BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">paste<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">This command is disabled for the time being to prevent security exploits.<BR><BR>This command will paste the contents of the clipboard at the location of the caret. If there is a selection, it will be deleted prior to the insertion of the clipboard's contents.<BR><BR>note: the shortcut key will automatically trigger this command (typically accel-V)</TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">redo<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">This command will redo the previous undo action. If undo was not the most recent action, this command will have no effect.<BR><BR>note: the shortcut key will automatically trigger this command (typically accel-shift-Z)</TD></TR> <TR> <TD vAlign=top>removeformat<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">selectall<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">This command will select all of the contents within the editable area.<BR><BR>note: the shortcut key will automatically trigger this command (typically accel-A)<BR></TD></TR> <TR> <TD vAlign=top>strikethrough<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top>If there is no selection, the insertion point will set strikethrough for subsequently typed characters. <BR><BR>If there is a selection and all of the characters are already striked, the strikethrough will be removed. Otherwise, all selected characters will have a line drawn through them.<BR></TD></TR> <TR> <TD vAlign=top>subscript<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top>If there is no selection, the insertion point will set subscript for subsequently typed characters. <BR><BR>If there is a selection and all of the characters are already subscripted, the subscript will be removed. Otherwise, all selected characters will be drawn slightly lower than normal text.<BR></TD></TR> <TR> <TD vAlign=top>superscript<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top>If there is no selection, the insertion point will set superscript for subsequently typed characters. <BR><BR>If there is a selection and all of the characters are already superscripted, the superscript will be removed. Otherwise, all selected characters will be drawn slightly higher than normal text<BR></TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">underline<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">If there is no selection, the insertion point will set underline for subsequently typed characters. <BR><BR>If there is a selection and all of the characters are already underlined, the underline will be removed. Otherwise, all selected characters will become underlined.</TD></TR> <TR> <TD style="VERTICAL-ALIGN: top">undo<BR></TD> <TD style="VERTICAL-ALIGN: top">none<BR></TD> <TD style="VERTICAL-ALIGN: top">This command will undo the previous action. If no action has occurred in the document, then this command will have no effect.<BR><BR>note: the shortcut key will automatically trigger this command (typically accel-Z)<BR></TD></TR> <TR> <TD vAlign=top>unlink<BR></TD> <TD vAlign=top>none<BR></TD> <TD vAlign=top><BR></TD></TR></TBODY></TABLE><BR></DIV><BR></TD></TR> <TR> <TD vAlign=top align=right colSpan=2> <DIV class=documentinfo>Copyright © 1998-2003 The Mozilla Organization. <BR>Last modified November 18, 2002. <BR><A href="http://www.mozilla.org/webtools/bonsai/cvslog.cgi?file=mozilla-org/html/editor/midas-spec.html&rev=&root=/cvsroot/">Document History</A>. <BR><A href="http://doctor.mozilla.org/?file=mozilla-org/html/editor/midas-spec.html">Edit this Page</A>. </DIV></TD></TR></TBODY></TABLE></BODY></HTML> --- NEW FILE: Midas Demo.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0040)http://www.mozilla.org/editor/midasdemo/ --> <HTML><HEAD><TITLE>Midas Demo</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <STYLE type=text/css>.imagebutton { BORDER-RIGHT: #c0c0c0 2px solid; BORDER-TOP: #c0c0c0 2px solid; BORDER-LEFT: #c0c0c0 2px solid; WIDTH: 23px; BORDER-BOTTOM: #c0c0c0 2px solid; HEIGHT: 22px; BACKGROUND-COLOR: #c0c0c0 } .image { BORDER-RIGHT: medium none; BORDER-TOP: medium none; LEFT: 1px; BORDER-LEFT: medium none; WIDTH: 21px; BORDER-BOTTOM: medium none; POSITION: relative; TOP: 1px; HEIGHT: 20px } .toolbar { HEIGHT: 30px; BACKGROUND-COLOR: #c0c0c0 } </STYLE> <SCRIPT> var command = ""; function InitToolbarButtons() { kids = document.getElementsByTagName('DIV'); for (var i=0; i < kids.length; i++) { if (kids[i].className == "imagebutton") { kids[i].onmouseover = tbmouseover; kids[i].onmouseout = tbmouseout; kids[i].onmousedown = tbmousedown; kids[i].onmouseup = tbmouseup; kids[i].onclick = tbclick; } } } function tbmousedown(e) { this.firstChild.style.left = 2; this.firstChild.style.top = 2; this.style.border="inset 2px"; e.preventDefault(); } function tbmouseup() { this.firstChild.style.left = 1; this.firstChild.style.top = 1; this.style.border="outset 2px"; } function tbmouseout() { this.style.border="solid 2px #C0C0C0"; } function tbmouseover() { this.style.border="outset 2px"; } function insertNodeAtSelection(win, insertNode) { // get current selection var sel = win.getSelection(); // get the first range of the selection // (there's almost always only one range) var range = sel.getRangeAt(0); // deselect everything sel.removeAllRanges(); // remove content of current selection from document range.deleteContents(); // get location of current selection var container = range.startContainer; var pos = range.startOffset; // make a new range for the new selection range=document.createRange(); if (container.nodeType==3 && insertNode.nodeType==3) { // if we insert text in a textnode, do optimized insertion container.insertData(pos, insertNode.nodeValue); // put cursor after inserted text range.setEnd(container, pos+insertNode.length); range.setStart(container, pos+insertNode.length); } else { var afterNode; if (container.nodeType==3) { // when inserting into a textnode // we create 2 new textnodes // and put the insertNode in between var textNode = container; container = textNode.parentNode; var text = textNode.nodeValue; // text before the split var textBefore = text.substr(0,pos); // text after the split var textAfter = text.substr(pos); var beforeNode = document.createTextNode(textBefore); var afterNode = document.createTextNode(textAfter); // insert the 3 new nodes before the old one container.insertBefore(afterNode, textNode); container.insertBefore(insertNode, afterNode); container.insertBefore(beforeNode, insertNode); // remove the old node container.removeChild(textNode); } else { // else simply insert the node afterNode = container.childNodes[pos]; container.insertBefore(insertNode, afterNode); } range.setEnd(afterNode, 0); range.setStart(afterNode, 0); } sel.addRange(range); }; function getOffsetTop(elm) { var mOffsetTop = elm.offsetTop; var mOffsetParent = elm.offsetParent; while(mOffsetParent){ mOffsetTop += mOffsetParent.offsetTop; mOffsetParent = mOffsetParent.offsetParent; } return mOffsetTop; } function getOffsetLeft(elm) { var mOffsetLeft = elm.offsetLeft; var mOffsetParent = elm.offsetParent; while(mOffsetParent){ mOffsetLeft += mOffsetParent.offsetLeft; mOffsetParent = mOffsetParent.offsetParent; } return mOffsetLeft; } function tbclick() { if ((this.id == "forecolor") || (this.id == "hilitecolor")) { parent.command = this.id; buttonElement = document.getElementById(this.id); document.getElementById("colorpalette").style.left = getOffsetLeft(buttonElement); document.getElementById("colorpalette").style.top = getOffsetTop(buttonElement) + buttonElement.offsetHeight; document.getElementById("colorpalette").style.visibility="visible"; } else if (this.id == "createlink") { var szURL = prompt("Enter a URL:", ""); document.getElementById('edit').contentWindow.document.execCommand("CreateLink",false,szURL) } else if (this.id == "createtable") { e = document.getElementById("edit"); rowstext = prompt("enter rows"); colstext = prompt("enter cols"); rows = parseInt(rowstext); cols = parseInt(colstext); if ((rows > 0) && (cols > 0)) { table = e.contentWindow.document.createElement("table"); table.setAttribute("border", "1"); table.setAttribute("cellpadding", "2"); table.setAttribute("cellspacing", "2"); tbody = e.contentWindow.document.createElement("tbody"); for (var i=0; i < rows; i++) { tr =e.contentWindow.document.createElement("tr"); for (var j=0; j < cols; j++) { td =e.contentWindow.document.createElement("td"); br =e.contentWindow.document.createElement("br"); td.appendChild(br); tr.appendChild(td); } tbody.appendChild(tr); } table.appendChild(tbody); insertNodeAtSelection(e.contentWindow, table); } } else { document.getElementById('edit').contentWindow.document.execCommand(this.id, false, null); } } function Select(selectname) { var cursel = document.getElementById(selectname).selectedIndex; /* First one is always a label */ if (cursel != 0) { var selected = document.getElementById(selectname).options[cursel].value; document.getElementById('edit').contentWindow.document.execCommand(selectname, false, selected); document.getElementById(selectname).selectedIndex = 0; } document.getElementById("edit").contentWindow.focus(); } function dismisscolorpalette() { document.getElementById("colorpalette").style.visibility="hidden"; } function Start() { document.getElementById('edit').contentWindow.document.designMode = "on"; try { document.getElementById('edit').contentWindow.document.execCommand("undo", false, null); } catch (e) { alert("This demo is not supported on your level of Mozilla."); } InitToolbarButtons(); document.addEventListener("mousedown", dismisscolorpalette, true); document.getElementById("edit").contentWindow.document.addEventListener("mousedown", dismisscolorpalette, true); document.addEventListener("keypress", dismisscolorpalette, true); document.getElementById("edit").contentWindow.document.addEventListener("keypress", dismisscolorpalette, true); } </SCRIPT> <META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD> <BODY onload=Start()> <H2>Please note that the changing of text format (Heading, Paragraph, etc.) will only function properly on a 1.3b build dated after January 26, 2003. Thanks.</H2> <TABLE id=toolbar1 bgColor=#c0c0c0> <TBODY> <TR> <TD> <DIV class=imagebutton id=cut><IMG class=image title=Cut alt=Cut src="Midas Demo-Dateien/cut.gif"></DIV></TD> <TD> <DIV class=imagebutton id=copy><IMG class=image title=Copy alt=Copy src="Midas Demo-Dateien/copy.gif"></DIV></TD> <TD> <DIV class=imagebutton id=paste><IMG class=image title=Paste alt=Paste src="Midas Demo-Dateien/paste.gif"></DIV> <TD></TD> <TD></TD> <TD> <DIV class=imagebutton id=undo><IMG class=image title=Undo alt=Undo src="Midas Demo-Dateien/undo.gif"></DIV></TD> <TD> <DIV class=imagebutton id=redo><IMG class=image title=Redo alt=Redo src="Midas Demo-Dateien/redo.gif"></DIV></TD> <TD></TD> <TD> <DIV class=imagebutton id=createlink style="LEFT: 10px"><IMG class=image title="Insert Link" alt="Insert Link" src="Midas Demo-Dateien/link.gif"></DIV></TD> <TD></TD> <TD> <DIV class=imagebutton id=createtable style="LEFT: 10px"><IMG class=image title="Insert Table" alt="Insert Table" src="Midas Demo-Dateien/table.gif"></DIV></TD></TR></TBODY></TABLE><BR> <TABLE id=toolbar2 bgColor=#c0c0c0> <TBODY> <TR> <TD><SELECT id=formatblock onchange=Select(this.id);> <OPTION value="<p>" selected>Normal</OPTION> <OPTION value="<p>">Paragraph</OPTION> <OPTION value="<h1>">Heading 1</OPTION> <OPTION value="<h2>">Heading 2</OPTION> <OPTION value="<h3>">Heading 3</OPTION> <OPTION value="<h4>">Heading 4</OPTION> <OPTION value="<h5>">Heading 5</OPTION> <OPTION value="<h6>">Heading 6</OPTION> <OPTION value="<address>">Address <ADDR></OPTION> <OPTION value="<pre>">Formatted</OPTION></SELECT> </TD> <TD><SELECT id=fontname onchange=Select(this.id);> <OPTION value=Font selected>Font</OPTION> <OPTION value=Arial>Arial</OPTION> <OPTION value=Courier>Courier</OPTION> <OPTION value="Times New Roman">Times New Roman</OPTION></SELECT> </TD> <TD><SELECT id=fontsize onchange=Select(this.id); unselectable="on"> <OPTION value=Size selected>Size</OPTION> <OPTION value=1>1</OPTION> <OPTION value=2>2</OPTION> <OPTION value=3>3</OPTION> <OPTION value=4>4</OPTION> <OPTION value=5>5</OPTION> <OPTION value=6>6</OPTION> <OPTION value=7>7</OPTION></SELECT> </TD> <TD> <DIV class=imagebutton id=bold><IMG class=image title=Bold alt=Bold src="Midas Demo-Dateien/bold.gif"></DIV></TD> <TD> <DIV class=imagebutton id=italic><IMG class=image title=Italic alt=Italic src="Midas Demo-Dateien/italic.gif"></DIV></TD> <TD> <DIV class=imagebutton id=underline><IMG class=image title=Underline alt=Underline src="Midas Demo-Dateien/underline.gif"></DIV></TD> <TD></TD> <TD> <DIV class=imagebutton id=forecolor style="LEFT: 10px"><IMG class=image title="Text Color" alt="Text Color" src="Midas Demo-Dateien/forecolor.gif"></DIV></TD> <TD> <DIV class=imagebutton id=hilitecolor style="LEFT: 40px"><IMG class=image title="Background Color" alt="Background Color" src="Midas Demo-Dateien/backcolor.gif"></DIV></TD> <TD></TD> <TD> <DIV class=imagebutton id=justifyleft style="LEFT: 10px"><IMG class=image title="Align Left" alt="Align Left" src="Midas Demo-Dateien/justifyleft.gif"></DIV></TD> <TD> <DIV class=imagebutton id=justifycenter style="LEFT: 40px"><IMG class=image title=Center alt=Center src="Midas Demo-Dateien/justifycenter.gif"></DIV></TD> <TD> <DIV class=imagebutton id=justifyright style="LEFT: 70px"><IMG class=image title="Align Right" alt="Align Right" src="Midas Demo-Dateien/justifyright.gif"></DIV></TD> <TD></TD> <TD> <DIV class=imagebutton id=insertorderedlist style="LEFT: 10px"><IMG class=image title="Ordered List" alt="Ordered List" src="Midas Demo-Dateien/orderedlist.gif"></DIV></TD> <TD> <DIV class=imagebutton id=insertunorderedlist style="LEFT: 40px"><IMG class=image title="Unordered List" alt="Unordered List" src="Midas Demo-Dateien/unorderedlist.gif"></DIV></TD> <TD></TD> <TD> <DIV class=imagebutton id=outdent style="LEFT: 10px"><IMG class=image title=Outdent alt=Outdent src="Midas Demo-Dateien/outdent.gif"></DIV></TD> <TD> <DIV class=imagebutton id=indent style="LEFT: 40px"><IMG class=image title=Indent alt=Indent src="Midas Demo-Dateien/indent.gif"></DIV></TD></TR></TBODY></TABLE><BR><IFRAME id=edit src="about:blank" width="100%" height=200></IFRAME><IFRAME id=colorpalette style="VISIBILITY: hidden; POSITION: absolute" src="Midas Demo-Dateien/colors.htm" width=250 height=170></IFRAME></IFRAME> <SCRIPT> function viewsource(source) { if (source) { var html = document.createTextNode(document.getElementById('edit').contentWindow.document.body.innerHTML); document.getElementById('edit').contentWindow.document.body.innerHTML = ""; document.getElementById('edit').contentWindow.document.body.appendChild(html); document.getElementById("toolbar1").style.visibility="hidden"; document.getElementById("toolbar2").style.visibility="hidden"; } else { var html = document.getElementById('edit').contentWindow.document.body.ownerDocument.createRange(); html.selectNodeContents(document.getElementById('edit').contentWindow.document.body); document.getElementById('edit').contentWindow.document.body.innerHTML = html.toString(); document.getElementById("toolbar1").style.visibility="visible"; document.getElementById("toolbar2").style.visibility="visible"; } } function usecss(source) { document.getElementById('edit').contentWindow.document.execCommand("useCSS", false, !(source)); } function readonly(source) { document.getElementById('edit').contentWindow.document.execCommand("readonly", false, !(source)); } </SCRIPT> <INPUT onclick=viewsource(this.checked) type=checkbox> View HTML Source</INPUT> <INPUT onclick=usecss(this.checked) type=checkbox CHECKED> Use CSS</INPUT> <INPUT onclick=readonly(this.checked) type=checkbox> Read only</INPUT> </BODY></HTML> --- NEW FILE: Converting an app using document_designMode from IE to Midas.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0043)http://www.mozilla.org/editor/ie2midas.html --> <HTML><HEAD><TITLE>Converting an app using document.designMode from IE to Midas.</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"><LINK href="Converting an app using document_designMode from IE to Midas-Dateien/persistent-style.css" type=text/css rel=stylesheet><LINK href="../images/mozilla-16.png" type=image/png rel=icon> <META content="MSHTML 6.00.2800.1141" name=GENERATOR></HEAD> <BODY> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=bannercell vAlign=top><A class=bannerlink href="http://www.mozilla.org/"><IMG class=mozillaorgbanner height=58 alt="" src="Converting an app using document_designMode from IE to Midas-Dateien/mozilla-banner.gif" width=600> </A></TD></TR></TBODY></TABLE> <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0> <TBODY> <TR> <TD vAlign=top> <TABLE class=outersidebar border=0> <TBODY> <TR> <TD class=bordercell vAlign=top> <TABLE class=middlesidebar cellSpacing=3 border=0> <TBODY> <TR> <TD class=titlecell vAlign=top> <TABLE class=innersidebar cellSpacing=3 cellPadding=0 border=0> <TBODY> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/"><B>The Mozilla<BR>Organization</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/mozorg.html">At A Glance</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/feedback.html">Feedback</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/get-involved.html">Get Involved</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/community.html">Newsgroups</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/MPL/">License Terms</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/catalog/"><B>Developer Docs</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/roadmap.html">Roadmap</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/projects/">Projects</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/ports/">Ports</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/owners.html">Module Owners</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/hacking/">Hacking</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/source.html">Get the Source</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/build/">Build It</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/quality/"><B>Testing</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/releases/">Download</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://bugzilla.mozilla.org/enter_bug.cgi?format=guided">Report A Bug</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/bugs/">Bugzilla</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://www.mozilla.org/quality/bug-writing-guidelines.html">Bug Writing</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/tools.html"><B>Tools</B></A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://lxr.mozilla.org/seamonkey/">View Source</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey">Tree Status</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=day&mindate=&maxdate=&cvsroot=%2Fcvsroot">New Checkins</A></TD></TR> <TR> <TD></TD> <TD class=linkcell><A href="http://bugzilla.mozilla.org/">Submit A Bug</A></TD></TR> <TR> <TD class=spacercell></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/faq.html"><B>FAQ</B></A></TD></TR> <TR> <TD class=linkcell colSpan=2><A href="http://www.mozilla.org/search.html"><B>Search</B></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD> <TD vAlign=top> <H2>Converting an app using document.designMode from IE to Midas. </H2> <P>This document provides an overview of porting an application using Internet Explorer's <SPAN style="FONT-FAMILY: monospace">document.designMode="on"</SPAN> functionality over to the new Mozilla Midas API. The first version of Mozilla that supports Midas fully is 1.3b. Note <SPAN style="FONT-FAMILY: monospace">contenteditable</SPAN> is not supported by Mozilla at this time. <P>A demo of basic Midas functionality is available at <A href="http://www.mozilla.org/editor/midasdemo">http://www.mozilla.org/editor/midasdemo</A>. This demo was NOT designed to function on both IE and Mozilla. It will be updated in the future. Note that there is a great deal of Midas functionality that goes beyond what IE provides. This will be documented elsewhere. </P> <P></P> <P>Note that many of the modifications you will have to make to enable your application to work with Mozilla are not specific to the new editor functionality - they are general modifications that would need to be made to make your application work on Mozilla anyway. Most of these are related to areas where Internet Explorer is not compliant with W3C specifications. </P> <OL> <LI> <P>All instances of <SPAN style="FONT-FAMILY: monospace">document.all.element</SPAN> must be replaced by <SPAN style="FONT-FAMILY: monospace">document.getElementById('element')</SPAN>. When you do this, you must make sure that all your elements actually have an "id" attribute, since <SPAN style="FONT-FAMILY: monospace">document.all</SPAN> works with both "id" and "name" attributes. </P> <P>In addition, any places where you reference elements directly by name must be changed to use <SPAN style="FONT-FAMILY: monospace">getElementById</SPAN> as well. For example, IE allows you to reference the style of a table element by using <SPAN style="FONT-FAMILY: monospace">tablecell.style</SPAN> - with Mozilla, you must use <SPAN style="FONT-FAMILY: monospace">document.getElementById('tablecell').style</SPAN>.</P> <P>Finally, IE provides different arrays such as frames, so that you can use <SPAN style="FONT-FAMILY: monospace">frames.iframename</SPAN>. For Mozilla, you must use <SPAN style="FONT-FAMILY: monospace">document.getElementById</SPAN> to reference the iframe. </P> <LI> <P>IE allows the <SPAN style="FONT-FAMILY: monospace">focus()</SPAN> method to be used directly on an iframe. Technically, the focus method should be executed against the contentWindow. The following code fragment can be used to replace <SPAN style="FONT-FAMILY: monospace">iframe.focus()</SPAN> and will work with IE and Mozilla.</P><PRE>document.getElementById("iframe").contentWindow.focus() </PRE> <LI> <P>Setting <SPAN style="FONT-FAMILY: monospace">document.designMode</SPAN> <STRONG>must NOT</STRONG> be done in the <SPAN style="FONT-FAMILY: monospace">script</SPAN> section of the <SPAN style="FONT-FAMILY: monospace">head</SPAN>. We suggest the onLoad function for the body where the iframe is contained.</P> <LI> <P>On IE, the document is obtained like this: <SPAN style="FONT-FAMILY: monospace">iframename.document</SPAN>. This is then used to do things like execCommand, etc. This does not work on Mozilla. You must use <SPAN style="FONT-FAMILY: monospace">document.getElementById("iframename").contentWindow.document</SPAN>. This method works on IE as well. </P> <LI> <P>If you would like to provide tooltip text for your toolbar buttons, you must use the title= attribute for images in addition to the alt= attribute. The alt= attribute is provided for accessibility purposes and while IE does allow it to be used for tooltips, the W3C compliant way is to use title= which works on both IE and Mozilla. For more information, please see: <A href="http://www.hixie.ch/advocacy/alttext">http://www.hixie.ch/advocacy/alttext</A>. </P> <LI> <P>Currently, the command "createlink" does not support displaying a user interface. You use Javascript to query the URL from the user. For instance: <PRE>var szURL = prompt("Enter the URL", ""); . . . getDocument().execCommand('createlink',false,szURL); </PRE> <P></P> <LI> <P>Due to ambiguity in the Microsoft specification for execCommand, Mozilla requires that you specify all three parameters in order to guarantee the behavior you are expecting. </P> <LI> <P>In researching the parameters to <SPAN style="FONT-FAMILY: monospace">formatblock</SPAN> for execCommand, we have determined that the current use of "Heading 1", "Preformatted", "Normal", etc. in most editors on the web is incorrect. These words are translated, so if you hardcode them in your application, it will not function on non-English browsers. Microsoft has provided non-localized versions of these identifiers and we suggest that they be used to guarantee your application works in all versions of IE, as well as Mozilla. Note that in all of our research, the Normal identifiers functions exactly like the Paragraph identifier. </P> <P>Here is the mapping: </P> <TABLE border=1> <TBODY> <TR> <TD>Localized Version</TD> <TD>Equivalent</TD></TR> <TR> <TD>Normal</TD> <TD><P></TD></TR> <TR> <TD>Heading 1</TD> <TD><H1></TD></TR> <TR> <TD>Heading 2</TD> <TD><H2></TD></TR> <TR> <TD>Heading 3</TD> <TD><H3></TD></TR> <TR> <TD>Heading 4</TD> <TD><H4></TD></TR> <TR> <TD>Heading 5</TD> <TD><H5></TD></TR> <TR> <TD>Heading 6</TD> <TD><H6></TD></TR> <TR> <TD>Paragraph</TD> <TD><P></TD></TR> <TR> <TD>Preformatted</TD> <TD><PRE></TD></TR> <TR> <TD>Address</TD> <TD><ADDRESS></TD></TR></TBODY></TABLE> <LI> <P>View source must be done differently for Mozilla. Here is a mapping between the two methods. </P> <P>IE method to switch to source view: </P><PRE>iHTML = getDocument().body.innerHTML; getDocument().body.innerText = iHTML; </PRE> <P>Mozilla method to switch to source view: </P><PRE>var html = document.createTextNode(getDocument().body.innerHTML); getDocument().body.innerHTML = ""; getDocument().body.appendChild(html); </PRE> <P>IE method to switch back to regular view: </P><PRE>iText = getDocument().body.innerText; getDocument().body.innerHTML = iText; </PRE> <P>Mozilla method to switch back to regular view: </P><PRE>var html = getDocument().body.ownerDocument.createRange(); html.selectNodeContents(getDocument().body); getDocument().body.innerHTML = html.toString(); </PRE> <P></P> <LI> <P>Inserting arbitrary HTML is not supported at this time. For an example of how to insert a table, plese see the demo at <A href="http://www.mozilla.org/editor/midasdemo">http://www.mozilla.org/editor/midasdemo</A> </P> <LI>The <SPAN style="FONT-FAMILY: monospace">print</SPAN> option to execCommand does not work with Mozilla. To print the document, simply call the <SPAN style="FONT-FAMILY: monospace">print()</SPAN> function on contentWindow. For example: <PRE>document.getElementById("iframe").contentWindow.print(); </PRE> <LI>The <SPAN style="FONT-FAMILY: monospace">backcolor</SPAN> option to execCommand behaves differently on Mozilla than on IE. It sets the background of the entire document. If you just want to hilite text, similar to the way backcolor behaves on IE, use <SPAN style="FONT-FAMILY: monospace">hilitecolor</SPAN>. <LI> <P>If you would like to detect whether or not the version of Mozilla that is being used support Midas at all, you can use this code snippet:</P><PRE>document.getElementById('edit').contentDocument.designMode = "on"; try { document.getElementById('edit').contentDocument.execCommand("undo", false, null); } catch (e) { alert("This demo is not supported on your level of Mozilla."); } </PRE></LI></OL></TD></TR> <TR> <TD vAlign=top align=right colSpan=2> <DIV class=documentinfo>Copyright © 1998-2003 The Mozilla Organization. <BR>Last modified January 30, 2003. <BR><A href="http://www.mozilla.org/webtools/bonsai/cvslog.cgi?file=mozilla-org/html/editor/ie2midas.html&rev=&root=/cvsroot/">Document History</A>. <BR><A href="http://doctor.mozilla.org/?file=mozilla-org/html/editor/ie2midas.html">Edit this Page</A>. </DIV></TD></TR></TBODY></TABLE></BODY></HTML> --- NEW FILE: .DS_Store --- (This appears to be a binary file; contents omitted.) |
From: <dav...@us...> - 2003-08-20 04:17:48
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/custom In directory sc8-pr-cvs1:/tmp/cvs-serv6463/custom Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/custom added to the repository |
From: <dav...@us...> - 2003-08-20 04:15:42
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/css In directory sc8-pr-cvs1:/tmp/cvs-serv6321/css Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/css added to the repository |
From: <dav...@us...> - 2003-08-20 03:59:27
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/css In directory sc8-pr-cvs1:/tmp/cvs-serv6726 Added Files: toolbars.css Log Message: initial upload --- NEW FILE: toolbars.css --- .sglButton { BACKGROUND-COLOR: buttonface; BORDER-BOTTOM: buttonface solid 1px; BORDER-LEFT: buttonface solid 1px; BORDER-RIGHT: buttonface solid 1px; BORDER-TOP: buttonface solid 1px; HEIGHT: 23px; WIDTH: 23px; } .sglIcon { POSITION: RELATIVE; LEFT: 0px; TOP: px; } .sglIconDown { POSITION: RELATIVE; LEFT: +1; TOP: +1; } .sglButtonMouseOverUp { BACKGROUND-COLOR: buttonface; BORDER-BOTTOM: buttonshadow solid 1px; BORDER-LEFT: buttonhighlight solid 1px; BORDER-RIGHT: buttonshadow solid 1px; BORDER-TOP: buttonhighlight solid 1px; HEIGHT: 23px; WIDTH: 24px; } .sglButtonMouseOverDown { BACKGROUND-COLOR: buttonface; BORDER-BOTTOM: buttonhighlight solid 1px; BORDER-LEFT: buttonshadow solid 1px; BORDER-RIGHT: buttonhighlight solid 1px; BORDER-TOP: buttonshadow solid 1px; HEIGHT: 23px; WIDTH: 24px; } .sglButtonDown { BACKGROUND-COLOR: gainsboro; BORDER-BOTTOM: buttonhighlight solid 1px; BORDER-LEFT: buttonshadow solid 1px; BORDER-RIGHT: buttonhighlight solid 1px; BORDER-TOP: buttonshadow solid 1px; HEIGHT: 23px; WIDTH: 24px; } .sglSeparator { BORDER-LEFT: buttonshadow solid 1px; BORDER-RIGHT: buttonhighlight solid 1px; FONT-SIZE: 0px; HEIGHT: 22px; WIDTH: 1px; } .sglSeparatorLine { BORDER-LEFT: buttonshadow solid 1px; BORDER-RIGHT: buttonhighlight solid 1px; FONT-SIZE: 0px; HEIGHT: 1px; } .sglGeneral { HEIGHT: 22px; } .sglMenuIconMouseOver { BACKGROUND-COLOR: buttonface; BORDER-BOTTOM: buttonshadow solid 1px; BORDER-LEFT: buttonhighlight solid 1px; BORDER-RIGHT: buttonshadow solid 1px; BORDER-TOP: buttonhighlight solid 1px; } .sglToolbar { BACKGROUND-COLOR: buttonface; BORDER-BOTTOM: buttonshadow solid 1px; BORDER-LEFT: buttonhighlight solid 1px; BORDER-RIGHT: buttonshadow solid 1px; BORDER-TOP: buttonhighlight solid 1px; HEIGHT: 27px; } |
From: <dav...@us...> - 2003-08-20 03:57:58
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv16254 Modified Files: first.php Log Message: Fixed header problem. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** first.php 15 Aug 2003 18:04:05 -0000 1.16 --- first.php 19 Aug 2003 20:47:59 -0000 1.17 *************** *** 118,122 **** // If it is the current module then color the item if (\$currentmodule == \$module->modulename){ ! \$headers .= \" | » <font color='red'><b><a class='menu' href='\$basepath/\$module->modulename'>\".ucwords(\$module->modulename).\"</a></b></font>\"; // Declare important variables so that headers can pick them up and preview them --- 118,122 ---- // If it is the current module then color the item if (\$currentmodule == \$module->modulename){ ! \$headers .= \" » <font color='red'><u><a class='menu' href='\$basepath/\$module->modulename'>\".ucwords(\$module->modulename).\"</a></u></font> |\"; // Declare important variables so that headers can pick them up and preview them |
From: <dav...@us...> - 2003-08-20 03:55:59
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/gecko/js In directory sc8-pr-cvs1:/tmp/cvs-serv6985/js Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/gecko/js added to the repository |
From: <dav...@us...> - 2003-08-20 03:54:51
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg In directory sc8-pr-cvs1:/tmp/cvs-serv5482/wysiwyg Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg added to the repository |
From: <dav...@us...> - 2003-08-20 03:34:00
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/gecko In directory sc8-pr-cvs1:/tmp/cvs-serv6530/gecko Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/gecko added to the repository |
From: <dav...@us...> - 2003-08-20 03:07:22
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/dialog In directory sc8-pr-cvs1:/tmp/cvs-serv7291 Added Files: setlink.htm selcolor.htm instable.htm Log Message: initial upload --- NEW FILE: setlink.htm --- <HTML> <HEAD> <TITLE>Set Hyperlink</TITLE> <STYLE TYPE="text/css"> BODY {margin-left:10; font-family:Arial; font-size:10; background:menu} BUTTON {width:7em} TABLE {font-family:Arial; font-size:10} P {text-align:center} </STYLE> <SCRIPT LANGUAGE=JavaScript> <!-- function set_target(s_obj) { var tval = s_obj.options[s_obj.selectedIndex].value; HREFtarget.value = tval; } function IsDigit() { return ((event.keyCode >= 48) && (event.keyCode <= 57)) } // --> </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=window EVENT=onload> <!-- for ( elem in window.dialogArguments ) { if (elem=='link') { HREFlink.value = window.dialogArguments["link"]; if (!HREFlink.value) HREFlink.value=''; } if (elem=='target') { HREFtarget.value = window.dialogArguments["target"]; //if (!HREFtarget.value) HREFtarget.value='_self'; } } // --> </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick> <!-- var arr = new Array(); arr["link"] = HREFlink.value; arr["target"] = HREFtarget.value; window.returnValue = arr; window.close(); // --> </SCRIPT> </HEAD> <BODY> <table cellpadding="6" cellspacing="" border="0"> <tr> <td> <fieldset><legend>Hyperlink information</legend> <table> <tr> <td>URL</td> <td><INPUT TYPE=TEXT SIZE=40 NAME=HREFlink></td> </tr> <tr> <td>Target</td> <td> <script> var config = window.dialogArguments["config"]; if (!config) { config = new Array(); config['advanced'] = 0; } if (config['advanced'] == 1) { document.writeln('<INPUT TYPE=TEXT SIZE=10 NAME=HREFtarget>'); document.writeln(' '); document.writeln('<img align="middle" src="../images/target.gif" alt="Choose Target here -->" width="23" height="22" border="0" title="Choose Target here -->">'); } else { document.writeln('<INPUT TYPE=HIDDEN NAME=HREFtarget>'); } </script> <select onchange="set_target(this)" title="Choose Target here"> <option value=""></option> <option value="_self">Open link in same window</option> <option value="_blank">Open link in new window</option> <script> if (config['advanced'] == 1) { document.writeln('<option value="_blank">_blank</option>'); document.writeln('<option value="_self">_self</option>'); document.writeln('<option value="_parent">_parent</option>'); document.writeln('<option value="_top">_top</option>'); } </script> </select> </td> </tr> <tr> <td>Email:</td> <td> <a href="#" onclick="HREFtarget.value='';HREFlink.value='mailto:';HREFlink.focus();">Click here to set an email address link</a> </td> </tr> </table> </fieldset> </td> <td> <BUTTON ID=Ok TYPE=SUBMIT>OK</BUTTON><br> <BUTTON ONCLICK="window.close();">Cancel</BUTTON> </td> </tr> </table> </BODY> </HTML> --- NEW FILE: selcolor.htm --- <!-- Copyright 1998 Microsoft Corporation. All rights reserved. --> <HTML> <HEAD> <TITLE>Select Color</TITLE> <STYLE TYPE="text/css"> BODY {margin-left:10; font-family:Verdana; font-size:12; background:menu} BUTTON {width:5em} P {text-align:center} TABLE {cursor:hand} </STYLE> <SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onclick> SelColor.value = event.srcElement.title; </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseover> text = event.srcElement.title; if ( text != event.srcElement.bgColor ) text += " (" + event.srcElement.bgColor + ")"; RGB.innerText = text; </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseout> RGB.innerText = " "; </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick> window.returnValue = SelColor.value; window.close(); </SCRIPT> </HEAD> <!-- Copyright 1998 Microsoft Corporation. All rights reserved. --> <BODY> <DIV> </DIV> <P> <TABLE ID=ColorTable BORDER=1 BORDERCOLOR=SILVER BORDERCOLORLIGHT=WHITE BORDERCOLORDARK=BLACK CELLSPACING=0 CELLPADDING=0> <TR> <TD BGCOLOR=aliceblue TITLE=aliceblue> <TD BGCOLOR=antiquewhite TITLE=antiquewhite> <TD BGCOLOR=aqua TITLE=aqua> <TD BGCOLOR=aquamarine TITLE=aquamarine> <TD BGCOLOR=azure TITLE=azure> <TD BGCOLOR=beige TITLE=beige> <TD BGCOLOR=bisque TITLE=bisque> <TD BGCOLOR=black TITLE=black> <TD BGCOLOR=blanchedalmond TITLE=blanchedalmond> <TD BGCOLOR=blue TITLE=blue> <TD BGCOLOR=blueviolet TITLE=blueviolet> <TD BGCOLOR=brown TITLE=brown> <TD BGCOLOR=burlywood TITLE=burlywood> <TD BGCOLOR=cadetblue TITLE=cadetblue> <TD BGCOLOR=chartreuse TITLE=chartreuse> <TD BGCOLOR=chocolate TITLE=chocolate> <TR> <TD BGCOLOR=coral TITLE=coral> <TD BGCOLOR=cornflower TITLE=cornflower> <TD BGCOLOR=cornsilk TITLE=cornsilk> <TD BGCOLOR=crimson TITLE=crimson> <TD BGCOLOR=cyan TITLE=cyan> <TD BGCOLOR=darkblue TITLE=darkblue> <TD BGCOLOR=darkcyan TITLE=darkcyan> <TD BGCOLOR=darkgoldenrod TITLE=darkgoldenrod> <TD BGCOLOR=darkgray TITLE=darkgray> <TD BGCOLOR=darkgreen TITLE=darkgreen> <TD BGCOLOR=darkkhaki TITLE=darkkhaki> <TD BGCOLOR=darkmagenta TITLE=darkmagenta> <TD BGCOLOR=darkolivegreen TITLE=darkolivegreen> <TD BGCOLOR=darkorange TITLE=darkorange> <TD BGCOLOR=darkorchid TITLE=darkorchid> <TD BGCOLOR=darkred TITLE=darkred> <TR> <TD BGCOLOR=darksalmon TITLE=darksalmon> <TD BGCOLOR=darkseagreen TITLE=darkseagreen> <TD BGCOLOR=darkslateblue TITLE=darkslateblue> <TD BGCOLOR=darkslategray TITLE=darkslategray> <TD BGCOLOR=darkturquoise TITLE=darkturquoise> <TD BGCOLOR=darkviolet TITLE=darkviolet> <TD BGCOLOR=deeppink TITLE=deeppink> <TD BGCOLOR=deepskyblue TITLE=deepskyblue> <TD BGCOLOR=dimgray TITLE=dimgray> <TD BGCOLOR=dodgerblue TITLE=dodgerblue> <TD BGCOLOR=firebrick TITLE=firebrick> <TD BGCOLOR=floralwhite TITLE=floralwhite> <TD BGCOLOR=forestgreen TITLE=forestgreen> <TD BGCOLOR=fuchia TITLE=fuchia> <TD BGCOLOR=gainsboro TITLE=gainsboro> <TD BGCOLOR=ghostwhite TITLE=ghostwhite> <TR> <TD BGCOLOR=gold TITLE=gold> <TD BGCOLOR=goldenrod TITLE=goldenrod> <TD BGCOLOR=gray TITLE=gray> <TD BGCOLOR=green TITLE=green> <TD BGCOLOR=greenyellow TITLE=greenyellow> <TD BGCOLOR=honeydew TITLE=honeydew> <TD BGCOLOR=hotpink TITLE=hotpink> <TD BGCOLOR=indianred TITLE=indianred> <TD BGCOLOR=indigo TITLE=indigo> <TD BGCOLOR=ivory TITLE=ivory> <TD BGCOLOR=khaki TITLE=khaki> <TD BGCOLOR=lavender TITLE=lavender> <TD BGCOLOR=lavenderblush TITLE=lavenderblush> <TD BGCOLOR=lawngreen TITLE=lawngreen> <TD BGCOLOR=lemonchiffon TITLE=lemonchiffon> <TD BGCOLOR=lightblue TITLE=lightblue> <TR> <TD BGCOLOR=lightcoral TITLE=lightcoral> <TD BGCOLOR=lightcyan TITLE=lightcyan> <TD BGCOLOR=lightgoldenrodyellow TITLE=lightgoldenrodyellow> <TD BGCOLOR=lightgreen TITLE=lightgreen> <TD BGCOLOR=lightgrey TITLE=lightgrey> <TD BGCOLOR=lightpink TITLE=lightpink> <TD BGCOLOR=lightsalmon TITLE=lightsalmon> <TD BGCOLOR=lightseagreen TITLE=lightseagreen> <TD BGCOLOR=lightskyblue TITLE=lightskyblue> <TD BGCOLOR=lightslategray TITLE=lightslategray> <TD BGCOLOR=lightsteelblue TITLE=lightsteelblue> <TD BGCOLOR=lightyellow TITLE=lightyellow> <TD BGCOLOR=lime TITLE=lime> <TD BGCOLOR=limegreen TITLE=limegreen> <TD BGCOLOR=linen TITLE=linen> <TD BGCOLOR=magenta TITLE=magenta> <TR> <TD BGCOLOR=maroon TITLE=maroon> <TD BGCOLOR=mediumaquamarine TITLE=mediumaquamarine> <TD BGCOLOR=mediumblue TITLE=mediumblue> <TD BGCOLOR=mediumorchid TITLE=mediumorchid> <TD BGCOLOR=mediumpurple TITLE=mediumpurple> <TD BGCOLOR=mediumseagreen TITLE=mediumseagreen> <TD BGCOLOR=mediumslateblue TITLE=mediumslateblue> <TD BGCOLOR=mediumspringgreen TITLE=mediumspringgreen> <TD BGCOLOR=mediumturquoise TITLE=mediumturquoise> <TD BGCOLOR=mediumvioletred TITLE=mediumvioletred> <TD BGCOLOR=midnightblue TITLE=midnightblue> <TD BGCOLOR=mintcream TITLE=mintcream> <TD BGCOLOR=mistyrose TITLE=mistyrose> <TD BGCOLOR=moccasin TITLE=moccasin> <TD BGCOLOR=navajowhite TITLE=navajowhite> <TD BGCOLOR=navy TITLE=navy> <TR> <TD BGCOLOR=oldlace TITLE=oldlace> <TD BGCOLOR=olive TITLE=olive> <TD BGCOLOR=olivedrab TITLE=olivedrab> <TD BGCOLOR=orange TITLE=orange> <TD BGCOLOR=orangered TITLE=orangered> <TD BGCOLOR=orchid TITLE=orchid> <TD BGCOLOR=palegoldenrod TITLE=palegoldenrod> <TD BGCOLOR=palegreen TITLE=palegreen> <TD BGCOLOR=paleturquoise TITLE=paleturquoise> <TD BGCOLOR=palevioletred TITLE=palevioletred> <TD BGCOLOR=papayawhip TITLE=papayawhip> <TD BGCOLOR=peachpuff TITLE=peachpuff> <TD BGCOLOR=peru TITLE=peru> <TD BGCOLOR=pink TITLE=pink> <TD BGCOLOR=plum TITLE=plum> <TD BGCOLOR=powderblue TITLE=powderblue> <TR> <TD BGCOLOR=purple TITLE=purple> <TD BGCOLOR=red TITLE=red> <TD BGCOLOR=rosybrown TITLE=rosybrown> <TD BGCOLOR=royalblue TITLE=royalblue> <TD BGCOLOR=saddlebrown TITLE=saddlebrown> <TD BGCOLOR=salmon TITLE=salmon> <TD BGCOLOR=sandybrown TITLE=sandybrown> <TD BGCOLOR=seagreen TITLE=seagreen> <TD BGCOLOR=seashell TITLE=seashell> <TD BGCOLOR=sienna TITLE=sienna> <TD BGCOLOR=silver TITLE=silver> <TD BGCOLOR=skyblue TITLE=skyblue> <TD BGCOLOR=slateblue TITLE=slateblue> <TD BGCOLOR=slategray TITLE=slategray> <TD BGCOLOR=snow TITLE=snow> <TD BGCOLOR=springgreen TITLE=springgreen> <TR> <TD BGCOLOR=steelblue TITLE=steelblue> <TD BGCOLOR=tan TITLE=tan> <TD BGCOLOR=teal TITLE=teal> <TD BGCOLOR=thistle TITLE=thistle> <TD BGCOLOR=tomato TITLE=tomato> <TD BGCOLOR=turquoise TITLE=turquoise> <TD BGCOLOR=violet TITLE=violet> <TD BGCOLOR=wheat TITLE=wheat> <TD BGCOLOR=white TITLE=white> <TD BGCOLOR=whitesmoke TITLE=whitesmoke> <TD BGCOLOR=yellow TITLE=yellow> <TD BGCOLOR=yellowgreen TITLE=yellowgreen> </TABLE> <P> <LABEL FOR=SelColor>Color:</LABEL> <INPUT TYPE=TEXT SIZE=20 ID=SelColor> <BR> <SPAN ID=RGB> </SPAN> <P> <BUTTON ID=Ok TYPE=SUBMIT>OK</BUTTON> <BUTTON ONCLICK="window.close();">Cancel</BUTTON> </BODY> </HTML> --- NEW FILE: instable.htm --- <!-- Copyright 1998 Microsoft Corporation. All rights reserved. --> <HTML> <HEAD> <TITLE>Enter Table Information</TITLE> <STYLE TYPE="text/css"> BODY {margin-left:10; font-family:Verdana; font-size:12; background:menu} BUTTON {width:5em} TABLE {font-family:Verdana; font-size:12} P {text-align:center} </STYLE> <SCRIPT LANGUAGE=JavaScript> function IsDigit() { return ((event.keyCode >= 48) && (event.keyCode <= 57)) } </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=window EVENT=onload> for ( elem in window.dialogArguments ) { switch( elem ) { case "NumRows": NumRows.value = window.dialogArguments["NumRows"]; break; case "NumCols": NumCols.value = window.dialogArguments["NumCols"]; break; case "TableAttrs": TableAttrs.value = window.dialogArguments["TableAttrs"]; break; case "CellAttrs": CellAttrs.value = window.dialogArguments["CellAttrs"]; break; case "Caption": Caption.value = window.dialogArguments["Caption"]; break; } } </SCRIPT> <SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick> var arr = new Array(); arr["NumRows"] = NumRows.value; arr["NumCols"] = NumCols.value; arr["TableAttrs"] = TableAttrs.value; arr["CellAttrs"] = CellAttrs.value; arr["Caption"] = Caption.value; window.returnValue = arr; window.close(); </SCRIPT> </HEAD> <BODY> <TABLE CELLSPACING=10> <TR> <TD>Rows: <TD><INPUT ID=NumRows TYPE=TEXT SIZE=3 NAME=NumRows ONKEYPRESS="event.returnValue=IsDigit();"> <TR> <TD>Columns: <TD><INPUT ID=NumCols TYPE=TEXT SIZE=3 NAME=NumCols ONKEYPRESS="event.returnValue=IsDigit();"> <TR> <TD>Table Attributes: <TD><INPUT TYPE=TEXT SIZE=40 NAME=TableAttrs> <TR> <TD>Cell Attributes: <TD><INPUT TYPE=TEXT SIZE=40 NAME=CellAttrs> <TR> <TD>Caption: <TD><INPUT TYPE=TEXT SIZE=40 NAME=Caption> </TABLE> <P> <BUTTON ID=Ok TYPE=SUBMIT>OK</BUTTON> <BUTTON ONCLICK="window.close();">Cancel</BUTTON> </BODY> </HTML> |
From: <dav...@us...> - 2003-08-20 03:02:55
|
Update of /cvsroot/openfirst/base/config/functions/wysiwyg/gecko/gfx In directory sc8-pr-cvs1:/tmp/cvs-serv7022/gfx Log Message: Directory /cvsroot/openfirst/base/config/functions/wysiwyg/gecko/gfx added to the repository |
From: <dav...@us...> - 2003-08-20 03:02:44
|
Update of /cvsroot/openfirst/messenger In directory sc8-pr-cvs1:/tmp/cvs-serv22473 Modified Files: viewmsg.php newmsg.php messenger.php index.php inbox.php Log Message: Module has been changed to allow only members to send and receive messages. A lot of the design has been edited to look and perform better. Index: viewmsg.php =================================================================== RCS file: /cvsroot/openfirst/messenger/viewmsg.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** viewmsg.php 28 Jun 2003 16:09:19 -0000 1.3 --- viewmsg.php 20 Aug 2003 00:40:28 -0000 1.4 *************** *** 29,59 **** include($header); // Retrieve recordset based on querystring ID data, then preview the information ! $query = mysql_query("SELECT * FROM ofirst_messages WHERE ID='".$_GET['ID']."'") or die("SELECT: ".mysql_error()); $msg = mysql_fetch_object($query); // Retrieve user information based Message information ! $qsend = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress='".$msg->Sender."'") or die("SELECT: ".mysql_error()); $sender = mysql_fetch_object($qsend); ?> <h1>Viewing Message</h1> ! <table> <tr> ! <th> </th> ! <th>Current Message</th> </tr> <tr> <th>Sender</th> ! <td>Visitor <?php echo $sender->ID; ?></td> </tr> <tr> <th>Subject</th> ! <td><?php echo $msg->Subject; ?></td> </tr> <tr> <th>Body</th> ! <td><?php echo $msg->Body; ?></td> </tr> </table> --- 29,66 ---- include($header); + if(! isset($user->user)){ + showlogin(); + die(include($footer)); + } + // Retrieve recordset based on querystring ID data, then preview the information ! $query = mysql_query("SELECT * FROM ofirst_messenger_messages WHERE ID='".$_GET['ID']."'") or die("SELECT: ".mysql_error()); $msg = mysql_fetch_object($query); // Retrieve user information based Message information ! $qsend = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE IPAddress='".$msg->Sender."'") or die("SELECT: ".mysql_error()); $sender = mysql_fetch_object($qsend); ?> <h1>Viewing Message</h1> ! <p>If this message contains profanity or abusive material then please contact ! the webmaster!</p> ! <table width="597"> <tr> ! <th width="127"> </th> ! <th width="458">Current Message</th> </tr> <tr> <th>Sender</th> ! <td><a href='profiles.php?ID=<?php echo $msg->Sender ?>'><?php echo $msg->Sender ?></a></td> </tr> <tr> <th>Subject</th> ! <td><?php echo slur_block(emoticon_translate($msg->Subject)); ?></td> </tr> <tr> <th>Body</th> ! <td><?php echo slur_block(emoticon_translate($msg->Body)); ?></td> </tr> </table> Index: newmsg.php =================================================================== RCS file: /cvsroot/openfirst/messenger/newmsg.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newmsg.php 28 Jun 2003 16:09:19 -0000 1.3 --- newmsg.php 20 Aug 2003 00:40:28 -0000 1.4 *************** *** 29,37 **** include($header); // If the user has posted a send command then insert the Message into the database if (isset($_POST['send'])) { ! mysql_query("INSERT INTO ofirst_messages (Sender,Receiver,Subject,Body, Status, Date) values( ! '".$IP."' ,'".$_POST['recip']."' ,'".$_POST['subject']."' --- 29,42 ---- include($header); + if(! isset($user->user)){ + showlogin(); + die(include($footer)); + } + // If the user has posted a send command then insert the Message into the database if (isset($_POST['send'])) { ! mysql_query("INSERT INTO ofirst_messenger_messages (Sender,Receiver,Subject,Body, Status, Date) values( ! '".$user->user."' ,'".$_POST['recip']."' ,'".$_POST['subject']."' *************** *** 40,94 **** ,'".time()."')") or die("INSERT ERROR: ".mysql_error()); ! echo("<br><br><br><center>Message has been sent! [ <a href='inbox.php'>Inbox</a> ]"); die(include($footer)); } ?> <form method="POST" action="newmsg.php"> ! <h1>Visitor Inbox for Messaging</h1> ! <table> ! <tr> ! <th>Recipient</th> ! <td> ! <select name="recip" id="recip"> <?php ! // Set the reply based on a regular member or visitor (David Notes: Coding to be changed later) ! if (ISSET($_GET['REPLY'])){ ! $query = mysql_query("SELECT * FROM ofirst_usersonline WHERE ID = '".$_GET['REPLY']."'"); ! $replyuser = mysql_fetch_object($query); ! if (! $replyuser->Member = "None"){ ! echo "<option value='".$replyuser->IPAddress."'>".$replyuser->Member." (REPLY MSG)</option>"; ! } else { ! echo "<option value='".$replyuser->IPAddress."'>Visitor #".$replyuser->ID." (REPLY MSG)</option>"; ! } ! } else { ! $query = mysql_query("SELECT * FROM ofirst_usersonline"); ! while($user = mysql_fetch_object($query)){ ! if (! $user->Member = "None"){ ! echo "<option value='".$user->IPAddress."'>".$user->Member."</option>"; ! } else { ! echo "<option value='".$user->IPAddress."'>Visitor #".$user->ID."</option>"; ! } ! } } ?> ! </select></td> ! </tr> ! <tr> ! <th>Subject</th> ! <td><input name="subject" type="text" id="subject" size="50" value="<?php if (isset($_GET['SUBJECT'])) { echo $_GET['SUBJECT']; } ?>"></td> ! </tr> ! <tr> ! <th>Body</th> ! <td> ! <textarea name="body" cols="50" rows="10" id="body"></textarea> ! <br> ! <font size="2">(HTML Messages enabled)</font></td> ! </tr> ! <tr> ! <td></td> ! <td><input name="send" type="submit" value="Send Message"></td> ! </tr> ! </table> </form> <?php --- 45,102 ---- ,'".time()."')") or die("INSERT ERROR: ".mysql_error()); ! echo("<br><br><br><center>Message has been sent! [ <a href='inbox.php'>Inbox</a> ]<br><br>"); die(include($footer)); } ?> <form method="POST" action="newmsg.php"> ! <h1>Visitor Inbox for Messaging</h1> ! <p>Please make sure that your messeges do not contain profanity or abusive comments.</p> ! <table width="66%"> ! <th></th><th>Send New Messege</th> ! <tr> ! <td width="34%"><?php emoticon_preview(); ?></td> ! <td width="66%"> ! <table> ! <tr> ! <th>Recipient</th> ! <td> <?php ! // Set the reply based on querystring or list members ! if (ISSET($_GET['RECIP'])){ ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE ID = '".$_GET['RECIP']."'"); ! $recipient = mysql_fetch_object($query); ! echo $recipient->Member; ! echo "<input type='hidden' name='recip' value='".$recipient->Member."'>"; ! }else{ ! echo "<select name='recip'id='recip'>"; ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline"); ! while($recipient = mysql_fetch_object($query)){ ! if(! $recipient->Member == "none"){ ! echo "<option>".$recipient->Member."<option>"; ! } ! } ! echo "</select>"; } ?> ! </td> ! </tr> ! <tr> ! <th>Subject</th> ! <td><input name="subject" type="text" id="subject" size="50" value="<?php if (isset($_GET['SUBJECT'])) { echo $_GET['SUBJECT']; } ?>"></td> ! </tr> ! <tr> ! <th>Body</th> ! <td> <textarea name="body" cols="50" rows="10" id="body"></textarea> ! <br> ! <font size="2">(HTML and emoticon options enabled)</font></td> ! </tr> ! <tr> ! <td></td> ! <td><input name="send" type="submit" value="Send Message"></td> ! </tr> ! </table></td> ! </tr> ! </table> </form> <?php Index: messenger.php =================================================================== RCS file: /cvsroot/openfirst/messenger/messenger.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** messenger.php 29 Jun 2003 03:37:02 -0000 1.4 --- messenger.php 20 Aug 2003 00:40:28 -0000 1.5 *************** *** 26,29 **** --- 26,30 ---- * */ + // Declare information to be used in all messenger files $IP = $_SERVER['REMOTE_ADDR']; *************** *** 32,88 **** // Check if a record for the persons IP is made if not then create it or else update current record info ! $query = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress = '".$IP."'"); if (mysql_num_rows($query) == 0){ $timeout = $TIME+30; ! mysql_query("INSERT INTO ofirst_usersonline (IPAddress,Location,Timestamp,Member) values( '".$IP."' ,'".$SCRIPT."' ,'".$timeout."' ! ,'none')") or die("INSERT: ".mysql_error()); } else { $timeout = $TIME + 480; ! mysql_query("UPDATE ofirst_usersonline SET Timestamp = '".$timeout."', Location = '".$SCRIPT."' WHERE IPAddress = '".$IP."'") or die("UPDATE: ".mysql_error()); } // Delete all records that are overdue the Timestamp expiry amount based on current time ! mysql_query("DELETE FROM ofirst_usersonline WHERE Timestamp < '".$TIME."'") or die("DELETE: ".mysql_error()); // Check how many records of users are available and put in user usable variable ! $query = mysql_query("SELECT * FROM ofirst_usersonline"); $usersonline = "There are currently <b>".mysql_num_rows($query)."</b> persons on this website! [ <a href='./'>View List</a> ]"; // Check how many people are previewing the same exact script location and put in user usable variable ! $page_query = mysql_query("SELECT * FROM ofirst_usersonline WHERE Location = '".$SCRIPT."'"); $usersonpage = "There are currently <b>".mysql_num_rows($page_query)."</b> viewing this page!"; // Check if the user has any new Messages ! $query = mysql_query("SELECT * FROM ofirst_messages WHERE Status = 'New' AND Receiver = '".$IP."'") or die(mysql_error()); ! $Messages = mysql_num_rows($query); // Update Message status so they don't show after the person requests the next page ! mysql_query("UPDATE ofirst_messages SET Status = 'Read' WHERE Receiver = '".$IP."'") or die(mysql_error()); // If there are one ore more then one Messages then preview the Message box ! if ($Messages >= 1) { ?> ! <table style="position: absolute; left: 306px; top: 64px; width: 384px; height: 19px" width="400"> <tr> <th>Private Messaging System Alert</th> </tr> <tr> ! <td height="25"><img src="<?php echo $basepath; ?>/messenger/msg.png" alt="New Message"> <br> ! You have <b><?php echo $Messages; ?></b> new Messages(s) in your visitor ! inbox!<br> ! <br> ! [ <a href="<?php echo $basepath; ?>/messenger/inbox.php">Visitor Inbox</a> ]<br> ! <br> ! </p></td> </tr> </table> ! <?php } ?> --- 33,98 ---- // Check if a record for the persons IP is made if not then create it or else update current record info ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE IPAddress = '".$IP."'"); ! ! if(ISSET($user->user)){ ! $memberinf = $user->user; ! }else{ ! $memberinf = "none"; ! } if (mysql_num_rows($query) == 0){ $timeout = $TIME+30; ! ! mysql_query("INSERT INTO ofirst_messenger_usersonline (IPAddress,Location,Timestamp,Member) values( '".$IP."' ,'".$SCRIPT."' ,'".$timeout."' ! ,'".$memberinf."')") or die("INSERT: ".mysql_error()); } else { $timeout = $TIME + 480; ! mysql_query("UPDATE ofirst_messenger_usersonline SET Timestamp = '".$timeout."', Member = '".$memberinf."', Location = '".$SCRIPT."' WHERE IPAddress = '".$IP."'") or die("UPDATE: ".mysql_error()); } // Delete all records that are overdue the Timestamp expiry amount based on current time ! mysql_query("DELETE FROM ofirst_messenger_usersonline WHERE Timestamp < '".$TIME."'") or die("DELETE: ".mysql_error()); // Check how many records of users are available and put in user usable variable ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline"); $usersonline = "There are currently <b>".mysql_num_rows($query)."</b> persons on this website! [ <a href='./'>View List</a> ]"; // Check how many people are previewing the same exact script location and put in user usable variable ! $page_query = mysql_query("SELECT * FROM ofirst_messenger_usersonline WHERE Location = '".$SCRIPT."'"); $usersonpage = "There are currently <b>".mysql_num_rows($page_query)."</b> viewing this page!"; + if(isset($user->user)){ + // Check if the user has any new Messages ! $query = mysql_query("SELECT * FROM ofirst_messenger_messages WHERE Status = 'New' AND Receiver = '".$user->user."'") or die(mysql_error()); ! $messages = mysql_num_rows($query); // Update Message status so they don't show after the person requests the next page ! mysql_query("UPDATE ofirst_messenger_messages SET Status = 'Read' WHERE Receiver = '".$user->user."'") or die(mysql_error()); // If there are one ore more then one Messages then preview the Message box ! if ($messages >= 1) { ?> ! <table style="position: absolute; left: 32px; top: 163px; width: 384px; height: 19px" width="400"> <tr> <th>Private Messaging System Alert</th> </tr> <tr> ! <td height="25" bgcolor="#FFFFFF"><img src="<?php echo $basepath; ?>/messenger/msg.png" alt="New Message"> ! <br> ! <center>You have <b><?php echo $messages; ?></b> new Messages(s) in your visitor ! inbox!<br><br>[ <a href="<?php echo $basepath; ?>/messenger/inbox.php">Visitor Inbox</a> ]<br><br></p></center></td> </tr> </table> ! <?php ! } ! } ! ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/openfirst/messenger/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 28 Jun 2003 16:09:19 -0000 1.3 --- index.php 20 Aug 2003 00:40:28 -0000 1.4 *************** *** 30,34 **** ?> <h1>Current Online Users</h1> ! <table> <tr> <th></th> --- 30,34 ---- ?> <h1>Current Online Users</h1> ! <table width="538"> <tr> <th></th> *************** *** 40,58 **** // Find user online records in the database ! $query = mysql_query("SELECT * FROM ofirst_usersonline"); ! while($user = mysql_fetch_object($query)){ ?> <tr> <td><img src="visitors.png" alt="Visitor"></td> <td><?php ! if ($user->Member = "none") { ! echo "Visiting Guest #".$user->ID; } else { ! echo $user->Member; } ?></td> ! <td><?php echo $user->Location; ?></td> ! <td>[ <a href="newmsg.php?REPLY=<?php echo $user->ID; ?>"> Message User</a> ! ]</td> </tr> <?php --- 40,65 ---- // Find user online records in the database ! $query = mysql_query("SELECT * FROM ofirst_messenger_usersonline"); ! while($userinf = mysql_fetch_object($query)){ ?> <tr> <td><img src="visitors.png" alt="Visitor"></td> <td><?php ! if ($userinf->Member == "none") { ! echo "Visiting Guest"; } else { ! echo $userinf->Member; } ?></td> ! <td><?php echo $userinf->Location; ?></td> ! <td> ! <?php ! if ($userinf->Member == "none") { ! echo "<center>--</center>"; ! }else{ ! echo "[ <a href='newmsg.php?RECIP=".$userinf->ID."'> Message User</a> ]"; ! } ! ?> ! </td> </tr> <?php Index: inbox.php =================================================================== RCS file: /cvsroot/openfirst/messenger/inbox.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** inbox.php 28 Jun 2003 16:09:19 -0000 1.3 --- inbox.php 20 Aug 2003 00:40:28 -0000 1.4 *************** *** 29,77 **** include($header); // If querystring delete is set with a value then delete the specified recordset if (isset($_GET['DELETE'])) { ! mysql_query("DELETE FROM ofirst_messages WHERE ID='".$_GET['DELETE']."'") or die(mysql_error()); ! ! die("<p>Message has been removed, thank you! [ <a href='inbox.php'>Inbox</a> ]</p>"); } ?> <h1>Visitor Inbox for Messaging</h1> ! <table> <tr> ! <th></th> ! <th>Subject</th> ! <th>Date</th> ! <th>Sender</th> ! <th>Option</th> </tr> <?php ! // Retrieve Messages relating to the users IP address then loop through them ! $query = mysql_query("SELECT * FROM ofirst_messages WHERE Receiver = '$IP'"); ! ! while($Messages = mysql_fetch_object($query)){ ! $queryuser = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress = '".$Messages->Sender."'"); ! $senderinfo = mysql_fetch_object($queryuser); ?> <tr> <td><img src="msg.png" alt="Message"></td> ! <td><a href='viewmsg.php?ID=<?php echo $Messages->ID; ?>'> <?php ! if (empty($Messages->Subject)){ echo "< No Subject >"; } else { ! echo $Messages->Subject; } ?> </a></td> ! <td><?php echo date("F j, Y, g:i a",$Messages->Date); ?></td> ! <td>Visitor #<?php echo $senderinfo->ID; ?></td> ! <td>[ <a href='inbox.php?DELETE=<?php echo $Messages->ID; ?>'> Delete </a> ] ! [ <a href="newmsg.php?REPLY=<?php echo $senderinfo->ID; ?>&SUBJECT=Re: <?php echo $Messages->Subject; ?>">Reply</a> ]</td> </tr> - <?php } ?> - </table> <?php include($footer); ! ?> \ No newline at end of file --- 29,97 ---- include($header); + if(! isset($user->user)){ + showlogin(); + die(include($footer)); + } + // If querystring delete is set with a value then delete the specified recordset if (isset($_GET['DELETE'])) { ! mysql_query("DELETE FROM ofirst_messenger_messages WHERE ID = '".$_GET['DELETE']."'") or die(mysql_error()); ! echo "<br><p>Message has been removed, thank you! [ <a href='inbox.php'>Inbox</a> ]</p><br>"; ! die(include($footer)); ! } ! ! // If user specifies to delete all messesges then delete them ! if (isset($_POST['deleteall'])) { ! mysql_query("DELETE FROM ofirst_messenger_messages WHERE Receiver = '".$user->user."'") or die(mysql_error()); ! echo "<br><p>All messages have been deleted, thank you! [ <a href='inbox.php'>Inbox</a> ]</p><br>"; ! die(include($footer)); } + + // Retrieve Messages relating to the users IP address then loop through them + $query = mysql_query("SELECT * FROM ofirst_messenger_messages WHERE Receiver = '".$user->user."'"); ?> <h1>Visitor Inbox for Messaging</h1> ! <p>You have (<?php echo mysql_num_rows($query); ?>) messages within your inbox.</p> ! <table width="661"> <tr> ! <th width="28"></th> ! <th width="194">Subject</th> ! <th width="171">Date</th> ! <th width="128">Sender</th> ! <th width="116">Option</th> </tr> <?php ! while($messages = mysql_fetch_object($query)){ ?> <tr> <td><img src="msg.png" alt="Message"></td> ! <td><a href='viewmsg.php?ID=<?php echo $messages->ID; ?>'> <?php ! if (empty($messages->Subject)){ echo "< No Subject >"; } else { ! echo slur_block(emoticon_translate($messages->Subject)); } ?> </a></td> ! <td><?php echo date("F j, Y, g:i a",$messages->Date); ?></td> ! <td><?php echo $messages->Sender; ?></td> ! <td>[ <a href='inbox.php?DELETE=<?php echo $messages->ID; ?>'> Delete </a> ] ! [ <a href="newmsg.php?SUBJECT=Re: <?php echo $messages->Subject; ?>">Reply</a> ]</td> </tr> <?php + } + if(mysql_num_rows($query) == 0){ + echo "<tr><td>--</td><td>--</td><td>No new messages!</td><td>--</td><td>--</td></tr>"; + } + ?> + </table> + <p><br><form action='inbox.php' method='POST'><input name="deleteall" type="submit" id="deleteall" value="Delete All Messages"></form> + </p> + <p><br> + <?php include($footer); ! ?> ! </p> |
From: <dav...@us...> - 2003-08-20 01:43:08
|
Update of /cvsroot/openfirst/messenger/setup In directory sc8-pr-cvs1:/tmp/cvs-serv22541 Modified Files: setup.mysql Log Message: Module has been changed to allow only members to send and receive messages. A lot of the design has been edited to look and perform better. Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/messenger/setup/setup.mysql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** setup.mysql 28 Jun 2003 16:09:07 -0000 1.8 --- setup.mysql 20 Aug 2003 00:40:44 -0000 1.9 *************** *** 1,3 **** ! CREATE TABLE `ofirst_messages` (`ID` int(6) unsigned NOT NULL auto_increment, `Sender` tinytext, `Receiver` tinytext, `Subject` tinytext, `Body` text, `Status` tinytext, `Date` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! CREATE TABLE `ofirst_usersonline` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Location` tinytext, `Timestamp` text, `Member` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; INSERT INTO ofirst_config SET modulename='messenger',showonmenu='0',active='0',modulenavigation='<a href="$basepath/messenger/">Users Online</a> | <a href="$basepath/messenger/inbox.php">Inbox</a> | <a href="$basepath/messenger/newmsg.php">Send Message</a>',includes='messenger.php'; --- 1,3 ---- ! CREATE TABLE `ofirst_messenger_messages` (`ID` int(6) unsigned NOT NULL auto_increment, `Sender` tinytext, `Receiver` tinytext, `Subject` tinytext, `Body` text, `Status` tinytext, `Date` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; ! CREATE TABLE `ofirst_messenger_usersonline` (`ID` int(6) unsigned NOT NULL auto_increment, `IPAddress` tinytext, `Location` tinytext, `Timestamp` text, `Member` tinytext, PRIMARY KEY (`ID`)) TYPE=MyISAM; INSERT INTO ofirst_config SET modulename='messenger',showonmenu='0',active='0',modulenavigation='<a href="$basepath/messenger/">Users Online</a> | <a href="$basepath/messenger/inbox.php">Inbox</a> | <a href="$basepath/messenger/newmsg.php">Send Message</a>',includes='messenger.php'; |
From: <xt...@us...> - 2003-08-17 16:59:19
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1:/tmp/cvs-serv10806 Modified Files: mail.php Log Message: Actually test this somewhat and remove the obvious glaring errors. Index: mail.php =================================================================== RCS file: /cvsroot/openfirst/base/config/functions/mail.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mail.php 15 Aug 2003 18:18:08 -0000 1.1 --- mail.php 17 Aug 2003 16:22:44 -0000 1.2 *************** *** 28,33 **** // Purpose: Provide mail functions capable of dealing with multi-part messages. ! //Produces multi-part mail messages in a manner able to be used as a drop-in replacement for mail(); ! function multipartmail($to, $subject, $message, $headers, $additionalparamaters) { $headers .= "Mime-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=openfirst-mail.boundry\r\n"; --- 28,36 ---- // Purpose: Provide mail functions capable of dealing with multi-part messages. ! // Produces multi-part mail messages in a manner able to be used as a drop-in replacement for mail(); ! function multipartmail($to, $subject = "openFIRST Mailing", $message = "No message given.", $headers = "", $additionalparamaters = "") { ! global $header; ! global $footer; ! $headers .= "Mime-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=openfirst-mail.boundry\r\n"; *************** *** 42,48 **** Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit"; ! fpassthru($header); ! echo("<pre>$message</pre>"); ! fpassthru($footer); return(mail($to, $subject, $info, $headers)); } --- 45,60 ---- Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit"; ! ! $fle = fopen($header, "r"); ! while(!feof($fle)) { ! $fheader .= fgets($fle); ! } ! fclose($fle); ! $fle = fopen($footer, "r"); ! while(!feof($fle)) { ! $ffooter .= fgets($fle); ! } ! fclose($fle); ! $info .= ("$fheader<pre>$message</pre>$ffooter"); return(mail($to, $subject, $info, $headers)); } |
From: <xt...@us...> - 2003-08-16 03:39:46
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1:/tmp/cvs-serv3503 Modified Files: first.php Log Message: Error trap a key database error message, in order to hopefully remedy the situation. Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** first.php 29 Jun 2003 04:09:42 -0000 1.15 --- first.php 15 Aug 2003 18:04:05 -0000 1.16 *************** *** 63,67 **** \$sqlpassword = '" . $_POST["sqlpassword"] . "'; \$sqldatabase = '" . $_POST["sqldatabase"] . "'; ! \$sqlconnection = mysql_connect(\"\$sqlserver\",\"\$sqluser\",\"\$sqlpassword\"); --- 63,69 ---- \$sqlpassword = '" . $_POST["sqlpassword"] . "'; \$sqldatabase = '" . $_POST["sqldatabase"] . "'; ! if(function_exists(\"mysql_connect\") == false) { ! die(\"Your version of PHP has not been compiled with MySQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request MySQL support for your version of PHP.\"); ! } \$sqlconnection = mysql_connect(\"\$sqlserver\",\"\$sqluser\",\"\$sqlpassword\"); |
From: <xt...@us...> - 2003-08-16 00:48:59
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1:/tmp/cvs-serv5960 Added Files: mail.php Log Message: Add preliminary html e-mail functions (completely untested) --- NEW FILE: mail.php --- <?php /* * openFIRST.base - config/functions/mail.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@po...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Purpose: Provide mail functions capable of dealing with multi-part messages. //Produces multi-part mail messages in a manner able to be used as a drop-in replacement for mail(); function multipartmail($to, $subject, $message, $headers, $additionalparamaters) { $headers .= "Mime-Version: 1.0\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=openfirst-mail.boundry\r\n"; $info .= "--openfirst-mail.boundry Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit $message --openfirst-mail.boundry Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit"; fpassthru($header); echo("<pre>$message</pre>"); fpassthru($footer); return(mail($to, $subject, $info, $headers)); } ?> |
From: <xt...@us...> - 2003-08-15 19:06:54
|
Update of /cvsroot/openfirst/guestbook In directory sc8-pr-cvs1:/tmp/cvs-serv14016 Modified Files: signthanks.php Log Message: Modify guestbook to use multipart mail message if functionality is available (completely untested). Index: signthanks.php =================================================================== RCS file: /cvsroot/openfirst/guestbook/signthanks.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** signthanks.php 24 Jul 2003 01:04:17 -0000 1.7 --- signthanks.php 15 Aug 2003 18:53:39 -0000 1.8 *************** *** 59,66 **** $result = mysql_db_query("$sqldatabase",$query); ! mail("$mailnotify", "Guestbook Posting","Someone has posted a message in your guest book. deletecode=$deletecode ! Guest: " . $_POST["guest"] . " Now: " . date("D M j G:i:s T Y") . " E-mail: " . $_POST["email"] . " --- 59,66 ---- $result = mysql_db_query("$sqldatabase",$query); ! $message = "Someone has posted a message in your guestbook. deletecode=$deletecode ! Guest: ". $_POST["guest"] . " Now: " . date("D M j G:i:s T Y") . " E-mail: " . $_POST["email"] . " *************** *** 74,96 **** Delete Code: $deletecode ! " . $_POST["comment"] . "", ! "From: $mailfrom\r\n" ! ."Reply-To: " . $_POST["email"] . "\r\n" ! ); ! mail("" . $_POST["email"] . "", "Your Guestbook Posting", "Dear Guest, ! Thank you for visiting our site and signing our guestbook. We hope you enjoyed it! We have sent you this E-mail out of thanks and also to give you some information which you may later need. If in your guestbook posting, you make a mistake that you didn't inntially realize, or just want to delete your post, you can do so by going to the following address: ! http://" . $_SERVER["HTTP_HOST"] . "$basepath/guestbook/deleteentry.php?email=" . $_POST["email"] . "&deletecode=$deletecode ! Thank you once again, and be sure to check in often as we are constantly making updates and adding new features. ! Web Site Administration", "From: $mailfrom\r\n"); ?> --- 74,108 ---- Delete Code: $deletecode ! " . $_POST["comment"]; ! $headers = "From: $mailfrom\r\n" ! ."Reply-To: " . $_POST["email"] . "\r\n"; ! if (function_exists("multipartmail")) { ! multipartmail("$mailnotify", "Guestbook Posting", $message, $headers); ! } else { ! mail("$mailnotify", "Guestbook Posting", $message, $headers); ! } + $message = "Dear Guest, + + Thank you for visiting our site and signing our guestbook. We hope you enjoyed it! + We have sent you this E-mail out of thanks and also to give you some information which you may later need. If in your guestbook posting, you make a mistake that you didn't inntially realize, or just want to delete your post, you can do so by going to the following address: ! http://" . $_SERVER["HTTP_HOST"] . "$basepath/guestbook/deleteentry.php?email=" . $_POST["email"] . "&deletecode=$deletecode ! Thank you once again, and be sure to check in often as we are constantly making updates and adding new features. + + Web Site Administration"; ! if (function_exists("multipartmail")) { ! multipartmail($_POST["email"], "Your Guestbook Posting", $message); ! } else { ! mail($_POST["email"], "Your Guestbook Posting", $message); ! } ?> |
From: <xt...@us...> - 2003-08-13 12:20:04
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv12285 Added Files: links.php Log Message: Add links page to members area (complete with file icons, categories, members being able to add links) Requirements in future: allow modification of existing links --- NEW FILE: links.php --- <?php /* * openFIRST.members - links.php * * Copyright (C) 2003, * openFIRST Project * Original Author: Tim Ginn <tim...@po...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ include("../config/globals.php"); include($header); if (isset($_POST["ncategory"]) == true && isset($user->user) == true && $_POST["ncategory"] != "") { $q = mysql_query("INSERT INTO ofirst_resources_categories (category) VALUES ('" . $_POST["ncategory"] . "');"); $_POST["category"] = $_POST["ncategory"]; } if (isset($_POST["address"]) == true && isset($user->user) == true) { $q = mysql_query("INSERT INTO ofirst_resources_links (address, name, category, type, creator, date) VALUES ('" . $_POST["address"] . "', '" . $_POST["name"] . "', '" . $_POST["category"] . "', '" . $_POST["type"] . "', '$user->user', '" . date("D M d Y") . "');"); } ?> <h1>Link Listing</h1> <?php $cats = mysql_query("SELECT category FROM ofirst_resources_categories;"); while($c = mysql_fetch_object($cats)) { echo("<h2>$c->category</h2>"); echo("<table> <tr><th>Type</th><th>Link</th><th>Creator</th><th>Date</th></tr>"); $links = mysql_query("SELECT * FROM ofirst_resources_links WHERE category='$c->category';"); while($l = mysql_fetch_object($links)) { echo("<tr><td><img src='$l->type' alt=''></td><td><a href='$l->address'>$l->name</a></td><td>$l->creator</td><td>$l->date</td></tr>"); } echo("</table>"); } ?> <?php if(isset($user->user)) { echo("<h2>Add A Link</h2> <form method='post' action='links.php'> <table> <tr><th>Link Name</th><td><input type='text' name='name' value=''></td></tr> <tr><th>Link Address</th><td><input type='text' name='address' value='http://'></td></tr> <tr><th>Category</th><td> <select name='category'>"); $cats = mysql_query("SELECT category FROM ofirst_resources_categories;"); while($c = mysql_fetch_object($cats)) { echo("<option value='$c->category'>$c->category</option>"); } echo(" </select> or new category: <input type='text' name='ncategory'></td></tr> <tr><th>Type of Document</th><td> <select name='type'>"); $types = mysql_query("SELECT image, description FROM ofirst_workspace_filetypes GROUP BY description ORDER BY description;"); while ($type = mysql_fetch_object($types)) { if($type->description == "HTML Page") { echo("<option value='$type->image' selected='selected'>$type->description</option>"); } else { echo("<option value='$type->image'>$type->description</option>"); } } echo(" </select> </td></tr> <tr><th>Add Link</th><td><input type='submit' value='Add Link'></td></tr> </table> </form>"); } else { echo("<h2>Login to Add A Link</h2>"); showlogin(); } include($footer); ?> |
From: <xt...@us...> - 2003-08-13 12:20:03
|
Update of /cvsroot/openfirst/members/setup In directory sc8-pr-cvs1:/tmp/cvs-serv12285/setup Modified Files: setup.mysql Log Message: Add links page to members area (complete with file icons, categories, members being able to add links) Requirements in future: allow modification of existing links Index: setup.mysql =================================================================== RCS file: /cvsroot/openfirst/members/setup/setup.mysql,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** setup.mysql 12 Aug 2003 04:45:57 -0000 1.9 --- setup.mysql 13 Aug 2003 11:52:30 -0000 1.10 *************** *** 1,4 **** INSERT INTO ofirst_config SET modulename='members',showonmenu='0',active='0'; ! UPDATE ofirst_config SET modulenavigation='<a href="$basepath/members/workspace.php">Workspace</a> | <a href="$basepath/members/divisions.php">Divisions</a> | <a href="$basepath/members/profile.php">Profile</a> | <a href="$basepath/members/skills.php">Skills</a> | <a href="$basepath/members/updateprofile.php">Update Profile</a> | <a href="$basepath/members/logout.php">Logout</a>',adminnavigation='<a href="$basepath/members/adduser.php">Add Users</a> | <a href="$basepath/config/">Configuration</a>' where modulename='members'; CREATE TABLE IF NOT EXISTS ofirst_workspace_users (quota BIGINT, user CHAR(128), virtfspath TEXT, frozen INT(1)); CREATE TABLE IF NOT EXISTS ofirst_workspace_files(size BIGINT, name TEXT, location TEXT, owner TEXT, division TEXT, permissions TEXT, date TEXT, description TEXT, filetype TEXT); --- 1,4 ---- INSERT INTO ofirst_config SET modulename='members',showonmenu='0',active='0'; ! UPDATE ofirst_config SET modulenavigation='<a href="$basepath/members/workspace.php">Workspace</a> | <a href="$basepath/members/divisions.php">Divisions</a> | <a href="$basepath/members/profile.php">Profile</a> | <a href="$basepath/members/links.php">Links</a> | <a href="$basepath/members/skills.php">Skills</a> | <a href="$basepath/members/updateprofile.php">Update Profile</a> | <a href="$basepath/members/logout.php">Logout</a>',adminnavigation='<a href="$basepath/members/adduser.php">Add Users</a> | <a href="$basepath/config/">Configuration</a>' where modulename='members'; CREATE TABLE IF NOT EXISTS ofirst_workspace_users (quota BIGINT, user CHAR(128), virtfspath TEXT, frozen INT(1)); CREATE TABLE IF NOT EXISTS ofirst_workspace_files(size BIGINT, name TEXT, location TEXT, owner TEXT, division TEXT, permissions TEXT, date TEXT, description TEXT, filetype TEXT); *************** *** 7,10 **** --- 7,14 ---- CREATE TABLE IF NOT EXISTS ofirst_divisions(division CHAR(50) UNIQUE, description TEXT); INSERT INTO ofirst_divisions (division, description) VALUES('Sample Division', 'A generic division responsible for taking care of everything.'); + CREATE TABLE IF NOT EXISTS ofirst_resources_links (address CHAR(255) UNIQUE, name TEXT, category TEXT, type TEXT, creator TEXT, date TEXT); + CREATE TABLE IF NOT EXISTS ofirst_resources_categories (category CHAR(250) UNIQUE); + INSERT INTO ofirst_resources_categories (category) VALUES ('General'); + INSERT INTO ofirst_resources_links (address, name, category, type, creator, date) VALUES('http://www.openfirst.org', 'open FIRST Web Portal System', 'General', 'icons/mimetypes/html.png', 'open FIRST Development Team', ''); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder.png', 'icons/filesystems/folder.png', 'Standard Sub Directory'); INSERT INTO ofirst_workspace_filetypes (extension, image, description) VALUES ('dir-folder_green.png', 'icons/filesystems/folder_green.png', 'Standard Sub Directory'); |