Commit graph

50 commits

Author SHA1 Message Date
Umherirrender
a9007e8baf Add missing & to @param documentation to match functon call
Change-Id: I81e68310abcbc59964b22e0e74842d509f6b1fb9
2017-08-11 18:47:46 +02:00
Umherirrender
b5cddfb27b Remove empty lines at begin of function, if, foreach, switch
Organize phpcs.xml a bit

Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
2017-07-01 11:34:16 +00:00
Matthias Mullie
ebb1680359 Show dimensions in TraditionalImageGallery
Bug: T121869
Change-Id: Ie2cb3f1594302f1726ae3d9d2d668c81b7e6b0f1
2017-03-07 13:09:00 +01:00
jenkins-bot
bfce465c0f Merge "Add showThumbnails option to slideshow galleries" 2017-01-02 07:06:52 +00:00
divadsn
7492975a28 Removed deprecated class ImageGallery
Bug: T61113
Change-Id: If315002ef7d1a3937f150d0dda930976c1d95f57
2017-01-01 15:56:55 +00:00
pppery
7fd737c4aa Add showThumbnails option to slideshow galleries
This option causes the thumbnail images for the slideshow to be visible
as soon as the slideshow is loaded. They can still be closed normally.`

Bug: T147913
Change-Id: Iae6fd4f016d9fc98280d4ba92e4332ff06e1fb9e
2016-12-20 20:07:14 +00:00
Arlo Breault
9da9ca5f96 Clarify comment in traditional gallery
Change-Id: I13aa2132d64a1dca8a5ab867fdffc48aca2cf9d1
2016-09-19 12:24:56 -07:00
jenkins-bot
df5e7c3aa0 Merge "Truncate gallery caption filenames with CSS" 2016-07-18 23:39:30 +00:00
Ed Sanders
af7ffaeeec Rename 'slider' gallery mode to 'slideshow'
Bug: T140093
Change-Id: I6f01344b9ac61e3d2a8e7a9d920ba37786537ff8
2016-07-12 14:48:58 +01:00
Ed Sanders
486027d7d5 Truncate gallery caption filenames with CSS
Bug: T139766
Change-Id: Iba7efb8f89e132b8eb39f3c9ba76d2b1a9181b2f
2016-07-09 14:21:12 +01:00
Prateek Saxena
e3aa36ddee Gallery: Add new slider mode
Bug: T128429
Change-Id: I14cac38cf1c66d9ba9584772a1cd3f345731b2af
2016-07-07 09:11:32 -07:00
Kunal Mehta
b9d4bc7824 TraditionalImageGallery: Preload Titles being linked into LinkCache
Change-Id: Ie8b2508a52c1c1476f34f0b8e16184bed15310e1
2016-05-19 19:08:03 -07:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Arlo Breault
3d8bb2923e Fix typo
Change-Id: Ifcea7b157dd1c22f45d03627c8bb0d42da548f79
2016-01-24 10:14:04 -08:00
umherirrender
9d6357bed1 PHP 7 compatibility: Fix variable interpolation in ImageGalleryBase.php
Bug: T115249
Change-Id: I772553cbddad4aa9296ad88877426e31b3d38bbb
2015-12-03 18:59:56 +01:00
umherirrender
5311afb6a4 phpcs: Assignment expression not allowed
Fix some "Assignment expression not allowed"

Found by tests:
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/2736/consoleFull

Change-Id: Ibfc62b0aaa5c7fa63081edea3ef2b4d0dc984f85
2015-11-18 19:39:19 +01:00
umherirrender
0c3a9674cf Load 'mediawiki.page.gallery.styles' also without javascript
Using OutputPage::addModules lets the style loaded over javascript
Using OutputPage::addModuleStyles forces loading over css

Follows I32697c2c65824d7622c1840330d6074ebb68b488

Bug: T117328
Change-Id: I3ddf105d180336b6eb7ae31286221151055e649f
2015-10-31 17:33:15 +00:00
umherirrender
27700d276f Load module mediawiki.page.gallery.styles for all ImageGalleries
Move the added module from Parser.php to TraditionalImageGallery,
because there the gallerybox class is added to the html and at the
moment all core image galleries are extending the traditional one.

That brings the styles back for special pages like Special:NewFiles,
Special:MostImages and also on category pages with media files.

Follows Ib1aef04dc4fece78e6615386ecaef6a9f368f49e

Bug: T113511
Change-Id: I32697c2c65824d7622c1840330d6074ebb68b488
2015-09-24 16:46:47 +02:00
umherirrender
e3d610bba2 Pass context to parent constructor in PackedImageGallery
This avoids a "ContextSource::getContext called without context."

Change-Id: Ib17139d4be3bf990acff1a1a435d6a7437b6f443
2015-07-11 11:35:34 +02:00
Alex Monk
e7c9096ecc HTTPS-ify links to Wikimedia's sites in MW core source
See https://blog.wikimedia.org/2015/06/12/securing-wikimedia-sites-with-https/

Ignoring SVN stuff because svn.wikimedia.org's SSL certificate has expired, and
ignoring wgSharedUploadPath because T25122 wants to get rid of it.

Also a couple of BZ -> phab changes

Change-Id: I02fd23ac6c30a4a4c718e57d4dedbc693dd653c0
2015-06-13 19:23:23 +01:00
Brian Wolff
06c9f3ae7f Add srcset for images in <gallery>
Bug: T64709
Change-Id: I476beb6cf072c5a38570143d1f56baa3f49d23d4
2015-02-25 19:52:06 -04:00
Kunal Mehta
364890d3d4 Make ImageGalleryBase member variables protected
This was supposed to have happened in 1.24, but oh well.

Follows up 0804f31c1c.

Change-Id: I1ff42f108d0955fd93e7ff7212cd5c1236cd944a
2015-02-04 11:28:29 -08:00
Florianschmidtwelzow
03bf64c84c Really allow Extensions to make a new gallery format
Adjust GalleryGetModes call to fit Hooks::run() signature.

Follow up: I33462a8b52502ed76aeb163b66e3704c8618ba23

Change-Id: I916dade31d6d67de4bb82582cc71585e83fec1c9
2014-12-22 19:09:52 +00:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
Brian Wolff
6869f5613b Add missing </div> tag to packed-overlay galleries
Bug: 71030
Change-Id: I7a1781797498b079137becee68f81bf478e6f10e
2014-09-19 00:28:02 -03:00
umherirrender
7c6a25856c Add missing @return to function docs
Change-Id: I45b9d02f94ecc58372268ec5e6a0b572a0b7e2a9
2014-08-23 23:14:57 +02:00
umherirrender
a5ed2df445 Use config instead of globals for ImageGallery
Have to pass a context to the constructor to acutally use it for
settings.

Also adds a RequestContext::getMainAndWarn to get a default warning,
when using the main request, but it would be better to pass one.

Change-Id: I1628a1790c45d44aa4239701486b8b1b7c59a0e6
2014-08-22 22:36:59 +02:00
umherirrender
3b2b6a2773 Add missing @param to function docs
Change-Id: I47fa96a976f55a1a93cb75397285edb8c7f4cd8a
2014-08-14 20:22:52 +02:00
umherirrender
b883e8c7c0 Cleanup some docs (includes/[e-l])
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I41a84e8e1dec39170aa655250325ffc485eaeaef
2014-07-24 19:43:03 +02:00
umherirrender
1051c349a0 Fix @deprecated of ImageGalleryBase
Follows-up 0804f31c1c. @deprecated "since", not "in".

Change-Id: I9f28fd431eb84258d89c34c7c1e3e8a90a594dba
2014-07-24 12:47:59 +00:00
Max Semenik
467f4affd1 New hook, AfterParserFetchFileAndTitle
It is needed for PageImages to collect information about galleries, improving results
for Commons mainspace.

Bug: 66510
Change-Id: I3136d648ef2c1841767db0ab33855cd168e3de3e
2014-07-01 17:40:11 -07:00
umherirrender
d1d37f0818 Remove ImageGalleryBase::useSkin() (deprecated since 1.18)
Change-Id: If1f92984bec36948a1149fffef765e7fa78cc26a
2014-06-25 16:46:16 +02:00
Mark A. Hershberger
0804f31c1c Add deprecation notices to recent s/var/public/ property changes.
See change I309cf46891223c5f1520e97b04d4ed315a300e7a for more
information.

Change-Id: I9fe5270f490657450ba2fcdb329abf66736f38c3
2014-05-10 08:35:20 -04:00
Mark A. Hershberger
d7f494c7be Make gallery properties publically accessible.
They were public in the previous release of MediaWiki (1.22), although
the visibility was not set explicitly.

See I779d5a683982dc25bc7cdd30addd5870f2a7efd0 and
https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/12

Change-Id: I309cf46891223c5f1520e97b04d4ed315a300e7a
2014-05-03 13:12:18 -04:00
Bartosz Dziewoński
59002d8935 Consistently use '@deprecated since <version>'
Variants included 'in <version>', 'as of <version>' and just the
version number.

Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.

Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
2014-04-15 22:18:19 +02:00
umherirrender
9c614ac02d Fixed some @params documentation
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: I8c9f30128b46086064326708a4878228ba459447
2014-04-14 19:52:18 +00:00
Siebrand Mazeland
f077c4b1d6 Update formatting
Change-Id: I18aff576262479c9bb1c56eb8e1d1aaae200e4b1
2014-02-06 09:27:05 +01:00
Siebrand Mazeland
bdd721886c Update type hints in TraditionalImageGallery
Change-Id: I09c7d15c8717277c0a84c63f1ebdbffb066d8910
2013-12-02 11:55:27 +01:00
Siebrand Mazeland
fd07e5e455 Declare visibility on class properties of ImageGalleryBase
Change-Id: I779d5a683982dc25bc7cdd30addd5870f2a7efd0
2013-11-25 06:40:50 +01:00
Siebrand Mazeland
3f9d374252 Update documentation for gallery related files
Change-Id: I113a5e055655aa4c99fa09e7ab5cc472815bf38c
2013-11-25 06:40:49 +01:00
Siebrand Mazeland
d3d3a966c5 Replace Linker::link() by linkKnown()
Change-Id: I70b15ea6352f65fcff70fcc85e743441e4fcab08
2013-11-25 06:40:47 +01:00
Siebrand Mazeland
77226ddee7 Remove commented out code
Change-Id: I5989410f8b97508b2b9a3af81f276a58bb18005a
2013-11-25 06:40:46 +01:00
Siebrand Mazeland
589875173b Break long lines in gallery classes
Change-Id: I49d9618155f0edc3fbeacc7bcec6351ada3886eb
2013-11-25 06:40:45 +01:00
Siebrand Mazeland
1e5ea537f8 Update formatting for gallery related files
Change-Id: Ib3381bca8a6c7fb28a3054d6b4f0493140c1cb75
2013-11-25 06:40:43 +01:00
umherirrender
2b980a226f The static declaration must come after the visibility declartion
Change-Id: I7f4646a5eb3acc7209b243c82a5a496daf82cf8f
2013-11-23 14:42:32 +01:00
umherirrender
5dbfd5bf80 Fixed spacing
- Removed trailing spaces in comments
- Removed multiple empty lines
- Removed space after object operator

Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2
2013-11-21 18:52:25 +00:00
jenkins-bot
74a782662a Merge "[New gallery] ignore perrow option in this mode, as doesn't make sense." 2013-08-26 18:28:20 +00:00
umherirrender
24bfde2710 Fix spacing and break some lines
Change-Id: Ia57685d8858e02e399ad5c75ce64d12609d340ac
2013-08-24 17:06:25 +02:00
Brian Wolff
7c4308d624 [New gallery] ignore perrow option in this mode, as doesn't make sense.
gallery in packed resizes images to have same height. Since the images
have dynamic height, its impossible to implement the perrow option
using a width: css rule.

Also fixes the option for the nolines mode, where it calculated
the row length wrong.

Change-Id: I99018e258d3eea93c8203cb0b6bb63bfed1c00b7
2013-08-23 16:24:32 -07:00
Brian Wolff
14b3f8767b New more slick gallery display
This extension adds a "mode" parameter to the gallery
tag, allowing different formats for the gallery tag
(galleries in the ui can be controlled by a global)
The added modes are:
*traditional - The original gallery
*nolines - Like the original, no borders, less padding
*packed - All images aligned by having same height.
  JS also justifies the images.
  (I think this one is the one that will go over best
  with users.)
*packed-overlay - like packed, but caption goes over
  top the image in a transloucent box.
*packed-hover - like packed-overlay, but caption only
  visible on hover. Degrades gracefully on screen
  readers, and falls back to packed-overlay if
  you are using a touch screen. I kind of like
  this mode when the caption is not that important
  (ex a category where its just the file name).

This also adds a hook to allow people to make their
own gallery version. I believe there would be interest
in this, as different people have done different
experiments. For example:
* Wikia: http://community.wikia.com/wiki/Help:Galleries,_Slideshows,_and_Sliders/wikitext
* Wikinews: https://en.wikinews.org/wiki/Template:Picture_select

What I would like to see for this patch, is first it gets
enabled, with the default still "traditional". After
about a month or two we consult with users. If feedback
is positive, we change the default mode to one of the
others (probably "packed").

Adds a "mode" parameter to gallery for different
mode, including one 'height-constrained-overlay'
which looks much more like other modern websites.

Note: This makes one change to the old gallery format.
It makes Nonexistent files be rendered like thumbnails
(i.e. they are rendered with a little grey border).

One thing I'm slightly worried about with this patch,
is that I added an option to MediaTransformOutput::toHtml
to override the width attribute. I'm not sure if that
is the best approach, and would appreciate thoughts
on that.

This should be merged at the same time as Ie82c1548

Change-Id: I33462a8b52502ed76aeb163b66e3704c8618ba23
2013-08-14 20:56:05 -03:00