Commit graph

25 commits

Author SHA1 Message Date
Ed Sanders
af7ffaeeec Rename 'slider' gallery mode to 'slideshow'
Bug: T140093
Change-Id: I6f01344b9ac61e3d2a8e7a9d920ba37786537ff8
2016-07-12 14:48:58 +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
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
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
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
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
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
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
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
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
Renamed from includes/ImageGallery.php (Browse further)