Gossamer Forum
Home : Products : Links 2.0 : Customization :

How to add a link to multiple categories - the solution!

(Page 1 of 2)
> >
Quote Reply
How to add a link to multiple categories - the solution!
In the past, there have been a number of request of a way to add links to multiple categories. Well now, with the help of Alex, I have added this option to my site.

It seemed to be very popular request on the old forum, and I have added detailed instructions at http://www.Ten-Tenths.com/links/mods/multicat if you would like to add it to your own Links site. If you run into problems, post a message here.

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Hi,

The link to convert.txt on your page is not working properly.

Great Mod

Thanks

Celio
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Thanks celio - it's now fixed. I had saved the file as convert.cgi.txt and it was trying to execute itself. I have now renamed it convert.txt and added a note to rename it when you upload it!

Glad you like it...

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Craig-

Thank you for this. It works wonders! =) Also, thanks for all your hard work on making this script the best it can be. I have learned a lot by just watching for your posts and trying the things you suggest (when I understand it!)
Thanks!

------------------
Kevin D
greeknet.hypermart.net
webmaster@greeknet.hypermart.net
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Not as far as I can remember - I'm pretty sure that everything was included in the help file, but I will double check...

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
I just had a look, and the help file is correct - at least it is the SAME as what is on my server - and that's working right!

The only possible thing which looked a bit odd looking quickly through the file was this:

Quote:
<td valign=top>|; print &build_select_field ("Category", "$rec{'Category'}", "$rec{$db_key}-Category"); print qq|</td>
<td valign=top>|;print &build_select_field ("Category", "$rec{'AltCat'}", "$rec{$db_key}-AltCat", "MULTIPLE", 5);print qq|</td>

Maybe change it to:

Quote:
<td valign=top>|; print &build_select_field ("Category", "$rec{'Category'}", "$rec{$db_key}-Category"); print qq|</td>
<td valign=top>|;print &build_select_field ("AltCat", "$rec{'AltCat'}", "$rec{$db_key}-AltCat", "MULTIPLE", 5);print qq|</td>

and see what happens - let me know how you get on.

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Didn't Work 4 Me. Worked Everywhere, But Refused To Build Pages With Added Categories. Any Thoughts?

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Didn't work for me either :-(
It messed up all my pages when I rebuild!!
and the total number (only the number) shown for total links was from 421 for 842!!

I did everything like your guiding lines


Saludos

Celio
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Have you carried out any other mods to the origianl script ?

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Craig,
I am using MegaLinks 2.0 . I converted it over by modifying the convert.cgi script to include the extra values. The problem I am having is that I am unable to modify existing records to replace that NULL value that is now in my links.db entries. Do I have to make further modifications some of the other admin scripts or add a line someplace not mentioned on you how to page?

Thanks,
Tim
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Craig,
That was apparently correct the first way. Unfortunately I am banging my head against a hard piece of wall. If I can chase it down, I will let you know.

Thanks!
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Craig,

Yes....i've added a a mods, but also made the adjustments nessesary to accommodate them. As I Stated, The added Field Shows Up The The Links.db, In The Correct Location, But Refuses To Be Added To The Additional pages.

Any Thoughts Would Be Helpful.

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Celio....,

In Your Links.def File, Where It Says "Search These Fields (1,4,5) Or Something Like That, Just Add 6 i.e (1,4,5,6)Or Whatever You've Renamed Your Description Field, And All Your Links Will Re-appear in your searches.

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Craig,
I am having the same thing as Dangermouse. The field is in the links.db but it will not update the alternative categories to the links.db. Seems like we missed a step someplace. Again, I am using the full tilt version of Mega Links 2.0

Tim
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Dangermouse,

I'm not sure if I understand what you say
I have the following in my links.def

$db_category = 4;
$db_alt= 5;
$db_modified = 3;
$db_url = 2;
$db_hits = 8;
$db_isnew = 9;
$db_ispop = 10;
$db_contact_name = 6;
$db_contact_email = 7;
$db_read = 11;
$db_revchoice = 12;
$db_picks = 13;

# Field names you want to allow visitors to search on:
@search_fields = (1,2,5);

Should I modify this to
@search_fields = (1,2,5,6); ? Why?
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Celio,

Yes, In Answer To Your Question. This Is Only In Response To The Mod By Craig To Add In Additional Categories. I Also Lost Many Links Returned By Searching When I Modified With This Mod And This Seemed To Correct This Problem, Just By Adding The Additional Field To The @search_fields = (1,2,5,6);

And As To Why? Well, I've Been Up 4 20 Hours, So I'll Have 2 Go In2 It In My Next Post ( After I Get Some Sleep!)

Anyways,

Ciao

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Celio.....,

1 More Thing:

In Craig's Instructions, #description = 6.
In Your Links.def, I See That Your Contact Email = 6. They Both Can't = 6.

Add Your #description Field Number To The Fields To @search fields string.

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Thanks for helping!!

Anyway I didn't get it to work...yet



Celio
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Celio,

I Got It To Work. I Don't Know If This Will Work 4 U, But Here Goes:

1st, I Changed All The References From "Alternative Categories" & "Alternative Category" To "AltCat". (Except In The Table Descriptions - Leave Those As Is.

2nd, In The Convert.cgi Script, Be Certain That The Added NULL Field, i.e.:

$value[4]|NULL|$value[5]

Matches Your $db Fields In Links.def
i.e:

$db_category=4 #description=5 Would Look Like $value[4]|NULL|$value[5] etc.

Try This.....It Worked 4 Me!

ciao

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Oh, And I Keep Forgetting To Tell Craig Thanks 4 The Mod! Grreat Work!

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
I'm really glad you got it working! I have been away for a bit, so I came back expecting to have to sit down and figure this all out! Smile

I'm positive that the problem didn't lay with the 'Alternative Categories' text, but it is very possible that the problem was with the convert.cgi script - I will try and add some more detailed instructions later tonight (if I ever get a spare moment!) Also, if anyone else is having problems with this, it may be neccessary to blank url.db before rebuilding.

celio, are you up and running yet ?

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Not yet Craig,

But I'll keep trying until I succed. This Mod is VERY important (one of the most).It's a Must for Links.



Celio
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
celio,
Sorry to hear you're still having problems Frown

Zip up your copy of links.def and nph-build.cgi and email them to me at Craig.Antill@Ten-Tenths.com

I'll have a look and see if there are any glaring differences in what you've got and what i've got (see if I forgot something in the instructions!)

I notice that you have added some extra fields to the database (from your posting further up the page) - maybe this has some bearing on it ?

Has anyone else tried this mod with any success ? Maybe I should create a ready modified links.def and nph-build.cgi for people to look at - would this help ?

------------------
Craig Antill
10 Tenths Motorsport
www.Ten-Tenths.com
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Craig, sorry 2 bother u even more.....but, do you know how to modify this mod so that it can be placed on the add resources form also?

thnx,

DM
Quote Reply
Re: How to add a link to multiple categories - the solution! In reply to
Thanx Much, Craig!

Works Like A Charm!!

DM
> >