| Author |
Message |
spasticdonkey
Newbie


Joined: Sep 05, 2007
Posts: 65
|
Posted:
Thu Jul 22, 2010 10:50 pm |
|
Well not too important as I'm not sure I've ever used this link before, but there is a slight issue with the search comments tap I thought I'd let you know about. Just a recap of a post at RPS
| sixonetonoffun wrote: |
| Clicking on the search comments link in the default News module "comments" section has odd behavior. I believe its intent was to select comments as the search criteria but instead its inserting "Comments" into the search field.....Seems to happen only with short links enabled..... |
| spasticdonkey wrote: |
ahh i see what you are saying, and good catch. In looking at the .htaccess
RewriteRule ^search-([/:\-\'{}()\,\._&a-zA-Z0-9+=\ ]*)-([a-zA-Z0-9_-]*).html modules.php?name=Search&query=$1&author=$2 [L]
RewriteRule ^search-comments-([0-9]*).html modules.php?name=Search&type=comments&sid=$1 [L]
these two rewrites are at odds with each other, at least in the order they are in because the first one will also match the comments link. Try editing your .htaccess so that the comments rewrite comes first.
| Code: |
#Search
RewriteRule ^search-([a-zA-Z0-9]*)-([0-9]*)-([0-9]*)-([/:\-\'{}()\,\._&a-zA-Z0-9+=\ ]*)-([a-zA-Z]*)-([0-9]*).html modules.php?name=Search&author=$1&topic=$2&min=$3&query=$4&type=$5&category=$6 [L]
RewriteRule ^search-([a-zA-Z0-9]*)-([0-9]*)-([0-9]*)-([/:\-\'{}()\,\._&a-zA-Z0-9+=\ ]*)-([a-zA-Z]*).html modules.php?name=Search&author=$1&topic=$2&min=$3&query=$4&type=$5 [L]
RewriteRule ^search-author-([a-zA-Z0-9]*).html modules.php?name=Search&author=$1 [L]
RewriteRule ^search-comments-([0-9]*).html modules.php?name=Search&type=comments&sid=$1 [L]
RewriteRule ^search-([/:\-\'{}()\,\._&a-zA-Z0-9+=\ ]*)-([a-zA-Z0-9_-]*).html modules.php?name=Search&query=$1&author=$2 [L]
RewriteRule ^search-([0-9]*).html modules.php?name=Search&query=&topic=$1 [L]
RewriteRule ^search-users.html modules.php?name=Search&type=users [L]
RewriteRule ^search.html* search.html [L] |
that's all you have to change it think
i couldnt reproduce within the search module itself so i don't think you need to change any shortlink files, although i could be wrong, lol  |
i think that fixes it but thought I would run it past the master  |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 375
|
Posted:
Fri Jul 23, 2010 4:42 am |
|
Nice one! I actually removed my taps for this module because I didn't see how tapping it had any benefit (bots cannot submit the form for processing). |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1281
|
Posted:
Fri Jul 23, 2010 9:13 am |
|
Spastic,
Absolutely right conclusion.
I did happen to see that thread over on RPS (but always a chance to miss, so thanks), but after you already had produced the solution. Since it looked good to me, I didn't feel the need to reply.  |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
|
|