Something must have gone wrong there - it now turns it
into
[[]]rest-of-Y..., see
http://en.wikipedia.org/w/index.php?title=2005&diff=77172402&oldid=…
- and look for 'gas cylinder', 'aircraft carrier' or 'sodomy
law'.
Thanks for the heads up and sorry about that, silly copy-and-paste error in the last thing
I changed, have fixed the tool and the
2005 page now.
If I understand correctly, "Don't know"
actually means "Don't link
this, but don't let my decision count as a vote against linking in the
future".
Exactly. It doesn't link it, and doesn't vote for it or against it. Basically it
does nothing, and affects no future link
suggestions, until a user explicitly chooses either yes or no, and clicks the
"preview with added links" button.
I had a similar one, [[Second in Command|second in
command]] instead
of [[second-in-command|second in command]] ([[second in command]] is a
redirect to that second one).
That should hopefully be okay now, I think.
I.e. this test text:
had a similar one, second in command instead of
Now suggests this:
had a similar one, [[Second-in-command|second in command]] instead of
a suggestion might be to link
differently if the words in question are in a different style from
surrounding text (ie italics vs non-italics) or in some kind of
quotation marks.
Well it won't suggest linking anything enclosed in italics or any other form of wiki
text (e.g. {{something linkable}}, [[something
else linkable]], ''something else linkable'', etc are all out).
It's debatable whether italics or bolded text should be linked, but my gut feeling is
that if the writer thought there was something
special about that phrase then we should probably assume we should leave it alone.
Adding links for things in quotation marks is possible, although I'm happy to see
mostly dubious links just get voted off the
island...
Can you make it so that changing any of the radio
buttons doesn't lose
their keyboard focus in Firefox? Otherwise it's extremely hard, to the
point of being impossible, to use this properly.
I'm assuming that you're probably using tab + left-arrow / right-arrow for
navigating around the page and changing radio button
choices?
The trade-off is that the up arrow and down arrow keys are currently being used to allow
moving the selected/highlighted row up and
down; However Firefox also binds those keys to changing the selected radio button if a
radio button has the focus. In other words,
without removing the focus, pressing up arrow and down arrow will both change the current
row, AND change the selected radio button
(which is very annoying, and that's why it explicitly drops the focus).
So I can stop fiddling with the focus, if we lose the up-arrow / down-arrow key
functionality (or shift it to different keys). Would
that work okay for you?
preg_replace("/\\[\\[([$linkprefixchars]*)([^]|]+)([$linktrailchars]*)\|$1\]\]/",
"$1[[$2]]$3", $text), where $linkprefixchars and $linktrailchars are
grabbed from the appropriate language file. (Regex is untested and
might contain typos and/or other errors, but you probably get the
point: try to use the exact matching technique that MediaWiki itself
uses.)
Cool, I'll have a look at using this, although to a certain extent it's currently
largely independent of MediaWiki (i.e. there may
be no appropriate language file to grab). And if it gets it wrong and suggests [[Aircraft
carrier|aircraft carriers]], it's probably
not as good as [[aircraft carrier]]s, but it's not a catastrophe.
Does it already tag the edit comment with "[via
Suggestor]"?
Yes, it supplies a default edit summary of: "Adding a few internal links from a
[[User:Nickj/Can We Link It|link suggesting tool]]".
All the best,
Nick.