Forums / All Other Contributions/Addons / Is there a "missing images" check mod like this?

Is there a "missing images" check mod like this?

Views: 4,383

Results 21 to 40 of 41
2 Dec 2011, 3:13 PM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Is there a "missing images" check mod like this?

dmagic:

have error when i try install

Failed: 1
Error ERROR: Cannot execute because table admin_pages does not exist. CHECK PREFIXES!
Warning Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.

What version of Zen Cart are you running?

Where are you when you get that error ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Jul 2013, 3:15 AM
#22
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

Hi

I have installed this image check, however I am not able to find any instructions on how to use it...
Thanks
RR

11 Nov 2013, 11:47 PM
#23
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

zc1.5.1

can anyone tell me how to I change the default /htdocs/mysite/images/ directory to /htdocs/mysite/images/products?

been looking to change to no avail.

any help is greatly appreciate.

12 Nov 2013, 5:24 AM
#24
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

zc1.5.1

can anyone tell me how to I change the default /htdocs/mysite/images/ directory to /htdocs/mysite/images/products?

been looking to change to no avail.

any help is greatly appreciate.

Don't know why you would want to do that, but the directory is essentially identified in both of your configure.php fileslocated in each includes directory (main site and admin). Changing this may not really fix the problem you are experiencing and may cause one too, but there you have it.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

12 Nov 2013, 11:28 PM
#25
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

Don't know why you would want to do that, but the directory is essentially identified in both of your configure.php fileslocated in each includes directory (main site and admin). Changing this may not really fix the problem you are experiencing and may cause one too, but there you have it.

Well. I should have formulated my question better. I am running zc1.5.1 with Image Check v1.392. The the default zc1.51 directory fro my images is /htdocs/mysite/images/. The images directory for my products are at /htdocs/mysite/images/products

I am trying to have image check indicate what images I am missing in my site.
It does mention that: If this is not the correct path to your image directory please change it in this script (imagecheck.php).

I have check all the "imagecheck.php" files in the mod and don't seem to understand how to direct Image Check v1.392 to check for the images at: /htdocs/mysite/images/products instead of checking it at the default /htdocs/mysite/images/ directory.

Can anyone help?

13 Nov 2013, 1:04 AM
#26
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

Well. I should have formulated my question better. I am running zc1.5.1 with Image Check v1.392. The the default zc1.51 directory fro my images is /htdocs/mysite/images/. The images directory for my products are at /htdocs/mysite/images/products

I am trying to have image check indicate what images I am missing in my site.
It does mention that: If this is not the correct path to your image directory please change it in this script (imagecheck.php).

I have check all the "imagecheck.php" files in the mod and don't seem to understand how to direct Image Check v1.392 to check for the images at: /htdocs/mysite/images/products instead of checking it at the default /htdocs/mysite/images/ directory.

Can anyone help?

