Automatic Hyperlinks

[quote=“Goose Egg”][quote=“Big Fluffy Matthew”]$strPattern = ’ '.trim(substr($strBuffer,0,$iPos));
Might took a tad better and not put a space between the word and the little icon thingy[/quote]
I hadn’t noticed the space between the link and the little icon thingy. But I’ve made the change. If there are many annoying references to the arctic on this forum, we can easily change it back :slight_smile:[/quote]
Yikes, I returned the second space to the string - when I removed it, every converted link was messed up for some reason. I’ve added a hard-space to the right of the little icon thingy - this may help keep it readable :slight_smile:

Very slow to load. Many timeouts. Other sites not affected, so its def. a Forumosa problem. Had to wait nearly 10 minutes to post this message.
Very irritating. Looks like we’re heading back into the bells and whistles problems we had before.
And these hyperlinks, while they might be marginally useful THE FIRST TIME posters see them and discover that they go to another site, are very quickly going to be just another annoyance, breaking up the page and causing posters to have to fiddle around with coding workarounds and such in order that their posts aren’t disrupted by unwanted links.

By adding the spaces, we also rule out instances where the target words will not be recognized if they start a paragraph or end a sentence and are immediately followed by with a period

BNHI - for example, BNHI will not be linked at the beginning of this paragraph or the end - BNHI. ARC

Also, links will only be made once per post, and there is a 20 link limit per post, as well :slight_smile:

When did you start to notice this change in performance?

It was having slow periods yesterday late afternoon/early evening, as fa as I recall (that’s the only time I was online yesterday) and today from around lunchtime onward.

[quote=“Goose Egg”]By adding the spaces, we also rule out instances where the target words will not be recognized if they start a paragraph or end a sentence and are immediately followed by with a period.

BNHI - for example, BNHI will not be linked at the beginning of this paragraph or the end - BNHI. ARC[/quote]I’m trying to work out a fix for that, I said it was an ugly bodge and wouldn’t always work. It would be better to do something using regular expressions.

if you change
$iStartPos = strpos( strtoupper($szBuffer), strtoupper($aTfPatterns[$i]), $iStartPos ); //comment in php 5 +
to
$iStartPos = strpos($szBuffer,$aTfPatterns[$i], $iStartPos ); //comment in php 5 +

it will become case sensitive, and then maybe you won’t need to check for spaces.

This feature can only slow things down, but compared to everything else that’s going on, like the rude word censor and the smilie inserter, the effect should be minimal.

Why don’t you hold off for now, BFM.

One of the concerns I’ve had about this modification is that it could severelly slow the server, and as Sandman has reported, this may well be the case.

Personally, I do not (yet) notice a speed difference, although the site did crash once for me when I was submitting something this afternoon.

Historically, Thu and Friday are the forum’s heaviest traffic days. So, I’m willing to run this mod for a bit longer to see how serious the performance problem is.

There is a good chance I’ll undo this modification, however

[quote=“Goose Egg”]By adding the spaces, we also rule out instances where the target words will not be recognized if they start a paragraph or end a sentence and are immediately followed by with a period

BNHI - for example, BNHI will not be linked at the beginning of this paragraph or the end - BNHI. ARC

Also, links will only be made once per post, and there is a 20 link limit per post, as well :slight_smile:[/quote]
surely you can set up the search to point multiple results to the same url?

eg. "ARC ", " ARC “, and " ARC.” should all point to the same place…

That coding is beyond my language portfolio, so I’ll butt out…

[quote=“Truant”][quote=“Goose Egg”]By adding the spaces, we also rule out instances where the target words will not be recognized if they start a paragraph or end a sentence and are immediately followed by with a period

BNHI - for example, BNHI will not be linked at the beginning of this paragraph or the end - BNHI. ARC

Also, links will only be made once per post, and there is a 20 link limit per post, as well :slight_smile:[/quote]
surely you can set up the search to point multiple results to the same url?

eg. "ARC ", " ARC “, and " ARC.” should all point to the same place…

That coding is beyond my language portfolio, so I’ll butt out…[/quote]
I don’t think adding more versions of a term to the pattern list would help. Indeed, that would probably make it worse - if I were to simply use the 2 extra versions you cited here, that would triple the size of the list - requiring the script to make even more comparisons to check for replacements.

At any given time, there are 50 Forumosans looking at the website - and if the publication of our magazine works out, there will be more pulling pages from the server in the near future.

This is why I’m particularly concerned about how much of an effect this modification is making.

What if you add these terms to the autocensor instead of using the new mod ? Adding to them wouldn’t really slow it down, it’s doing it already.

Yes, this is true. And its what we were doing for over a week now. But that had other problems - like changing terms in the discussion titles, PMs and searches. This modification is limited to just the threads - plus I liked how it limits the number of links on a page.

Worst of all, the autocensor system changes URLs. This modification handles this quite well. If we can figure out how to make the Auto Censor skip changing URLs, then I’d remove this modification in a flash :slight_smile:

Do you have the code for the autocensor, and the smilie-izer ? They do similar jobs, changing one sequence of characters into another.
I’m on a roll here, I can do anything :dance:

[quote=“sandman”]Very irritating. Looks like we’re heading back into the bells and whistles problems we had before.
And these hyperlinks, while they might be marginally useful THE FIRST TIME posters see them and discover that they go to another site, are very quickly going to be just another annoyance, breaking up the page and causing posters to have to fiddle around with coding workarounds and such in order that their posts aren’t disrupted by unwanted links.[/quote]Quoted for truth.

Plus, if you’re going to have these, how about only having the ones that are likely to be relevant, which is to say, why are III and the phrase “the knowledge” auto-linked? How often are these going to be actually referring to these pages, rather than the roman numeral 3 and the phrase “the knowledge”?