WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] auto search input link (10 posts)

  1. butterbaugh9
    Member
    Posted 2 years ago #

    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/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. butterbaugh9
    Member
    Posted 2 years ago #

    What am i looking for on the demo site??

  4. butterbaugh9
    Member
    Posted 2 years ago #

    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

  5. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  6. butterbaugh9
    Member
    Posted 2 years ago #

    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!

  7. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    I will keep the mod in.

  8. butterbaugh9
    Member
    Posted 2 years ago #

    Awesome. think you very much!

  9. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 2 years ago #

    And fixed a bug that i found while playing with this

  10. butterbaugh9
    Member
    Posted 2 years ago #

    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??

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic