WordPress.org

Support

Support » Plugins and Hacks » WP Photo Album Plus » [Resolved] [Plugin: WP Photo Album Plus] auto search input link

[Resolved] [Plugin: WP Photo Album Plus] auto search input link

  • butterbaugh9

    @butterbaugh9

    Hi, i was wondering if there was a script i can run to auto input a giving search phrase in to the photo search and then render the results. Lets say i list a part on a vehicle and put the text “see photos” next to that part, and from that text link it triggers a search for that part. Then based on the descriptions for each album it renders which ones have that part on them.
    Thanks for your time.

    http://wordpress.org/extend/plugins/wp-photo-album-plus/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Jacob N. Breetvelt

    @opajaap

    The status of this topic is resolved.
    If you are still interested in an answer, here it is.

    Do the following:

    1. Make a page with %%wppa%% in its content, in this example its page id is 18. Its title is Search results.

    2. Asign this page in Table IX item 2 to the search mechanism.

    3. Put links in your text like this (use the html editor, NOT the wysiwyg as that editor destructs your html)

    Example 1: <a href="javascript://" onclick="document.location='http://beta.opajaap.nl?page_id=18&wppa-searchstring=image1'" >View the photos that have image1 in their name</a> 
    
    Example 2: <a href="javascript://" onclick="document.location='http://beta.opajaap.nl?page_id=18&wppa-searchstring=image2'" >View the photos that have image2 in their name</a>

    You will have to change the links to reflect your site, page_id and the search criteria.

    One other thing is that you need version 4.2.10 for this to work.
    Please visit my beta test site to see if this is what you want, then i will release 4.2.10 asap

    btw: It will work on names and descriptions of both albums and photos.

    butterbaugh9

    @butterbaugh9

    What am i looking for on the demo site??

    butterbaugh9

    @butterbaugh9

    i put it to resolved because i just cut the source code for the standard search form out, and then removed the title and hid the search bar. the only thing is that it isnt a link it is the submit button just like the normal search, just with “see on jeeps” instead of “submit”

    Here is the code:

    <form id="wppa_searchform" class="widget_search" action="http://www.jeepvision.com/image-search-results/" method="post"><input id="wppa_s" type="hidden" name="wppa-searchstring" value="winch" /><input id="wppa_searchsubmit" type="submit" value="See on Jeeps" /></form>

    View at – http://www.jeepvision.com/winches

    Plugin Author Jacob N. Breetvelt

    @opajaap

    If this is what you want, its ok, i can not add any substantial.
    The change in 4.2.10 with respect to this issue is only that the wppa-searchstring will be $_REQUESTed as opposed to $_POSTed, so you can use it in a link also.

    butterbaugh9

    @butterbaugh9

    I think as of now i am going to leave it how it is on my site because it keeps the “theme” of how a submit button looks and functions the same. However i dont believe it would hurt any to have a link as an option also, i may use it that way in the future or in other aspects of my site. so on that note it is up to you whether you feel like it or not 🙂
    thank you for your help and wuick responses!

    Plugin Author Jacob N. Breetvelt

    @opajaap

    I will keep the mod in.

    butterbaugh9

    @butterbaugh9

    Awesome. think you very much!

    Plugin Author Jacob N. Breetvelt

    @opajaap

    And fixed a bug that i found while playing with this

    butterbaugh9

    @butterbaugh9

    so i tried it out your way and it returns the not found page but the search word is sitting in the search bar, then if i then click search it finds it just fine. something i’m doing??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] [Plugin: WP Photo Album Plus] auto search input link’ is closed to new replies.
Skip to toolbar