Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 78

PostPosted: Thu Jul 22, 2010 10:50 pm Reply with quote

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 Wink
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 Rolling Eyes


i think that fixes it but thought I would run it past the master Wink
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Fri Jul 23, 2010 4:42 am Reply with quote

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).
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Jul 23, 2010 9:13 am Reply with quote

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. Wink

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch