Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
jessyhanley  
#1 Posted : Thursday, March 15, 2007 12:40:06 AM(UTC)
jessyhanley

Rank: Member

Groups: Member
Joined: 1/10/2007(UTC)
Posts: 15

The bottom section works fine, but when I edit the this.activeXClassId="" to match the one that was in our file we do not get the drop down box... but a very small looking thing that should the explore Window (I believe) - see screen shot

[Image was removed]

How do I edit the iuembed.js so that works. This is what we have in the javascript

Code:
function ThumbnailWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="F1F51698-7B63-4394-8743-1F4CF1853DE1";
	this.activeXProgId="Aurigma.ImageUploader.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.Thumbnail.class";
}

function ShellComboBoxWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
		this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="F1F51698-7B63-4394-8743-1F4CF1853DE1";
	this.activeXProgId="Aurigma.ImageUploader.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.ShellComboBox.class";
}

function UploadPaneWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="72D36C78-CC12-445C-8169-CCC942B61100";
	this.activeXProgId="Aurigma.UploadPane.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.UploadPane.class";
}

function FileDownloaderWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="FileDownloader.cab";
	this.activeXClassId="E1A26BBF-26C0-401D-B82B-5C4CC67457E0";
	this.activeXProgId="Aurigma.FileDownloader.1";
	this.javaAppletEnabled=false;
	this.controlClass="FileDownloader";
}

And this is how we are calling it in the file:

Code:
<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed ShellComboBox to the page.z
var sc = new ShellComboBoxWriter("ShellComboBox1", 420, 24);

//For ActiveX control full path to CAB file (including file name) should be specified.
sc.activeXControlCodeBase = "http://whoozie.myphotodevel.com/ImageUploader4.cab";
sc.activeXControlVersion = "4,1,25,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
sc.javaAppletCodeBase = "../";
sc.javaAppletCached = true;
sc.javaAppletVersion = "2.1.30.0";

//Configure appearance.
sc.addParam("BackgroundColor", "#ece9d8");

//Link ShellComboBox with ImageUploader
sc.addParam("AdditionalFolderNavigator", "ImageUploader1");

//Tell the ShellComboBox writer object to generate all necessary HTML code to embed 
//it to the page.
sc.writeHtml();
//]]></script>		

Edited by user Friday, December 18, 2009 8:28:25 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Thursday, March 15, 2007 3:11:30 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Do you mean you have set an empty string as a value of activeXClassId property? If yes, that does not have to work. There should be the correct ActiveX object CLSID.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

jessyhanley  
#3 Posted : Thursday, March 15, 2007 11:27:15 PM(UTC)
jessyhanley

Rank: Member

Groups: Member
Joined: 1/10/2007(UTC)
Posts: 15

Solved MOST of the issues (had to use the names outlined in our customization file)

However, I am still having one strange issue. On the first install of the active x component, the top file drop down thinks it's not installed and is generating the message that we have edited in the iuembed. It says follow the directions to the left. Yet the active x is installed, I can see my "add ons" in IE. Plus the bottom portion is totally functioning. See screen shot for example:

[Image was removed]

But when I refresh the page, the message goes away. Nothing new is asked to be installed and if you click on the white box the drop down appears. The drop down never has a down arrow (neither does the sample on the your site ), just the white box that functions when you click on it. You can't really tell that it is a drop down box, but at least it works.

[Image was removed]

So What I need to know is.

1. Is there a way I can make sure that both load at the same time and there is no refresh necessary

2. Is there anyway to add a down arrow to the drop down box like there is on version 3 so users know its something to click on.

This is the code to load it:

Code:

//<![CDATA[
//Create JavaScript object that will embed ShellComboBox to the page.
var sc = new ShellComboBoxWriter("ShellComboBox1", 320,24);

//For ActiveX control full path to CAB file (including file name) should be specified.
sc.activeXControlCodeBase = "<?php echo $gallery->app->subdomain . "." . $gallery->app->service_name; ?>/ImageUploader4.cab";
sc.activeXControlVersion = "4,1,25,0";
//For Java applet only path to directory with JAR files should be specified (without file name).
sc.javaAppletCodeBase = "../";
sc.javaAppletCached = true;
sc.javaAppletVersion = "2.1.1.0";



//Configure appearance.
sc.addParam("BackgroundColor", "#ece9d8");

//Link ShellComboBox with ImageUploader
sc.addParam("AdditionalFolderNavigator", "EasyUploadTool1");

//Tell the ShellComboBox writer object to generate all necessary HTML code to embed 
//it to the page.
sc.writeHtml();
//]]>

Code:

//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.


