paperlined.org
apps > wikipedia > technical > mw_features
document updated 16 years ago, on Jun 2, 2007
Sometimes more than one version of an image is discussed in a public forum.  Clearest examples
include [[Wikipedia:Featured picture candidates]] and [[Wikipedia:Graphic Lab/Images to improve]].
The way this is currently done is to create two different filenames, even when the images differ in
only minor ways.  For all other areas of the wiki, we use versioning to keep track of this.  Not so
on images, because we have no way to be able to embed a specific version of an image.  Allowing us
to embed a specific version in a talk page would these image-discussion areas to actually use the
built-in versioning system we have, and wouldn't have to make image history needlessly complicated.

The way the image would be embedded would be:

    [[Image:Transformer3d col3.svg|300px|ver20060825031229|(caption)<br>Before polarity was added]]

For the parsing details, see:
    http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/Parser.php?view=markup
        function makeImage
            $mwWidth  =& MagicWord::get( 'img_width' );
             ^^^^^^^

            } elseif ( !isset( $params['width'] ) && ! is_null( $match = $mwWidth->matchVariableStartToEnd($val) ) ) {
                                                                          ^^^^^^^


    http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/messages/MessagesEn.php?view=markup
            'img_width'              => array( 1,    '$1px'                   ),



Things to consider:
    - one possible complaint is that this could be used on articles to lock-in a specific version of
      an image, which is sort of anti-wiki.  One answer is that this feature is mainly intended to
      help DISCUSSION of images, and it's possible that there won't be any proper use within
      articles, so perhaps we could add some extra text in the embedded image's caption to indicate
      it's an old version, something non-optional, partially to disuade people from using it in
      articles.  It also would serve the same function as the [[MediaWiki:Revision-info]]
        "This is an archived version of this page.  ...  It may differ significantly from the current version."
      blurb that's at the top of archived versions of pages:
        http://en.wikipedia.org/w/index.php?title=IPod&oldid=134823207

    - how does my code interact with the thumbnail cache?  do we cache thumbs or not?  if so, do we
      have to modify the any of the existing cache works?  (hopefully not...)