Here's my requirement:
- a wiki page is one JSON document
- when editing, the user edits the JSON directly
- when viewing, I have a viewer that turns the JSON into wikitext, and that
wikitext gets rendered as wikitext and turned into HTML by MediaWiki
I have several options, including:
1) hook for a tag like <json>, and write an extension that parses the
content between the tags and turns it into wikitext (not ideal, as I don't
use any of the existing support for JSON stuff, and also I could have
several such tags per page, which does not fit with my requirements)
2) I found the JsonConfig extension by yurik. This allows me to do almost
all of the things above - but it returns HTML directly, not wikitext. It
doesn't seem trivial to be able to return wikitext instead of HTML, but
hopefully I am wrong? Also, this ties in nicely with the Code Editor.
3) there is actually a JsonContentHandler in core. But looking through it
it seems that this suffers from the same limitations - I can return HTML,
but not wikitext.
3 seems to have the advantage to be more actively worked on that 2 (which
is not based on 3, probably because it is older than 3). So future goodies
like a Json Schema validator will probably go to 3, but not to 2, so I
should probably go to 3.
Writing this down, one solution could be to create the wikitext, and then
call the wikitext parser manually and have it create HTML?
I have already developed the extension in 1, and then fully rewritten it in
2. Before I go and rewrite it again in 3, I wanted to ask whether I am
doing it right, or if should do it completely differently, and also if
there are examples of stuff developed in 3, i.e. of extensions or features
using the JsonContent class.
Example:
I have a JSON document
{ "username": "Denny" }
which gets turned into wikitext
''Hello, [[User:Denny|Denny]]!''
which then gets turned into the right HTML and displayed to the user, e.g.
<i>Hello, <a href="...">Denny</a>!</i>
Cheers,
Denny
TL;DR: The oldest deprecated JavaScript functions ("wikibits") are being
removed. Most gadgets and site scripts on Wikimedia wikis don't use these
anymore, but you may need to adjust user scripts.
This change will be part of MediaWiki 1.29.0-wmf.21, which goes to
Wikimedia wikis from 25 April. The removal covers almost all wikibits
functions that were deprecated in MediaWiki 1.17 and 1.18 (in 2010 and
2011). They have had console warnings since MediaWiki 1.22 (April 2013).
[1] Only a few functions are being kept (importScript, importStylesheet,
and addOnloadHook - those may be removed later.
We considered removal in MediaWiki 1.22 but, to avoid disruption, we
instead replaced most variables with dummy placeholders. This meant that
calling code was silently disabled, instead of causing cascading failures
into other code. Anything still using these variables today has been broken
since at least April 2013.
This removal includes:
* User-Agent variables:
is_gecko, is_chrome_mac, is_chrome, webkit_version, is_safari_win,
is_safari,
webkit_match, is_ff2, ff2_bugs, is_ff2_win, is_ff2_x11, opera95_bugs,
opera7_bugs, opera6_bugs, is_opera_95, is_opera_preseven, is_opera,
ie6_bugs.
(deprecated since 1.17; warnings and hardcoded to false since 1.22)
* User-Agent string: clientPC (deprecated since 1.17; warnings added in
1.22)
* DOM manipulation:
changeText, killEvt, addHandler, hookEvent, addClickHandler,
removeHandler,
getElementsByClassName, getInnerText.
(deprecated since 1.17; replaced with no-op warning dummies in 1.22)
* Checkbox utilities: setupCheckboxShiftClick, addCheckboxClickHandlers.
(deprecated since 1.17; replaced with no-op warning dummies in 1.22)
* Classic toolbar utilities: mwEditButtons, mwCustomEditButtons
(deprecated since 1.17; replaced with no-op warning dummies in 1.22)
* Misc utilities:
- injectSpinner, removeSpinner, escapeQuotes, escapeQuotesHTML, jsMsg
(deprecated since 1.17; replaced with no-op warning dummies in 1.22)
- addPortletLink, appendCSS, tooltipAccessKeyPrefix,
tooltipAccessKeyRegexp, updateTooltipAccessKeys
(deprecated since 1.17; warnings added in 1.22)
Examples of how to upgrade existing scripts using these, see:
https://www.mediawiki.org/wiki/ResourceLoader/Legacy_JavaScript#wikibits.js
For an introduction to mediawiki.js, jQuery, and other modern libraries,
see:
https://www.mediawiki.org/wiki/ResourceLoader/Core_modules
Yours,
-- Krinkle
Phabricator Task: https://phabricator.wikimedia.org/T122755
[1] wikitech-l: First round of JavaScript deprecations (introducing
mw.log.deprecate for wikibits) - MediaWiki 1.23 (2013)
https://www.mail-archive.com/wikitech-l@lists.wikimedia.org/msg72198.html
[Crossposted to wikitech-l and mediawiki-l]
MediaWiki supports MySQL 5.0.3 (which was released back in 2005-03-23), and this is somewhat of a blocker to MediaWiki development, and is also meaning we're missing out on taking for granted that various features will be there for use. Or having to do conditional support, with more potential drawbacks.
I started a discussion [1] as to bumping the MySQL version, and it seems that selecting the 5.5 branch of MySQL (specifically, 5.5.8, released 2010-12-03 [2]) is gathering support.
This should hopefully be less of a controversial "bump" than the PHP 5.5 bump was, as hosting providers seem to keep more up to date with MySQL versions. From data gathered from wikiapiary, 90% of wikis running PHP 5.5 (ie new enough to run the latest and greatest MediaWiki release) are running MySQL 5.5 or newer.
This email serves as the initial announcement of taking this forward, and feedback is requested on [1] before this is taken forward to an RfC meeting in the near future
-- Reedy
[1] https://phabricator.wikimedia.org/T161232
[2] https://dev.mysql.com/doc/relnotes/mysql/5.5/en/news-5-5-8.html
Thanks Joseph! Just a followup reminder that submissions are due TOMORROW.
If you have submitted a proposal already but it's marked as a "draft",
please finalize it and mark it as "completed" by tomorrow as well. (If you
are a submitter you may already have email from me about this).
thanks everyone! We are going to have a great program this year!
Phoebe
(for the program committee)
On Sat, Apr 8, 2017 at 10:38 AM, Joseph Seddon <jseddon(a)wikimedia.org>
wrote:
> REMINDER: Deadline for submitting presentations, panels,
> roundtables and workshops to Wikimania is *April 10*.
>
> You have TWO days remaining.
>
> The deadline for posters and birds-of-a-feather sessions remains *May 15*.
>
> Please see below for the call for submissions for Wikimania, and submit
> your ideas! Please also note, for those who have already submitted, there
> is now a field in the registration form for "completed" or "in-progress"
> submission. When you are ready to have your submission reviewed, please
> note that it is "completed". Thank you!
>
> Please contact us with any questions: wikimania-program(a)wikimedia.org
>
> Seddon
>
> Phoebe
> >
> > On Tue, Feb 14, 2017 at 10:10 AM, phoebe ayers <phoebe.wiki(a)gmail.com>
> > wrote:
> >
> > > All,
> > > I'm very pleased to send out the Wikimania Montréal Call for
> Submissions,
> > > which can be found in French here:
> > > https://wikimania2017.wikimedia.org/wiki/Submissions/fr
> > > and in English here:
> > > https://wikimania2017.wikimedia.org/wiki/Submissions/en
> > >
> > > On behalf of the Wikimania programme committee,
> > > Phoebe Ayers
> > > -----
> > >
> > > Que vous soyez un membre de la communauté de l’un des projets Wikimédia
> > > (tels que Wikipédia, Wikibooks, Wikidata, Wikisource, Wikinews,
> Wikimedia
> > > Commons, Wiktionnaire, MediaWiki ou autres), un créateur de contenu
> libre
> > > ou un consommateur, nous recevrons avec plaisir votre proposition pour
> > une
> > > session lors de Wikimania 2017.
> > >
> > > *dates importantes*
> > >
> > > Appel aux propositions ouvert : 2 février 2017
> > > Date limite de soumission des présentations (conférence, panneau, table
> > > ronde et atelier) : *15 avril 2017*
> > > Date limite de soumission des brefs exposés, affiches et réunions
> > > d’oiseaux de la même plume : 15 mai 2017.
> > > Notification d’acceptation des présentations : 20 avril 2017
> > > Notification d’acceptation des brefs exposés, affiches et réunions
> > > d’oiseaux de la même plume : 10 juin 2017
> > >
> > > *Types de soumissions & Comment soumettre: *https://wikimania2017.
> > > wikimedia.org/wiki/Submissions/fr
> > >
> > > *Des questions ?* Merci de contacter le Comité du programme par
> > > wikimania-program(à)wikimedia.org.
> > >
> > > ----
> > >
> > > Whether you are a community member of one of the Wikimedia projects
> (such
> > > as Wikipedia, Wikibooks, Wikidata, Wikisource, Wikinews, Wikimedia
> > Commons,
> > > Wiktionary, MediaWiki or others), or a fellow open content creator or
> > > consumer, we welcome your proposal for a session at Wikimania 2017.
> > >
> > > *Important dates*
> > >
> > > Call for proposals opens: February 2, 2017
> > > Deadline for submitting presentation (lecture, panel, roundtable and
> > > workshop) submissions: *April 10, 2017*
> > > Deadline for submitting lightning talks, poster, and birds of a feather
> > > submissions: May 15, 2017
> > > Notification of acceptance for presentations: April 20, 2017
> > > Notification of acceptance for lightning talks, poster and birds of a
> > > feather submissions: June 10, 2017
> > >
> > > *Submission types & how to submit:* https://wikimania2017.
> > > wikimedia.org/wiki/Submissions/en
> > >
> > > *Any questions?* Please contact the Programme Committee at
> > > wikimania-program at wikimedia.org
> > >
> >
> >
> >
> > --
> > * I use this address for lists; send personal messages to phoebe.ayers
> <at>
> > gmail.com *
> > _______________________________________________
> > Wikimedia-l mailing list, guidelines at: https://meta.wikimedia.org/
> > wiki/Mailing_lists/Guidelines and https://meta.wikimedia.org/
> > wiki/Wikimedia-l
> > New messages to: Wikimedia-l(a)lists.wikimedia.org
> > Unsubscribe: https://lists.wikimedia.org/mailman/listinfo/wikimedia-l,
> > <mailto:wikimedia-l-request@lists.wikimedia.org?subject=unsubscribe>
>
>
>
>
> --
> Seddon
>
> *Advancement Associate (Community Engagement)*
> *Wikimedia Foundation*
> _______________________________________________
> Wikimedia-l mailing list, guidelines at: https://meta.wikimedia.org/
> wiki/Mailing_lists/Guidelines and https://meta.wikimedia.org/
> wiki/Wikimedia-l
> New messages to: Wikimedia-l(a)lists.wikimedia.org
> Unsubscribe: https://lists.wikimedia.org/mailman/listinfo/wikimedia-l,
> <mailto:wikimedia-l-request@lists.wikimedia.org?subject=unsubscribe>
--
* I use this address for lists; send personal messages to phoebe.ayers <at>
gmail.com *
Hello!
The analytics team would like to announce that legacy pagecounts are now
available programatically in an API.
"Pagecount" is the legacy definition of what we now call "pageview".
Pagecounts agreggated per project are available on API endpoint since
January 2008 to December 2016. The main difference among pagecounts and the
current pageview data is lack of filtering of self-reported bots, thus
automated and human traffic are reported together. You can access data
overall but also mobile/desktop split.
Note that -at this time- we still do not have pagecount data per article,
thus far we have loaded only per-project legacy data.
More info and examples of how to query the API can be found here:
https://wikitech.wikimedia.org/wiki/Analytics/AQS/Legacy_Pagecounts
Thanks to Thomas Steiner for promptly updating the pageviews.js node client
to be able to access pagecounts. Javascript client can be found here:
https://github.com/tomayac/pageviews.js
A glimpse of this data:
https://analytics.wikimedia.org/dashboards/reportcard/#pagecounts-dec-2007-…
Thanks,
Nuria
Hi all! I'm the main developer of the ProveIt gadget
<https://commons.wikimedia.org/wiki/Help:Gadget-ProveIt>, a reference
manager for Wikipedia. The code is tracked via Phabricator, reviewed via
Gerrit, and served to the various Wikipedias from Commons. Each wiki has a
unique initialization code
<https://en.wikipedia.org/wiki/MediaWiki:Gadget-ProveIt.js> that sets some
local config and then requests the main code from Commons (JavaScript, CSS
and JSON). Every time I merge a new change via Gerrit, I need to manually
update the Commons pages so that the Wikipedias have the latest code.
This is sub-optimal. Ideally, the Wikipedias should request the code
directly from Diffusion, so that when developers merge new changes, they
are immediately available (and we don't need interface rights or manual
work in Commons). However, when I go to the Diffusion of the gadget
<https://phabricator.wikimedia.org/diffusion/1884/>, click on the main
proveit.js file, and click on "View Raw File", I get to a URL like the
following:
https://phab.wmfusercontent.org/file/data/iapd7kogqo5x2naywwlq/PHID-FILE-dk…
The URL of the raw file changes with every click and doesn't have the
proper MIME type header, so it's useless for serving the code.
I think it would be very useful, for my case and others, to have a stable
URL that serves the latest code with the proper MIME type heading. In other
words, a CDN, which may or may not be integrated with Diffusion.
Thanks!
Sorry, I hit enter early by accident.
I realized the dump file for wikidata is no longer in the format wikidatawiki-2017XXXX-pages-articles.xml.bz2 anymore.
Now, it is split in to different dumps:
https://dumps.wikimedia.org/wikidatawiki/latest/wikidatawiki-latest-md5sums…
I am wondering when did this happen and the rationale behind it. Will it be permanent or we will switch back to the original format soon ?
Thank you,
Best regards,
Trung
On 4/5/17, 9:57 PM, "Wikitech-l on behalf of Trung Dinh" <wikitech-l-bounces(a)lists.wikimedia.org on behalf of trd(a)fb.com> wrote:
Hi everyone,
I realized the dump file for wikidata is no longer in the format wikidatawiki-2017XXXX-pages-articles.xml.bz2 anymore.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l