Forums / Addon Admin Tools / Missing Image Utility/Scanner [Support Thread]

Missing Image Utility/Scanner [Support Thread]

Results 1 to 20 of 60
16 Jul 2014, 21:10
#1
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Missing Image Utility/Scanner [Support Thread]

Features
========
Scans your database and images folder for any missing images and reports on them.

Version Date
==============
v1.0 2014-07-16 02:37
    * Initial release

Author
======
Paul Williams ([email protected])

Known Issues
============
    * People on shared servers or those without the ability to turn Safe Mode off
      will experience more time outs on larger databases. This is because I 
      cannot force the script to essentially reset the execution_timer. This will
      be worked on in a later version. You can try to edit the script on line 121 
      or line 145 and change the SQL query a little bit. If you do, you may end 
      up having to run this script a couple of times.

Description
===========
This script will run through your ZenCart database, provided by you in the
connection information of the script, and then retrieve all images from products 
table of ZenCart. Then, the script will run through each of those images making 
sure that the image exists and is saved in the correct format. (For example, a 
.gif is actually a GIF.) This is useful if you use a batch product uploader like 
easyPopulate and you don't know which of your images are missing.

GitHub
======
https://github.com/retched/missing-images-zen


Pretty much, this script shouldn't be too difficulty. Before you talk about problems with the script, please make a note about the Known Issue noted above and in the readme file. I will come back for this in a later update but I wanted to release it now while I figure out how to make the script lap around.
24 Jul 2014, 12:26
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Posts:
13,980
Plugin Contributions:
46

Re: Missing Image Utility/Scanner [Support Thread]

What a time-saver! I suggest the following small change to enable this to be used with an /includes/local/configure.php file (I use this a bunch for local, pre-test versions of a site):
// Load the definition file for the database table names. 
require_once(DIR_FS_CATALOG . "includes/database_tables.php");  //-20140724-lat9-Use configure.php setting, enables using /includes/local/configure.php
24 Jul 2014, 17:32
#3
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

lat9:

What a time-saver! I suggest the following small change to enable this to be used with an /includes/local/configure.php file (I use this a bunch for local, pre-test versions of a site):
// Load the definition file for the database table names. 
require_once(DIR_FS_CATALOG . "includes/database_tables.php");  //-20140724-lat9-Use configure.php setting, enables using /includes/local/configure.php


You know I was thinking about that really. I've gone ahead and made the change. I still have to wait for the script to be approved and then I can add and make the change there.
24 Jul 2014, 17:35
#4
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

Also for those interested, the plugin will reside here once approved. You can go to the GitHub linked in my first post. Also while I haven't tested this extensively on ZenCart versions prior to 1.5.0, this SHOULD work with almost any version of ZenCart and it does not necessarily need to reside on the same directory as your ZenCart installation BUT it must reside on the same server as it.

Zen-Cart Download Page:
http://www.zen-cart.com/downloads.php?do=file&id=1887
24 Jul 2014, 18:28
#5
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