<?php if ($gallery->session->prem->isPremium()) { ?>
var iu = new ImageUploaderWriter("EasyUploadTool", 540, 450);
<? } else { ?>
var iu = new ImageUploaderWriter("EasyUploadTool", 418, 450);
<? } ?>
//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "http://<?php echo $gallery->app->subdomain . "." . $gallery->app->service_name; ?>/ImageUploader4.cab";
iu.activeXControlVersion = sc.activeXControlVersion;

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = sc.javaAppletVersion;

iu.showNonemptyResponse = "off";
iu.addParam("LicenseKey", "6526-6190-7501-5974-64751;7430-6063-6063-7750-74030");
//Configure appearance and behaviour.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("FolderView", "Thumbnails");
iu.addParam("UploadView", "Details");
iu.addParam("PreviewThumbnailSize", "70");
iu.addParam("ShowButtons", "false");
iu.addParam("ShowSubfolders", "true");
iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowContextMenu", "false");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowMultipleRotate", "true");
iu.addParam("AllowFolderUpload", "false");

//Configure colors.
iu.addParam("PaneBackgroundColor", "#ffffff");
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("PreviewThumbnailBorderColor", "#eeeeee");
iu.addParam("PreviewThumbnailBorderHoverColor", "#f8b330");


<?php if (!$gallery->session->prem->isPremium()) { ?>
iu.addParam("MaxFileCount", "50");
iu.addParam("MessageMaxFileCountExceededText", "Club members have unlimited photo uploads -- join the club now! Free members are restricted to 50 photos at a time.  If you have more than 50 to add please upload them in batches.");
<? } ?>

//Configure  Messages.
iu.addParam("LoadingFilesText", "Loading photos, please be patient...");


iu.addParam("ProgressDialogTitleText", "MyPhotoAlbum Easy Upload Tool");
iu.addParam("MegabytesText", "MB");
iu.addParam("KilobytesText", "KB");
iu.addParam("ProgressDialogPreparingDataText", "Preparing photos...");
iu.addParam("ProgressDialogEstimatedTimeText", "Estimated:[Current] of [Total]");
iu.addParam("ProgressDialogPreviewThumbnailSize", "100");
iu.addParam("ProgressDialogWidth", "450");

iu.addParam("MessageUploadCompleteText", "Success, your photos have been added to your album.");
iu.addParam("MessageUploadCancelledText", "You photo upload has been cancelled.");
iu.addParam("MessageUploadFailedText", "Your photo upload failed (the connection was interrupted), please try again.");
iu.addParam("MessageNoResponseFromServerText", "uring upload of your photos, the connection to MyPhotoAlbum was dropped, please try again");
iu.addParam("MessageNoInternetSessionTex", "During upload of your photos, the connection to MyPhotoAlbum was dropped, please try again.");
iu.addParam("MessageNoResponseFromServerText", "No response from MyPhotoAlbum server, please try again");
iu.addParam("MessageBoxTitleText", "MyPhotoAlbum Easy Upload Tool");


//Hide tree pane.
iu.addParam("TreePaneWidth", "-1");

//Allow upload not only files, but also entire folders.
//iu.addParam("AllowFolderUpload", "true");

//Single or multiple file selection.
//iu.addParam("AllowMultipleSelection", "false");

//Link ImageUploader with ShellComboBox.
iu.addParam("AdditionalFolderNavigator", "EasyUploadTool1");

//Configure file mask to display images only.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.gif;*.png");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "ActualSize");
iu.addParam("UploadThumbnail1JpegQuality", "100");
iu.addParam("UploadSourceFile", "true");




//Configure upload settings.
iu.addParam("Action", "http://<?php echo $gallery->app->subdomain . "." . $gallery->app->service_name; ?>:8080/image_uploader3.php");
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "3");
iu.addParam("AutoRecoverTimeOut", "2000");

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "/personalize_album.php?set_albumName=<?php echo $gallery->session->albumName; ?>");

iu.fullPageLoadListenerName = "FullPageLoad";

//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
//]]>

Edited by user Friday, December 18, 2009 8:28:51 PM(UTC)  | Reason: Not specified

Alex Makhov  
#4 Posted : Sunday, March 18, 2007 2:12:15 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

That’s strange. It looks like there are some problems with control version setting. Could you give me the instructions about how to get to your Image Uploader page to check?

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

jessyhanley  
#5 Posted : Sunday, March 18, 2007 11:19:39 PM(UTC)
jessyhanley

Rank: Member

Groups: Member
Joined: 1/10/2007(UTC)
Posts: 15

Before the user even gets to the page we first check to see if they are on IE or another browser... another browser goes to our own java upload tool.

