Gallery2 Search Form Integration With Wordpress - urldecode Page/ File Querystring

Discussion in 'HTML & Website Design' started by LocateArt, Jun 28, 2009.

  1. #1
    DigitalPoint Forum:

    I have struggled to find a way to place a search form on my Gallery2 integrated Wordpress pages.
    The search plug-in for WPG2 simply does not work in Wordpress. What I have resorted to is a form that
    places the submitted keywords to a keyword album query string. The search box is located here:
    http://www.locateart.com/

    <div class="block-search-SearchBlock">
    <form id="search_SearchBlock" method="get">
    <input type="text" id="searchCriteria" size="18" name="page_id=115&g2_view=keyalbum.KeywordAlbum&g2_keyword" class="textbox"/>
    <input type="submit" value="Go" />
    <br/>
    </form>
    </div>

    This works but during the form submit process the browser url-enclodes the non-ASCII characters like ampersand "&" becomes %26 and equal "=" becomes %3D. If I simply cut and past the query string into the browser the keyword album page loads fine such as - this works:

    http://www.locateart.com/?page_id=115&g2_view=keyalbum.KeywordAlbum&g2_keyword=Vintage Art

    I believe the solution could be as simple as placing the php function urldecode($url_path) as the page loads
    so the query string is decoded properly. Problem is I have no idea where to place the php urldecode($url_path)
    function and what variables to use. My guess is the url_path is the variable $wpg2_g2path located in one of the wpg2 files like "wpg2functions" but not sure.

    Again I am looking for guidance locate the page/ file for search form $_POST/ GET function parses the query string so I can place the php function urldecode().

    Thanks

    Plug-in that embeds Gallery2 within Wordpress:
    http://wpg2.galleryembedded.com/index.php?title=Main_Page

    ____________________________________________________________________________________________________

    Gallery URL = http://locateart.com/art_gallery/main.php
    Gallery version = 2.3 core 1.3.0
    API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
    PHP version = 4.4.9 cgi
    Webserver = Apache/1.3.41 (Unix) mod_fastcgi/2.4.6 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.7a
    Database = mysqlt 5.0.67-community, lock.system=flock
    Toolkits = ArchiveUpload, Exif, ImageMagick, Gd
    Acceleration = none, none
    Operating system = Linux 2.6.9-78.0.13.ELsmp #1 SMP Wed Jan 14 16:12:46 EST 2009 i686
    Default theme = matrix
    gettext = enabled
    Locale = en_US
    Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729) FirePHP/0.3
    Rows in GalleryAccessMap table = 250
    Rows in GalleryAccessSubscriberMap table = 278916
    Rows in GalleryUser table = 3
    Rows in GalleryItem table = 278916
    Rows in GalleryAlbumItem table = 18
    Rows in GalleryCacheMap table = 0

    WordPress 2.7
     
    LocateArt, Jun 28, 2009 IP