AN UPDATE HAS BEEN MADE. (Actually two updates have been made, I'm just rolling them out as one.)

v1.0.2    2014-07-24 13:50
  * Removed the choice of running the script as MySQLi or MySQL. The script 
    will now check if it can run mysqli_connect. If not, it will run 
    mysql_connect. If that fails, the script will not run. The user also
    has the option to force MySQL although this should NOT really be used. I
    will still reserve the right to remove this option at a later time once
    MySQL is removed from PHP.
  * Consolidated the location of the query that is being run by the script to
    one location. (There is no difference in SQL language between MySQL and 
    MySQLi. So having two separate queries which produced the same result table
    was a bit redundant.)


v1.0.1    2014-07-24 12:58
  * Improved call for database_tables.php as suggested by lat9. 
    Thanks for the code suggestion.


Also the ReadMe file has been "fixed" to be formatted as Windows/PC Readme. This shouldn't really cause an issue for *nix users.

These changes have been posted to the GitHub and will be soon available via the ZenCart Downloads Page.
08 Aug 2014, 09:28
#6
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

Dear retched,

Hello, I am make some change of your original module. First of all thank you make for this. Real useful.

But, you miss some security that need keep in mind, this files can running without admin login first, and it show the full path on the server,while outside can scan the web server. It will have some security risk.

I make some change of it, and now it must place to under /admin/missing_images.php

The second I am add the miss Menu for both ZC 1.3.9x to 1.5.x
So the end user not need manual copy and paste the files name and running on admin page.
Then I think can help many user. So I also post my changed version there.

I am also uploaded my files to zen-cart.com, waiting they post for public ..

But, if you integration my coding with it, please also add my name and e-mail on it.

Here are what I do base on your module

v1.0.3 2014-08-08 14:14
* Force MUST Login to using this Module for Security Reason, since it show up the full server path.
Copy the contents of the "admin" folder to the admin folder of your shop whatever it is called (it should have been renamed from the default "admin").
The files are already arranged in their correct locations and there are *no* overwrites of core files!
For example
/admin/missing_images.php (Where replace above path to match your live shop.)
* You'll find "Missing Images Checker" under "Tools" in the Admin, both for ZC 1.3.9x to 1.5.3
* Add SQL Scripts to install in on the Admin Page for ZC 1.5.x Only, for easier now.
* This make for you by explorer1979 (explorerhome##################, http://explorerhome.no-ip.org/blog)

File here Attachment #14379

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog
08 Aug 2014, 13:09
#7
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

explorer1979:

Dear retched,

Hello, I am make some change of your original module. First of all thank you make for this. Real useful.

But, you miss some security that need keep in mind, this files can running without admin login first, and it show the full path on the server,while outside can scan the web server. It will have some security risk.

I make some change of it, and now it must place to under /admin/missing_images.php

The second I am add the miss Menu for both ZC 1.3.9x to 1.5.x
So the end user not need manual copy and paste the files name and running on admin page.
Then I think can help many user. So I also post my changed version there.

I am also uploaded my files to zen-cart.com, waiting they post for public ..

But, if you integration my coding with it, please also add my name and e-mail on it.

Here are what I do base on your module

v1.0.3 2014-08-08 14:14
* Force MUST Login to using this Module for Security Reason, since it show up the full server path.
Copy the contents of the "admin" folder to the admin folder of your shop whatever it is called (it should have been renamed from the default "admin").
The files are already arranged in their correct locations and there are *no* overwrites of core files!
For example
/admin/missing_images.php (Where replace above path to match your live shop.)
* You'll find "Missing Images Checker" under "Tools" in the Admin, both for ZC 1.3.9x to 1.5.3
* Add SQL Scripts to install in on the Admin Page for ZC 1.5.x Only, for easier now.
* This make for you by explorer1979 (explorerhome##################, http://explorerhome.no-ip.org/blog)

File here Attachment #14379

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog



Were these changes being made to a version I officially released here on ZenCart or are you referring to the "pre-release" version I posted on the GitHub? If you're talking about the one that I'm making changes to the script so it can run in the backend, please note I haven't even started to work with that yet. That coding is actually in the middle of being worked on once I have some time.

As for the original v1.x.x, please also note that version of the script is meant to run as a standalone single file installation (meaning no integration in the backend or anything). It's generally meant to be run once, and then immediately deleted. But I will take a look at the changes suggested.
12 Aug 2014, 00:02
#8
graniteman22 avatar

graniteman22

New Zenner

Join Date:
Jan 2014
Posts:
27
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

I have moved the files into the appropriate location but I am unable to get this module to show up in my tools menu. I am using ZC 1.5.3
12 Aug 2014, 00:52
#9
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

Which version of the add-on are you using? The official release series of 1.x.x isn't meant to show up as an option in the backed but is meant to be run as a standalone. The 1.0.3 is NOT a release of mind and I cannot offer any official support to it. The 2.0.0 version on the github isn't even meant for public use.

To run the script, the 1.0.2 version, you simply upload the file to your server after supplying the location of your configure.php file in the variables and run it in your browser via direct call. As for the "1.0.3" linked above in explorer1979 post and in the plugin directory, that is NOT my file and I have no support for that version as it is not mine and is causing more confusion than anything. (I can't pull it down I'm afraid, so you should use my last version while I get the chance to work with it soon I guess) I haven't even had a chance to work with that file and haven't seen its contents to know what is going on.
12 Aug 2014, 01:14
#10
graniteman22 avatar

graniteman22

New Zenner

Join Date:
Jan 2014
Posts:
27
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

retched:

Which version of the add-on are you using? The official release series of 1.x.x isn't meant to show up as an option in the backed but is meant to be run as a standalone. The 1.0.3 is NOT a release of mind and I cannot offer any official support to it. The 2.0.0 version on the github isn't even meant for public use.

To run the script, the 1.0.2 version, you simply upload the file to your server after supplying the location of your configure.php file in the variables and run it in your browser via direct call. As for the "1.0.3" linked above in explorer1979 post and in the plugin directory, that is NOT my file and I have no support for that version as it is not mine and is causing more confusion than anything. (I can't pull it down I'm afraid, so you should use my last version while I get the chance to work with it soon I guess) I haven't even had a chance to work with that file and haven't seen its contents to know what is going on.


I was using the 1.0.3 version. I thought it would be easier to use via the admin. I am not sure how to activate it via my browser. I entered the file name behind the location I put it in, but it doesn't work.
12 Aug 2014, 01:59
#11
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

Graniteman22:

I was using the 1.0.3 version. I thought it would be easier to use via the admin. I am not sure how to activate it via my browser. I entered the file name behind the location I put it in, but it doesn't work.

Were all if the files uploaded to the proper location in your admin directory? Including th SQL patch?
12 Aug 2014, 02:05
#12
graniteman22 avatar

graniteman22

New Zenner

Join Date:
Jan 2014
Posts:
27
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

retched:

Were all if the files uploaded to the proper location in your admin directory? Including th SQL patch?


I deleted the 1.0.3 version and downloaded your 1.0.2 version. The download only included one php file to move onto server.
12 Aug 2014, 02:22
#13
retched avatar

retched

Totally Zenned

Join Date:
Jun 2007
Posts:
935
Plugin Contributions:
1

Re: Missing Image Utility/Scanner [Support Thread]

Graniteman22:

I deleted the 1.0.3 version and downloaded your 1.0.2 version. The download only included one php file to move onto server.


With 1.0.2 (my version), all you have to do is upload it to the server where ZenCart is (preferably the main directory). Edit that one file so it is pointing to the /includes/configure.php file. (Either the one in your admin/includes or your /catalog/includes is fine.) Then call the file in your web browser directory. When it's done and you are satisfied with your results, remove it from your server.

Like I said, I'll figure out what happened with 1.0.3 and what it's supposed to do. But there is already a version on the GitHub (2.0.0) which is going to the ZenCart backend. That one is NOT ready as of yet and will likely not end up using the code provided by express1973. But we'll see.
12 Aug 2014, 03:13
#14
graniteman22 avatar

graniteman22

New Zenner

Join Date:
Jan 2014
Posts:
27
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

retched:

With 1.0.2 (my version), all you have to do is upload it to the server where ZenCart is (preferably the main directory). Edit that one file so it is pointing to the /includes/configure.php file. (Either the one in your admin/includes or your /catalog/includes is fine.) Then call the file in your web browser directory. When it's done and you are satisfied with your results, remove it from your server.

Like I said, I'll figure out what happened with 1.0.3 and what it's supposed to do. But there is already a version on the GitHub (2.0.0) which is going to the ZenCart backend. That one is NOT ready as of yet and will likely not end up using the code provided by express1973. But we'll see.


I think I will just hold off on it until an update is made.
12 Aug 2014, 07:01
#15
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

Hi Graniteman22,

You need run the SQL Patch if you are using ZC 1.5.3, and copy all the files on 1.0.3 to your folder,
But rename the path as your admin folder

For example, if you rename your /admin to /admin123

Then you must copy all the zc_1.5.x/
file to under your /admin123 folder.

then login to your back end, then Tool --> Install SQL Patches
then open /zc_1.5.x/install_sql.sql
Copy this SQL coding, then paste in Tool --> Install SQL Patches
[PHP]
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('missingImagesChecker', 'BOX_TOOLS_MISSINGIMAGESCHECKER', 'FILENAME_MISSINGIMAGESCHECKER', '', 'tools', 'Y', 50);
[/PHP]

Then reload your admin page, then you will see the new Menu Under Tools --> Missing Images Checker

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog
12 Aug 2014, 07:14
#16
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

Graniteman22

If your shop /admin is rename to something like that /admin123, then below is what you do

Copy
/zc_1.5.x/admin/missing_images.php
to
/admin123/missing_images.php

Copy
/zc_1.5.x/admin/includes/extra_datafiles/missing_images.php
to
/admin123/includes/extra_datafiles/missing_images.php

Then on Admin Back End, go Tools --> Install SQL Patches
[PHP]
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('missingImagesChecker', 'BOX_TOOLS_MISSINGIMAGESCHECKER', 'FILENAME_MISSINGIMAGESCHECKER', '', 'tools', 'Y', 50);
[/PHP]

Then reload your admin page, then you will see the new Menu Under Tools --> Missing Images Checker

Hope this help.

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog
12 Aug 2014, 15:56
#17
graniteman22 avatar

graniteman22

New Zenner

Join Date:
Jan 2014
Posts:
27
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

explorer1979:

Graniteman22

If your shop /admin is rename to something like that /admin123, then below is what you do

Copy
/zc_1.5.x/admin/missing_images.php
to
/admin123/missing_images.php

Copy
/zc_1.5.x/admin/includes/extra_datafiles/missing_images.php
to
/admin123/includes/extra_datafiles/missing_images.php

Then on Admin Back End, go Tools --> Install SQL Patches
[PHP]
INSERT INTO admin_pages (page_key, language_key, main_page, page_params, menu_key, display_on_menu, sort_order) VALUES ('missingImagesChecker', 'BOX_TOOLS_MISSINGIMAGESCHECKER', 'FILENAME_MISSINGIMAGESCHECKER', '', 'tools', 'Y', 50);
[/PHP]

Then reload your admin page, then you will see the new Menu Under Tools --> Missing Images Checker

Hope this help.

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog


Ya...I tried that several times and it still doesn't show up in the admin. Your directions seem simple enough, but something is off. I have installed several plugins and this one seems to be the most difficult while also being the most simple. Have you tested it on 1.5.3?
13 Aug 2014, 02:17
#18
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

Graniteman22:

Ya...I tried that several times and it still doesn't show up in the admin. Your directions seem simple enough, but something is off. I have installed several plugins and this one seems to be the most difficult while also being the most simple. Have you tested it on 1.5.3?



Graniteman22,

Yes, I am tested on my company's live shop (With different skin and plugin of course) from 1.3.7.1, 1.3.9h, 1.5.1.

and of course, on ZC 1.5.3,
I am special build a original live demo ZC 1.5.3 for you to show off there
http://explorerhome.no-ip.org/t153/

Please see my attachment image of this demo shop backend
Screen Capture 1
http://explorerhome.no-ip.org/q/Other_20140813_001.jpg

Screen Capture 2
http://explorerhome.no-ip.org/q/Other_20140813_002.jpg

Screen Capture 3
http://explorerhome.no-ip.org/q/Other_20140813_003.jpg

Screen Capture 4
Key Capture, once you installed the SQL Patch, on this you can see the added Menu there
P.S. ZC forum ONLY allow attachment 4 images, so I post all screen capture there.
http://explorerhome.no-ip.org/q/Other_20140813_004.jpg

Screen Capture 5
http://explorerhome.no-ip.org/q/Other_20140813_005.jpg


Hope this help.

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog
13 Aug 2014, 02:35
#19
explorer1979 avatar

explorer1979

Inactive

Join Date:
Jan 2007
Posts:
377
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

Actually,

I think if you rename your /admin to /admin123, then ..

If anyone who

Copy (This is Main Key Files)
/zc_1.5.x/admin/missing_images.php
to
/admin123/missing_images.php

or

Copy (This is Main Key Files)
/zc_1.3.9x/admin/missing_images.php
to
/admin123/missing_images.php


Also same as the original author 1.0.2 version, but I changed this files add load the top application, so this also add the safe for you, since FORCE you login first then can using this module.

Whatever you following the SQL Patch or copy other files to the right path or not, you still can manual access it once FTP to your server above KEY CORE FILE!
By access it manual
http://www.yourshop.com/yourinstallpath/youradmin/missing_images.php

for example my demo shop
http://explorerhome.no-ip.org/t153/adminx/missing_images.php

P.S. If you are using the original 1.0.2, you can access WITHOUT login, mean any robot can scan the web site maybe cache it, or can google it ...

But if you using my 1.0.3 version, whatever you want the menu add to Tools or not
Anyone MUST LOGIN FIRST to access by same URL like above example! This is for safe

Why? Since on my company's live shop, not only me management it, with other staff, it is why not like the original author said, run it once, then you can del it, this is okay for a ONLY you are admin live shop, but for bigger company who need make the live shop good for customer experience without miss image, we will want can run it anytime, anywhere safe, not need run once then del it. It is why I make this 1.0.3 for both ZC 1.3.7.1 to 1.3.9h and ZC 1.5.x base end user hope can help them all before the original author released the 2.0.

And I am here thank again the original author who maked this great plugin for us :-)

Hope this help.

Thank you

Best Regards,
Jimmy Chan
http://www.jimmychan.tk
http://explorerhome.no-ip.org/blog
14 Aug 2014, 18:06
#20
gwcorp avatar

gwcorp

New Zenner

Join Date:
Jan 2014
Posts:
4
Plugin Contributions:
0

Re: Missing Image Utility/Scanner [Support Thread]

You people are being BEYOND rude, hijacking retched's thread.

The plugin you're talking about with the admin option is a different plugin. You should start a different thread