[Mediawiki-l] link picker

Rob Church robchur at gmail.com
Wed Mar 7 20:53:56 UTC 2007


On 07/03/07, Jim Wilson <wilson.jim.r at gmail.com> wrote:
> 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.
>
> All of that aside - it's still a hard problem because of the
> nondeterministic nature of wiki rendering and the complications that arise
> from template transclusion.  Even if you know the referrer (as in an Edit
> Preview), the process of determining where in the wikitext a particular link
> was generated is daunting.

If it can be assumed that by clicking on the link generated by [[this
is some pretty link text]] in page A, we also want to change links in
any other page pointing to that one, then you *can* quite easily find
out where it's being linked from, using the link tables...with the
caveat that there will also be link table entries on pages where links
have come from a template. I assume any decent implementation would
ignore pages which don't seem to have the link in and wouldn't commit
the edit unless an actual change was made further down the line.


Rob Church



More information about the MediaWiki-l mailing list