The gallery scanner function will allow you to automatically check some/all of the galleries in your database to make sure the URLs are still working and that they are following your rules for blacklist items, reciprocal links, etc. This document will describe how to setup and run the gallery scanner through the TGPX control panel.
Viewing Scanner Configurations
To view the scanner configurations that have been created, access the Galleries > Gallery Scanner function from the control panel menu. This will display a page where you will be able to see all of the scanner configurations that are currently defined.
In the table that displays the scanner configurations, you will find several functions that you can run on each configuration. Each of those functions are described below.
Click this icon to view the history for this scanner configuration | |
Click this icon to view the results of the last scan completed using this configuration | |
Click this icon to start the gallery scanner with this configuration | |
Click this icon to stop the gallery scanner with this configuration | |
Click this icon to edit this scanner configuration | |
Click this icon to delete this scanner configuration |
Starting/Stopping the Scanner
The gallery scanner requires that your server have the CLI (command line interface) version of PHP installed in one of the common binary directories. If TGPX is unable to find the CLI version of PHP
on your server, you won't be able to use the gallery scanner. In this case you should contact your server administrator and ask them to install the CLI version of PHP for you and/or make sure it is placed
in one of the common binary directories on the server (/bin, /usr/bin, /usr/local/bin).
On some servers it may not be possible to start the gallery scanner through the TGPX control panel. If your server's PHP installation is running in safe mode or has the shell_exec() function disabled you will not be able to start the gallery scanner through the TGPX control panel. In that case, please see the alternate scanner starting methods for possible workarounds.
The gallery scanner will run as a background process on your server, so you may need to confirm with your server administrator that you are allowed to run background processes.
On some servers it may not be possible to start the gallery scanner through the TGPX control panel. If your server's PHP installation is running in safe mode or has the shell_exec() function disabled you will not be able to start the gallery scanner through the TGPX control panel. In that case, please see the alternate scanner starting methods for possible workarounds.
The gallery scanner will run as a background process on your server, so you may need to confirm with your server administrator that you are allowed to run background processes.
To start the gallery scanner, first locate the configuration you want to run and make sure the status shows that it is Not Running. You can then click on the icon to start the gallery scanner. You will be asked to confirm that you want to start the scanner, and if you select ok the process of starting the scanner will continue. A confirmation box will appear to let you know that the process has been completed, and you should now see the Status value updated with the current progress of the scanner.
To stop the gallery scanner, first locate the configuration you want to stop and make sure the status shows that it is scanning galleries. You can then click on the icon to halt the scanning process. It may take a few minutes for the scanner to stop, so during that time it is normal for the Status to still show that the scanner is working.
Adding a Scanner Configuration
To add a new scanner configuration access the Galleries > Gallery Scanner function from the control panel menu. This will display your scanner configurations that have been created. Near the top of the page in the header bar that reads "Gallery Scanner Configurations" click on the icon. This will display a popup window where you will be able to enter the settings for the scanner configuration that you want to add. Each of the form fields are described below.
Identifier | Enter a short identifier so you can |
Import galleries from your configured RSS feeds before scanning Check this box if you want the scanner to import any new galleries from your configured RSS feeds before starting the scan |
|
Status | Select the gallery statuses you want to scan (or leave all unchecked to scan all) |
Type | Select the gallery types you want to scan (or leave all unchecked to scan all) |
Format | Select the gallery formats you want to scan (or leave all unchecked to scan all) |
ID Range | Enter a range of gallery IDs that you want to scan (leave blank to scan all) |
Date Added Range | Enter a date range of when the galleries were added to restrict the scan to galleries in this range (leave blank to scan all) |
Date Approved Range | Enter a date range of when the galleries were approved to restrict the scan to galleries in this range (leave blank to scan all) |
Date Last Scanned | Enter a date range of when the galleries were last scanned to restrict the scan to galleries in this range (leave blank to scan all) |
Sponsors | Select the sponsors that you want to scan, or select ALL SPONSORS to scan galleries from all sponsors. |
Categories | Select the categories that you want to scan, or select ALL CATEGORIES to scan galleries from all categories. |
Only galleries submitted by partners Check this box to only scan galleries that were submitted by partners | |
Only galleries that do not currently have a preview thumbnail Check this box to only scan galleries that do not yet have at least 1 preview thumbnail created | |
Only galleries that currently have a zero thumbnail count Check this box to only scan galleries that have 0 set for their thumbnail count (generally galleries imported without a thumbnail count) | |
Only galleries that have not yet been scanned Check this box to only scan galleries that have not yet been scanned (galleries that are bulk imported will not yet have been scanned) |
Create a preview thumbnail for galleries that do not have one with the following dimensions Check this box to have a preview thumbnail created for galleries that do not yet have at least 1 created. You will be able to select the dimensions that you want to use for both picture and movie type galleries or enter a custom size if needed. |
Re-create existing preview thumbnails Check this box to have a new preview thumbnail created for galleries that already have one. The thumbnail that will be recreated will be the size that you select in the thumb size settings above this option. For example, if a gallery has a 100x100 preview thumb and a 120x150 preview thumb and you select 120x150 in the thumb size fields above this option, only the 120x150 preview thumb will be re-created. |
Resize existing preview thumbnails Check this box to have the existing preview thumbnail image resized to a new size. Note that this should generally only be used when you want to reduce the size of an already existing thumbnail, since increasing the size will result in greatly reduced image quality.
Keep original preview thumbnail
Check this box if you want to retain the original sized preview thumbnail. If you leave this unchecked, the new sized thumbnail will be created and the original will be deleted. Overwrite existing preview thumbnails that have the new size Check this box if you want to overwrite existing preview thumbnail images that have the same size(s) as the new thumbnail(s) being created. Original Size Select the thumbnail size which will be used to create the resized preview thumbnails New Size(s) Enter the new thumbnail size to create in WxH format. This can also be a comma separated list of sizes to have multiple different sized thumbnails created at once. |
Download preview thumbnails located on remote servers Check this box to have a preview thumbnails downloaded from remote servers and stored on your server. This is useful if you have imported a bunch of galleries with thumbnail URLs and want to have the software grab the thumbnails from the supplied URLs. |
Resize downloaded thumbnails to dimensions selected above If you check the download option above, you can also check this box to have those downloaded preview thumbs resized to the sizes you entered above. |
Update the thumbnail count for scanned galleries Check this box to have TGPX count the number of thumbnails on the gallery and set that value for the gallery's thumbnail count. |
Update the gallery format for scanned galleries Check this box to have TGPX determine the gallery format (pictures or movies) and assign that value to the gallery |
Re-enable disabled galleries that no longer have exceptions Check this box to have galleries restored to their previous status after having been disabled by the gallery scanner. For example, if you have the gallery scanner set to disable galleries with connection errors you can enable this option to have galleries that previously had a connection error but no longer do to be restored to their regular status in the gallery database. |
Rebuild the TGP pages when the scanner is completed Check this box to have your TGP pages built using a Build type of build when the gallery scanner has finished scanning. |
Send an e-mail to administrators when the scanner is completed Check this box to have all administrators with the gallery scanner e-mail option enabled notified by e-mail when the gallery scanner has finished scanning |
Ignore | No action will be taken |
Display in report only | The gallery will be displayed in the scanner report |
Change gallery status to disabled | The gallery status will be changed to disabled and will be displayed in the scanner report |
Delete gallery from database | The gallery will be deleted from the database and will be displayed in the scanner report |
Delete gallery and blacklist | The gallery will be deleted from the database, the gallery data will be blacklisted, and the gallery will appear in the scanner report. The hostname from the gallery URL, e-mail address, and submitter IP will be added to the blacklist. |
Connection errors | Select the action to take for galleries that the scanner cannot connect to. This could be the result of a DNS lookup failure, the server being offline, or internet connection issues. For this issue type it is not recommended that you delete or blacklist galleries because this can simply indicate that the server is temporarily offline. |
Broken URLs | Select the action to take for galleries that the scanner has found are no longer working. Broken URLs are those that return a HTTP status code of 400 or greater. For example, a 404 Not Found status code for pages that no longer exist, or a 500 Internal Server Error for pages that are causing a server error. |
Forwarding URLs | Select the action to take for galleries that the scanner has found are forwarding to a different URL. Forwarding URLs are those that return a HTTP status code in the 300 range, for example 302 Found. The scanner will take into account the 'Allow URL redirection' setting for partners and whitelisted data. If the gallery is allowed to redirect, it will not be flagged for this issue type if it produces a 300 level HTTP status code. |
Blacklisted data | Select the action to take for galleries that the scanner has found to contain one or more items on your blacklist. |
No reciprocal link | Select the action to take for galleries that the scanner has found to not contain a link back to your site. The scanner will take into account the 'Require a reciprocal link' partner setting. If the link is not required to have a reciprocal link, it will not be flagged for this issue type. |
No 2257 code | Select the action to take for galleries that the scanner has found to not contain 2257 code. |
Excessive Links | Select the action to take for galleries that the scanner has found to contain more links than you allow (excluding links to the gallery content) |
Thumb count change | Select the action to take for galleries where the number of thumbnails appearing on the gallery has changed since the last scan |
Page Changed | Select the action to take for galleries where the page HTML has changed since the last scan |
Content on different server | Select the action to take for galleries where the gallery content is hosted on a different server than the gallery itself |
Editing a Scanner Configuration
To edit a scanner configuration you will first need to locate it through the Gallery Scanner Configurations interface. When you locate the configuration you want to edit, click on the icon to bring up the editing interface. This interface is nearly identical to the scanner configuration creation interface, and has the same form fields with the same properties. You can make the changes that you want, and then press the Update Scanner Configuration button to save your changes.
Deleting a Configuration
To edit a scanner configuration you will first need to locate it through the Gallery Scanner Configurations interface. When you locate the configuration you want to delete, click on the icon, which will ask you to confirm the deletion.
You can also delete several configurations at once by putting a check in the box next to the configurations you want to delete, then pressing the Delete button at the bottom of the page.
Alternate Methods for Starting/Stopping the Scanner
If you are not able to start the gallery scanner through the control panel, there is currently one alternate method to run the scanner. This requires that you have shell access to your server and are comfortable working with the server's shell environment. You can login to your server using your favorite shell access software. Once logged in, change into the admin directory of your TGPX installation and issue the following command: