Last modified: 2014-09-17 11:41:38 UTC
Created attachment 5660 [details] Proposed patch v1 Currently many Wikimedia wikis use JavaScript to add a "Complete list" link to the bottom of the interwiki list on the main page. Since this is clearly a desired feature, it would be best to eliminate the need for JavaScript and instead implement this in Wikimedia's site configurations. I'm including a patch that adds [[completelist:]] as a "language" so that it can be included in the language links. I suggest that completelist: correspond to http://meta.wikimedia.org/wiki/$1 which should work well for all Wikimedia wikis.
The "Complete list" thing is basically one line of JS: addPortletLink('p-lang', 'http://meta.wikimedia.org/wiki/List_of_Wikipedias', 'Complete list', 'interwiki-completelist', 'Complete list of Wikipedias') Creating a "fake language" for use on the main page interwiki list is taking a local JS hack (if one can even call it that, addPortletLink is designed for things like this) and turning it into a hack in MediaWiki core. I really don't see why this is desirable.
I don't know if there is a better way to do this in MediaWiki. I do know that using JavaScript to do this is suboptimal -- it would be best to serve the desired link as part of the document in the first place, rather than using JavaScript to throw it in afterwards. Between the clients that do not have JavaScript enabled, and a rare few like Dillo that do not support JavaScript at all, there are about 6% of web users that the JavaScript hack will not work for: http://www.thecounter.com/stats/2009/January/javas.php
I really don't think 6% of people not seeing a tiny little link that's only going to be used on 1 page per site, on Wikimedia sites only, really justifies adding a hack to core. Its an extremely trivial loss of function, and at least enwiki has a link to the list of Wikipedias elsewhere on the Main Page, so people with JS actually get 2 links. The interlanguage links are supposed to be links to other languages, anything that adds a link to something that isn't another language is going to be a hack to some degree no matter how its done. One of the reasons MediaWiki has sitewide JS and CSS customizable through the wiki is so that end users can add things like this, without having to hack the core code, it even provides the addPortletLink function to add links to the various portlets.
Hack this into the WikimediaMessages extension? :-)
All I'm asking for is a way to provide this feature without having to hack it in with JavaScript. The patch I posted is one way to do it; is is not the only way and clearly it is not a desirable way.
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Setting "patch-reviewed" keyword as per comment 5.
(In reply to comment #4) > Hack this into the WikimediaMessages extension? :-) This could also be hacked into one of the Wikimedia configuration files. In any case, I think this is an easy bug to resolve; marking it as such accordingly.
Comment on attachment 5660 [details] Proposed patch v1 Marking patch obsolete, there is no way this would be accepted now.
See Gerrit change #110832. This is the first step. Then to write a (very simple) extension, or even just consume the hook in CommonSettings.php (although I don't think Reedy would like that).
(In reply to This, that and the other from comment #10) > See Gerrit change #110832. This is the first step. Clearly not. But we can always use SkinTemplateOutputPageBeforeExec instead, so it's not a big deal. > Then to write a (very simple) extension It wouldn't be quite that simple, but certainly possible. I see three implementation paths here: * Store data relating to additional links in a $wg configuration variable. Inflexible - only server admins could change the "Complete list" link and its target, and which pages it appears on. * Implement an extension that reads parser function syntax like {{extralanguagelink:meta:List of Wikipedias|Complete list|class=whatever}}. Definitely doable, but tricky and possibly overkill? * Add (say) "listofwikipedias:" to the [[m:interwiki map]], and set "listofwikipedias" as an additional language link prefix, a la the proposed Gerrit change #111390. Then we can include an interwiki to [[listofwikipedias:]] on the Main Page, which would appear in the list of language links (the link text would be read from a MediaWiki: page). Least effort, but seems very unclean. (Then again, Extension:RelatedSites is an example of a horribly unclean implementation that somehow got deployed on the WMF cluster, so there's a precedent...)
Change 141099 had a related patch set uploaded by TTO: Add additional interwiki links as requested in various bugs https://gerrit.wikimedia.org/r/141099
Change 141099 merged by jenkins-bot: Add additional interwiki links as requested in various bugs https://gerrit.wikimedia.org/r/141099
Patch is merged; this is just waiting on a manual update of interwiki.cdb