PDA

View Full Version : I want to link "baseball" and "baseball bat". How?


bob
11-22-2005, 06:00 AM
I'm trying to link different terms, the smaller of which is wholly contained in the larger.

For example, say I want to create an autolink for baseball and another, going to a totally different URL, for baseball bat. What's happening is that I'm getting links like this:

baseball bat

not

baseball bat

I've tried changing the ordinals, but it doesn't seem to be working. I'm not sure if it makes a difference, but I added the shorter term first, and then the second one.

Thanks in advance for any assistance. :)

Edit: Looks like it might be related to this thread about ordinals (http://www.thevbgeek.com/showthread.php?t=593). Feel free to lock/merge/whatever.

The Geek
11-22-2005, 07:25 AM
you running the latest version Bob?

bob
11-22-2005, 08:06 AM
I'm running GAL 4.6.

cclaerhout
11-22-2005, 08:39 AM
It seems you have the same problem as me.
http://www.thevbgeek.com/showthread.php?t=593

The Geek
11-22-2005, 04:10 PM
4.61 dramatically improves the order links are replaced however cclaerhout is right, there are some instances I just cant get my head around! (At least - yet!)

bob
12-04-2005, 01:04 AM
So, let me see if I've got this right. Suppose I want to GAL the following:

bat
baseball bat
aluminum baseball bat
used aluminum baseball bat would it be best to give the one-term autolinkee (just making up terms) a high ordinal? And the two-term autolinkee a lower ordinal?

For example:

bat (4 ordinal)
baseball bat (3 ordinal)
aluminum baseball bat (2 ordinal)
used aluminum baseball bat (1 ordinal) and if that's the case, could I just as a rule set ordinals something like this:

bat (10000 ordinal)
baseball bat (1000 ordinal)
aluminum baseball bat (100 ordinal)
used aluminum baseball bat (10 ordinal) And if that's a good idea, would it be possible to have GAL automatically assign an order to autolinkees according to the number of terms in them?

For example, all four-term autolinkees would automatically have a priority over three-term autolinkees, three-term over two, and two-term over one.

Do I understand the system correctly?

The Geek
12-04-2005, 01:13 AM
Are they all linking to the same url/description?

The problem here is that you could link baseball bat then it would come along and think bat was up for being linked which could give you wacky results.

bob
12-04-2005, 01:26 AM
No, all the links would all be different.

I'm using baseball and baseball bat as an example that's close to the problem I'm having on my forum.

On my forum, I have a GAL for one term, say grammar. But I'd also like to link to a popular book, which happens to have a name something like A Great Grammar Book. I'd like to set that up to GAL to my Amazon affiliate link.

But it's not working the way I'd hope.

bob
12-04-2005, 05:26 AM
So you may have gathered that many of us are using GAL to plug in our affiliate links. Yeah, that's important, too. :)

The Geek
12-04-2005, 09:33 AM
Im going to have to mull this one about. If you link bat first then Baseball bat wont capture. If you do baseball bat first, bat may link twice. There may not be an easy solution.

tim330i
12-07-2005, 05:14 PM
Im going to have to mull this one about. If you link bat first then Baseball bat wont capture. If you do baseball bat first, bat may link twice. There may not be an easy solution.
Any update on this? We are having the same problem as everyone else and it is frustrating (as the product works great otherwise!).

I thought the order would basically prevent this from happening (I actually figured that was the problem, but I guess not). For instance if you put 'baseball bat' first in the order then it would link that any time but not try to re-link 'baseball' as it has already been allocated the 'baseball bat' link. Is there some way you could just make it look for words that have already been linked and ignore them? That would solve the problem wouldn't it?

If that isn't the point of the order, what does it actually do?

Tim

The Geek
12-07-2005, 05:41 PM
The order works fine, its just when the other word you are looking for has a space before it that is causes a problem.

ie
Baseball bat - Bat wouldnt work, Baseball would.
I am working on adding a look ahead that will help however even with the look ahead, it would screw bat up in:

baseball bat rocks.

Hope this helps

tim330i
12-07-2005, 06:09 PM
So if I am understanding you correctly the following would happen, right?

Scenario A

baseball bat - order 1 - linked to URL_A
baseball - order 2 - linked to URL_B

Any time 'baseball bat' is posted it will be a single link to URL_A for the entire text and the 'baseball' autolink would be ignored for 'baseball bat' because it is a higher order?

Scenario B

baseball - order 1 - linked to URL_B
baseball bat - order 2 - linked to URL_A

Any time that 'baseball' OR 'baseball bat' is posted 'baseball' will be linked to URL_B and effectively the autolink for 'baseball bat' will never be used because 'baseball' is of the higher priority?

Am I on the right track here for the order?

Thanks,
Tim

The Geek
12-07-2005, 06:37 PM
er. Not sure - Im confused now :)

Lets say we have 2 entries:

1- Baseball bat
2- bat

If #2 has a lower ordinal, baseball bat will not ever get linked (becasue part of its required match will already be taken).
if #1 has a lower ordinal, bat is going to get double linked because bat LOOKS like its valid for linking (primarily as there is a space before the keyword).

However, if the keywords are:
1 - Baseball bat
2 - baseball

Then I would put baseball bat in at a lower ordinal becasue that WILL work.
I cant change the keyword as such - I can only really "wrap" stuff around it.

HTHs

tim330i
12-07-2005, 06:59 PM
if #1 has a lower ordinal, bat is going to get double linked because bat LOOKS like its valid for linking (primarily as there is a space before the keyword).


This is basically the problem I am having.

Thanks for the clarification on how the rest of the stuff works. If by chance you could get a "look ahead" bit working that would be really awesome!

Thanks for all the help and the great product!

Tim

Aunt Clara
08-15-2006, 06:50 PM
Was this ever solved, I am having the same problem and it is driving me nuts.

The Geek
08-16-2006, 06:25 PM
Not really, its a known limitation except for how I posted above.

The good news is 5.0 has the ability to create custom regexp's so in theory you can get around this.

tom
10-02-2006, 04:48 AM
There must be a better solution to this very common problem. Maybe you can program it so that you just never "nest" GAL's?

The Geek
10-02-2006, 12:04 PM
Its not a matter of nesting, its a matter of balancing performance versus usability. To create a regexp that would 100% foolproof about double linking would mean that each post would take about 10 times longer to process. 10 times longer x 100 entries = SERIOUS performance lag. Regardless, with 5.0 you can create your own custom regexp's and assign them to a category which means you could technically create the regexp that wouldnt have this problem.

The best solution is to have singel words link first, then double words. That means less risk of a double link (which is still rare)

HTHs