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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Inazad  
#1 Posted : Sunday, August 23, 2009 11:16:37 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

Hi there,

when I'm trying to load index.php, I get this message :

Parse error: syntax error, unexpected T_STATIC, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in ImageUploaderPHP/BaseControl.class.php on line 13

The lines in BaseControl.class.php :
.....
class BaseControl {
/* ----------------------------------------------------------------------
* Non-public members
* ----------------------------------------------------------------------*/
static $_controlID = 1; <---- bug here
.....

There is the index.php code :

<?php
require_once "ImageUploaderPHP/ImageUploader.class.php";

$imageUploader = new ImageUploader("ImageUploader1", 650, 400);
$imageUploader->setAction("upload.php");
$imageUploader->setRedirectUrl("gallery.php");

$imageUploader->setActiveXControlEnabled(false);
$imageUploader->setJavaAppletEnabled(true);

$imageUploader->setUploadThumbnail1FitMode("Fit");
$imageUploader->setUploadThumbnail1Width(120);
$imageUploader->setUploadThumbnail1Height(120);

$imageUploader->render();

?>

I'm waiting your news.

Edited by user Sunday, August 23, 2009 11:18:24 AM(UTC)  | Reason: Not specified

Dmitry  
#2 Posted : Sunday, August 23, 2009 9:56:36 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Could you specify version of PHP installed on your server?
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#3 Posted : Tuesday, August 25, 2009 3:24:08 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

I have the PHP 5 version.
Dmitry  
#4 Posted : Tuesday, August 25, 2009 5:43:22 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

I found forum thread with similar problem. Changes in .htaccess fixed it.

Also I would recommend you to check zend.ze1_compatibility_mode setting in php.ini. This option enables compatibility mode with Zend Engine 1 (PHP 4), this mode can cause the problem. So you need to turn it off.

Please, let me know if the problem still persists.

Edited by user Tuesday, August 25, 2009 5:46:11 PM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#5 Posted : Thursday, August 27, 2009 7:53:10 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

Hi there,

Now the applet is loading well on IE and FF but I got this message :

IUEmbed Warning:

You should specify at least one license key using addParam("LicenseKey", "...") method in JavaScript or LicenseKey property in ASP.NET/PHP. Otherwise, upload will not work.

And I cannot send images through the app.

Thanks
Dmitry  
#6 Posted : Thursday, August 27, 2009 2:07:40 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

You need to get trial license keys and embed them into your application. The detailed information how to do it can be found in the How to Evaluate Image Uploader topic.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#7 Posted : Friday, August 28, 2009 1:30:33 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

OK Thanks for the quick answer.

Now how can we change the standard interface to the multiple descriptions (like the online demo, i.e : http://demo.aurigma.com/...escriptions/default.aspx ) ?

Do we have all theses type of view in the express licence or we have to buy others interfaces ?

We don't have this kind of help in the doc ! :P

Thanks

Edited by user Friday, August 28, 2009 1:32:05 AM(UTC)  | Reason: Not specified

Dmitry  
#8 Posted : Friday, August 28, 2009 2:09:16 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Multiple Descriptions is just a sample showing how to make Image Uploader to upload additional information along with files. You just purcahse Image Uploader license and you can use this demo(among the other ones) in the way you need - you can change it or embed it to your application without modifications.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#9 Posted : Monday, August 31, 2009 8:29:26 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

Can we use this demo with the evaluation version and customize the fields other than a textbox ? If yes, how can we do this ?

I want exactly this : http://demo.aurigma.com/...escriptions/default.aspx with a select input.

The demo is written in JavaScript, I need it in PHP. My select input will be filled from data with a MySQL table.

Thanks

Edited by user Monday, August 31, 2009 9:19:27 AM(UTC)  | Reason: Not specified

Dmitry  
#10 Posted : Tuesday, September 1, 2009 4:39:48 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Hello,

Quote:
Can we use this demo with the evaluation version and customize the fields other than a textbox?

Sure, you can. You just need to take this sample from installation package, install trial license keys (in the way I suggested you before in the How to Evaluate Image Uploader topic) and everything should work.

Quote:
The demo is written in JavaScript, I need it in PHP. My select input will be filled from data with a MySQL table.

Unfortunately these customizations should be performed in JavaScript. You need to pass your data obtained from DB from server to client.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#11 Posted : Wednesday, September 2, 2009 8:22:07 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

I have found the demo but I cannot launch it.

I got this error :

Quote:
IUEmbed Warning:

You have enabled ActiveX version, but haven't specified version 6.x license key for it. You should either add license key or disable it using activeXControlEnabled = false syntax.


I've add my evaluation licence and I added this line to deactivate the ActiveX :

Quote:

// deactivate ActiveX
iu.addParam("activeXControlEnabled","false");


What I have to do now ?

Edited by user Wednesday, September 2, 2009 9:15:51 AM(UTC)  | Reason: Not specified

Tamila  
#12 Posted : Wednesday, September 2, 2009 3:03:13 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

Quote:
You have enabled ActiveX version, but haven't specified version 6.x license key for it. You should either add license key or disable it using activeXControlEnabled = false syntax.

If you see this message you should add license keys as follow:
Code:
iu.addParam("LicenseKey", "activeX_license_key;java_license_key");

activeX_license_key and java_license_key you can find in your account in section My Licenses & Downloads at our site.

If you do not want to use Image Uploader ActiveX control, you should disable it in following way:
Code:
iu.activeXControlEnabled = false;

If you still have any problems with it feel free to let us know.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#13 Posted : Saturday, September 5, 2009 4:22:53 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

this is my index.php code :

Quote:

<?php
require_once "ImageUploaderPHP/ImageUploader.class.php";

// create the object
$iu = new ImageUploader("ImageUploader1", 800, 600);
// configure it
$iu->setLicenseKey("72060-4F50B-00000-0876E-319DF");

$iu->setAction("upload.php");
$iu->setRedirectUrl("gallery.php");

$iu->setActiveXControlEnabled(false);
$iu->setJavaAppletEnabled(true);

$iu->setUploadView("Thumbnails");
$iu->setPaneLayout("ThreePanes");
$iu->setFolderView("FolderView");
$iu->setShowDescriptions(false);
//$iu->setShowButtons(false);
$iu->setAllowRotate(false);
$iu->setAllowMultipleSelection(true);
//$iu->setFolderPaneHeight(-1);

$iu->setShowUploadListButtons(true);
$iu->setFilesPerOnePackageCount(1);
$iu->setAutoRecoverMaxTriesCount(5);
$iu->setAutoRecoverTimeOut(5000);
//$iu->setMaxConnectionCount("1");
$iu->setUploadSourceFile(false);

$iu->setUploadThumbnail1FitMode("Fit");
$iu->setUploadThumbnail1Width(640);
$iu->setUploadThumbnail1Height(480);
$iu->setUploadThumbnail1JpegQuality(85);

$iu->setFileMask("*.jpg;*.jpeg;*.bmp;*.png;*.gif;*.tif;*.tiff;");
$iu->setMinImageWidth(640);
$iu->setMinImageHeight(480);
$iu->setMaxFileCount(24);

// events handler
//$iu->addClientUploadFileCountChange("ImageUploader1_UploadFileCountChange");
//$iu->addClientBeforeUpload("ImageUploader1_BeforeUpload");
//$iu->addClientFullPageLoad("ImageUploader1_FullPageLoad");


// show it
$iu->render();

?>

<html>
<head>
<script type="text/javascript" src="script.js" ></script>
</head>

<body>

<div id="UploadPaneFrame">
<div id="UploadPane"></div>
</div>

</body>

</html>



I want the customized upload pane... I don't get it damn... What I'm doing wrong ?

If I do the upload normally (without the FolderPaneHeight to -1), I got during the upload waiting for reply or ImageUploader has encountered some problem.... ????

Edited by user Sunday, September 6, 2009 12:17:35 AM(UTC)  | Reason: Not specified

Tamila  
#14 Posted : Sunday, September 6, 2009 6:26:10 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hi,

As I understand you try to use Multiple Description sample. In this case I recommend you to read the following article:
Multiple Descriptions Sample
Here you can find detail information about this sample.

If you see "Image Uploader has encountered some problem.." error message, it means that you have some server-side error. How to debug server scripts you can read here:
Debugging Server Scripts
I hope it helps you.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#15 Posted : Sunday, September 6, 2009 10:29:44 PM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

I don't want the original picture so I set UploadSourceFile to false.

I got this error on the Java console :

Code:

Fatal error: Uncaught exception 'Exception' with message 'Source file is not uploaded. In order to upload source file you should pass true value to ImageUploader.setUploadSourceFile method.' in /home/jspsol5/public_html/tmp/aurigma/ImageUploaderPHP/UploadedFiles.php:41 Stack trace: #0 /home/jspsol5/public_html/tmp/aurigma/ImageUploaderPHP/UploadedFiles.php(335): UploadedFiles::_throwException('Source file is ...') #1 /home/jspsol5/public_html/tmp/aurigma/ImageUploaderPHP/UploadedFiles.php(481): BaseFileInfo->_checkWhetherUploaded() #2 /home/jspsol5/public_html/tmp/aurigma/upload.php(12): BaseFileInfo->getSafeFileName('Gallery/') #3 {main} thrown in /home/jspsol5/public_html/tmp/aurigma/ImageUploaderPHP/UploadedFiles.php on line 41 


If I put true to UploadSourceFile, its work fine.

For the customized pane, I'll search later. I'll start to be able to upload than after, customize the pane.

I need fast answers to test it.

Thanks

Edited by user Sunday, September 6, 2009 10:35:50 PM(UTC)  | Reason: Not specified

Tamila  
#16 Posted : Monday, September 7, 2009 1:54:37 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

You have this problem because your server-side script (UploadedFiles.php) tried to save SourceFile. So you need to modify this script.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#17 Posted : Tuesday, September 8, 2009 5:09:15 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

Why I have to modify the source file if we can set it with the setUploadSourceFile method ? I don't think we have to proceed like that..

Your always sending me on non-resolving solutions... Its seems to be very easy but why I got so many problems ? I'm using the same server with the multi description demo and I never modified any source file from your product...

I need an answer and a good one. Just tell me to modify this file do not answer my question. I said I'm not a pro developper so, be more precise please.

I'm waiting for 2 weeks now... and its not working more. The support is slow, if you want a new customer, be better ...

And how, my god, can we customize the upload pane in PHP ??? The documentation is all in JavaScript Brick wall

Edited by user Tuesday, September 8, 2009 5:51:31 AM(UTC)  | Reason: Not specified

Tamila  
#18 Posted : Tuesday, September 8, 2009 1:18:11 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Let me describe a bit detailed.

You tried to use Multiple Descriptions Sample. This sample works correctly if source file is uploaded. But you do not want to upload source file. In this case you have added the following line in index.php script:
Code:
$iu->setUploadSourceFile(false);


Also you need to modify upload.php script which pointed in Action property. This script saves uploaded files and additional information from POST-request. I have modified this script for you.
upload.php
Code:
<?php
require_once '../ImageUploaderPHP/UploadedFiles.php';

//This variable specifies relative path to the folder, where the gallery with uploaded files is located.
//Do not forget about the slash in the end of the folder name.
$galleryPath = '../Gallery/';

$absGalleryPath = realpath($galleryPath) . '/';
$absThumbnailsPath = realpath($galleryPath . 'Thumbnails/') . '/';


function saveUploadedFiles() {
	global $absGalleryPath, $absThumbnailsPath;
	
	//Create XML file which will keep information about files (image dimensions, description, etc). 
	//XML is used solely for brevity. In real-life application most likely you will use database instead.	
	$descriptions = new DOMDocument('1.0');
	$descriptions->appendChild($descriptions->createElement('files'));
	
	//Iterate through uploaded data and save the original file, thumbnail, and description.
	while(($file = UploadedFiles::fetchNext()) !== null) {
		//Save Thumbnails.
		$thumbFileName = $file->getThumbnail(1)->getSafeFileName($absThumbnailsPath);
		$file->getThumbnail(1)->save($absThumbnailsPath . '/' . $thumbFileName);
		
		//Save file info.
		$xmlFile = $descriptions->createElement('file');
		$xmlFile->setAttribute('name', $fileName);
		$xmlFile->setAttribute('thumbName', $thumbFileName);
		$xmlFile->setAttribute('width', $file->getSourceFile()->getWidth());
		$xmlFile->setAttribute('height', $file->getSourceFile()->getHeight());	
		echo '===Title_' . $file->getFileIndex() . '====';
		$xmlFile->setAttribute("title", $_POST ['Title_' . $file->getFileIndex()]);						
		$xmlFile->setAttribute('description', $file->getDescription());
		$descriptions->documentElement->appendChild($xmlFile);
	}
	
	$descriptions->save($absGalleryPath . 'Descriptions.xml');	
}


function initGallery() {
	global $absGalleryPath, $absThumbnailsPath;
	
	//First of all, clear files and data uploaded at previous time.
	
	//Delete source files.
	$handle = opendir($absGalleryPath);
	
	while (false !== ($file = readdir($handle))) {
		if (is_file($absGalleryPath . $file)) {
			unlink($absGalleryPath . $file);
		}
	}
	closedir($handle); 
	
	//Delete thumbnails
	$handle = opendir($absThumbnailsPath);	
	while (false !== ($file = readdir($handle)))  {
		if (is_file($absThumbnailsPath . $file)) {
			unlink($absThumbnailsPath . $file);
		}
	}
	closedir($handle);
	
	//NOTE: If you do not want to delete previously uploaded files, just 
	//remove or comment out the code above.	
}


initGallery();
saveUploadedFiles();
?>

Please let us know if you have any questions.

Quote:
And how, my god, can we customize the upload pane in PHP ??? The documentation is all in JavaScript

Documentation for PHP Library you can find here:
Image Uploader PHP Library Reference

See ImageUploader Class to customize upload pane.

Edited by user Tuesday, September 8, 2009 1:22:12 PM(UTC)  | Reason: Not specified

Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Inazad  
#19 Posted : Wednesday, September 9, 2009 6:28:24 AM(UTC)
Inazad

Rank: Member

Groups: Member
Joined: 8/23/2009(UTC)
Posts: 16

Your code had erased all my files in the directory, so I have to restart from the beginning...

There is my index.php code :
Code:

<?php 
    require_once "ImageUploaderPHP/ImageUploader.class.php";   
	require_once "ImageUploaderPHP/UploadPane.class.php";
        
	// create the object
    $iu = new ImageUploader("ImageUploader1", 800, 300);
	// configure it
	$iu->setLicenseKey("72060-4F50B-00000-0876E-319DF");
	
    $iu->setAction("upload.php");
    $iu->setRedirectUrl("gallery.php");
	
    $iu->setActiveXControlEnabled(false);
    $iu->setJavaAppletEnabled(true);

	$iu->setUploadView("Thumbnails");
	$iu->setPaneLayout("ThreePanes");
	$iu->setFolderView("FolderView");
	$iu->setShowDescriptions(false);
	//$iu->setShowButtons(false);
	$iu->setAllowRotate(false);
	$iu->setAllowMultipleSelection(true);
	$iu->setFolderPaneHeight(-1);
	
	$iu->setShowUploadListButtons(true);
	$iu->setFilesPerOnePackageCount(1);
	$iu->setAutoRecoverMaxTriesCount(5);
	$iu->setAutoRecoverTimeOut(5000);
	//$iu->setMaxConnectionCount("1");
	$iu->setUploadSourceFile(false);
	
	$iu->setUploadThumbnail1FitMode("Fit");
    $iu->setUploadThumbnail1Width(640);
    $iu->setUploadThumbnail1Height(480);
    $iu->setUploadThumbnail1JpegQuality(85);
	
	$iu->setFileMask("*.jpg;*.jpeg;*.bmp;*.png;*.gif;*.tif;*.tiff;"); 
    $iu->setMinImageWidth(640);
    $iu->setMinImageHeight(480);
    $iu->setMaxFileCount(24);
	
	$iu->setShowDebugWindow(true);
	
	// events handler
	//$iu->addClientUploadFileCountChange("ImageUploader1_UploadFileCountChange");
	//$iu->addClientBeforeUpload("ImageUploader1_BeforeUpload");
	//$iu->addClientFullPageLoad("ImageUploader1_FullPageLoad");

	// upload pane
	$up = new UploadPane("UploadPane", 800, 300);
	
	$up->setParentControlName("ImageUploader1");
            
	// show the comp
    $iu->render();
	$up->render();
	
	?>
	
<html>
	<head>
		<script type="text/javascript" src="script.js" ></script>
	</head>
	
	<body>
	
	<div id="UploadPaneFrame">
		<div id="UploadPane"></div>
	</div>
	
	
	</body>
	
</html>


There is my script.js code :
Code:

var imageUploader1 = null;
var uniqueId = 0;
var prevUploadFileCount = 0;
var dragAndDropEnabled = true;


var allowDrag = false;

function ImageUploader1_FullPageLoad() {
	imageUploader1 = getImageUploader(imageUploader1ID);

	var UploadPane = document.getElementById("UploadPane");
	
	while (UploadPane.childNodes.length > 0) {
		UploadPane.removeChild(UploadPane.childNodes[0]);
	}

	//Fix Opera applet z-order bug
	if (IUCommon.browser.isOpera) {
	    UploadPane.style.height = "auto";
	}


	if (dragAndDropEnabled) {

	    //Handle drag & drop.
	    if (IUCommon.browser.isIE || IUCommon.browser.isSafari || IUCommon.browser.isChrome) {
	        var target = IUCommon.browser.isIE || IUCommon.browser.isChrome ? UploadPane : document.body;
	        target.ondragenter = function() {
	            var e = window.event;
	            var data = e.dataTransfer;
	            if (data.getData('Text') == null) {
	                this.ondragover();
	                data.dropEffect = "copy";
	                allowDrag = true;
	            }
	            else {
	                allowDrag = false;
	            }
	        }

	        target.ondragover = function() {
	            var e = window.event;
	            e.returnValue = !allowDrag;
	        }

	        target.ondrop = function() {
	            var e = window.event;
	            this.ondragover();
	            e.dataTransfer.dropEffect = "none";
	            processDragDrop();
	        }
	    }
	    else {
	        window.captureEvents(Event.DRAGDROP);
	        window.addEventListener("dragdrop", function(e) {
	            e.stopPropagation();
	            e.preventDefault();
	            processDragDrop();
	        }, true);
	    }
	}
}

function processDragDrop() {
	//alert("Adding files with drag & drop can not be implemented in standard version due security reasons. However it can be enabled in private-label version."
	//	+ "\r\n\r\nFor more information please contact us at sales@aurigma.com");
	if (imageUploader1) {
		imageUploader1.AddToUploadList();
	}
}

//To identify items in upload list, GUID are used. However it would work 
//too slow if we use GUIDs directly. To increase performance, we will use 
//hash table which will map the guid to the index in upload list. 

//This function builds and returns the hash table which will be used for
//fast item search.
function getGuidIndexHash() {
	var uploadFileCount = imageUploader1.getUploadFileCount();
	var guidIndexHash = new Object();
	for (var i = 1; i <= uploadFileCount; i++) {
		guidIndexHash[new String(imageUploader1.getUploadFileGuid(i))] = i;
	}
	return guidIndexHash;
}

//This function returns HTML which represent the single item in the custom upload pane.
//It contains of the Thumbnail object and form elements for each piece of data (in our 
//case - title and description). If you want to upload extra data, you should write
//additional form elements here.
//
//It is highly recommended not to copy this function into the main HTML page to 
//avoid problems with activation of ActiveX controls in Internet Explorer with
//security update 912945. You can read more detailed about activation on Microsoft website:
//
//http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp 
function addUploadFileHtml(index){
	var guid = new String(imageUploader1.getUploadFileGuid(index));
	var fileName = new String(imageUploader1.getUploadFileName(index));
	
	var h = "<table cellspacing=\"5\"><tbody>";
	h += "<tr>";
	h += "<td class=\"Thumbnail\" align=\"center\" valign=\"middle\">";

	//Add thumbnail control and link it with Image Uploader by its name and GUID.
	var tn = new ThumbnailWriter("Thumbnail" + uniqueId, 96, 96);
	//Copy codebase and version settings from ImageUploaderWriter instance.
	//var iu = eval(imageUploader1ID + "_w");
	tn.activeXControlCodeBase = iu.activeXControlCodeBase;
	tn.activeXControlVersion = iu.activeXControlVersion;
	tn.javaAppletCodeBase = iu.javaAppletCodeBase;
	tn.javaAppletJarFileName  = iu.javaAppletJarFileName;
	tn.javaAppletCached = iu.javaAppletCached;
	tn.javaAppletVersion = iu.javaAppletVersion;

	tn.addParam("ParentControlName", "ImageUploader1");
	tn.addParam("Guid", guid);
	tn.addParam("FileName", fileName);
	h += tn.getHtml();

	h += "</td>";
	h += "<td valign=\"top\">";

	//Add Piece element
	// ref aurigma-list-piece.txt 
	h += "Pièce:<br />";
	//h += "<input id=\"Title" + uniqueId + "\" class=\"Title\" type=\"text\" /><br />";
	h += "<select id=\"Piece" + uniqueId + "\" name=\"Piece" + uniqueId + "\">";
	h += "<option value=\"À construire\">À construire</option>";
	h += "<option value=\"Atelier\">Atelier</option>";
	h += "<option value=\"Bibliothèque\">Bibliothèque</option>";
	h += "<option value=\"Bord de l'eau\">Bord de l'eau</option>";
	h += "<option value=\"Boudoir\">Boudoir</option>";
	h += "<option value=\"Bureau à dom.\">Bureau à dom.</option>";
	h += "<option value=\"Cave/Ch. froide\">Cave/Ch. froide</option>";
	h += "<option value=\"Chambre\">Chambre</option>";
	h += "<option value=\"Chambre princ.\">Chambre princ.</option>";
	h += "<option value=\"Coin-repas\">Coin-repas</option>";
	h += "<option value=\"Commerce\">Commerce</option>";
	h += "<option value=\"Cour\">Cour</option>";
	h += "<option value=\"Cuisine\">Cuisine</option>";
	h += "<option value=\"Écurie\">Écurie</option>";
	h += "<option value=\"En construction\">En construction</option>";
	h += "<option value=\"Érablière\">Érablière</option>";
	h += "<option value=\"Extérieur\">Extérieur</option>";
	h += "<option value=\"Façade\">Façade</option>";
	h += "<option value=\"Garage\">Garage</option>";
	h += "<option value=\"Grange\">Grange</option>";
	h += "<option value=\"Hall d'entrée\">Hall d'entrée</option>";
	h += "<option value=\"Intérieur\">Intérieur</option>";
	h += "<option value=\"Maison modèle\">Maison modèle</option>";
	h += "<option value=\"Mezzanine\">Mezzanine</option>";
	h += "<option value=\"Photo aérienne\">Photo aérienne</option>";
	h += "<option value=\"Piscine\">Piscine</option>";
	h += "<option value=\"Rangement\">Rangement</option>";
	h += "<option value=\"Remise\">Remise</option>";
	h += "<option value=\"Restaurant\">Restaurant</option>";
	h += "<option value=\"Rue\">Rue</option>";
	h += "<option value=\"Salle à manger\">Salle à manger</option>";
	h += "<option value=\"Salle d'eau\">Salle d'eau</option>";
	h += "<option value=\"Salle de bains\">Salle de bains</option>";
	h += "<option value=\"Salle couture\">Salle couture</option>";
	h += "<option value=\"Salle de jeux\">Salle de jeux</option>";
	h += "<option value=\"Salle de lavage\">Salle de lavage</option>";
	h += "<option value=\"Salle familiale\">Salle familiale</option>";
	h += "<option value=\"Salon\">Salon</option>";
	h += "<option value=\"Serre\">Serre</option>";
	h += "<option value=\"Solarium\">Solarium</option>";
	h += "<option value=\"Sous-sol\">Sous-sol</option>";
	h += "<option value=\"Terre à bois\">Terre à bois</option>";
	h += "<option value=\"Vente sur plan\">Vente sur plan</option>";
	h += "<option value=\"Véranda\">Véranda</option>";
	h += "<option value=\"Vue sur l'eau\">Vue sur l'eau</option>";
	h += "<option value=\"Autre\">Autre</option>";
	h += "</select>";
	
	//h += "<select id=\"pieces" + uniqueId + "\" style=\"width: 125px;\" \" >";
	//for(var i = 0; i < txtDesc.length; i++) {
	//    h += "<option value=\"" + txtDesc[i] + "\">" + txtDesc[i] + "</option>";
	//}
	//h += "</select>";

	//Add Description element.
	//h += "Description:<br />";
	//h += "<textarea id=\"Description" + uniqueId + "\" class=\"Description\"\"></textarea>";

	h += "</td>";
	h += "</tr>";
	h += "<tr>";
	h += "<td align=\"center\"><a href=\"#\" onclick=\"return Remove_click('" + guid + "');\">Enlever</a></td>";
	h += "<td></td>";
	h += "</tr>";
	h += "</tbody></table>";

	//Create DIV element which will represent the upload list item.
	var div = document.createElement("div");
	div.className = "UploadFile";
	div.innerHTML = h;
	div._guid = guid;
	//_uniqueId is used for fast access to the Title and Description form elements.
	div._uniqueId = uniqueId;

	//Append this upload list item to the custom upload pane.
	document.getElementById("UploadPane").appendChild(div);

	//Increase the ID to guaranty uniqueness.
	uniqueId++;
}

//Synchronize custom upload pane with Image Uploader upload list when 
//some files are added or removed.
function ImageUploader1_UploadFileCountChange() {
	if (imageUploader1) {
		var uploadFileCount  = imageUploader1.getUploadFileCount();

		//Files are being added.
		if (prevUploadFileCount <= uploadFileCount) {
			for (var i = prevUploadFileCount + 1; i <= uploadFileCount; i++){
				addUploadFileHtml(i);
			}
		}
		//Files are being removed.
		else {
			var guidIndexHash = getGuidIndexHash();
			var UploadPane = document.getElementById("UploadPane");
			var i = UploadPane.childNodes.length - 1;
			while (i >= 0) {
				if (guidIndexHash[new String(UploadPane.childNodes[i]._guid)] == undefined){
					UploadPane.removeChild(UploadPane.childNodes[i]);
				}
				i--;
			}
		}

		prevUploadFileCount = uploadFileCount;

		document.getElementById("UploadButton").disabled = (uploadFileCount == 0);
	}
}

//Append the additional data entered by the user (title and description)
//to the upload. If you add more fields, do not forget to modify this event 
//handler to call AddField for these fields.
function ImageUploader1_BeforeUpload() {
	var guidIndexHash = getGuidIndexHash();

	var UploadPane = document.getElementById("UploadPane");

	for (var i = 0; i < UploadPane.childNodes.length; i++) {
		var div = UploadPane.childNodes[i];

		var index = guidIndexHash[div._guid];

		//Description will be sent as a native Description POST field 
		//provided by Image Uploader.
		imageUploader1.setUploadFileDescription(index
			, document.getElementById("Description" + div._uniqueId).value);

		//Title will be sent as a custom Title_N POST field, where N is an 
		//index of the file.
		imageUploader1.AddField("Title_" + index, document.getElementById("Title" + div._uniqueId).value);
	}
}

//This function is used to handle Remove link click. It removes an item 
//from the custom upload pane by specified GUID.
function Remove_click(guid) {
	var guidIndexHash = getGuidIndexHash();
	imageUploader1.UploadFileRemove(guidIndexHash[guid]);
	return false;
}

//This function posts data on server.
function UploadButton_click() {
	imageUploader1.Send();
}


There is a preview :
UserPostedImage

1) I don't get the customized pane.
2) The files aren't uploaded (waiting for retry again...)
3) I'm wasting my time for 3 weeks now on a ''supposed best imaging program''..
4) I don't get the support I need. Its simple I want a clear example with the code working.

Which interest I have to buy your software if I cannot get what I want ? You don't have a chat system or im ? Its better than a forum.

Edited by user Wednesday, September 9, 2009 6:37:58 AM(UTC)  | Reason: Not specified

Tamila  
#20 Posted : Wednesday, September 9, 2009 8:01:30 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

Thank you for the code. I have prepared sample project for you (using your code). Put Sample folder on your server and try to upload photos. I hope it will be helpful for you.
File Attachment(s):
Sample.zip (2,019kb) downloaded 7 time(s).
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
2 Pages12>
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.