Gossamer Forum
Home : Products : Links 2.0 : Customization :

search all, except one category

Quote Reply
search all, except one category
Hey,

is there a chance to search all links, except one category. I want to build up a bookshop with editorial reviews. I will fill one category with links to other sites. The search engine should not include this category.

Is there a chance to get this work?

-- Patrick


Quote Reply
Re: search all, except one category In reply to
See this: http://gossamer-threads.com/...=&vc=1#Post96048.

Martin Webster
--
Cebidae's UK Internet Resource
http://www.cebidae.co.uk/
Quote Reply
Re: search all, except one category In reply to
Hey Martin,

in this thread is a guide to add searchable fields. But I want not to search one category. The search is ok, but how can I say the search engine "Do not search the category with the name weblinks."

-- Patrick

Quote Reply
Re: search all, except one category In reply to
This is what you want:

http://gossamer-threads.com/...=&vc=1#Post27238


Floristan

Quote Reply
Re: search all, except one category In reply to
Alex mentioned in that thread that Links 2 can search for something like "isNew=Yes". But that doesn't work. I tried it with my site and also the GT resource center. It returns the search form and no results.

In Reply To:
This is already in version 2! For instance, try out:

http://gossamer-threads.com/scripts/links/demo/search.cgi?isNew=Yes
Does anyone know how to return results for "Yes" "No" values in the database.

Thanks

Quote Reply
Re: search all, except one category In reply to
It most certainly does work...
http://ucmd.virtualave.net/...search.cgi?isNew=Yes

--Drew
Quote Reply
Re: search all, except one category In reply to
It does not work here (resoruce center):
http://www.gossamer-threads.com/...search.cgi?isNew=Yes

Quote Reply
Re: search all, except one category In reply to
Thats because the Resource Center is not using the same search engine used by Links itself (I believe), or it is a highly customized one.

- Bobsie
bobsie@orphanage.com
http://goodstuff.orphanage.com/
Quote Reply
Re: search all, except one category In reply to
Hello socrates,

I think it works. You must also add something to search, for example:
http://www.gossamer-threads.com/...search&isNew=Yes

Regards, Del.

Quote Reply
Re: search all, except one category In reply to
The Resource center is running Links SQL in some customised version.

In one of my Links 2 installations, http://www.gotzespace.dk/...search.cgi?isNew=Yes does indeed work.


Quote Reply
Re: search all, except one category In reply to
So if I use this variant to search all except one category, I have to extend all links with a field. This is much work, because I have to write "Yes" or something else in this field.

I want to create an extra category with links to bookshops. I want to use another links.html-Template only for this category. How can I do this?

Thanx for help.

Patrick

Quote Reply
Re: search all, except one category In reply to
One way would be to just write the html yourself using your template to make it look like the rest of the site and not put the listings in the database then hardcode a link from your home page to this category.

Jimmy Crow
http://www.homewithgod.com/
Quote Reply
Re: search all, except one category In reply to
Thanx for your help. But is there a chance to use a second template?

The search works.

-- Patrick


Quote Reply
Re: search all, except one category In reply to
Just a quick note to say that I use the isNew=Yes code on my site and it works great as I can now let people just search for the newest links using a drop down box!

Take a look -
URL is under my name!

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: search all, except one category In reply to
Paul Wilson, it looks good. Now I run the search engine
except one category. Now I need a different template for this category.

The Links in this category should look not like my editorial book reviews. I have a category with WebLinks and I don't need the ratings, etc. What can I do? How can I add a second link.html to Links 2.0.

-- Patrick

Quote Reply
Re: search all, except one category In reply to
I shall just think about that for a moment!

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: search all, except one category In reply to
Do you just want to add another template?
Is that what you mean?

A new template for that one category?

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: search all, except one category In reply to
Yes, I want a new template, like link2.html, only for one category, perhaps I want to use it for two categories ;)

-- Patrick

Quote Reply
Re: search all, except one category In reply to
Hint: For all. If you want to add the field "Search" in the database, you have to fill out this field with "Yes" or "No". This is very hard, if you have much working links in the categories.

You can use the editor "TEXTPAD" to add a string to every line. So you can extend your database in a few minutes.

-- Patrick

Quote Reply
Re: search all, except one category In reply to
Im not totally sure what to do because I use site_html.pl myself, but I would think that you need to go to site_html_templates.pl and add the following sub..

sub site_html_whatever_category {
# --------------------------------------------------------
# This rountine will build a page based for the current category.

return &load_template ( 'yourcategory.html', {
date => $date,
time => $time,
category => $category,
links => $links2,
title_linked => $title_linked,
title => $title,
total => $total,
grand_total => $grand_total,
category_name => $category_name,
category_name_escaped => $category_name_escaped,
category_clean => $category_clean,
description => $description,
meta_name => $meta_name,
meta_keywords => $meta_keywords,
header => $header,
footer => $footer,
prev => $prev,
next => $next,
related => $related,
build_links_per_page => $build_links_per_page,
%globals
} );
}

Replace whatever category with your category name so if it was Music_websites you would use..

sub site_html_music_websites

Then change yourcategory.html to the name of yourcategory

and create a link2.html with the template you want.

Then in yourcategory.html

add...


<%if links2%>
<h2>Links: </h2>
<%links2%>
<%endif%>


BUT AS I SAY-DON'T QUOTE ME ON THAT BECAUSE I DON'T USE TEMPLATES

Please backup all necessary files as I may be totally wrong!


From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: search all, except one category In reply to
I will try this tomorrow.

Thank you for your help.

-- Patrick

Quote Reply
Re: search all, except one category In reply to
I tried the code, but the category uses the original link.html. The link2.html is not used.

Any other chance?

-- Patrick