Then we check to see if the user has the old version (3) loaded... (see code below) if they do, the go to an "upgrade page" that just lets them know they will need to approve the active x again. They should only see this page one time ever

Code:

   Function supportImageUploader()       
      If ScriptEngineMajorVersion >= 1 Then   
    	
    	  supportImageUploader = "NotInstalled"    
    	  Dim installed
    	  installed = False
    	  installed = IsObject(CreateObject("[b]FortuneCity.EasyUploadTool[/b]"))
        If installed Then
          supportImageUploader = "Installed"
        End If       
    	Else
        supportImageUploader = "Unsupported"
    	End If
    End Function
	Function isInstalled()
	  On Error Resume Next
	   installed = false
	   installed = IsObject(CreateObject("[b]FortuneCity.EasyUploadTool[/b]"))
	   If installed Then
	     isInstalled = "yes"
	   Else
	     isInstalled = "no"
	  End If
	end function

If they have the new version loaded (see code below) They go right to the easy upload version

Code:

 Function supportNewImageUploader()       
      If ScriptEngineMajorVersion >= 4 Then   
    	
    	  supportNewImageUploader = "NotInstalled"    
    	  Dim installed
    	  installed = False
    	  installed = IsObject(CreateObject("[b]FortuneCitycomInc.MyPhotoAlbumEasyUploadTool.4[/b]"))
        If installed Then
          supportNewImageUploader = "Installed"
        End If       
    	Else
        supportNewImageUploader = "Unsupported"
    	End If
    End Function
	Function isNewInstalled()
	  On Error Resume Next
	   installed = false
	   installed = IsObject(CreateObject("[b]FortuneCitycomInc.MyPhotoAlbumEasyUploadTool.4[/b]"))
	   If installed Then
	     isNewInstalled = "yes"
	   Else
	     isNewInstalled = "no"
	  End If
	end function

The actual load of the tool utilzes the js that you provide (see below) I have bolded all the itmes we have changed

Code:

// Aurigma Image Uploader Embedding Script 
// Version 2.0.2.0 August 21, 2006
// Copyright(c) Aurigma Inc. 2002-2006

function __Browser(){
	var a=navigator.userAgent.toLowerCase();
	this.isOpera=(a.indexOf("opera")!=-1);
	this.isKonq=(a.indexOf('konqueror')!=-1);
	this.isSafari=(a.indexOf('safari')!=-1)&&(a.indexOf('mac')!=-1);
	this.isKhtml=this.isSafari||this.isKonq;
	this.isIE=(a.indexOf("msie")!=-1)&&!this.isOpera;
	this.isWinIE=this.isIE&&(a.indexOf("win")!=-1);
	this.isCSS1Compat=(!this.isIE)||(document.compatMode&&document.compatMode=="CSS1Compat");
}

var __browser=new __Browser();

//Create set/get expando methods for ActiveX
function _createExpandoMethods(id){
	var o=document.getElementById(id);
	var props=new Array();
	for (propName in o){
		var c=propName.charAt(0);
		if (c==c.toUpperCase()){
			props.push(propName);
		}
	}
	for (i=0;i<props.length;i++){
		//Check whether property is indexed
		if (typeof(o[props[i]])=="unknown"){
			eval("o.set"+props[i]+"=function(i,v){this."+props[i]+"(i)=v;};");
			eval("o.get"+props[i]+"=function(i){return this."+props[i]+"(i);};");
		}
		else{
			eval("o.set"+props[i]+"=function(v){this."+props[i]+"=v};");
			eval("o.get"+props[i]+"=function(){return this."+props[i]+"};");
		}
	}
	
	// PaneItemDesign
	//eval("o.setPaneItemDesign = function(Pane, Index, Value){this.PaneItemDesign(Pane, Index) = Value;};");
	//eval("o.getPaneItemDesign = function(Pane, Index){return this.PaneItemDesign(Pane, Index);};");
	
	// PaneItemSelected
	//eval("o.getPaneItemSelected = function(Pane, Index){return this.PaneItemSelected(Pane, Index);};");
	
	// PaneItemEnabled
	//eval("o.setPaneItemEnabled = function(Pane, Index, Value){this.PaneItemEnabled(Pane, Index) = Value;};");
	//eval("o.getPaneItemEnabled = function(Pane, Index){return this.PaneItemEnabled(Pane, Index);};");
}

