Inspired by bug 10866 and turned to be more general, since there are different sources for different types of data:
Let's have the following set:
- Special:Sources
- MediaWiki:Sources
- MediaWiki:Sources/book, MediaWiki:Sources/patent, MediaWiki:Sources/magazine etc.
- {{#sources:}}
Now, if somebody put the following code to the source of page:
{{#sources:book|123456789|book name}}
it would render the link in a way
[[Special:Sources/book/123456789|book name]]
Special:Sources (resp. Special:Sources/*) will call the corresponding MediaWiki (sub)page to display.
eg. MediaWiki:Sources/book can contain:
[http://www.library.com/book/$1 Search $2 in library.com]
where $1 is 123456789 and $2 book name (if empty then $1).
Similar behavior for other types.
MediaWiki:Sources would contain the list similar to sidebar eg. such as
- book|book
- magazine|magazine
- kniha|book // kniha = book in Czech
etc...
where first item is the keyword used in {{#source:keyword}} and second is the name of the subpage - MediaWiki (resp. Special):Sources/subpage.
This would allow easy i18n and manageability.
Might be created as an extension, but I'd rather say it should be part of the basic instalation like Special:Booksources is.
Version: unspecified
Severity: enhancement