Page MenuHomePhabricator

New parser function 'medialocalurl' and rename 'filepath' to 'mediafullurl'
Closed, DeclinedPublic

Description

Author: olaf

Description:
Patch that adds a parser function "medialocalurl" and creates a new alias "mediafullurl" for "filepath".

I want to propose the attached patch, that will do the following:

  • It introduces a new parser function "medialocalurl", that will returns the local URL of the given media file (e.g. [{{medialocalurl:foobar.jpg}} an image])
  • Corresponding to the parser functions "localurl" and "fullurl", this function complements the parser function "filepath", that returns the full url.
  • To better represent this correspondance, it also renames the function "filepath" to "mediafullurl".
  • For compatibility, it keeps the parser function "filepath" as an alias of "mediafullurl".

If the patch is accepted, I will gladly write the (still missing) documentation (in-code, and on the Mediawiki wiki).


Version: unspecified
Severity: enhancement

attachment patch2.diff ignored as obsolete

Details

Reference
bz15891

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:19 PM
bzimport set Reference to bz15891.
bzimport added a subscriber: Unknown Object (MLST).

sumanah wrote:

Olaf, thank you for the patch. I'm sorry that it's taken us so long to review it. In the three years since you posted it, the codebase has changed so much that it no longer cleanly applies to trunk. Do you think the functionality is still necessary, when you look at what's now in MediaWiki 1.18 (and, more pertinently, in trunk?) If so, we would be interested in knowing so that Gabriel and Brion can work with you to include it in the parser rewrite they're working on.

Thanks; I await your response. And again, my regrets on the delay.

sumanah wrote:

Comment on attachment 5402
Patch that adds a parser function "medialocalurl" and creates a new alias "mediafullurl" for "filepath".

Patch no longer applies to trunk, per automated testing by Rusty Burchfield, http://lists.wikimedia.org/pipermail/wikitech-l/2011-November/056340.html

olaf wrote:

Meanwhile, the patch is obsolete, as I can generate the link that I needed via the standard [[]]-syntax.