Gossamer Forum
Home : Products : Gossamer Links : Discussions :

grab a colum in the search resolute

Quote Reply
grab a colum in the search resolute
In the search resolute (search.cgi) page can I grab a column like "city" and get a list of all the cities that are in the resolute.
Quote Reply
Re: [nir] grab a colum in the search resolute In reply to
You mean you want to get a list of results, with a specific city?

If your "City" field is called "City", then this should work:

search.cgi?query=*;City=Whatever

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] grab a colum in the search resolute In reply to
I want something else:), if user search for "pizza" and get in the search result 150 links, I want to give another list of all the city that are in the result (cityname1, cityname2, cityname3)
Quote Reply
Re: [nir] grab a colum in the search resolute In reply to
Oh mmm, not sure you can do that easily (due to the span pages etc)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] grab a colum in the search resolute In reply to
But when we have get the result we get the list of all the ID's and we can grab the city, or am I talking nonsenseWhistle
Quote Reply
Re: [nir] grab a colum in the search resolute In reply to
Not quite as simple as that, if you have more than one page of results :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] grab a colum in the search resolute In reply to
Actually andy, you gave me a solution to this a few weeks ago... :) At least you pointed me in the right direction and I figured it out.

Its NOT 100% solution since its a permanent option, fields available or results available or not... But since most of the time there are search results, it almost works always.

Once the person searches for pizza, the URL would be:
http://www.medicosdeelsalvador.com/cgi-bin/medicos/search.cgi?query=pizza&Go=Buscar

This URL (in my site) gets displayed on the actual page using: <%escape_html query%>

So in the search results page, I added a "filter" jejejeje to that line and autolinked to it, such as:

<a href="http://www.mysite.com/cgi-bin/links/search.cgi?query=<%escape_html query%>&isCity=Miami">Only in Miami</a>

So that doesnt exactly filter what you searched, it researches all over again but this time using Pizza AND Miami and a parameter.

To take the person back to all results, the link would be the same with out the "&isCity=Miami" part, such as:

<a href="http://www.mysite.com/cgi-bin/links/search.cgi?query=<%escape_html query%>">Back to: <%escape_html query%></a>

Now, the only "bad" side to this methos is that I only filter out something like "Have Video" or "Have Pictures"... So I only have a few of those links, and they are ALWAYS available. You can leave it out optionaly if you use <%if query eq ....%> but depends on your site it may be too much to type out...

Hope that helped a little.

If youd like to see it working, PM me, Ill send you the URL.
Quote Reply
Re: [Gorospe] grab a colum in the search resolute In reply to
Yeah, that would work - but I think he was wanting a list of the different cities (found in those results, on ALL the search pages for that query) ... not just hard-coded links.

It could be done, but would require something that would do the search again (on the first results page), and then store all the different "cities" found for that particular query. Not something thats very quick to do :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Gorospe] grab a colum in the search resolute In reply to
Actually, (Im guessing here), you could probably have a dynamic dropdown (from Andys all in one plugin thingie) select all the cities...

Each option would have the full URL to Search, the search phrase AND the city selected.

Just an idea...