[Zope-CVS] CVS: Products/ExternalEditor/win32 - ZopeExtEditDummyOCX.ocx:1.1 ocx.txt:1.1 setup.iss:1.18

Chris McDonough chrism at plope.com
Wed Nov 10 22:33:38 EST 2004

Update of /cvs-repository/Products/ExternalEditor/win32
In directory cvs.zope.org:/tmp/cvs-serv7854

Modified Files:
Added Files:
	ZopeExtEditDummyOCX.ocx ocx.txt 
Log Message:
Add dummy OCX for EE detection from within IE (JS/VBS).

=== Added File Products/ExternalEditor/win32/ZopeExtEditDummyOCX.ocx ===
  <Binary-ish file>

=== Added File Products/ExternalEditor/win32/ocx.txt ===
In this directory is a file named "ZopeExtEditDummyOCX.ocx".  The OCX
does nothing whatsoever.  But if you install it on a client system, it
can be used to test for the presence of external editor.

To install by hand:

regsvr32 ZopeExtEditDummyOCX.ocx

To install via Innosetup see "Installing OCXs" at
http://www.jrsoftware.org/iskb.php?a=vb ... I haven't tried it yet tho

Once it's installed, you can use the folllowing VBScript to do the

 return IsObject(

Or an x-platform bit of Javascript that works under Moz or IE to do same

function externalEditorInstalled() {
     // mozilla: life is easy; test for mimetype availability
     mt  = 'application/x-zope-edit'
     if ( navigator.mimeTypes && navigator.mimeTypes.length ) {
          thing = navigator.mimeTypes[mt];
          return thing;

     // IE: test for presence of dummy OCX installed by installer
     else if ( ActiveXObject ) {
       return new

     // others: return true for conservatism's sake
     else {
          return true;


... then condition the visibility of "pencil icons" (or whatever) on the
result of that function ... I have been wrapping the result of all
occurrences of ExternalEditLink in a span that has a CSS class named
"eelink" which has style "display:none", then I have a bit of javascript
at the bottom of templates that show these icons which calls the
"externalEditorInstalled()" function; if it returns true, it iterates
over all of the "eelink" elements on the page switching them on.

=== Products/ExternalEditor/win32/setup.iss 1.17 => 1.18 ===
--- Products/ExternalEditor/win32/setup.iss:1.17	Tue Jul 13 11:02:10 2004
+++ Products/ExternalEditor/win32/setup.iss	Wed Nov 10 22:33:37 2004
@@ -33,6 +33,7 @@
 Source: "..\dist\*.*"; DestDir: "{app}"; Flags: ignoreversion
 Source: "*.txt"; DestDir: "{app}"; Flags: ignoreversion
 Source: "ZopeEdit.ini"; DestDir: "{app}"; Flags: onlyifdoesntexist
+Source: "ZopeExtEditDummyOCX.ocx"; DestDir: "{app}"; Flags: restartreplace regserver
 Source: "..\README.txt"; DestDir: "{app}"; Flags: ignoreversion
 Source: "..\LICENSE.txt"; DestDir: "{app}"; Flags: ignoreversion
 Source: "..\CHANGES.txt"; DestDir: "{app}"; Flags: ignoreversion

More information about the Zope-CVS mailing list