Jim Wilson wrote:
Probably
showing my 'lack of knowledge ', but there must already be a
function that is called when a user clicks on a link and the wiki tries
to match the link to a current page and fails, as it then autoloads the
editor so the user can create a page, it would be in this step that you
could offer a choice.
Well, sortof. When you click a red link, it takes you to the edit page of
the chosen article. At this point, the decision to show you the edit form
(as opposed to the "this page is empty" message) has already been made. If
you do a view-source of the link URL, you'll see that "action=edit" is
already in there.
You _can_ hook into MediaWiki at the "show edit page" event and do some cool
things with it, but there's no good way to know the article from which the
user came - which would be a prerequisite for modifying said article's
links. Technically you could use the browser's provided "referrer", but
this is unreliable (proxies) and easily spoofed or disabled.
Ah - I see that would be a problem, knowing where you came from, as they
are in effect separate actions - may be in wiki 3.7.3 !!!
I'm not trying to say that you're idea is a
bad one - or flawed in some
way. It sounds like useful functionality to have (in some form), it's just
that MediaWiki, in its current form, is not amiable to the development of
such an extension
An alternative might be some form of page search button actually on the
edit page, like the current button that allows you to put the [[ ]]
round selected text, that would put in front:- [[Selected Page| and
after:- ]] round the selected text where 'selected page' would be the
name of the page selected in the search window.
Ta
John