Restrict search to gallery

FreeheelvrmntFreeheelvrmnt Registered Users Posts: 29 Big grins
edited November 21, 2011 in SmugMug Support
I've tried searching for this with no avail.

Is there a way to restrict a search to within a particular user's gallery? I have this search, for example:
http://benjamindbloom.smugmug.com/search/?searchWords=bib189&searchType=InUser&NickName=benjamindbloom&x=0&y=0

I'd like it to show all hits for images tagged with "bib189". However, since I shoot multiple events/year, I'd like to be able to provide a search box that restricts the scope to a particular gallery, using one gallery per event.

Here's the scenario I'm ultimately envisioning, and maybe there's a better solution. When I shoot an event, I tag the images with the bib numbers. I upload the photos to SmugMug and allow competitors to search by their bib number for their photos. I set up some smart galleries to segment photos for browsing for those that don't want to search.

I'm web competent, so making a landing page on a separately hosted site with a search box that calls into an API shouldn't be a problem, if that's an option.

Any thoughts/help? I'm sure there are others doing this sort of thing and I'd rather learn from your experiences.

Thanks!
-Ben

Comments

  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited November 9, 2011
    I've tried searching for this with no avail.

    Is there a way to restrict a search to within a particular user's gallery? I have this search, for example:
    http://benjamindbloom.smugmug.com/search/?searchWords=bib189&searchType=InUser&NickName=benjamindbloom&x=0&y=0

    I'd like it to show all hits for images tagged with "bib189". However, since I shoot multiple events/year, I'd like to be able to provide a search box that restricts the scope to a particular gallery, using one gallery per event.

    Here's the scenario I'm ultimately envisioning, and maybe there's a better solution. When I shoot an event, I tag the images with the bib numbers. I upload the photos to SmugMug and allow competitors to search by their bib number for their photos. I set up some smart galleries to segment photos for browsing for those that don't want to search.

    I'm web competent, so making a landing page on a separately hosted site with a search box that calls into an API shouldn't be a problem, if that's an option.

    Any thoughts/help? I'm sure there are others doing this sort of thing and I'd rather learn from your experiences.

    Thanks!
    -Ben
    It might work if you add this to your CSS. Hides search on all pages except galleries. Removes
    searching links to upper pages. Might have to fine tune what pages you want the search showing.

    .allusersearch {display:none;}
    #mysearch {display:none;}
    .galleryPage #mysearch {display:block;}
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • FreeheelvrmntFreeheelvrmnt Registered Users Posts: 29 Big grins
    edited November 9, 2011
    Allen wrote: »
    It might work if you add this to your CSS. Hides search on all pages except galleries. Removes
    searching links to upper pages. Might have to fine tune what pages you want the search showing.

    .allusersearch {display:none;}
    #mysearch {display:none;}
    .galleryPage #mysearch {display:block;}


    So tweaking the CSS would let me restrict where the search is displayed, but would that also restrict the search to that particular gallery?

    What I'd love to be able to do is pass a parameter to search by adding something like the gallery name to the search URL, a la:
    http://benjamindbloom.smugmug.com/search/?searchWords=bib189&searchType=InUser&NickName=benjamindbloom&x=0&y=0&galleryname=MyEventName


    Thanks..
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited November 9, 2011
    So tweaking the CSS would let me restrict where the search is displayed, but would that also restrict the search to that particular gallery?

    What I'd love to be able to do is pass a parameter to search by adding something like the gallery name to the search URL, a la:
    http://benjamindbloom.smugmug.com/search/?searchWords=bib189&searchType=InUser&NickName=benjamindbloom&x=0&y=0&galleryname=MyEventName


    Thanks..
    If the search box is showing in a gallery it only searches in that one gallery. At the top normally there
    are links to search higher levels but that CSS hides that.

    The CSS hides the search box everywhere and unhides it only in the galleries. You can specify which
    galleries you want to show it in by specifying each gallery or even only Smugmug style galleries.

    Add the CSS and search in the gallery you linked, it gives you exactly what you want. Go to another gallery
    and try it there also.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • SamirDSamirD Registered Users Posts: 3,474 Major grins
    edited November 14, 2011
    I didn't know that about the search feature. Neat!
    Pictures and Videos of the Huntsville Car Scene: www.huntsvillecarscene.com
    Want faster uploading? Vote for FTP!
  • tipk99tipk99 Registered Users Posts: 46 Big grins
    edited November 16, 2011
    Sorry to steal the thread... I want to add a search box to a gallery - but I don't know what customization to use. I tried reading through the FAQs but couldn't find anything. Is it simple to do?

    Thanks

    Tom
    Allen wrote: »
    If the search box is showing in a gallery it only searches in that one gallery. At the top normally there
    are links to search higher levels but that CSS hides that.

    The CSS hides the search box everywhere and unhides it only in the galleries. You can specify which
    galleries you want to show it in by specifying each gallery or even only Smugmug style galleries.

    Add the CSS and search in the gallery you linked, it gives you exactly what you want. Go to another gallery
    and try it there also.
  • AllenAllen Registered Users Posts: 10,013 Major grins
    edited November 17, 2011
    tipk99 wrote: »
    Sorry to steal the thread... I want to add a search box to a gallery - but I don't know what customization to use. I tried reading through the FAQs but couldn't find anything. Is it simple to do?

    Thanks

    Tom
    I see a search box on all your pages now.headscratch.gif
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • tipk99tipk99 Registered Users Posts: 46 Big grins
    edited November 17, 2011
    Allen wrote: »
    I see a search box on all your pages now.headscratch.gif

    Sorry! Yes I figured it out later last night, and forgot to come back here to call off the hunt.... Thank you so much for replying anyway!

    I do have a follow on question though - How can I get the search results to show in their own gallery, much like clicking on a keyword link. So for example if you go to my MFG Woodland Park 2011 Gallery ( http://www.tpk-photography.com/Cycling/Cyclocross/MFG-Woodland-Park-2011/20126194_RpBxfL#1588658009_9WSKcB5 ) and type Hagens Berman in the search block, you get a search results page that you cannot browse. Clicking on any photo takes you back to the original gallery. However, if you click on the Hagens Berman keyword, you get a slick little gallery of all the Hagens Berman Photos that you can browse through...

    Why can't the search box return this web address? http://www.tpk-photography.com/keyword/hagens%20berman-mfg%20woodland%20park

    That'd be awesome!

    Tom
  • rainforest1155rainforest1155 Registered Users Posts: 4,566 Major grins
    edited November 21, 2011
    tipk99 wrote: »
    I do have a follow on question though - How can I get the search results to show in their own gallery, much like clicking on a keyword link. So for example if you go to my MFG Woodland Park 2011 Gallery ( http://www.tpk-photography.com/Cycling/Cyclocross/MFG-Woodland-Park-2011/20126194_RpBxfL#1588658009_9WSKcB5 ) and type Hagens Berman in the search block, you get a search results page that you cannot browse. Clicking on any photo takes you back to the original gallery. However, if you click on the Hagens Berman keyword, you get a slick little gallery of all the Hagens Berman Photos that you can browse through...
    That's the way photo results in search currently work. Only with keyword results, you can click on a keyword to have the keyword shown in a virtual keyword gallery.
    That's not possible with photo results in search. Sorry.
    Sebastian
    SmugMug Support Hero
Sign In or Register to comment.