I haven't seen this addressed previously. Please let me know if it has.
I love the addition of tagging (and someday maybe a normalized database for them

), but I hate the URLs. So, I have a simple hack to make this:
`http://elbedesign.com/zenphoto/index.php?p=search&searchfields=4&words=sometag`
look like this:
`http://elbedesign.com/zenphoto/tags/sometag`
(this hack obviously requires that mod_rewrite is enabled. Well, I check to ensure that it is, so you can implement this hack on your site, but it won't do anything unless your server can support it (and zenphoto is configured to enable mod_rewrite)
I added these lines to the .htaccess:
` #### Rewrite rule for tags clean URL
#### SEE ALSO: hack in template-functions.php - FUNCTION "getSearchURL" -- insert 4 lines starting at line 1967 ####
RewriteRule ^tags/(.*) index.php?p=search&searchfields=4&words=$1 [L,QSA]
`
(You have to add this rewrite rule ABOVE the "catch-all" rule)
and I added 4 new lines at the start of the `getSearchURL` function in `template-functions.php` (inserted lines start at line 1967 in release 1.1.3)
`function getSearchURL($words, $dates, $fields=0) {
if ( !empty($words) && empty($dates) && $fields==SEARCH_TAGS && getOption('mod_rewrite') ) { // elbe added (hack for clean tags URL)
// if request is for a "tags" url AND mod_rewrite is enabled, give them a clean /tags/ URL // elbe added (hack for clean tags URL)
return WEBPATH."/tags/".$words; // elbe added (hack for clean tags URL)
} // elbe added (hack for clean tags URL)
$url = WEBPATH."/index.php?p=search";
if($fields != 0) { $url .= "&searchfields=$fields"; }
if (!empty($words)) { $url .= "&words=$words"; }
if (!empty($dates)) { $url .= "&date=$dates"; }
return $url;
}
`
I can make the hacked versions of these files available for download if necessary, but it is a pretty easy edit (and I don't really trust myself to update the hack with every point release).
All standard disclaimers apply -- make backups, hack at your own risk, I cannot be held responsible for any unforseen breakage. but it works on my test site...