I have amended the Zenphoto website files tremendously. I have installed netbeans and want to mimic a search for 'kenya' using the Zenpage theme. Adding the below to the top of the index.php (root)doesnt help. Somehow Search words is empty/null.
$_POST = array("words" => 'kenya',"inalbums" => NULL ,"SEARCH_country" => 'country',"SEARCH_desc" => 'desc',"SEARCH_location" => 'location',"SEARCH_state" => 'state', "SEARCH_tags" => 'tags',"SEARCH_title" => 'title');
$_GET = array("p" => 'search');
Please help.
Regards
Comments
Add that on the root index.php surely will not work as that is outside the theme context. Try the theme's index.php.
And also see the documentation of the SearchEngine class:
http://www.zenphoto.org/documentation/classes/SearchEngine.html
Regards
You really should look at the plugin system and its filters.
But then what do you do with this, priming the search engine dose nothing by itself. If you really want the "home" page of your site to be the result of this search then you will have to also cause your them to load its search script or modify the them index.php to mimic the search script.
But the bottom line is this: There is no call for inserting this or other code into the Zenphoto core scripts. Read up on the plugin system and on filtering as these are the mechanisms Zenphoto provides for altering its behavior. Modifying the core just makes your site unsupportable and limits your ability to upgrade Zenphoto (something necessary if you expect to benifit from any fixes or enhancements we make.)