Jump to content
Sign in to follow this  
MaxiDVD

[SUPPORT] HTML Editor and UltraPics by MaxiDVD

Recommended Posts

I wonder how difficult it would be to use gd or imagemagick instead of netpbm to do the image resizing?

Share this post


Link to post
Share on other sites
I wonder how difficult it would be to use gd or imagemagick instead of netpbm to do the image resizing?

 

 

Well I hope someone who knows more than me can address this concern. My hosting company feels they are at risk with this contibution is put together now, but it is OK if I don't upload NETPBM. That means I can't resize any pics. :(


I like these mods, there fun! ...65 70 72 75 80 85 125+ contributions installed and counting...

 

Tools I'm using: OSC2.2 milestone2, Filezilla for FTP, PHP Designer 2007PE (nice), Araxis Merge 6.5 to compare files, XP(my box), Remote Server is shared Apache 1.3 Cpanel, CURL, and PHPmyAdmin through my hosts Cpanel to mess up the database.

Share this post


Link to post
Share on other sites

I saw that there are many version of NETPBM, my hosting server using Linux system, which one should I download? I cant find a NETPBM for linux or unix... :(


Best regards,

Koh Kho King

Share this post


Link to post
Share on other sites
I saw that there are many version of NETPBM, my hosting server using Linux system, which one should I download? I cant find a NETPBM for linux or unix... :(

 

I found out that my server has the GD library installed, and I dont need NETPBM! All images are thumbnailed automatically! :thumbsup:


Best regards,

Koh Kho King

Share this post


Link to post
Share on other sites

I have a strange issue with the image upload pop-up.

 

The windows does not display the full content. The last part is 'cut-off' by the status line that tell's me the source.

 

Does anybody know how I can 'fix' this so that the full contect of the pop-up is displayed?

 

dioalog.jpg

 

 

Thx, Marco

Share this post


Link to post
Share on other sites

Hi i installed this contribution and this error shows up when i click on any product in my catalog-

 

1054 - Unknown column 'p.products_image_med' in 'field list'

 

select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from products p, products_description pd where p.products_status = '1' and p.products_id = '32' and pd.products_id = p.products_id and pd.language_id = '1'

 

I managed to setup phpmyadmin so i can run the sql file and it come up with an error, not sure if its that stopping it from working? I also used dbManager pro to run the sql file and it seemed to be ok but not 100% sure?

 

Any1 have any ideas what im doing wrong?

 

Thanx in advance

Share this post


Link to post
Share on other sites
I have a strange issue with the image upload pop-up.

 

The windows does not display the full content. The last part is 'cut-off' by the status line that tell's me the source.

 

Does anybody know how I can 'fix' this so that the full contect of the pop-up is displayed?

 

dioalog.jpg

 

 

Thx, Marco

 

increase pixel value in ../admin/htmlarea/popups/insert_image.html

at end of row 62, for me was sufficient this:

 

if(config.InsertImageURL) document.all.tags("html")[0].style.height='480px';

 

rgds Robert

Share this post


Link to post
Share on other sites
As an easypopulate user, I am also interested in compatability resolve of this contribution. Anyone to share experience or suggestions?

 

I have same problem with EP upload after WYSIWYG instal.

Share this post


Link to post
Share on other sites
As an easypopulate user, I am also interested in compatability resolve of this contribution. Anyone to share experience or suggestions?

 

check if yours /catalog/temp and admin/temp folders are writable - CHMOD 777

Share this post


Link to post
Share on other sites

I have a problem after installing UltraPics and Margin Reports. Not sure which one is causing the problem...

 

I can't copy a product...

 

(can only link product but NOT DUPLICATE PRODUCT) :(

 

1136 - Column count doesn't match value count at row 1

 

insert into products (products_quantity, products_model, products_image, products_image_med, products_image_lrg, products_image_sm_1, products_image_xl_1, products_image_sm_2, products_image_xl_2, products_image_sm_3, products_image_xl_3, products_image_sm_4, products_image_xl_4, products_image_sm_5, products_image_xl_5, products_image_sm_6, products_image_xl_6, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('1', 'U-NK-CPL62', 'unkcpl62_ln_s.gif', '', 'unkcpl62_ln_l.gif', '', '', '', '', '', '', '', '', '', '', '', '', '250.00', now(), '', '0.00', '0', '0', '11')

 

[TEP STOP]


Best regards,

Koh Kho King

Share this post


Link to post
Share on other sites

Hello everyone,

 

in my store I have fixed the sort problem with the imagedirectories in the image-upload-popup. :D

 

This is my code of the lister.php

 

<html>
<head>
<?php
require("config.inc.php");
?>
<style type="text/css">
TD { <?php echo LISTER_STYLE; ?> }
TD.delete { <?php echo LISTER_DELETE; ?> } </style> <script language="javascript">

function actionComplete(action, path, error, info) {
  var manager = findAncestor(window.frameElement, '<?php echo MANAGER_NAME; ?>', '<?php echo MANAGER_TAG; ?>');
  var wrapper = findAncestor(window.frameElement, '<?php echo WRAPPER_NAME; ?>', '<?php echo WRAPPER_TAG; ?>');

  if(manager) {
  if(error.length < 1) {
	 manager.all.actions.reset();
<?php
// if UPLOAD is supported ...
if(SUPPORT_UPLOAD) {

  // ... emit the JavaScript
  echo "		 if(action == 'upload') {\n";
  echo "			manager.all.actions.image.value = '';\n";
  echo "			manager.all.actions.name.value = '';\n";
  echo "			manager.all.actions.width.value = '';\n";
  echo "			manager.all.actions.height.value = '';\n";
  echo "			manager.all.actions.aspect.checked = true;\n";
  echo "		 }\n";

  // if NETPBM is NOT available ...
  if(!(file_exists(NETPBM_DIR))) {

  // ... emit the JavaScript
  echo "		 manager.all.actions.width.disabled = true;\n";
  echo "		 manager.all.actions.height.disabled = true;\n";
  echo "		 manager.all.actions.aspect.disabled = true;\n";
  }
}

// if CREATE is supported ...
if(SUPPORT_CREATE) {

  // ... emit the JavaScript
  echo "		 if(action == 'create')\n";
  echo "			manager.all.actions.folder.value = '';\n";
}

// if DELETE is supported ...
if(SUPPORT_DELETE) {

  // ... emit the JavaScript
  echo "		 if(action == 'delete')\n";
  echo "			manager.all." . MANAGER_SRC . ".value = '';\n";
}
?>
  }
  manager.all.actions.DPI.value = <?php echo AGENT_DPI; ?>;
  manager.all.actions.path.value = path;
  }
  if(wrapper)
  wrapper.all.viewer.contentWindow.navigate('<?php echo
scriptURL("viewer.php?DPI=") . AGENT_DPI; ?>');
  if(error.length > 0)
  alert(error);
  else if(info.length > 0)
  alert(info);
}
</script>
</head>
<?php
/*
** Emits the appropriate HTML for the specified Directory.
**
** Params:  $value - Directory name
**		  $key - Array key (undefined)
**		  $depth - Indent depth
**		  $icon - Icon filename
**		  $link - TRUE if Directory should be linked; FALSE otherwise
*/
function dirTag($value, $key, $depth, $icon = ICON_CLOSED, $link = TRUE) {
  global $HTTP_SERVER_VARS, $base;

  // initialize context
  $path = basePath($value, ($depth - 1));

  // emit the HTML
  echo "<tr><td align=\"left\" valign=\"bottom\" width=\"100%\">\n";

  // indent as required
  indentTag($depth);

  // emit the HTML
  echo "<img align=\"bottom\" src=\"" . scriptURL($icon) . "\"
alt=\"$value\">";
  if($link) {
  echo "<a href=\"" . scriptURL(basename($HTTP_SERVER_VARS["PHP_SELF"]))
. "?DPI=" . AGENT_DPI;
  if(strcmp(TEXT_ROOT, $value))
	 echo "&path=" . urlencode($path);
  echo "\">";
  }
  echo "<b>$value</b>";
  echo "</a>";
  echo "</td><td class=\"delete\" align=\"right\" valign=\"bottom\">\n";
  if(SUPPORT_DELETE) {
  if(!(strcmp($icon, ICON_CLOSED)) && isEmpty($path))
	 echo "<a href=\"javascript:deletePath('" . $path . "')\">" .
TEXT_DELETE . "</a>";
  }
  echo "</td></tr>\n";
}

/*
** Creates a new Folder.
**
** Params:  $folder - Folder to create
*/
function doCreate($folder) {
  global $error;

  // initialize context
  $path = basePath($folder);

  // if Folder does NOT already exist ...
  if(!(file_exists(IMAGE_DIR . $path))) {

  // ... if Folder does NOT create ...
  if(!(@mkdir(IMAGE_DIR . $path, 0777)))

	 // ... report the error
	 $error = "Folder \'" . $path . "\' could not be created";
  }

  // ... otherwise, report the error
  else
  $error = "Folder \'" . $path . "\' already exists"; }

/*
** Deletes a Folder/File.
**
** Params:  $file - Folder/file to delete */ function doDelete($file) {
  global $base, $error;

  // if Folder/File exists ...
  if(file_exists(IMAGE_DIR . $file)) {

  // ... if this is a Folder ...
  if(is_dir(IMAGE_DIR . $file)) {

	 // ... if Folder does NOT delete ...
	 if(!(@rmdir(IMAGE_DIR . $file)))

		// ... report the error
		$error = "Folder \'" . $file . "\' could not be deleted";
  }

  // ... otherwise, if File does NOT delete ...
  else if(!(@unlink(IMAGE_DIR . $file)))

	 // ... report the error
	 $error = "Image \'" . $file . "\' could not be deleted";
  }

  // ... otherwise, report the error
  else
  $error = "Folder or file \'" . $file . "\' not found"; }

/*
** Lists a Path.
*/
function doList() {
  global $dirs;
  $exts = array("gif", "jpg", "jpeg", "png");

  // initialize context
  $nodes = 0;
  $current = (count($dirs) + 1);

  // emit the HTML
  echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"
width=\"100%\">\n";
  dirTag(TEXT_ROOT, "", $nodes++, ICON_OPENED);

  // for ALL Directories in the Path ...
  foreach($dirs as $dir) {

  // ... if Directory is exists ...
  if(strlen($dir) > 0)

	 // ... emit the HTML
	 dirTag($dir, "", $nodes++, ICON_OPENED, ($nodes != $current));
  }

  // list Directories and emit the HTML
  $list = listDirs();
  @array_walk($list, dirTag, $nodes);

  // if BITMAP support is desired ...
  if(SUPPORT_BITMAP)

  // ... include BMP extensions
  $exts[] = "bmp";

  // if METAFILE support is desired ...
  if(SUPPORT_METAFILE)

  // ... include WMF extensions
  $exts[] = "wmf";

  // list Image files and emit the HTML
  $list = listFiles($exts);
  @array_walk($list, fileTag, $nodes);

  // emit the HTML
  echo "</table>\n";
}

/*
** Uploads an Image.
**
** Params:  $name - Name for uploaded Image
**		  $width - Width to resize (OR zero)
**		  $height - Height to resize (OR zero)
**		  $aspect - TRUE if aspect ration is to be preserved; false
otherwise
*/
function doUpload($name, $width, $height, $aspect) {
  global $HTTP_POST_FILES, $error, $info;

  // initialize context
  $temp = $HTTP_POST_FILES["image"]["tmp_name"];

  // if File is a legitimate upload ...
  if(is_uploaded_file($temp)) {
  $type = $HTTP_POST_FILES["image"]["type"];
  $types = array("image/gif" => "[.]gif$", "image/jpg" => "[.]jp[e]?g$", "image/jpeg" => "[.]jp[e]?g$", "image/pjpeg" => "[.]jp[e]?g$", "image/png"
=> "[.]png$", "image/x-png" => "[.]png$");

  // ... if BITMAP support is desired ...
  if(SUPPORT_BITMAP) {

	 // ... add BITMAP type
	 $types["image/bmp"] =  "[.]bmp$";
	 $types["image/x-bmp"] =  "[.]bmp$";
  }

  // if METAFILE support is desired ...
  if(SUPPORT_METAFILE)

	 // ... add METAFILE type
	 $types["image/x-wmf"] =  "[.]wmf$";

  // if File is a valid image ...
  if(isset($types[$type])) {
	 $search = (isWindows() ? "eregi" : "ereg");
	 $replace = (isWindows() ? "eregi_replace" : "ereg_replace");

	 // ... if Name was NOT specified ...
	 if(strlen($name) < 1)

		// ... use the same Name
		$name = $HTTP_POST_FILES["image"]["name"];

	 // if File has NO or an improper extension ...
	 if(!($search($types[$type], $name))) {
		$exts = array("image/gif" => ".gif", "image/jpg" => ".jpg", "image/jpeg" => ".jpg", "image/pjpeg" => ".jpg", "image/png" => ".png", "image/x-png" => ".png", "image/bmp" => ".bmp", "image/x-bmp" => ".bmp", "image/x-wmf" => ".wmf");

		// ... if NO extension exists ...
		if(!($search("[.].+$", $name)))

		   // ... append the proper extension
		   $name .= $exts[$type];

		// ... otherwise, force a proper extension
		else
		   $name = $replace("[\.].*$", $exts[$type], $name);

		// notify the user
		$info = "Proper extension was added to make \'" . $name . "\'
valid for this image type";
	 }

	 // if File has the proper extension now ...
	 if($search($types[$type], $name)) {
		$path = basePath($name);

		// ... if File does NOT already exist ...
		if(!(file_exists(IMAGE_DIR . $path))) {
		   $size = $HTTP_POST_FILES["image"]["size"];

		   // ... if NO size limit exists OR File is NOT over the limit ...
		   if(UPLOAD_LIMIT == 0 || $size <= UPLOAD_LIMIT) {

			  // ... if File CANNOT be copied ...
			  if(!(@copy($temp, (IMAGE_DIR . $path))))

				 // ... report the error
				 $error = "File \'" . $path . "\' could not be created";

			  // ... otherwise, if NETPBM is available ...
			  else if(file_exists(NETPBM_DIR)) {
				 $size = @imageInfo(IMAGE_DIR . $path);
				 $action = "resized";

				 // ... if Width was NOT specified ...
				 if($width < 1)

					// ... use the image width
					$width = $size[0];

				 // if Width exceeds image constraint ...
				 if(CONSTRAIN_WIDTH > 0 && CONSTRAIN_WIDTH < $width) {

					// ... use the constrained width
					$width = CONSTRAIN_WIDTH;
					$action = "constrained";
				 }

				 // if Height was NOT specified ...
				 if($height < 1)

					// ... use the image height
					$height = $size[1];

				 // if Height exceeds image constraint ...
				 if(CONSTRAIN_HEIGHT > 0 && CONSTRAIN_HEIGHT < $height) {

					// ... use the constrained height
					$height = CONSTRAIN_HEIGHT;
					$action = "constrained";
				 }

				 // if image must be scaled ...
				 if($size[0] != $width || $size[1] != $height) {
					$script = "";

					// ... based on type ...
					switch($size[2]) {
					case IMAGE_GIF:
					   $script = NETPBM_GIF;
					   break;
					case IMAGE_JPG:
					   $script = NETPBM_JPG;
					   break;
					case IMAGE_PNG:
					   $script = NETPBM_PNG;
					   break;
					case IMAGE_BMP:
					   $script = NETPBM_BMP;
					   break;
					}

					// if image can be constrained using NETPBM (WMFs cannot) ...
					if(strlen($script) > 0) {

					   // ... if aspect ration is to be preserved ...
					   if($aspect)

						  // ... set bounding box
						  $options = "-xysize $width $height";

					   // ... otherwise, set absolute dimensions
					   else
						  $options = "-xsize=$width -ysize=$height";

					   // if Windows environment ...
					   if(isWindows())

						  // ... prepend the command shell
						  $script = "cmd.exe /C $script";

					   // scale the image
					   $dir = getcwd();
					   chdir(NETPBM_DIR);
					   shell_exec(sprintf($script, $temp, $options, (IMAGE_DIR . $path)));
					   chdir($dir);

					   // notify the user
					   $size = @imageInfo(IMAGE_DIR . $path);
					   $info = "Image \'" . $name . "\' was $action to $size[0] ? $size[1]";
					}
				 }
			  }
		   }

		   // ... otherwise, report the error
		   else
			  $error = "File \'" . $path . "\' exceeds " .
round((UPLOAD_LIMIT / 1024)) . " KByte size limit";
		}

		// ... otherwise, report the error
		else
		   $error = "File \'" . $path . "\' already exists";
	 }

	 // ... otherwise, report the error
	 else
		$error = "Files of type \'" . $type . "\' require a matching extension";
  }

  // ... otherwise, report the error
  else
	 $error = "File \'" . $HTTP_POST_FILES["image"]["name"] . "\' is not a supported type ($type)";
  }

  // ... otherwise, report the error
  else
  $error = "Invalid upload environment"; }

/*
** Emits the appropriate HTML for the specified File.
**
** Params:  $value - File name
**		  $key - Array key (undefined)
**		  $depth - Indent depth
*/
function fileTag($value, $key, $depth) {

  // initialize context
  $file = basePath($value);
  $size = @imageInfo(IMAGE_DIR . $file);

  // if Image size and type are available ...
  if($size) {

  // ... emit the HTML
  echo "<tr><td align=\"left\" valign=\"bottom\" width=\"100%\">\n";

  // indent as required
  indentTag($depth);

  // emit the HTML
  echo "<img align=\"bottom\" src=\"";
  switch($size[2]) {
  case IMAGE_GIF:
	 echo scriptURL("gif.gif");
	 break;
  case IMAGE_JPG:
	 echo scriptURL("jpg.gif");
	 break;
  case IMAGE_PNG:
	 echo scriptURL("png.gif");
	 break;
  case IMAGE_BMP:
	 echo scriptURL("bmp.gif");
	 break;
  case IMAGE_WMF:
	 echo scriptURL("wmf.gif");
	 break;
  }
  echo "\" alt=\"" . $value . "\">";
  echo "<a href=\"" . scriptURL("viewer.php?DPI=" . AGENT_DPI . "&file="
. urlencode($file)) . "\" target=\"" . VIEWER_NAME . "\">";
  echo $value;
  echo "</a>\n";
  echo "</td><td class=\"delete\" align=\"right\" valign=\"bottom\">\n";
  if(SUPPORT_DELETE) {
	 echo "<a href=\"javascript:deletePath('" . $file . "')\">" .
TEXT_DELETE . "</a>";
  }
  echo "</td></tr>\n";
  }
}

/*
** Emits the appropriate HTML for an Indent.
**
** Params:  $depth - Indent depth
*/
function indentTag($depth) {

  // if Indent is desired ...
  if($depth > 0) {
  $size = @getImageSize(SCRIPT_DIR . ICON_INDENT);

  // ... emit the HTML
  echo "<img src=\"" . scriptURL(ICON_INDENT) . "\" width=\"" .
($size[0] * $depth) . "\" height=\"" . $size[1] . "\">";
  }
}

/*
** Returns the empty status of the specified Directory.
**
** Params:  $path	- Path to check
**
** Return:  TRUE if Directory is empty; FALSE otherwise */ function isEmpty($path) {

  // initialize context
  $empty = TRUE;

  // if the Directory opens ...
  if(($dir = @opendir(IMAGE_DIR . $path))) {

  // ... while Files remain ...
  while($empty && FALSE !== ($file = readdir($dir))) {

	 // ... if NOT hierarchy entries ...
	 if($file != "." && $file != "..")

		// ... indicate NOT empty
		$empty = FALSE;
  }

  // close the Directory
  closedir($dir);
  }

  // return the status
  return $empty;
}

/*
** Returns an array of the Directories within the specified path.
**
** Return:  Array of Directory names
*/
function listDirs() {
  global $base;
  $result = array();

  // if the Directory opens ...
  if(($dir = @opendir(IMAGE_DIR . $base))) {

  // ... while Files remain ...
  while(FALSE !== ($file = readdir($dir))) {

	 // ... if NOT hierarchy entries ...
	 if($file != "." && $file != "..") {

		// ... if File is a Directory ...
		if(is_dir(IMAGE_DIR . basePath($file)))

		   // ... return the Directory
		   array_push($result, $file);
			sort($result);
	 }
  }

  // close the Directory
  closedir($dir);
  }

  // return the Directories
  return $result;
}

/*
** Returns an array of the Files within the specified path.
**
** Params:  $filter - Extension filter(s)
**
** Return:  Array of File names
*/
function listFiles($filter = Array()) {
  global $base;
  $result = Array();

  // if the Directory opens ...
  if(($dir = @opendir(IMAGE_DIR . $base))) {
  $filters = count($filter);

  // ... while Files remain ...
  while(FALSE !== ($file = readdir($dir))) {

	 // ... if File is NOT a Directory ...
	 if(!(is_dir(IMAGE_DIR . basePath($file)))) {

		// ... if Filters were specified ...
		if($filters > 0) {
		   $compare = (isWindows() ? "strcasecmp" : "strcmp");

		   // ... isolate the Extension
		   $parts = pathinfo(IMAGE_DIR . basePath($file));
		   $ext = strtolower($parts["extension"]);

		   // for ALL specified Filters ...
		   for($index = 0; $index < $filters; $index++) {

			  // ... if this a Filtered extension ...
			  if(!($compare($ext, $filter[$index])))

				 // ... get out now!
				 break;
		   }

		   // if File is NOT to be included ...
		   if($index >= $filters)

			  // ... continue listing Files
			  continue;
		}
		// return the File
	   $result[] = $file;
	}
 }

 // close the Directory
 closedir($dir);
 }
natsort($result);
 // return the Files
 return $result;
/*
		// return the File
		$result[] = $file;
	 }
  }

  // close the Directory
  closedir($dir);
  }

  // return the Files
  return $result;
*/
}

// process GET/POST parameters
$action = "";
if(isset($HTTP_GET_VARS["action"]))
  $action = urldecode($HTTP_GET_VARS["action"]);
else if(isset($HTTP_POST_VARS["action"]))
  $action = urldecode($HTTP_POST_VARS["action"]);
$aspect = false;
if(SUPPORT_UPLOAD)
  $aspect = isset($HTTP_POST_VARS["aspect"]); $file = "";
if(SUPPORT_DELETE) {
  if(isset($HTTP_GET_VARS["file"]))
  $file = urldecode($HTTP_GET_VARS["file"]);
  else if(isset($HTTP_POST_VARS["file"]))
  $file = urldecode($HTTP_POST_VARS["file"]);
}
$folder = "";
if(SUPPORT_CREATE) {
  if(isset($HTTP_POST_VARS["folder"]))
  $folder = $HTTP_POST_VARS["folder"]; } $height = 0;
if(SUPPORT_UPLOAD) {
  if(isset($HTTP_POST_VARS["height"]) &&
is_numeric($HTTP_POST_VARS["height"]))
  $height = (int) $HTTP_POST_VARS["height"]; } $name = "";
if(SUPPORT_UPLOAD) {
  if(isset($HTTP_POST_VARS["name"]))
  $name = $HTTP_POST_VARS["name"];
}
$path = "";
if(isset($HTTP_GET_VARS["path"]))
  $path = urldecode($HTTP_GET_VARS["path"]);
else if(isset($HTTP_POST_VARS["path"]))
  $path = urldecode($HTTP_POST_VARS["path"]);
$width = 0;
if(SUPPORT_UPLOAD) {
  if(isset($HTTP_POST_VARS["width"]) &&
is_numeric($HTTP_POST_VARS["width"]))
  $width = (int) $HTTP_POST_VARS["width"]; }

// parse and clean the Path
cleanPath($path);

?>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <?php // if CREATE is supported AND this is CREATE ...
if(SUPPORT_CREATE && !(strcasecmp($action, "create")))

  // ... create the Folder
  doCreate($folder);

// ... otherwise, if DELETE is supported AND this is DELETE ...
else if(SUPPORT_DELETE && !(strcasecmp($action, "delete")))

  // ... delete the Folder/File
  doDelete($file);

// ... otherwise, if UPLOAD is supported AND this is UPLOAD ...
else if(SUPPORT_UPLOAD && !(strcasecmp($action, "upload")))

  // ... upload the Image
  doUpload(basename($name), $width, $height, $aspect);

// list the Path
doList();

// emit the HTML
echo "<script language=\"javascript\">\n";

// if DELETE is supported ...
if(SUPPORT_DELETE) {

  // ... emit the HTML
  echo "function deletePath(path) {\n";
  echo "   var lister = findAncestor(window.frameElement, '" . LISTER_NAME
. "', '" . LISTER_TAG . "');\n\n";
  echo "   if(lister && confirm(\"Delete '\" + path + \"'?\"))\n";
  echo "	  lister.contentWindow.navigate('" .
scriptURL("lister.php?DPI=") . AGENT_DPI . "&action=delete&path=" . $base .
"&file=" . "' + escape(path));\n";
  echo "}\n\n";
}
?>
actionComplete("<?php echo $action; ?>", "<?php echo $path; ?>", "<?php echo $error; ?>", "<?php echo $info; ?>");
</script>
</body>
</html>

 

With this lister.php the sorting works for images and image-directories. Directories are listed at top, pictures below, if a directory contains both - directories and images.

 

BoF

Share this post


Link to post
Share on other sites

after installing admin access level , i couldnt see use anymore the broswe file popup page to select an image

does someone got an idea on what are the change to to in the admin_files table to allow them ?


MS2

Share this post


Link to post
Share on other sites

I have made 4 shops based on osc with admin access level and I never had the problem you described. If a "lessadmin" is able to edit products, the popup also works. I only had problems with popup blocker apps like IE itself or google/yahoo toolbars or similar software.

 

BoF

Edited by BoF

Share this post


Link to post
Share on other sites

Hello forum,

 

I did have the following error - as many other people around here - "#1062 - Duplicate entry '144' for key 1".

 

I got it when i inserted the SQL-file : HTML_WYSIWYG_SQL.sgl-file (but the Dutch version).

 

phpAdmin did give the next error :

 

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function ) VALUES ('144', '<b>Gebruik WYSIWYG voor productbeschrijving</b>' , 'HTML_AREA_WYSIWYG_DISABLE', 'Enable', 'Activeer/De-activeer WYSIWYG voor productbeschrijving', '112', '0', '2005-05-06 09:13:25', '2005-05-05 21:24:26', NULL , 'tep_cfg_select_option(array(\'Enable\', \'Disable\'),'
);


MySQL retourneerde:  

#1062 - Duplicate entry '144' for key 1

 

I noted that it was due to the '144' configuration_id . I already had this configuration_id taken by an other sql-insertion.

 

The solution : remove the 144 (leave the quotes ''). It should look like this :

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function ) VALUES ([b]''[/b], '<b>Gebruik WYSIWYG voor productbeschrijving</b>' , 'HTML_AREA_WYSIWYG_DISABLE', 'Enable', 'Activeer/De-activeer WYSIWYG voor productbeschrijving', '112', '0', '2005-05-06 09:13:25', '2005-05-05 21:24:26', NULL , 'tep_cfg_select_option(array(\'Enable\', \'Disable\'),'
);

I hope this might help some people.

 

Xinirnix

Edited by xinirnix

Share this post


Link to post
Share on other sites

Hello all,

 

I have installed the HTML WYSIWYG contribution. Almost everything works out fine.

 

Except for this. My 'Insert Image - Web Page Dialog' looks different from this one (i did use the link of someone else, because I don't have a webspace yet).

 

dioalog.jpg

 

My versioin shows errors in the 2 upper windows :

 

WINDOW_1 = I do not see the 'opened.gif' and the 'closed.gif'. I DO see the directory structure (=names).

WINDOW_2 = I get an error : "Object not found! The requested URL ..."

 

Does somebody know where to look? I have spent a whole day figuring out what to do, but without result.

Maybe an important note : I do work locally!!

<B>Also, I guess I have to change 'something' (but what) in the 'config.inc.php'-file in the htmlarea-directory. </B>

 

Thanks,

 

Xinirnix

Edited by xinirnix

Share this post


Link to post
Share on other sites

I guess my fault has to do with th 'config.inc.php'-file and the link with the 'configure.php'-file. Maybe one of my paths is not right (although I did not change anything - that I can recall).

 

Why are there 2 'config.inc.php'-files in the htmlarea-directory? One in the .../htmlarea/popup-directory and one in the .../htmlarea/popup/file-directory?

 

 

Xinirnix

Share this post


Link to post
Share on other sites

Hi All.

I have installed this contrib and all seemed to go fine.

But I have noticed this morning that when I select a product from the catalogue, I can only add 1 item to the cart and it will not add another one of the same item or allow me to select the same item with different options.

Has anyone had this problem before??

Share this post


Link to post
Share on other sites

Has anyone been able to completely beat the Internet Explorer nonsecure error? I am an Ipower customer, attempting to use their shared SSL....

 

Using various methods that were presented in this forum, I was able to suppress the error on the product entry page.

 

However, I am unable to find any way to suppress the nonsecure error on the popup page for entering item photos.

 

At this point, I find Ipower's SSL certificate to be too exspensive ($99 first year, $150 each year after), and I do not want to move to another provider (just to make this contribution work), therefore, I'm about to remove this module.

 

Any suggestions I may have overlooked, I have read this entire 21 page post several times...... I have even contacted several others who had posted in this forum, that they were experiencing the same problem. They had given up on this contribution, and moved to other methods.

 

Thanks,

Rob

Rob@PistolandPawn.com


-------------------------------

Rob

Huntsville, AL

Share this post


Link to post
Share on other sites

I have installed Version 1.7 on my shop that has already had imagemagic installed. I cannot seem to be able to get the image portion of WYSWIG to work, in that images are not uploaded.

 

I may be doing something totally wrong but cannot see what/where.

 

Any advice would be great.

 

Damian

Share this post


Link to post
Share on other sites

have just installed UltraPics, but have one problem:

 

when i upload more than 1 SM (small) picture (where up to 6 are possible) all of the mget aligned horizontally (one next to the other) instead of vertical (one beneath the other) - am i doing somethin wrong or can i change that somewhere in the code (could not find it yet, but think it must be somewher in additional_pictures.php)

 

thanks for your help!

Share this post


Link to post
Share on other sites
have just installed UltraPics, but have one problem:

 

when i upload more than 1 SM (small) picture (where up to 6 are possible) all of the mget aligned horizontally (one next to the other) instead of vertical (one beneath the other) - am i doing somethin wrong or can i change that somewhere in the code (could not find it yet, but think it must be somewher in additional_pictures.php)

 

thanks for your help!

 

done - sorry for that stupid question - just could not find the <tr> tags till i found out, that they are after the 3rd small picture

 

great contribution!

Share this post


Link to post
Share on other sites

here is a tricky question for all the php gurus out there:

 

 

i posted earlier on the subject of integrating UltraPics contribution into a product_info.php.html for STS 4 template.

here is how far i came:

 

i copied what MaxiDVD changes for UltraPics in the original product_info.php file to the one that comes with sts 4.

replacing this:

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

with the right query for UltraPics like this:

 

$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

 

here all the additional images are also loaded into the $product_info_array.

 

now i declare a new variable for STS 4 in the product_info.php file of STS 4 like this:

 

if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') {

$template_pinfo['ultrapics']=include(DIR_WS_MODULES . 'additional_images.php') ;

}

 

where the 'additional_images.php' file is a file from the UltraPics contribution that parses the pictures and gives it back in an HTML table layout.

 

finally i place the so created $ultrapics$ placeholder in a table in my product_info.php.html file

 

This works just fine, with one major error: the 'additional_images.php' file gets included at the top of the template file and not in the table wher it should be. Where it should be, i just get "1" - probably stating that the include was a success.

 

i think this would be a very interesting question to be answered, because so one could use the UltraPics contibution in ones content templates from STS 4.

 

I was searching the forum for hours, before i tried to do this, but found no answer to any question about to implement these two contributions and use ultrapics in a content template.

 

i will this also post in the UltraPics contribution support hoping that someone might come up with a solution.

 

thanks a lot for any answer how to implement this!

Share this post


Link to post
Share on other sites

I have a problem with the POPUP option. When I click on Enlarge Image the window opens blank. Any ideas?

Share this post


Link to post
Share on other sites

I've been trying to get this contrib to work ( Ultra pics & html editor) I don't know what I've done, but all the links from the admin panel start with "http://mystore.co.ukdir_ws_" such as "http://mystore.co.ukdir_ws_adminconfiguration.php/?selected_box=configuration&gID=1" I've searched but nothing.

 

How can I correct the "dir_ws_" problem?

 

Any help will be appreciated please.

 

Thanks

 

Oh BTW, keep it simple, don't assume I'm a wizz, coz I aint, hence the question! :o


____________________________________________________________________

____________________________________________________________________

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×