Gossamer Forum
Home : Products : Links 2.0 : Customization :

Links Sucks!!!

(Page 1 of 3)
> >
Quote Reply
Links Sucks!!!
Wait Wait Wait. It doesn't suck! I just need your help real bad and I had to get you in here somehow.

Can anyone help me with the search sub categories mod, found here http://www.ford-network.at/LLinks/subsearch.shtml

I tried installing it but it no longer is compliant to Links ver 2

Please help

Quote Reply
Re: Links Sucks!!! In reply to
yea.. it doesn't work unless you get that Language Links.. Smile

and next time you do it.. don't put Links Sucks!! put something like.. YAHOO SOURCE CODE!.. something like that.. )

Jerry
Quote Reply
Re: Links Sucks!!! In reply to
Yes,

That mod no longer works with the new links 2.0. THe first part of the mod is missing, I never got it to work right.

I would suggest that Alex should pull that one down.

I could be off base but I believe that to be the case.

MIke
Quote Reply
Re: Links Sucks!!! In reply to
i'm looking at that guys source code and it looks like that mod is very simple.. it just looks if the what you searched for is in that category.. if it is post it.. if it isn't skip it..

hmm.... check back soon..
Quote Reply
Re: Links Sucks!!! In reply to
Jerry,

May I ask you a question? Just how many mods are you working on at the same time? Wink
Quote Reply
Re: Links Sucks!!! In reply to
LOL.. t_dog.. too many..

I am having the worst time on your New Link one.. I can only get it to work if I do not display the category names.. Frown

I just made this mod.. search in category.. it's only a 3 line mod.. lol..

Check back in a few minutes.. I will post instructions..

Jerry
Quote Reply
Re: Links Sucks!!! In reply to
Ok! DONE!!

It's REALLY easy.. Looks simpler than LLink's

anyways.. this will search in the category that it is stated in and UP (sub categories)..

here.. in search.cgi FIND:

Code:
my $nh = $in{'nh'} | | 1;

and add this, one line below:

Code:
my $catsearch = $in{'category'} if ($in{'category'});
my $catsearch = "All" if (!$in{'category'});

then find this:

Code:
$link_output{$setoflinks} .= &site_html_link (%tmp) . "\n";

and replace it with:

Code:
$link_output{$setoflinks} .= &site_html_link (%tmp) . "\n" if ($catsearch eq "All");
$link_output{$setoflinks} .= &site_html_link (%tmp) . "\n" if ($tmp{'Category'} =~ /^$catsearch/);
$link_hits-- if ($tmp{'Category'} =~ /^$catsearch/);

now on your category pages.. you will have to make a search form seperate than the one on the main page and all others.. and add this inside the form..

Code:
<select name="category">
<option value="All" selected>in $site_title</option>
<option value="$category_name_escaped">in $category_name_escaped</option>
</select>

you can also add it on advanced options.. with a list of all the categories.. (will make when I release the instructions on my page.. [few days])

hope you understand..

jerry

[This message has been edited by widgetz (edited July 12, 1999).]

[This message has been edited by widgetz (edited July 13, 1999).]
Quote Reply
Re: Links Sucks!!! In reply to
Holy christ. i have been trying to get this mod going for 6 months. I say "Links sucks" and voila.

Of course, more kudos should be given to you and your scripting skills.

thank you widgetz
Quote Reply
Re: Links Sucks!!! In reply to
i didn't know how easy it was.. lol.. i thought it would have been made by now.. but i guess not..

i had been searching for this mod awhile back and made no attempt at doing it until now.. lol.. and oh boy.. easy

thanks! did you get it to work?

jerry
Quote Reply
Re: Links Sucks!!! In reply to
Hello again,

I do not understand the last bit
Quote:
now on your category pages.. you will have to make a search form seperate than the one on the main page and all others.. and add this inside the form..

Do I add the seach form to the index.html page or one of the templates?

Add what kind of form? Just a form search field?

Lost

Mic
Quote Reply
Re: Links Sucks!!! In reply to
Could you please provide an example of making a form for whatever pages you are refering to.

Tried again and still dont get adding the form part.

