Since the very beginning of Wikipedia, the parser has contained a special pattern for the letters ISBN followed by 10 (now 10 or 13) digits, resulting in a link pertaining to the specified International Standard Book Number. MediaWiki inherited this behaviour from UseModWiki. At one point, a Special:Booksource page was introduced as an intermediary between the ISBN mentioned in an article and a list of alternative libraries and bookstores. Since June 2003, the Special:Booksource page transcludes user-editable contents from [[Wikipedia:Book sources]] and substitutes the word MAGICNUMBER.
Today, new numbering and reference schemes are not introduced in the parser, but instead through templates. If the above had been invented today, we would write {{ISBN | 9876543210}} instead of the "naked" pattern ISBN 9876543210.
For many years now, it has been asked if we could have ISSN support similar to the ISBN support. ISSN are International Standard Serial Numbers, identifying newspapers and journals (collectively called "serials" by librarians), such as Nature (ISSN 0028-0836) and Science (ISSN 0036-8075).
An increasing number of Wikipedias have introduced the template {{ISSN|0028-0836}} but the template designer then has to decide whether this should link to http://dispatch.opac.ddb.de/DB=1.1/LNG=EN/CMD?ACT=SRCHA&IKT=8&TRM=00... (as in the English Wikipedia) or to http://worldcat.org/issn/0028-0836 (as in the Danish Wikipedia) or to http://libris.kb.se/showrecord.jsp?q=numm:0028-0836 (as in the Swedish Wikipedia) or to http://www.gegnir.is/F/?func=find-a&find_code=ISSN&request=0028-0836 (as in the Icelandic Wikipedia).
The national libraries (gegnir.is, kb.se) are very useful for one country's local serials, but the international ones (worldcat.org) are more useful for internationally renowned journals.
It would be a lot easier for the template designer, if the existing template (without modifying the wiki parser!) could link to an intermediary page called Special:Serialsource which could transclude text from a user-editable [[Wikipedia:Serial sources]].
Is this something we could hope to see implemented?
It is important to note that other numbering schemes such as ASIN (Amazon), LCCN (Library of Congress), OCLC and DOI are tied to one supplier, and there is no need to link to different sources. ISBN and ISSN (and perhaps other schemes?) are different.
It would be a lot easier for the template designer, if the existing template (without modifying the wiki parser!) could link to an intermediary page called Special:Serialsource which could transclude text from a user-editable [[Wikipedia:Serial sources]].
Some way to access a post/get value in a page would do it, then you could just link to Wikipedia:Serial sources?issn=12345678. I can imagine hundreds of potential security issues with that, though, so it would have to be done very carefully. It could have lots of uses, though.
Thomas Dalton wrote:
Some way to access a post/get value in a page would do it, then you could just link to Wikipedia:Serial sources?issn=12345678. I can imagine hundreds of potential security issues with that, though, so it would have to be done very carefully. It could have lots of uses, though.
Not bad. The obvious way to implement that is to receive CGI parameters as if they were template parameters. For the above example, the template would then use {{{issn}}} rather than MAGICNUMBER. Or just {{{1}}} for Serial_sources?12345678
One potential problem is that this opens a back door for sneaking in contents, making it look like official Wikipedia contents. For example, if the [[Wikipedia:Recommends]] page says "Wikipedia endorses {{{1}}}" and external websites link to Wikipedia:Recommends?Encyclopedia+Britannica
Is this a problem only for cross-site linking? Should CGI parameters to templates be null and void if the referer is a remote site?
On 9/12/07, Lars Aronsson lars@aronsson.se wrote:
For many years now, it has been asked if we could have ISSN support similar to the ISBN support. ISSN are International Standard Serial Numbers, identifying newspapers and journals (collectively called "serials" by librarians), such as Nature (ISSN 0028-0836) and Science (ISSN 0036-8075).
In case anyone isnt aware, there is a bug open for this:
http://bugzilla.wikimedia.org/show_bug.cgi?id=3663
And I have asked for input on whether this is important to pursue at a new wikiproject that has been formed to work on journals:
Wikipedia_talk:WikiProject_Academic_Journals#ISSNs_required
On 9/12/07, Lars Aronsson lars@aronsson.se wrote:
Thomas Dalton wrote:
Some way to access a post/get value in a page would do it, then you could just link to Wikipedia:Serial sources?issn=12345678. I can imagine hundreds of potential security issues with that, though, so it would have to be done very carefully. It could have lots of uses, though.
How would this be linked?
[[Wikipedia:Serial sources?issn=1234-5678|1234-5678]]
or
[http://en.wikipedia.org/w/index.php?title=Wikipedia:Serial_sources&issn=...]
or throwing convention to the wind, adding params by extending the internal link format:
[[Wikipedia:Serial sources|1234-5678|issn=1234-5678|param2=foo]]
Not bad. The obvious way to implement that is to receive CGI parameters as if they were template parameters. For the above example, the template would then use {{{issn}}} rather than MAGICNUMBER. Or just {{{1}}} for Serial_sources?12345678
We can get away with Serial_sources?12345678 and Serial_sources?12345678&87654321 to also fill {{{2}}}, however as CGI & HTML forms are designed around name=value pairs, I think that unnamed parameters would be better handled as numbered params, like Serial_sources?1=12345678&2=87654321.
One potential problem is that this opens a back door for sneaking in contents, making it look like official Wikipedia contents. For example, if the [[Wikipedia:Recommends]] page says "Wikipedia endorses {{{1}}}" and external websites link to Wikipedia:Recommends?Encyclopedia+Britannica
Is this a problem only for cross-site linking? Should CGI parameters to templates be null and void if the referer is a remote site?
The referrer is a client side feature; it can be disabled in firefox with the config option network.http.sendRefererHeader
http://kb.mozillazine.org/Network.http.sendRefererHeader
If we want to get around that, when the mediawiki software constructs a real URL from an internal link that uses these additional params, it could also embed a token to be used to verify that the link came from an internal link rather than a foreign site. The token would need to be a moving target to prevent foreign sites being able to use it.
-- John Vandenberg (en:User:Jayvdb)
If we want to get around that, when the mediawiki software constructs a real URL from an internal link that uses these additional params, it could also embed a token to be used to verify that the link came from an internal link rather than a foreign site. The token would need to be a moving target to prevent foreign sites being able to use it.
Since wikis are, by their very nature, editable, I don't think we can trust internal links any more than we trust external ones.
The only way I can see this working is to severely restrict what can be done with these parameters. For example, they should never, under any circumstance, be parsed, as wikitext or HTML.
On 9/12/07, Thomas Dalton thomas.dalton@gmail.com wrote:
If we want to get around that, when the mediawiki software constructs a real URL from an internal link that uses these additional params, it could also embed a token to be used to verify that the link came from an internal link rather than a foreign site. The token would need to be a moving target to prevent foreign sites being able to use it.
Since wikis are, by their very nature, editable, I don't think we can trust internal links any more than we trust external ones.
I was thinking that ordinary users and admins can fix any problem parameters in internal links and potential problems could be prevented with page protection, but I can understand why even that may be insufficient to prevent problems on large sites.
We could limit URL parameters to pages that are protected, or add another bit somewhere to indicate that the page knows how to deal with incoming params and is under admin supervision.
The only way I can see this working is to severely restrict what can be done with these parameters. For example, they should never, under any circumstance, be parsed, as wikitext or HTML.
Ideally pages that accepted parameters would define preconditions to tell mediawiki what types of values that are acceptable. Initially, simple data-types are all that would be needed. For ISBN, ISSN and most other uses of this data, these preconditions could be added like:
#precondition isbn number(13) #precondition issn number(8)
or if we wanted more flexibility, in this case to allow a hyphen in the issn:
#regexprecondition issn [-0-9]{1,9}
When the value doesnt meet the precondition, it could simply not be passed to the page which would then act appropriately.
If these params were only passed through to pages that were approved, another option that would be to add a set of parser functions that can be used to sanity check the param values before the template/page uses them. e.g. isnum, isalpha, etc. Extension RegexParserFunctions would be ideal for this purpose because it is very flexible, but a specialised set of functions written with performance in mind is probably preferable in order to have it enabled on large wiki's.
-- John
"John Vandenberg" jayvdb@gmail.com wrote in message news:deea21830709111813t3fecc34fwfdd3d4a3524e5835@mail.gmail.com...
On 9/12/07, Thomas Dalton
thomas.dalton@gmail.com wrote:
If we want to get around that, when the mediawiki software constructs a real URL from an internal link that uses these additional params, it could also embed a token to be used to verify that the link came from an internal link rather than a foreign site. The token would need to be a moving target to prevent foreign sites being able to use it.
Since wikis are, by their very nature, editable, I don't think we can trust internal links any more than we trust external ones.
We could limit URL parameters to pages that are protected, or add another bit somewhere to indicate that the page knows how to deal with incoming params and is under admin supervision.
This seems like over-complicating the issue.
- Mark Clements (HappyDog)
Thomas Dalton wrote:
It would be a lot easier for the template designer, if the existing template (without modifying the wiki parser!) could link to an intermediary page called Special:Serialsource which could transclude text from a user-editable [[Wikipedia:Serial sources]].
Some way to access a post/get value in a page would do it, then you could just link to Wikipedia:Serial sources?issn=12345678. I can imagine hundreds of potential security issues with that, though, so it would have to be done very carefully. It could have lots of uses, though.
Special pages CAN read extra parameters. However, i'd advise the format Special:Serialsource/12345678 instead, as it can use internal wikilinks.
Special pages CAN read extra parameters. However, i'd advise the format Special:Serialsource/12345678 instead, as it can use internal wikilinks.
I was trying to think of a way to do it without creating a new special page. It's rather a specific thing to get it's own special page, a more general feature would be better.
"Thomas Dalton" thomas.dalton@gmail.com wrote in message news:a4359dff0709111513j330263eag6517c1b7a518cecd@mail.gmail.com...
Special pages CAN read extra parameters. However, i'd advise the format Special:Serialsource/12345678 instead, as it can use internal wikilinks.
I was trying to think of a way to do it without creating a new special page. It's rather a specific thing to get it's own special page, a more general feature would be better.
See my other post for a general solution. It adds a new special page, but only one that can be used for any similar situation, and which could possibly replace Special:Booksource.
- Mark Clements (HappyDog)
On 9/12/07, Mark Clements gmane@kennel17.co.uk wrote:
"Thomas Dalton" thomas.dalton@gmail.com wrote in message news:a4359dff0709111513j330263eag6517c1b7a518cecd@mail.gmail.com...
Special pages CAN read extra parameters. However, i'd advise the format Special:Serialsource/12345678 instead, as it can use internal wikilinks.
I was trying to think of a way to do it without creating a new special page. It's rather a specific thing to get it's own special page, a more general feature would be better.
See my other post for a general solution. It adds a new special page, but only one that can be used for any similar situation, and which could possibly replace Special:Booksource.
How about: <newpagetemplate title="ISSN 12345">some_template|12345</newpagetemplate>
which links to a special page with the contents (dynamically generated) {{some_template|12345}}
In other words, a special page that will dynamically run a template with parameters. That would allow to use all the nice template magick we are used to, and be general enough to cover many cases.
Maybe we could even get rid of geohack! (just dreaming...)
Magnus
On 9/12/07, Magnus Manske magnusmanske@googlemail.com wrote:
<newpagetemplate title="ISSN 12345">some_template|12345</newpagetemplate>
replying to myself, how about a parser function? {{#newpage:some_template|12345}}
On 12/09/2007, Magnus Manske magnusmanske@googlemail.com wrote:
On 9/12/07, Magnus Manske magnusmanske@googlemail.com wrote:
<newpagetemplate title="ISSN 12345">some_template|12345</newpagetemplate>
replying to myself, how about a parser function? {{#newpage:some_template|12345}}
I don't think we even need that. Just [[Special:Newpagetemplate/some_template|12345]] should work (well, the | will need to be escaped, or something). It's just a matter of writing the special page, which is a really simple one.
Thomas Dalton wrote:
On 12/09/2007, Magnus Manske wrote:
On 9/12/07, Magnus Manske wrote:
<newpagetemplate title="ISSN 12345">some_template|12345</newpagetemplate>
replying to myself, how about a parser function? {{#newpage:some_template|12345}}
I don't think we even need that. Just [[Special:Newpagetemplate/some_template|12345]] should work (well, the | will need to be escaped, or something). It's just a matter of writing the special page, which is a really simple one.
You could as well use {{Special:Newpagetemplate/some_template|12345}} to create the link. But don't forget boys that all the parameters you pass to it, must be available in the url, as it will be processed by a different http request.
You could as well use {{Special:Newpagetemplate/some_template|12345}} to create the link. But don't forget boys that all the parameters you pass to it, must be available in the url, as it will be processed by a different http request.
But that wouldn't create a link, it would transclude the page.
Thomas Dalton wrote:
You could as well use {{Special:Newpagetemplate/some_template|12345}} to create the link. But don't forget boys that all the parameters you pass to it, must be available in the url, as it will be processed by a different http request.
But that wouldn't create a link, it would transclude the page.
The special page can choose what happens when it gets transcluded. It's a bit annoying using a transcluding syntax to create a link, but OTOH the semantics of how to pass parameters are clear. You don't need to create a new kind of "links with parameters".
The special page can choose what happens when it gets transcluded. It's a bit annoying using a transcluding syntax to create a link, but OTOH the semantics of how to pass parameters are clear. You don't need to create a new kind of "links with parameters".
Good point. It's counter-intuitive, but would work quite well.
On 13/09/2007, Platonides Platonides@gmail.com wrote:
Thomas Dalton wrote:
You could as well use {{Special:Newpagetemplate/some_template|12345}} to create the link. But don't forget boys that all the parameters you pass to it, must be available in the url, as it will be processed by a different http request.
But that wouldn't create a link, it would transclude the page.
The special page can choose what happens when it gets transcluded. It's a bit annoying using a transcluding syntax to create a link, but OTOH the semantics of how to pass parameters are clear. You don't need to create a new kind of "links with parameters".
It's probably not a very good idea to alter what happens when one includes a special page into another - all other includable special pages inject some content into the page, not just a link. Furthermore, included special pages are treated as block content, so the link would appear in an odd position.
You could do something like [[Special:Pagetemplate/ISSN/12345]] - the special page can parse this quite trivially.
Rob Church
Magnus Manske wrote:
How about: <newpagetemplate title="ISSN 12345">some_template|12345</newpagetemplate>
which links to a special page with the contents (dynamically generated) {{some_template|12345}}
This discussion is very interesting and could potentially lead to something very powerful and useful. However, it seems like the novel concept needs some time to mature, first being developed as a separate Mediawiki module, then tested on separate wikis, before at last being deployed on Wikipedia.
For the more immediate need, is it possible to just double the existing Special:Booksources page to be used for ISSNs? As I pointed out in my first posting in this thread, it doesn't require any changes to the wiki syntax or parser. The new special page would just be linked to from the Template:ISSN. That's all.
"Lars Aronsson" lars@aronsson.se wrote in message news:Pine.LNX.4.64.0709112133080.7230@localhost.localdomain...
Since the very beginning of Wikipedia, the parser has contained a special pattern for the letters ISBN followed by 10 (now 10 or 13) digits, resulting in a link pertaining to the specified International Standard Book Number. MediaWiki inherited this behaviour from UseModWiki. At one point, a Special:Booksource page was introduced as an intermediary between the ISBN mentioned in an article and a list of alternative libraries and bookstores. Since June 2003, the Special:Booksource page transcludes user-editable contents from [[Wikipedia:Book sources]] and substitutes the word MAGICNUMBER.
Today, new numbering and reference schemes are not introduced in the parser, but instead through templates. If the above had been invented today, we would write {{ISBN | 9876543210}} instead of the "naked" pattern ISBN 9876543210.
For many years now, it has been asked if we could have ISSN support similar to the ISBN support. ISSN are International Standard Serial Numbers, identifying newspapers and journals (collectively called "serials" by librarians), such as Nature (ISSN 0028-0836) and Science (ISSN 0036-8075).
An increasing number of Wikipedias have introduced the template {{ISSN|0028-0836}} but the template designer then has to decide whether this should link to
http://dispatch.opac.ddb.de/DB=1.1/LNG=EN/CMD?ACT=SRCHA&IKT=8&TRM=00...
(as in the English Wikipedia) or to http://worldcat.org/issn/0028-0836 (as in the Danish Wikipedia) or to http://libris.kb.se/showrecord.jsp?q=numm:0028-0836 (as in the Swedish Wikipedia) or to http://www.gegnir.is/F/?func=find-a&find_code=ISSN&request=0028-0836 (as in the Icelandic Wikipedia).
The national libraries (gegnir.is, kb.se) are very useful for one country's local serials, but the international ones (worldcat.org) are more useful for internationally renowned journals.
It would be a lot easier for the template designer, if the existing template (without modifying the wiki parser!) could link to an intermediary page called Special:Serialsource which could transclude text from a user-editable [[Wikipedia:Serial sources]].
Is this something we could hope to see implemented?
It is important to note that other numbering schemes such as ASIN (Amazon), LCCN (Library of Congress), OCLC and DOI are tied to one supplier, and there is no need to link to different sources. ISBN and ISSN (and perhaps other schemes?) are different.
What might work would be if {{ISSN|0028-0836}} expanded to [[Special:ExternalRef/ISSN/0028-0836|IISN: 0028-0836]].
Then add a special page 'ExternalRef' which uses its first parameter to transclude special text from the MediaWiki namespace, appropriate to the type of reference (e.g. [[MediaWiki:ExtRef-ISSN]]) and passes the supplied number as the {{MAGICNUMBER}} property to that page (a la Special:Booksource).
This would then allow any such external reference scheme to be used from the one page (providing the MediaWiki page exists).
It would also allow Special:Booksource to be deprecated (or to simply transclude Special:ExternalReference with the appropriate parameters).
- Mark Clements (HappyDog)
wikitech-l@lists.wikimedia.org