> How are people integrating eWebEditPro 2.6.0.7 (under Spectra 
> 1.5.2) so that when you click the image button you can simply 
> select a file from your computer and upload it to the server 
> instead of using Spectra's Media Assets?

First, check \program
files\allaire\spectra\customtags\system\tier1\ui\cfa_htmleditor.cfm
Following lines switches the image uploading method to a custom .cfm
template:

        <cfoutput>
        <script language="JavaScript1.2" type="text/javascript">
                function InsertHyperlink(name) {
        
PopUpWindow('/allaire/spectra/ewebeditpro/hyperlinkpopup.cfm?editorName=
' + escape(name)+ '&#URLSTRING#', 'HyperlinkList', 500, 300, 1);
                }
                function initTransferMethod(sEditor){
                        var Transfer =
"/allaire/spectra/ewebeditpro/imagepopup.cfm?#URLSTRING#";
        
eWebEditPro[sEditor].MediaFile().setProperty("TransferMethod",
Transfer);
                }
                eWebEditPro.onready =
"initTransferMethod(eWebEditPro.event.srcName)";
        </script>               
        </cfoutput> 

So you have to change /allaire/spectra/ewebeditpro/imagepopup.cfm to
your own needs. We have implemented a picture chooser with thumbnail
previews, metadata categories for images and more.

Here you can provide your custom image uploading method. After uploading
a new or picking an existing image, use following javascript code to set
the properties in ewebeditpro:

                <script language="JavaScript1.2">
                <!--
                if(!top.opener.closed) {
                        var strEditorName = '#url.editorname#';  // (0)
                        var strSrcFileLocation =
'#JSStringFormat(full_url_to_image)#'; // (1)
                        var strFileTitle =
'#JSStringFormat(imageAltText)#'; // (2)
                        var nWidth = #imageWidth#;      // (3)
                        var nHeight = #imageHeight#'; // (4)
        
top.opener.eWebEditPro.instances[strEditorName].insertMediaFile(strSrcFi
leLocation,false,strFileTitle,'IMAGE',nWidth,nHeight); // (5)
                }
                top.close();
                // -->
                </script>

(0) url.editorname is provided by ewebeditpro when calling
imagepopup.cfm
(1) here you provide the full url to the image absolute from webroot,
e.g. "/images/newimage.jpg"
(2) here you can provide the alt text (if needed) for the image. You can
also leave this field blank
(3) + (4) here you can provide the image width and height (if known).
When you leave this fields blank ( '' ), the user can "recalculate" the
image in the image mask provided by eWebEditPro. Since we use cfx_image
for image uploading, we know the width and height of the image.

The last line (5) submit the collected informations to eWebEditPro (you
can shorten this javascript to this line, if you want to). The second
attribute (false) informs eWebEditPro that the file is on the server
(isLocal=false, isLocal=true means that it is still on client's
harddisk). The fourth attribute 'IMAGE' informs eWebEditPro that this is
an image. You can also provide real media, flash and other formats. See
the developerguide
http://www.ektron.com/software/released/ewebeditpro/v26/developerguide.p
df  for Version 2.6 for more information.


-- 
best regards,
Hendrik Kramer

Webentwicklung
Lwd e-solutions gmbh +++ kruppstrasse 82-100 +++ 45145 essen
T.: 0201-8 20 20 20 +++ F.: 0201-8 20 20 44 +++ www.lwd.de
+++ e-commerce +++ content management +++ design
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

                        
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to