Mic
Quote Reply
Re: Links Sucks!!! In reply to
Come in, do you have any compassion? Smile This guy is working without a fan or air-con!

Quote:
will make when I release the instructions on my page.. [few days]

Give him some time. Smile
Quote Reply
Re: Links Sucks!!! In reply to
hmm... i don't know how to do it on templates..

just look for the <form> for the search thingy.. and add the code i posted in..

btw.. my fan is back on.. on med. Smile but now i have nose plugs.. lol if i'm not on for 3 days.. my house burned up and my computer went with it..

lol
jerry
Quote Reply
Re: Links Sucks!!! In reply to
OOPs! I left out some stuff...

in search.cgi there is a line that looks like this:

Code:
($nh > 1) and ($next .= qq~<a href="$build_search_url?$next_url&nh=$prev_hit">[<<]</a> ~);

change it to:

Code:
($nh > 1) and ($next .= qq~<a href="$build_search_url?$next_url&nh=$prev_hit&category=$catsearch">[<<]</a> ~);

there is another line that looks like this:

Code:
($next .= qq~<a href="$build_search_url?$next_url&nh=$i">$i</a> ~);

change it to this

Code:
($next .= qq~<a href="$build_search_url?$next_url&nh=$i&category=$catsearch">$i</a> ~);

that's all..

jerry
Quote Reply
Re: Links Sucks!!! In reply to
look up at the main instructions.. i added:

Code:
my $catsearch = $in{'category'} if ($in{'category'});
my $catsearch = "All" if (!$in{'category'});

so when you make a search from the main page it will give you all categories.. the original one just messed up and gave you no links.. but the correct link number
Quote Reply
Re: Links Sucks!!! In reply to
JUST FOR YOUR INFORMATION.. the code above does not work properly.. (although it does return correct links it does not return the correct link #...

i made code that works.. put I am making the webpage with instructions.. so please wait before you install this one..

Jerry
Quote Reply
Re: Links Sucks!!! In reply to
do templates have templates for search output?

jerry
Quote Reply
Re: Links Sucks!!! In reply to
Yes. It's called search_results.html.
Quote Reply
Re: Links Sucks!!! In reply to
Ok,

Will be waiting.

Again thank you.

mic
Quote Reply
Re: Links Sucks!!! In reply to
ok.. i'm done.. here are the instructions.. of course.. i am only done with the non template version right now.. need to look at the template version..


http://www.widgetz.com/links_mods/

[This message has been edited by widgetz (edited July 13, 1999).]
Quote Reply
Re: Links Sucks!!! In reply to
ok.. now i beleive i got the template version..
i did no tests (sorry), but it should work.

please post your results here.. so i know what happens..

jerry
Quote Reply
Re: Links Sucks!!! In reply to
Jerry,

Your mod works (I tested the templates version).

In the search results page, it still shows the categories as well as the links. Can you remove the categories and show the links in the current category only?

Also, instead of having a pull down menu, I think it would look a lot nicer with a check box. I can change that myself, though.

Thanks for a great mod.
Quote Reply
Re: Links Sucks!!! In reply to
Oh.. i forgot about that.. lol.. and i didn't want a checkbox cause my site is based on download.com and they use different stuff..
:0)

thanks for testing.. i will update it with no current category..

BTW.. i am almost done with that new span thingy.. Smile i need to figure out one more thing

jerry
Quote Reply
Re: Links Sucks!!! In reply to
QUESTION..

do you want it to not show the current category or all the categories..

IE: when a search is done in Software

it will show Software
and the subcategories inside software..

.. do you understand?
jerry
Quote Reply
Re: Links Sucks!!! In reply to
  
Quote:
IE: when a search is done in Software it will show Software and the subcategories inside software..

Yep. I think that's the best way. It just doesn't make sense to have other categories displayed in the results.

Quote:
i didn't want a checkbox cause my site is based on download.com and they use different stuff..

So you're copying download.com, huh? Smile Well, I changed it to a checkbox for my site, and I think it looks very nice. Smile

[This message has been edited by t_dog (edited July 13, 1999).]
> >