Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Mint not picking up Google advanced search query right?

Joost de Valk
Pepper Developer
Posted on May 29, '07 at 04:24 pm

Hi,

i saw this new unique referrer showing up in my site’s stats: google.com/search?as_q=CSS3&hl=en&num=5 … s_rights=&

am i right in assuming that Mint doesn’t understand that as_q= is the same as q= ?

Shaun Inman
Mint/Pepper Developer
Posted on May 30, '07 at 09:28 am

That would appear to be the case. The Default Pepper’s search term detection would require a rewrite to identify multiple possible query containers (which I am currently working on).

Why, oh, why couldn’t google just use q and set an advanced search flag instead of a completely different container for advanced search?

Joost de Valk
Pepper Developer
Posted on May 30, '07 at 09:52 am

Hehe yeah, loads of stat packages get this wrong… Annoying, but true.

Shaun Inman
Mint/Pepper Developer
Posted on May 30, '07 at 11:35 am

Actually this one has an easy fix. It turns out I’m only preg_quote()ing (escaping special regular expression characters) the domain and images indexes each search engine array. So you can add Advanced Google Search recognition by opening /mint/pepper/shauninman/default/engines.php and changing:

'query'         => 'q',

to:

'query'         => 'q|as_q',

in the first $SI_SearchEngines array listed. I haven’t tested extensively but the change adds support for advanced searches without breaking normal Google searches. It shouldn’t interfere with the other engine’s but like I said, I haven’t tested this fix extensively.

Joost de Valk
Pepper Developer
Posted on Jun 02, '07 at 03:33 pm

sounds pretty good… i’ll try it.

Joost de Valk
Pepper Developer
Posted on Jun 02, '07 at 03:40 pm

As far as i can see now, it works :)

You must be logged in to reply. Login above or create an account