[Mediawiki-l] Detecting presence of an anchor?

Emufarmers Sangly emufarmers at gmail.com
Thu Aug 2 02:08:36 UTC 2007


On 8/1/07, Jean-Lou Dupont <jeanlou.dupont at gmail.com> wrote:
>
> Daniel Barrett wrote:
> > When you link to an article that doesn't exist, the link appears in red.
> > Is there a similar way to display whether a page anchor exists?  For
> > example, if you link to [[mypage#myanchor]], can it be colored
> > differently if "myanchor" does not exist on page "mypage"?
> >
> > DanB
> >
> > _______________________________________________
> > MediaWiki-l mailing list
> > MediaWiki-l at lists.wikimedia.org
> > http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
> >
> >
> To the best of my knowledge, this would require an extension that sifts
> through the html output
> of the parser and makes the appropriate changes such as adding
> 'class="new"' to the relevant
> anchors.
>
> The extension would need to hook-up to 'parser after tidy' (assuming one
> cares about parser caching).
>
> jld.


Ideally it would also able to register with Special:Wantedpages (or even a
new special page specifically for broken anchors) for large-scale checking
and fixing of broken anchors.  Is there any extension that does something
like this, or is it not possible?


More information about the MediaWiki-l mailing list