//Installation instructions
function _addInstructions(obj){
	obj.instructionsEnabled=true;
	if (obj.controlClass=="FileDownloader"){
		obj.instructionsCommon="File Downloader ActiveX control is necessary to download "+
			"files quickly and easily. You will be able to select required files "+
			"in a user-friendly interface and simply click a 'Download' button. "+
			"Installation will take up to few minutes, please be patient. To install File Downloader, ";
		obj.instructionsNotWinXPSP2="please reload the page and click the \"Yes\" button " +
			"when you see the control installation dialog."
		obj.instructionsWinXPSP2="please click the Information Bar. After page reloads click \"Yes\" when "+
			"you see the control installation dialog.";
	} else {
		obj.instructionsCommon="[b]Please follow the directions to the left to install the new easy upload tool[/b]";
		obj.instructionsNotWinXPSP2="";
		obj.instructionsWinXPSP2="";
	}
}


function ControlWriter(id,width,height){
	//Private
	this._params=new Array();
	this._events=new Array();

	this._getObjectParamHtml=function(name,value){
		return "<param name=\""+name+"\" value=\""+value+"\" />";
	}

	this._getObjectParamsHtml=function(){
		var r="";
		var p=this._params;
		var i;
		for (i=0;i<p.length;i++){
			r+=this._getObjectParamHtml(p[i].name,p[i].value);
		}
		return r;
	}

	this._getObjectEventsHtml=function(){
		var r="";
		var e=this._events;
		for (i=0;i<e.length;i++){
			r+=this._getObjectParamHtml(e[i].name+"Listener",e[i].listener);
		}
		return r;
	}

	this._getEmbedParamHtml=function(name,value){
		return " "+name+"=\""+value+"\"";	
	}

	this._getEmbedParamsHtml=function(){
		var r="";
		var p=this._params;
		var i;
		for (i=0;i<p.length;i++){
			r+=this._getEmbedParamHtml(p[i].name,p[i].value);
		}
		return r;
	}

	this._getEmbedEventsHtml=function(){
		var r="";
		var e=this._events;
		for (i=0;i<e.length;i++){
			r+=this._getEmbedParamHtml(e[i].name+"Listener",e[i].listener);
		}
		return r;
	}

	//Public

	//Properties
	this.id=id;
	this.width=width;
	this.height=height;

	this.activeXControlEnabled=true;
	this.activeXControlVersion="";

	this.javaAppletEnabled=true;
	this.javaAppletCodeBase="./";
	this.javaAppletCached=true;
	this.javaAppletVersion="";

	this.fullPageLoadListenerName=null;

	//Methods
	this.addParam=function(paramName,paramValue){
		var p=new Object();
		p.name=paramName;
		p.value=paramValue;
		this._params.push(p);
	}

	this.addEventListener=function(eventName,eventListener){
		var p=new Object();
		p.name=eventName;
		p.listener=eventListener;
		this._events.push(p);
	}

	this.getActiveXInstalled=function(){
		if (this.activeXProgId){
			try{
				var a=new ActiveXObject(this.activeXProgId);
				return true;
			}
			catch(e){
				return false;
			}
		}
		return false;
	}

	this.getHtml=function(){
		var r="";
		if (this.fullPageLoadListenerName){
			r+="<" + "script type=\"text/javascript\">";
			r+="var __"+this.id+"_pageLoaded=false;";
			r+="var __"+this.id+"_controlLoaded=false;";
			r+="function __fire_"+this.id+"_fullPageLoad(){";
			r+="if (__"+this.id+"_pageLoaded&&__"+this.id+"_controlLoaded){";
			r+=this.fullPageLoadListenerName + "();";
			r+="}";
			r+="}";
			var pageLoadCode="new Function(\"__"+this.id+"_pageLoaded=true;__fire_"+this.id+"_fullPageLoad();\")";
			if (__browser.isWinIE){
				r+="window.attachEvent(\"onload\","+pageLoadCode+");";
			}
			else{
				r+="var r=window.addEventListener?window:document.addEventListener?document:null;";
				r+="if (r){r.addEventListener(\"load\","+pageLoadCode+",false);}";
			}
			r+="<"+"/script>";
		}

		_addInstructions(this);

		//ActiveX control
		if(__browser.isWinIE&&this.activeXControlEnabled){
			var v=this.activeXControlVersion.replace(/\./g,",")
			var cb=this.activeXControlCodeBase+(v==""?"":"#version="+v);

			r+="<" + "script for=\""+this.id+"\" event=\"InitComplete()\">";
			r+="_createExpandoMethods(\""+this.id+"\");";
			if (this.fullPageLoadListenerName){
				r+="__"+this.id+"_controlLoaded=true;";
				r+="__fire_"+this.id+"_fullPageLoad();";
			}
			r+="<"+"/script>";

			r+="<object id=\""+this.id+"\" name=\""+this.id+"\" classid=\"clsid:"+this.activeXClassId+"\" codebase=\""+cb+"\" width=\""+this.width+"\" height=\""+this.height+"\">";
			if (this.instructionsEnabled){
				r+=this.instructionsCommon;
				var isXPSP2=(window.navigator.userAgent.indexOf("SV1") != -1);
				if (isXPSP2){
					r+=this.instructionsWinXPSP2;
				}
				else{
					r+=this.instructionsNotWinXPSP2;
				}
			}
			r+=this._getObjectParamsHtml();
			r+="</object>";

			//Event handlers
			var e=this._events;
			var eventParams;
			for (i=0;i<e.length;i++){
				if (this.controlClass=="FileDownloader"){
					switch (e[i].name){
						case "DownloadComplete":
							eventParams="Value";
							break;
						case "DownloadItemComplete":
							eventParams="Result, ErrorPage, Url, FileName, ContentType, FileSize";
							break;
						case "DownloadStep":
							eventParams="Step";
							break;
						case "Progress":
							eventParams="PercentTotal, PercentCurrent, Index";
							break;
						case "Error":
							eventParams="ErrorCode, HttpErrorCode, ErrorPage, Url, Index";
							break;
						default:
							eventParams="";
					}
					r+="<script for=\""+this.id+"\" event=\""+e[i].name+"("+eventParams+")\">";
					r+=e[i].listener+"("+eventParams+");";
					r+="<"+"/script>";
				}
				else {
					switch (e[i].name){
						case "Progress":
							eventParams="Status, Progress, ValueMax, Value, StatusText";
							break;
						case "InnerComplete":
							eventParams="Status, StatusText";
							break;
						case "ViewChange":
						case "SortModeChange":
							eventParams="Pane";
							break;
						default:
							eventParams="";
					}
				}
				r+="<" + "script for=\""+this.id+"\" event=\""+e[i].name+"("+eventParams+")\">";
				if (e[i].name=="BeforeUpload"){
					r+="return ";
				}
				r+=e[i].listener+"("+eventParams+");";
				r+="<"+"/script>";
			}

		}
		else 
		//Java appplet
		if(this.javaAppletEnabled){
			if (this.fullPageLoadListenerName){
				r+="<" + "script type=\"text/javascript\">";
				r+="function __"+this.id+"_InitComplete(){";
				r+="__"+this.id+"_controlLoaded=true;";
				r+="__fire_"+this.id+"_fullPageLoad();";
				r+="}";
				r+="<"+"/script>";
			}

			//<object> for IE and <applet> for Safari
			if (__browser.isWinIE||__browser.isKhtml){
				if (__browser.isWinIE){
					r+="<object id=\""+this.id+"\" classid=\"clsid:F1F51698-7B63-4394-8743-1F4CF1853DE1\" codebase=\""+window.location.protocol+"//java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0\" width=\""+this.width+"\" height=\""+this.height+"\">";
				}
				else{
					r+="<applet id=\""+this.id+"\" code=\""+this.javaAppletClassName+"\" java_codebase=\"../\" align=\"baseline\" archive=\""+this.javaAppletJarFileName+"\" mayscript=\"true\" scriptable=\"true\" width=\""+this.width+"\" height=\""+this.height+"\">";
				}

				if (this.javaAppletCached&&this.javaAppletVersion!=""){
					r+=this._getObjectParamHtml("cache_archive",this.javaAppletJarFileName);
					var v=this.javaAppletVersion.replace(/\,/g,".");
					//r+=this._getObjectParamHtml("cache_version",v+","+v);
					r+=this._getObjectParamHtml("cache_version",v);
				}

				r+=this._getObjectParamHtml("type","application/x-java-applet;version=1.4");
				r+=this._getObjectParamHtml("codebase",this.javaAppletCodeBase);
				r+=this._getObjectParamHtml("archive",this.javaAppletJarFileName);
				r+=this._getObjectParamHtml("code",this.javaAppletClassName);
				r+=this._getObjectParamHtml("scriptable","true");
				r+=this._getObjectParamHtml("mayscript","true");

				r+=this._getObjectParamsHtml();

				r+=this._getObjectEventsHtml();

				if (this.fullPageLoadListenerName){
					r+=this._getObjectParamHtml("InitCompleteListener","__"+this.id+"_InitComplete");
				}
				if (__browser.isWinIE){
					r+="</object>";
				}
				else{
					r+="</applet>";
				}
			}
			//<embed> for all other browsers
			else{
				r+="<embed id=\""+this.id+"\" type=\"application/x-java-applet;version=1.4\" codebase=\""+this.javaAppletCodeBase+"\" code=\""+this.javaAppletClassName+"\" archive=\""+this.javaAppletJarFileName+"\" width=\""+this.width+"\" height=\""+this.height+"\" scriptable=\"true\" mayscript=\"true\" pluginspage=\""+window.location.protocol+"//java.sun.com/products/plugin/index.html#download\"";

				if (this.javaAppletCached&&this.javaAppletVersion!=""){
					r+=this._getEmbedParamHtml("cache_archive",this.javaAppletJarFileName);
					var v=this.javaAppletVersion.replace(/\,/g,".");
					//r+=this._getEmbedParamHtml("cache_version",v+","+v);
					r+=this._getEmbedParamHtml("cache_version",v);
				}

				r+=this._getEmbedParamsHtml();

				r+=this._getEmbedEventsHtml();

				if (this.fullPageLoadListenerName){
					r+=this._getEmbedParamHtml("InitCompleteListener","__"+this.id+"_InitComplete");
				}
				r+=">";
				r+="</embed>";
			}
		}
		else
		{
			r+="Your browser is not supported.";
		}
		
		//For backward compatibility
		this.controlType=this.getControlType();
			
		return r;
	}

	this.getControlType=function(){
		return (__browser.isWinIE&&this.activeXControlEnabled)?"ActiveX":(this.javaAppletEnabled?"Java":"None");
	}
	
	this.writeHtml=function(){
		document.write(this.getHtml());
	}
}

function ImageUploaderWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="[b]F1F51698-7B63-4394-8743-1F4CF1853DE1[/b]";
	this.activeXProgId="[b]FortuneCitycomInc.MyPhotoAlbumEasyUploadTool.4[/b]";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.ImageUploader.class";

	//Extend
	this.showNonemptyResponse="off";
	this._getHtml=this.getHtml;
	this.getHtml=function(){
		var r="";
		if (this.showNonemptyResponse!="off"){
			r+="<" + "script type=\"text/javascript\">";
			r+="function __"+this.id+"_InnerComplete(Status,StatusText){";
			r+="if (new String(Status)==\"COMPLETE\" && new String(StatusText).replace(/\\s*/g,\"\")!=\"\"){";
			if (this.showNonemptyResponse=="dump"){
				r+="var f=document.createElement(\"fieldset\");";
				r+="var l=f.appendChild(document.createElement(\"legend\"));";
				r+="l.appendChild(document.createTextNode(\"Server Response\"));";
				r+="var d=f.appendChild(document.createElement(\"div\"));";
				r+="d.innerHTML=StatusText;";
				r+="var b=f.appendChild(document.createElement(\"button\"));";
				r+="b.appendChild(document.createTextNode(\"Clear Server Response\"));";
				r+="b.onclick=function(){var f=this.parentNode;f.parentNode.removeChild(f)};";
				r+="document.body.appendChild(f);";
			}
			else{
				var s="";
				for (var i=0;i<80;i++){s+="-";}
				r+="alert(\""+s+"\\r\\nServer Response\\r\\n"+s+"\\r\\n\"+StatusText);";
			}
			r+="}";
			r+="}";
			r+="<"+"/script>";
			this.addEventListener("InnerComplete","__"+this.id+"_InnerComplete");
		}
		return r+this._getHtml();
	}
}

function ThumbnailWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="[b]47937974-690E-49F5-ACD3-8115B61FC6D8[/b]";
	this.activeXProgId="[b]FortuneCitycomInc.Thumbnail.4[/b]";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.Thumbnail.class";
}

function ShellComboBoxWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="[b]82B56B47-90DC-4F58-9A7D-D27BA46D3C0F[/b]";
	this.activeXProgId="[b]FortuneCitycomInc.ShellCombo.4[/b]";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.ShellComboBox.class";
}

function UploadPaneWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="[b]2484BA21-8DF7-4C3E-97EB-E7290252ACBD[/b]";
	this.activeXProgId="[b]FortuneCitycomInc.UploadPane.4[/b]";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.UploadPane.class";
}

function FileDownloaderWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="FileDownloader.cab";
	this.activeXClassId="[b]F1F51698-7B63-4394-8743-1F4CF1853DE1[/b]";
	this.activeXProgId="[b]FortuneCitycomInc.FileDownloader.1[/b]";
	this.javaAppletEnabled=false;
	this.controlClass="FileDownloader";
}

function getControlObject(id){
	if (__browser.isSafari){
		return document[id];
	}
	else{
		return document.getElementById(id);
	}
}

function getImageUploader(id){
	return getControlObject(id);
}

function getFileDownloader(id){
	return getControlObject(id);
}
[/quote]