Do you see the variable DIR_WS_IMAGES anywhere in that portion of the coding? More than likely appending . 'products/' would "adjust" the location appropriately. (Sorry, haven't gone to pull down the app to be able to give you more guidance.) Let me know if that is needed.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

13 Nov 2013, 1:17 AM
#27
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

mc12345678:

Do you see the variable DIR_WS_IMAGES anywhere in that portion of the coding? More than likely appending . 'products/' would "adjust" the location appropriately. (Sorry, haven't gone to pull down the app to be able to give you more guidance.) Let me know if that is needed.

Okay, so since I was on a computer, I went ahead and went the extra step. (Didn't install it, but) Found that there is reference to DIR_FS_CATALOG_IMAGES which is an admin only variable it appears, but yeah where you have DIR_FS_CATALOG_IMAGES you could replace with DIR_FS_CATALOG_IMAGES . 'products/' and that would reassign the references. Now I didn't go through and look at all of the files, but it seems that this is only needed to be done in the imagecheck.php file that is in the admin directory.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Nov 2013, 7:15 PM
#28
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

Okay, so since I was on a computer, I went ahead and went the extra step. (Didn't install it, but) Found that there is reference to DIR_FS_CATALOG_IMAGES which is an admin only variable it appears, but yeah where you have DIR_FS_CATALOG_IMAGES you could replace with DIR_FS_CATALOG_IMAGES . 'products/' and that would reassign the references. Now I didn't go through and look at all of the files, but it seems that this is only needed to be done in the imagecheck.php file that is in the admin directory.

thamks. let me go and try it and report back

15 Nov 2013, 8:18 PM
#29
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

Okay, so since I was on a computer, I went ahead and went the extra step. (Didn't install it, but) Found that there is reference to DIR_FS_CATALOG_IMAGES which is an admin only variable it appears, but yeah where you have DIR_FS_CATALOG_IMAGES you could replace with DIR_FS_CATALOG_IMAGES . 'products/' and that would reassign the references. Now I didn't go through and look at all of the files, but it seems that this is only needed to be done in the imagecheck.php file that is in the admin directory.

I found 3 instances of DIR_FS_CATALOG_IMAGES in the following code block:

// Report to user what we're actually doing
echo TEXT_DIR_LOCATION . "<br />\n<strong>" . DIR_FS_CATALOG_IMAGES . "</strong><br />\n" . TEXT_DIR_ERROR . "</td></tr>\n<tr><td>";

					$imagecheck_query = $db->Execute("select p.products_id, p.products_model, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd  where p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' order by products_id");

					$imagenumber = $imagecheck_query->RecordCount();
					$misstotal = 1;

					while (!$imagecheck_query->EOF){
					if (!file_exists(DIR_FS_CATALOG_IMAGES . $imagecheck_query->fields['products_image'])){
						$list .= "<dl>\n<dt><strong>" . TEXT_MISSING_TOTAL . $misstotal . "</strong>\n";
						$list .= '<dd>' . TEXT_MISSING_NAME . $imagecheck_query->fields['products_name']."\n";
						$list .= '<dd>' . TEXT_MISSING_MODEL . $imagecheck_query->fields['products_model']."\n";
						$list .= '<dd>' . TEXT_MISSING_LOCATION . DIR_FS_CATALOG_IMAGES . $imagecheck_query->fields['products_image']."\n";
						$list .= '<dd>' . TEXT_MISSING_REPAIR . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_product_path($imagecheck_query->fields['products_id']) . '&pID=' . $imagecheck_query->fields['products_id'] . '&product_type=' . zen_get_products_type($imagecheck_query->fields['products_id'])) . '" target="_blank">';

But what Exactly am I replacing? Can you elaborate?
+
Do I just put 'products/' behind all 3 instances of DIR_FS_CATALOG_IMAGES?

15 Nov 2013, 8:26 PM
#30
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

I found 3 instances of DIR_FS_CATALOG_IMAGES in the following code block:

// Report to user what we're actually doing
echo TEXT_DIR_LOCATION . "<br />\n<strong>" . DIR_FS_CATALOG_IMAGES . "</strong><br />\n" . TEXT_DIR_ERROR . "</td></tr>\n<tr><td>";

$imagecheck_query = $db->Execute("select p.products_id, p.products_model, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and pd.language_id = '" . (int)$_SESSION['languages_id'] . "' order by products_id");

$imagenumber = $imagecheck_query->RecordCount();
$misstotal = 1;

while (!$imagecheck_query->EOF){
if (!file_exists(DIR_FS_CATALOG_IMAGES . $imagecheck_query->fields['products_image'])){
$list .= "<dl>\n<dt><strong>" . TEXT_MISSING_TOTAL . $misstotal . "</strong>\n";
$list .= '<dd>' . TEXT_MISSING_NAME . $imagecheck_query->fields['products_name']."\n";
$list .= '<dd>' . TEXT_MISSING_MODEL . $imagecheck_query->fields['products_model']."\n";
$list .= '<dd>' . TEXT_MISSING_LOCATION . DIR_FS_CATALOG_IMAGES . $imagecheck_query->fields['products_image']."\n";
$list .= '<dd>' . TEXT_MISSING_REPAIR . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_product_path($imagecheck_query->fields['products_id']) . '&pID=' . $imagecheck_query->fields['products_id'] . '&product_type=' . zen_get_products_type($imagecheck_query->fields['products_id'])) . '" target="_blank">';

But what Exactly am I replacing? Can you elaborate?
+
Do I just put 'products/' behind all 3 instances of DIR_FS_CATALOG_IMAGES?

To answer the last question first, essentially yes, you need to concatenate DIR_FS_CATALOG_IMAGES with 'products/' by having it read:

DIR_FS_CATALOG_IMAGES . 'products/'

Wherever you see just DIR_FS_CATALOG_IMAGES. At least that was my interpretation when reviewing all of the instances of it.

So for example instead of:
$list .= '<dd>' . TEXT_MISSING_LOCATION . DIR_FS_CATALOG_IMAGES . $imagecheck_query->fields['products_image']."\n";

You have:
$list .= '<dd>' . TEXT_MISSING_LOCATION . DIR_FS_CATALOG_IMAGES . 'products/' . $imagecheck_query->fields['products_image']."\n";

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Nov 2013, 8:43 PM
#31
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

To answer the last question first, essentially yes, you need to concatenate DIR_FS_CATALOG_IMAGES with 'products/' by having it read:

DIR_FS_CATALOG_IMAGES . 'products/'

Wherever you see just DIR_FS_CATALOG_IMAGES. At least that was my interpretation when reviewing all of the instances of it.

So for example instead of:
$list .= '<dd>' . TEXT_MISSING_LOCATION . DIR_FS_CATALOG_IMAGES . $imagecheck_query->fields['products_image']."\n";

You have:
$list .= '<dd>' . TEXT_MISSING_LOCATION . DIR_FS_CATALOG_IMAGES . 'products/' . $imagecheck_query->fields['products_image']."\n";

thank you very much. I had taken a bet with doing it and it took a long time to load. When it finished loading, IT does display the correct path after loading Image check from admin. and displays:

Image Check v1.392
Matching products against the following image directory:
/data/14/1/137/80/1300732/user/1392549/htdocs/admin/images/Products/
If this is not the correct path to your image directory please change it in this script (imagecheck.php).

That should mean it works. I should on purpose delete one of pics and see it it will give me a report that the pic is missing. Which I think will work correctly.

Many thanks and appreciation
:clap:.

15 Nov 2013, 8:59 PM
#32
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

it does display the correct directory as stated before, but it does not display the pics that are missing? is there something that is still missing?

15 Nov 2013, 8:59 PM
#33
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

thank you very much. I had taken a bet with doing it and it took a long time to load. When it finished loading, IT does display the correct path after loading Image check from admin. and displays:

Image Check v1.392
Matching products against the following image directory:
/data/14/1/137/80/1300732/user/1392549/htdocs/admin/images/Products/
If this is not the correct path to your image directory please change it in this script (imagecheck.php).

That should mean it works. I should on purpose delete one of pics and see it it will give me a report that the pic is missing. Which I think will work correctly.

Many thanks and appreciation
:clap:.

You're welcome. I'm still a little perplexed though, (haven't gone into my database to see what path is expected by the information passed back after the 'products/' portion, but it would seem to me that the passed back info would already include products/ as the prefix. I could be wrong and I haven't tried using it yet myself. I did assume you had already performed a test like you are proposing. I guess more to see. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Nov 2013, 9:32 PM
#34
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

it does display the correct directory as stated before, but it does not display the pics that are missing? is there something that is still missing?
So, I just looked into my own database. Products that I have in a sub-directory include that sub-directory as part of the products_image path. So, removing the newly added text and with your deleted file, should actually provide a result, assuming the file you selected to delete really meets the criteria to report.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Nov 2013, 9:50 PM
#35
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

mc12345678:

So, I just looked into my own database. Products that I have in a sub-directory include that sub-directory as part of the products_image path. So, removing the newly added text and with your deleted file, should actually provide a result, assuming the file you selected to delete really meets the criteria to report.

Oh, and another thing, it looks like the file you would want to delete as a "test" would need to be a "base" file, not one of the additional images. This utility doesn't account for the "absence" of an additional image, but it looks like it identifies that an image listed in the database is not in the expected directory structure.

If not mistaken, ZC doesn't really "keep track" of the additional images, it merely presents those files that have the same "prefix" as thebase document.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

15 Nov 2013, 10:05 PM
#36
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

Oh, and another thing, it looks like the file you would want to delete as a "test" would need to be a "base" file, not one of the additional images. This utility doesn't account for the "absence" of an additional image, but it looks like it identifies that an image listed in the database is not in the expected directory structure.

If not mistaken, ZC doesn't really "keep track" of the additional images, it merely presents those files that have the same "prefix" as thebase document.

It's a base file (the one and only that I use). I don't use multiple images for the same product.

I tried to rund image check with another browser and still no result.

15 Nov 2013, 10:16 PM
#37
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

So, I just looked into my own database. Products that I have in a sub-directory include that sub-directory as part of the products_image path. So, removing the newly added text and with your deleted file, should actually provide a result, assuming the file you selected to delete really meets the criteria to report.

You mean undue what I have done to the file and that should work? But before we done changes, it does report missing pics, but simply because it was reading the default directory where the files are not in it in the first place. Still confused.

15 Nov 2013, 11:26 PM
#38
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

You mean undue what I have done to the file and that should work? But before we done changes, it does report missing pics, but simply because it was reading the default directory where the files are not in it in the first place. Still confused.
Thatswhat I am suggesting and for the following reason(s):
The image path that is pulled from the database should be created as it compares to the image path that is returned by the capitalized (defined) variable. So even though the photo(s) is in the product subdirectory the returned path should have that as part of the directory.
If not mistaken the utility does not differentiate between active (p.status) and inactive product. It may be possible that the value(s) you were seeing relate to inactive product.

  1. There really should not be anything that changes your "default" directory that is not captured in the variable (defined) that is used. If there is, then your cart has something "wrong" with it or is not standard. I would suggest changing the code back, run it to see if the newly "deleted" immage shows up in the list, then restore the image and see if it disappears from the list. The other items in the list would be validated as existing in the database, but not in the file structure.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Nov 2013, 5:46 PM
#39
twi avatar

twi

Zen Follower

Join Date:
Aug 2007
Posts:
277
Plugin Contributions:
0

Re: Is there a "missing images" check mod like this?

mc12345678:

Thatswhat I am suggesting and for the following reason(s):
The image path that is pulled from the database should be created as it compares to the image path that is returned by the capitalized (defined) variable. So even though the photo(s) is in the product subdirectory the returned path should have that as part of the directory.
If not mistaken the utility does not differentiate between active (p.status) and inactive product. It may be possible that the value(s) you were seeing relate to inactive product.
3) There really should not be anything that changes your "default" directory that is not captured in the variable (defined) that is used. If there is, then your cart has something "wrong" with it or is not standard. I would suggest changing the code back, run it to see if the newly "deleted" immage shows up in the list, then restore the image and see if it disappears from the list. The other items in the list would be validated as existing in the database, but not in the file structure.

You are right. I did exactly what you told me and did produce the result as expected. Image check Mod readme files should include this info. I though that It won't run because my pics are not directly in the default directory. Cause the message " If this is not the correct path to your image directory please change it in this script (imagecheck.php)." seems to suggest that if your pic files are not in the default directory, then it will report them as missing cause I have so many missing files that it just seems like that all my pic files are missing. Which make me belief it's not working properly.

Many thanks again. Greatly Appredicated.:clap:

16 Nov 2013, 8:51 PM
#40
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Is there a "missing images" check mod like this?

twi:

You are right. I did exactly what you told me and did produce the result as expected. Image check Mod readme files should include this info. I though that It won't run because my pics are not directly in the default directory. Cause the message " If this is not the correct path to your image directory please change it in this script (imagecheck.php)." seems to suggest that if your pic files are not in the default directory, then it will report them as missing cause I have so many missing files that it just seems like that all my pic files are missing. Which make me belief it's not working properly.

Many thanks again. Greatly Appredicated.:clap:

Well, hopefully the exercise wasn't totally worthless. :) Yes perhaps there could be some improvements to the instructions, though when I downloaded it, I don't recall seeing any "directions" associated with it. I could be wrong. So my thoughts about the "not your default directory" statement, is that the utility could be used on your site to assess the images of another site... Ie if you were to "backup" your data and restore it elsewhere, then you may want to provide a different image reference, or I guess really if the photos were supported away from the current site/site path, then one would want to replace that path statement.

Otherwise, yeah understanding what is meant by the default image directory and when reviewing the code understanding what the various variables mean.

It's a shame that you are missing so many pictures, but it appears that you have found a utility to help you out. Good luck!!!

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...