Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Hi,
I have finally figured out how to get the search to work properly (must be Gallery, NOT CRG - so sad) and everything works perfectly...UNTIL I turn on "enable password." Once I turn on "enable password," the login works as it should, but then when I go to search for a term, I get nothing. Is there something I'm missing?
I tried copying the /search/ folder into the protected gallery, and then tried the folder above that, thinking maybe it couldn't access the images due to the password protection, but that changed nothing.
Any ideas, or solutions?
Offline
search works globally (it cannot be gallery specific) so you probably wouldn't want images in a password protected gallery to show up in a search.
This is also the reason search doesn't work for CRG: your clients wouldn't want their images showing up in a search by some random visitor to your site.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
You're not missing anything. Search is intentionally disabled to protect password protected and client images.
Offline
Thanks for the quick reply! Is there any way I can go into the code and re-enable search for password protected galleries? Or alternate way to make a search happen?
Here's my deal: I do a ton of event/conference photography, where speakers & participants want to find photos of themselves quickly out of a gallery of hundreds of photos. I want to be able to password protect the gallery because it gives the illusion of privacy for the participants who want to control their image. I'd rather not use Photoshelter or similar subscription solution (self-employed so trying to keep monthly costs down), and don't want to use flickr or more public places like that.
Can I create stand-alone galleries where I password protect the folder in c panel, instead of through TTG, and have the search still work?
Offline
If you make the following edits, search should work on any photo and album other than those explicitly hidden from search. That means photos in password-protected albums, and password protected albums, and CRG albums.
It goes without saying that you should only make these changes if you fully understand what that means.
We will not be held responsible for photos and albums that you did not intend to be discoverable or viewable inadvertently becoming discoverable or viewable.
The changes are all in publisher/application/dao/SearchDAO.php
1. Change this line from:
$excludeAlbumsClause = 'a.enable_password=? and a.hide_from_search=? and a.enable_crg=?';
to:
$excludeAlbumsClause = 'a.hide_from_search=?';
2. Change these lines from:
$params = array('no', 'no', 'no', '%'.$term.'%');
$caption_params = array('no', 'no', 'no', 'image_caption', '%'.$term.'%');
to:
$params = array('no', '%'.$term.'%');
$caption_params = array('no', 'image_caption', '%'.$term.'%');
Note that there is a lot more to solving this searchability than just opening search for all cases. A proper solution would take into consideration the logged-in status of the albums, album sets and CRG login, and be much more involved.
Offline
You saved my bacon! Thanks so much for the edits, Ben! I will not hold anyone, other than myself, responsible for the consequences of making the edits to search on my site.
This is possibly the best, most helpful, and most active forum on the internet. Thanks for all of your help.
Offline