And the tool is called within our php page with the following code (nearly identical to the sample provided I have [b]bolded[/b] all the items we have changed:
[quote]
<table cellpadding="0" cellspacing="3" border="0">
		<tr>
			<td align="right">
				Click to Look in:</td>
			<td>
				<table cellpadding="0" cellspacing="0" border="0" width="100%">
					<tr>
						<td>
							<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed ShellComboBox to the page.
var sc = new ShellComboBoxWriter("ShellComboBox1", 320,24);

//For ActiveX control full path to CAB file (including file name) should be specified.
sc.activeXControlCodeBase = "[b]http://whoozie.myphotodevel.com/ImageUploader4.cab[/b]";
sc.activeXControlVersion = "[b]4,1,25,0[/b]";
//For Java applet only path to directory with JAR files should be specified (without file name).
sc.javaAppletCodeBase = "../";
sc.javaAppletCached = true;
sc.javaAppletVersion = "2.1.1.0";



//Configure appearance.
sc.addParam("BackgroundColor", "#ece9d8");

//Link ShellComboBox with ImageUploader
sc.addParam("AdditionalFolderNavigator", "[b]EasyUploadTool1[/b]");

//Tell the ShellComboBox writer object to generate all necessary HTML code to embed 
//it to the page.
sc.writeHtml();
//]]>
						</script>						
</td>
						<td align="right">
							<button onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToPreviousFolder();" title="Back"
								class="SmallButton">
								<img src="images/Back.gif" alt="Back" class="Icon" /></button>
							<button onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToParentFolder();" title="Up"
								class="SmallButton">
								<img src="images/Up.gif" alt="Up" class="Icon" /></button>
							<button onclick="changeView(0);" title="Thumbnails" class="SmallButton">
								<img src="images/Thumbnails.gif" alt="Thumbnails" class="Icon" />
							</button>
							<button onclick="changeView(3);" title="Details" class="SmallButton">
								<img src="images/Details.gif" alt="Details" class="Icon" /></button>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td valign="top" class="LeftPanel">
				<table cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td class="ShortcutPanel" valign="top">
							<table>
								<tr id="DesktopHolder">
									<td>
										<button title="Desktop" class="IconButton" onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToFolder(desktop);">
											<img src="images/Desktop.gif" alt="Desktop" class="Icon" />

											Desktop
										</button>
									</td>
								</tr>
								<tr id="MyComputerHolder">
									<td>
										<button title="My Computer" class="IconButton" onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToFolder(myComputer);">
											<img src="images/MyComputer.gif" alt="My Computer" class="Icon" />

											MyComputer
										</button>
									</td>
								</tr>
								<tr id="MyDocumentsHolder">
									<td>
										<button title="My Documents" class="IconButton" onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToFolder(myDocuments);">
											<img src="images/MyDocuments.gif" alt="My Documents" class="Icon" />

											MyDocuments
										</button>
									</td>
								</tr>
								<tr id="MyPicturesHolder">
									<td>
										<button title="My Pictures" class="IconButton" onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToFolder(myPictures);">
											<img src="images/MyPictures.gif" alt="My Pictures" class="Icon" />

											MyPictures
										</button>
									</td>
								</tr>
								<tr id="MyVideoHolder">
									<td>
										<button title="My Video" class="IconButton" onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToFolder(myVideo);">
											<img src="images/MyVideo.gif" alt="My Video" class="Icon" />

											MyVideo
										</button>
									</td>
								</tr>
								<tr id="NetworkHolder">
									<td>
										<button title="Network" class="IconButton" onclick="getImageUploader('[b]EasyUploadTool[/b]').GoToFolder(network);">
											<img src="images/Network.gif" alt="Network" class="Icon" />

											Network
										</button>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				
				</table>
			</td>
			<td valign="top">
			<table width="100%">
								<tr>
									<td>
										<button title="Select All" onclick="getImageUploader('[b]EasyUploadTool[/b]').SelectAll();"
											class="Button" style="font-size:11px;">
											Select All</button>
									</td>
						
									<td align="right">
										<button title="Upload" onclick="getImageUploader('[b]EasyUploadTool[/b]').Send();" class="Button" class="submit" style="font-weight:bold;font-family:Arial, Verdana, Tahoma;">
											<span class=blue>Upload Photos Now!</span></button>
									</td>
								</tr>
							</table>
	<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.



var iu = new ImageUploaderWriter("[b]EasyUploadTool[/b]", 540, 450);
//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "[b]http://whoozie.myphotoalbum.com/ImageUploader4.cab[/b]";
iu.activeXControlVersion = sc.activeXControlVersion;

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = sc.javaAppletVersion;

iu.showNonemptyResponse = "off";
iu.addParam("LicenseKey", "[b]6526-6190-7501-5974-64751;7430-6063-6063-7750-74030[/b]");
//Configure appearance and behaviour.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("FolderView", "Thumbnails");
iu.addParam("UploadView", "Details");
iu.addParam("PreviewThumbnailSize", "70");
iu.addParam("ShowButtons", "false");
iu.addParam("ShowSubfolders", "true");
iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowContextMenu", "false");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowMultipleRotate", "true");
iu.addParam("AllowFolderUpload", "false");

//Configure colors.
iu.addParam("PaneBackgroundColor", "#ffffff");
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("PreviewThumbnailBorderColor", "#eeeeee");
iu.addParam("PreviewThumbnailBorderHoverColor", "#f8b330");


//Configure  Messages.
iu.addParam("LoadingFilesText", "Loading photos, please be patient...");


iu.addParam("ProgressDialogTitleText", "MyPhotoAlbum Easy Upload Tool");
iu.addParam("MegabytesText", "MB");
iu.addParam("KilobytesText", "KB");
iu.addParam("ProgressDialogPreparingDataText", "Preparing photos...");
iu.addParam("ProgressDialogEstimatedTimeText", "Estimated:[Current] of [Total]");
iu.addParam("ProgressDialogPreviewThumbnailSize", "100");
iu.addParam("ProgressDialogWidth", "450");

iu.addParam("MessageUploadCompleteText", "Success, your photos have been added to your album.");
iu.addParam("MessageUploadCancelledText", "You photo upload has been cancelled.");
iu.addParam("MessageUploadFailedText", "Your photo upload failed (the connection was interrupted), please try again.");
iu.addParam("MessageNoResponseFromServerText", "uring upload of your photos, the connection to MyPhotoAlbum was dropped, please try again");
iu.addParam("MessageNoInternetSessionTex", "During upload of your photos, the connection to MyPhotoAlbum was dropped, please try again.");
iu.addParam("MessageNoResponseFromServerText", "No response from MyPhotoAlbum server, please try again");
iu.addParam("MessageBoxTitleText", "MyPhotoAlbum Easy Upload Tool");


//Hide tree pane.
iu.addParam("TreePaneWidth", "-1");

//Allow upload not only files, but also entire folders.
//iu.addParam("AllowFolderUpload", "true");

//Single or multiple file selection.
//iu.addParam("AllowMultipleSelection", "false");

//Link ImageUploader with ShellComboBox.
iu.addParam("AdditionalFolderNavigator", "[b]EasyUploadTool1[/b]");

//Configure file mask to display images only.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.gif;*.png");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "ActualSize");
iu.addParam("UploadThumbnail1JpegQuality", "100");
iu.addParam("UploadSourceFile", "true");




//Configure upload settings.
iu.addParam("Action", "[b]http://whoozie.myphotodevel.com:8080/image_uploader3.php[/b]");
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "3");
iu.addParam("AutoRecoverTimeOut", "2000");

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "[b]/personalize_album.php?set_albumName=<?php echo $gallery->session->albumName; ?>[/b]");

iu.fullPageLoadListenerName = "FullPageLoad";

//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
//]]>
				</script>


			</td>
		</tr>
	</table>

Edited by user Tuesday, December 18, 2007 4:22:45 PM(UTC)  | Reason: Not specified

Alex Makhov  
#6 Posted : Monday, March 19, 2007 7:07:22 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Try to debug the way how this message appeared. I mean try to attach to internal initComplete event handler and check the way of ShellComboBox insertion.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

jessyhanley  
#7 Posted : Tuesday, March 20, 2007 12:30:18 AM(UTC)
jessyhanley

Rank: Member

Groups: Member
Joined: 1/10/2007(UTC)
Posts: 15

Can you please be more specific, I'm not sure how to implement your suggestion.

It appears to work, but visitors are asked to install twice.

j

Alex Makhov  
#8 Posted : Tuesday, March 20, 2007 1:36:47 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

I did not debug VBScripts myself. Try to google about it. The main idea is to put breakpoint to your code where you think the problem is. While executing your script will be stopped in the line of code where you have set a breakpoint. In this moment you will be able to check all available variable values and find the reason of the problem.

P.S. As I proposed before try to use the getActiveXInstalled method to check if Image Uploader is installed.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

Fedor  
#9 Posted : Wednesday, March 21, 2007 3:21:13 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Alex, it seem that there are problems with ShellComboBox rendering. Here is screenshot on Windows XP:

UserPostedImage

Also sometimes it is displayed just as white box until click on it. I have marked yellow the problem area.

Fedor attached the following image(s):
1.jpg
Best regards,

Fedor Skvortsov

Fedor  
#10 Posted : Wednesday, March 21, 2007 6:25:47 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
Well it seems there is no problem with ShellComboBox - on this sample special background was used which mimicked control borders.
Best regards,

Fedor Skvortsov

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.