Index: trunk/extensions/Plotter/SmoothGallery.php |
— | — | @@ -1,152 +0,0 @@ |
2 | | -<?php |
3 | | -# Copyright (C) 2004 Ryan Lane <rlane32@gmail.com> |
4 | | -# |
5 | | -# This program is free software; you can redistribute it and/or modify |
6 | | -# it under the terms of the GNU General Public License as published by |
7 | | -# the Free Software Foundation; either version 2 of the License, or |
8 | | -# (at your option) any later version. |
9 | | -# |
10 | | -# This program is distributed in the hope that it will be useful, |
11 | | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | | -# GNU General Public License for more details. |
14 | | -# |
15 | | -# You should have received a copy of the GNU General Public License along |
16 | | -# with this program; if not, write to the Free Software Foundation, Inc., |
17 | | -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | | -# http://www.gnu.org/copyleft/gpl.html |
19 | | - |
20 | | -# SmoothGallery extension. Creates galleries of images that are in your wiki. |
21 | | -# |
22 | | -# SmoothGallery.php |
23 | | -# |
24 | | -# Extension info available at http://www.mediawiki.org/wiki/Extension:SmoothGallery |
25 | | -# SmoothGallery available at http://smoothgallery.jondesign.net/ |
26 | | -# |
27 | | -# sgallery Parser Function changes contributed by David Claughton <dave@eclecticdave.com> |
28 | | -# infopane sliding and opacity patch provided by David Claughton <dave@eclecticdave.com> |
29 | | - |
30 | | -if( !defined( 'MEDIAWIKI' ) ) |
31 | | - die( -1 ); |
32 | | - |
33 | | -/** |
34 | | - * Add extension information to Special:Version |
35 | | - */ |
36 | | -$wgExtensionCredits['other'][] = array( |
37 | | - 'path' => __FILE__, |
38 | | - 'name' => 'SmoothGallery parser extension', |
39 | | - 'version' => '1.1d', |
40 | | - 'author' => 'Ryan Lane', |
41 | | - 'description' => 'Allows users to create galleries with images that have been uploaded. Allows most options of SmoothGallery', |
42 | | - 'descriptionmsg' => 'smoothgallery-desc', |
43 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:SmoothGallery', |
44 | | -); |
45 | | - |
46 | | -$wgExtensionFunctions[] = "efSmoothGallery"; |
47 | | - |
48 | | -$wgHooks['OutputPageParserOutput'][] = 'smoothGalleryParserOutput'; |
49 | | -$wgHooks['LanguageGetMagic'][] = 'smoothGalleryLanguageGetMagic'; |
50 | | - |
51 | | -$dir = dirname(__FILE__) . '/'; |
52 | | -$wgExtensionMessagesFiles['SmoothGallery'] = $dir . 'SmoothGallery.i18n.php'; |
53 | | -$wgAutoloadClasses['SmoothGallery'] = $dir . 'SmoothGalleryClass.php'; |
54 | | -$wgAutoloadClasses['SmoothGalleryParser'] = $dir . 'SmoothGalleryParser.php'; |
55 | | - |
56 | | -//sane defaults. always initialize to avoid register_globals vulnerabilities |
57 | | -$wgSmoothGalleryDelimiter = "\n"; |
58 | | -$wgSmoothGalleryExtensionPath = $wgScriptPath . '/extensions/SmoothGallery'; |
59 | | -$wgSmoothGalleryAllowExternal = false; |
60 | | -$wgSmoothGalleryThumbHeight = "75px"; |
61 | | -$wgSmoothGalleryThumbWidth = "100px"; |
62 | | - |
63 | | -function efSmoothGallery() { |
64 | | - global $wgParser; |
65 | | - |
66 | | - $wgParser->setHook( 'sgallery', 'initSmoothGallery' ); |
67 | | - $wgParser->setHook( 'sgalleryset', 'initSmoothGallerySet' ); |
68 | | - |
69 | | - $wgParser->setFunctionHook( 'sgallery', 'initSmoothGalleryPF' ); |
70 | | -} |
71 | | - |
72 | | -function initSmoothGalleryPF( &$parser ) { |
73 | | - global $wgSmoothGalleryDelimiter; |
74 | | - |
75 | | - $numargs = func_num_args(); |
76 | | - if ( $numargs < 2 ) { |
77 | | - $input = "#SmoothGallery: no arguments specified"; |
78 | | - return str_replace( '§', '<', '§pre>§nowiki>' . $input . '§/nowiki>§/pre>' ); |
79 | | - } |
80 | | - |
81 | | - // fetch all user-provided arguments (skipping $parser) |
82 | | - $input = ""; |
83 | | - $argv = array(); |
84 | | - $arg_list = func_get_args(); |
85 | | - for ( $i = 1; $i < $numargs; $i++ ) { |
86 | | - $p1 = $arg_list[$i]; |
87 | | - |
88 | | - $aParam = explode( '=', $p1, 2 ); |
89 | | - if ( count( $aParam ) < 2 ) { |
90 | | - continue; |
91 | | - } |
92 | | - SmoothGallery::debug( 'sgallery tag parameter: ', $aParam ); |
93 | | - if ( $aParam[0] == "imagelist" ) { |
94 | | - $input = $aParam[1]; |
95 | | - continue; |
96 | | - } |
97 | | - $sKey = trim( $aParam[0] ); |
98 | | - $sVal = trim( $aParam[1] ); |
99 | | - |
100 | | - if ( $sKey != '' ){ |
101 | | - $argv[$sKey] = $sVal; |
102 | | - } |
103 | | - } |
104 | | - |
105 | | - $output = initSmoothGallery( $input, $argv, $parser ); |
106 | | - return array( $output, 'noparse' => true, 'isHTML' => true); |
107 | | -} |
108 | | - |
109 | | -function initSmoothGallery( $input, $argv, &$parser, $calledAsSet=false ) { |
110 | | - $sgParser = new SmoothGalleryParser( $input, $argv, $parser, $calledAsSet ); |
111 | | - $sgGallery = new SmoothGallery(); |
112 | | - |
113 | | - $sgGallery->setParser( $parser ); |
114 | | - $sgGallery->setSet( $calledAsSet ); |
115 | | - $sgGallery->setArguments( $sgParser->getArguments() ); |
116 | | - $sgGallery->setGalleries( $sgParser->getGalleries() ); |
117 | | - |
118 | | - $sgGallery->checkForErrors(); |
119 | | - if ( $sgGallery->hasErrors() ) { |
120 | | - return $sgGallery->getErrors(); |
121 | | - } else { |
122 | | - return $sgGallery->toHTML(); |
123 | | - } |
124 | | -} |
125 | | - |
126 | | -function initSmoothGallerySet( $input, $args, &$parser ) { |
127 | | - $output = initSmoothGallery( $input, $args, $parser, true ); |
128 | | - |
129 | | - return $output; |
130 | | -} |
131 | | - |
132 | | -/** |
133 | | - * Hook callback that injects messages and things into the <head> tag |
134 | | - * Does nothing if $parserOutput->mSmoothGalleryTag is not set |
135 | | - */ |
136 | | -function smoothGalleryParserOutput( &$outputPage, &$parserOutput ) { |
137 | | - if ( !empty( $parserOutput->mSmoothGalleryTag ) ) { |
138 | | - SmoothGallery::setGalleryHeaders( $outputPage ); |
139 | | - } |
140 | | - if ( !empty( $parserOutput->mSmoothGallerySetTag ) ) { |
141 | | - SmoothGallery::setGallerySetHeaders( $outputPage ); |
142 | | - } |
143 | | - return true; |
144 | | -} |
145 | | - |
146 | | -/** |
147 | | - * We ignore langCode - parser function names can be translated but |
148 | | - * we are not using this feature |
149 | | - */ |
150 | | -function smoothGalleryLanguageGetMagic( &$magicWords, $langCode ) { |
151 | | - $magicWords['sgallery'] = array(0, 'sgallery'); |
152 | | - return true; |
153 | | -} |
Index: trunk/extensions/Plotter/jd.gallery.css.patch |
— | — | @@ -1,40 +0,0 @@ |
2 | | -+++ jd.gallery.css 2007-03-16 19:07:02.000000000 -0500 |
3 | | -@@ -81,7 +81,7 @@ |
4 | | - .jdGallery div.carouselContainer |
5 | | - { |
6 | | - position: absolute; |
7 | | -- height: 135px; |
8 | | -+ height: 160px; |
9 | | - width: 100%; |
10 | | - z-index: 10; |
11 | | - margin: 0px; |
12 | | -@@ -111,7 +111,7 @@ |
13 | | - margin: 0px; |
14 | | - left: 0; |
15 | | - top: 0; |
16 | | -- height: 115px; |
17 | | -+ height: 140px; |
18 | | - background: #333; |
19 | | - color: #fff; |
20 | | - text-indent: 0; |
21 | | -@@ -122,7 +122,7 @@ |
22 | | - { |
23 | | - position: absolute; |
24 | | - width: 100%; |
25 | | -- height: 78px; |
26 | | -+ height: 123px; |
27 | | - top: 10px; |
28 | | - left: 0; |
29 | | - overflow: hidden; |
30 | | -@@ -212,8 +212,10 @@ |
31 | | - { |
32 | | - left: 0; |
33 | | - top: 0; |
34 | | -+ /* |
35 | | - width: 100%; |
36 | | - height: 100%; |
37 | | -+ */ |
38 | | - } |
39 | | - |
40 | | - .withArrows a.open |
Index: trunk/extensions/Plotter/jd.gallery.js.patch |
— | — | @@ -1,12 +0,0 @@ |
2 | | -+++ jd.gallery.js 2007-03-16 19:10:20.000000000 -0500 |
3 | | -@@ -315,7 +315,8 @@ |
4 | | - |
5 | | - this.constructThumbnails(); |
6 | | - |
7 | | -- this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing)) - this.options.thumbSpacing + this.options.thumbWidth) + "px"; |
8 | | -+ /*this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing)) - this.options.thumbSpacing + this.options.thumbWidth) + "px";*/ |
9 | | -+ this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing + 8)) + this.options.thumbSpacing) + "px"; |
10 | | - }, |
11 | | - toggleCarousel: function() { |
12 | | - if (this.carouselActive) |
Index: trunk/extensions/Plotter/SmoothGalleryClass.php |
— | — | @@ -1,335 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class SmoothGallery { |
5 | | - |
6 | | - var $parser; |
7 | | - var $set; |
8 | | - var $argumentArray, $galleriesArray; |
9 | | - var $errors; |
10 | | - |
11 | | - function hasErrors() { |
12 | | - if ( $this->errors == '' ) { |
13 | | - return false; |
14 | | - } else { |
15 | | - return true; |
16 | | - } |
17 | | - } |
18 | | - |
19 | | - function getErrors() { |
20 | | - return $this->errors; |
21 | | - } |
22 | | - |
23 | | - function checkForErrors() { |
24 | | - foreach ( $this->galleriesArray["galleries"] as $galleryArray ) { |
25 | | - //We are being harsh for gallery sets. |
26 | | - //If even one gallery is missing all images, we |
27 | | - //are going to return an error to the user. |
28 | | - if ( !isset( $galleryArray["images"] ) ) { |
29 | | - wfLoadExtensionMessages( 'SmoothGallery' ); |
30 | | - $error = wfMsg( "smoothgallery-error" ); |
31 | | - |
32 | | - if ( isset( $galleryArray["missing_images"] ) && isset( $galleryArray["invalid_images"] ) ) { |
33 | | - $error .= wfMsg( "smoothgallery-no-images", implode( ", " , $galleryArray["missing_images"] , count($galleryArray["missing_images"]) , count($galleryArray["missing_images"]) + count($galleryArray["invalid_images"]) ) ); // FIXME: 3rd (last) parameter should have the number of good images added. |
34 | | - $error .= wfMsg( "smoothgallery-invalid-images", implode( ", " , $galleryArray["invalid_images"] , count($galleryArray["invalid_images"]) ) ); |
35 | | - } else if ( isset( $galleryArray["invalid_images"] ) ) { |
36 | | - $error .= wfMsg( "smoothgallery-invalid-images", implode( ", " , $galleryArray["invalid_images"] , count($galleryArray["invalid_images"]) ) ); |
37 | | - } else if ( isset( $galleryArray["missing_images"] ) ) { |
38 | | - $error .= wfMsg( "smoothgallery-no-images", implode( ", " , $galleryArray["missing_images"] , count($galleryArray["missing_images"]) , count($galleryArray["missing_images"]) ) ); // FIXME: 3rd (last) parameter should have the number of good images added. |
39 | | - } else { |
40 | | - $error .= wfMsg( "smoothgallery-not-found" ); |
41 | | - } |
42 | | - |
43 | | - if ( $this->errors == '' ) { |
44 | | - $this->errors = $error; |
45 | | - } else { |
46 | | - $this->errors .= "<br />" . $error; |
47 | | - } |
48 | | - } |
49 | | - } |
50 | | - |
51 | | - } |
52 | | - |
53 | | - function setArguments( $argumentArray ) { |
54 | | - $this->argumentArray = $argumentArray; |
55 | | - } |
56 | | - |
57 | | - function setGalleries( $galleriesArray ) { |
58 | | - $this->galleriesArray = $galleriesArray; |
59 | | - } |
60 | | - |
61 | | - function setParser( &$parser ) { |
62 | | - $this->parser = $parser; |
63 | | - } |
64 | | - |
65 | | - function setSet( $calledAsSet ) { |
66 | | - $this->set = $calledAsSet; |
67 | | - } |
68 | | - |
69 | | - function toHTML () { |
70 | | - $output = ''; |
71 | | - $fallbackOutput = ''; |
72 | | - |
73 | | - if ( $this->set ) { |
74 | | - //Open the div, and initialize any needed variables |
75 | | - $output = '<div id="' . $this->galleriesArray["gallery_set_name"] . '" style="width: ' . $this->argumentArray["width"] . ';height: ' . $this->argumentArray["height"] . '; display: none;" >'; |
76 | | - |
77 | | - //iterate through galleries, call renderGallery on each, and |
78 | | - //collect the fallback output |
79 | | - $i = 1; |
80 | | - foreach ( $this->galleriesArray["galleries"] as $galleryArray ) { |
81 | | - $output .= $this->renderGallery( $galleryArray ); |
82 | | - $fallbackOutput .= $this->renderFallback( $galleryArray ); |
83 | | - $i++; |
84 | | - } |
85 | | - |
86 | | - $output .= '</div>'; |
87 | | - $output .= '<div id="' . $this->galleriesArray["gallery_set_name"] . '-fallback">' . $fallbackOutput . '</div>'; |
88 | | - $output .= $this->renderJavascript( $this->galleriesArray["gallery_set_name"] ); |
89 | | - } else { |
90 | | - $output = $this->renderGallery( $this->galleriesArray["galleries"][0] ); |
91 | | - $output .= $this->renderFallback( $this->galleriesArray["galleries"][0] ); |
92 | | - $output .= $this->renderJavascript( $this->galleriesArray["galleries"][0]["gallery_name"] ); |
93 | | - } |
94 | | - |
95 | | - # flags for use by smoothGalleryParserOutput |
96 | | - $this->parser->mOutput->mSmoothGalleryTag = true; |
97 | | - if ( $this->set ) { |
98 | | - $this->parser->mOutput->mSmoothGallerySetTag = true; |
99 | | - } |
100 | | - |
101 | | - //Finished, let's send it out |
102 | | - return $output; |
103 | | - } |
104 | | - |
105 | | - function renderGallery ( $galleryArray ) { |
106 | | - global $wgSmoothGalleryDelimiter; |
107 | | - global $wgSmoothGalleryThumbHeight, $wgSmoothGalleryThumbWidth; |
108 | | - |
109 | | - //Open the outer div of the gallery |
110 | | - if ( $this->set ) { |
111 | | - $output = '<div id="' . $galleryArray["gallery_name"] . '" class="galleryElement">'; |
112 | | - $output .= '<h2>' . $galleryArray["gallery_name"] . '<h2>'; |
113 | | - } else { |
114 | | - $output = '<div id="' . $galleryArray["gallery_name"] . '" style="width: ' . $this->argumentArray["width"] . ';height: ' . $this->argumentArray["height"] . '; display:none;">'; |
115 | | - } |
116 | | - |
117 | | - //TODO iterate over the images and output each |
118 | | - foreach ( $galleryArray["images"] as $imageArray ) { |
119 | | - if ( isset( $imageArray["external"] ) && $imageArray["external"] ) { |
120 | | - $thumbsizes = 'height="' . $wgSmoothGalleryThumbHeight . '" width="' . $wgSmoothGalleryThumbWidth . '" '; |
121 | | - $fullsizes = 'height="' . $this->argumentArray["height"] . '" width="' . $this->argumentArray["width"] . '" '; |
122 | | - } else { |
123 | | - $thumbsizes = ''; |
124 | | - $fullsizes = ''; |
125 | | - } |
126 | | - //Add the html for the image |
127 | | - $output .= '<div class="imageElement">'; |
128 | | - $output .= '<h3>' . $imageArray["heading"] . '</h3>'; |
129 | | - $output .= '<p>' . $imageArray["description"] . '</p>'; |
130 | | - $output .= '<a href="' . $imageArray["full_url"] . '" title="open image" class="open"></a>'; |
131 | | - $output .= '<a href="' . $imageArray["view_url"] . '" title="open image" class="open"></a>'; |
132 | | - $output .= '<img src="' . $imageArray["full_thumb_url"] . '" class="full" alt="' . $imageArray["description"] . '" ' . $fullsizes . '/>'; |
133 | | - |
134 | | - if ( $this->argumentArray["carousel"] ) { |
135 | | - $output .= '<img src="' . $imageArray["icon_thumb_url"] . '" class="thumbnail" alt="' . $imageArray["description"] . '" ' . $thumbsizes . '/>'; |
136 | | - } |
137 | | - |
138 | | - $output .= '</div>'; |
139 | | - } |
140 | | - |
141 | | - |
142 | | - //Close the outer div of the gallery |
143 | | - $output .= '</div>'; |
144 | | - |
145 | | - return $output; |
146 | | - } |
147 | | - |
148 | | - function renderFallback ( $galleryArray ) { |
149 | | - $output = ''; |
150 | | - |
151 | | - if ( !isset( $galleryArray["images"] ) ) { |
152 | | - return $output; |
153 | | - } |
154 | | - |
155 | | - if ( $this->argumentArray["fallback"] == "image" ) { |
156 | | - if ( !isset( $galleryArray["images"][0] ) ) { |
157 | | - return ''; |
158 | | - } |
159 | | - |
160 | | - $output .= '<div id="' . $galleryArray['gallery_name'] . '-fallback" class="MediaWikiSGallerySingleImage" style="width: ' . $this->argumentArray["width"] . ';height: ' . $this->argumentArray["height"] . ';" alt="' . $galleryArray["images"][0]["description"] . '">'; |
161 | | - $output .= '<img src="' . $galleryArray["images"][0]["full_thumb_url"] . '" class="full" alt="' . $galleryArray["images"][0]["description"] . '" />'; |
162 | | - $output .= '</div>'; |
163 | | - } elseif ( $this->argumentArray["fallback"] == "image-warn" ) { |
164 | | - if ( !isset( $galleryArray["images"][0] ) ) { |
165 | | - return ''; |
166 | | - } |
167 | | - |
168 | | - $output .= '<div id="' . $galleryArray['gallery_name'] . '-fallback" class="MediaWikiSGalleryWarning" style="width: ' . $this->argumentArray["width"] . ';height: ' . $this->argumentArray["height"] . ';" alt="' . $galleryArray["images"][0]["description"] . '">'; |
169 | | - |
170 | | - wfLoadExtensionMessages( 'SmoothGallery' ); |
171 | | - $output .= wfMsg("smoothgallery-javascript-disabled"); |
172 | | - |
173 | | - $output .= '<div class="MediaWikiSGallerySingleImage">'; |
174 | | - $output .= '<img src="' . $galleryArray["images"][0]["full_thumb_url"] . '" class="full" alt="' . $galleryArray["images"][0]["description"] . '" />'; |
175 | | - $output .= '</div></div>'; |
176 | | - } else { |
177 | | - $output .= $this->renderPlainGallery ( $galleryArray ); |
178 | | - } |
179 | | - |
180 | | - return $output; |
181 | | - } |
182 | | - |
183 | | - function renderPlainGallery ( $galleryArray ) { |
184 | | - global $wgVersion; |
185 | | - |
186 | | - if ( !isset( $galleryArray["images"] ) ) { |
187 | | - return ''; |
188 | | - } |
189 | | - |
190 | | - //Wrapper div for plain old gallery, to be shown per default, if JS is off. |
191 | | - $output = '<div id="' . $galleryArray["gallery_name"] . '-fallback">'; |
192 | | - |
193 | | - $plain_gallery = new ImageGallery(); |
194 | | - |
195 | | - $i = 0; |
196 | | - foreach ( $galleryArray["images"] as $image ) { |
197 | | - if ( isset( $image["external"] ) && $image["external"] ) { |
198 | | - continue; |
199 | | - } |
200 | | - |
201 | | - if ( version_compare( $wgVersion, "1.11", '<' ) ) { |
202 | | - $plain_gallery->add( $image["image_object"], $image["description"] ); //TODO: use text |
203 | | - } else { |
204 | | - $plain_gallery->add( $image["image_object"]->getTitle(), $image["description"] ); //TODO: use text |
205 | | - } |
206 | | - $i++; |
207 | | - } |
208 | | - |
209 | | - // Return an empty div if there are no usable images in the gallery. |
210 | | - // This can happen if all images are external. |
211 | | - if ( $i == 0 ) { |
212 | | - return $output . '</div>'; |
213 | | - } |
214 | | - |
215 | | - $output .= $plain_gallery->toHTML(); |
216 | | - |
217 | | - //Close the wrapper div for the plain old gallery |
218 | | - $output .= '</div>'; |
219 | | - |
220 | | - return $output; |
221 | | - } |
222 | | - |
223 | | - function renderJavascript ( $name ) { |
224 | | - //Output the javascript needed for the gallery with any |
225 | | - //options the user requested |
226 | | - $output = '<script type="text/javascript">'; |
227 | | - |
228 | | - $output .= 'document.getElementById("' . $name . '-fallback").style.display = "none";'; //hide plain gallery |
229 | | - $output .= 'document.getElementById("' . $name . '").style.display = "block";'; //show smooth gallery |
230 | | - |
231 | | - $output .= 'function startGallery_' . $name . '() {'; |
232 | | - if ( $this->set ) { |
233 | | - $output .= "var MediaWikiSGallerySet = new gallerySet($('" . $name . "'), {"; |
234 | | - } else { |
235 | | - $output .= "var MediaWikiSGallery = new gallery($('" . $name . "'), {"; |
236 | | - } |
237 | | - |
238 | | - $output .= 'thumbWidth: 100, thumbHeight: 75'; //would be nice if we could change this to 120x120 to re-use thumbnails... |
239 | | - |
240 | | - //Add user provided options |
241 | | - if ( $this->argumentArray["timed"] ) { |
242 | | - $output .= ', timed: true'; |
243 | | - $output .= ', delay: ' . $this->argumentArray["delay"]; |
244 | | - } |
245 | | - |
246 | | - if ( !$this->argumentArray["carousel"] ) { |
247 | | - $output .= ', showCarousel: false'; |
248 | | - } |
249 | | - |
250 | | - if ( !$this->argumentArray["showarrows"] ) { |
251 | | - $output .= ', showArrows: false'; |
252 | | - } |
253 | | - |
254 | | - if ( !$this->argumentArray["showinfopane"] ) { |
255 | | - $output .= ', showInfopane: false'; |
256 | | - } |
257 | | - |
258 | | - if ( !$this->argumentArray["slideinfozoneslide"] ) { |
259 | | - $output .= ', slideInfoZoneSlide: false'; |
260 | | - } |
261 | | - |
262 | | - if ( $this->argumentArray["slideinfozoneopacity"] ) { |
263 | | - $output .= ', slideInfoZoneOpacity: ' . $this->argumentArray["slideinfozoneopacity"]; |
264 | | - } |
265 | | - |
266 | | - #$output .= ', useHistoryManager: true'; |
267 | | - #$output .= ', preloader: true'; |
268 | | - #$output .= ', preloaderImage: true'; |
269 | | - #$output .= ', preloaderErrorImage: true'; |
270 | | - #$output .= ', carouselPreloader: true'; |
271 | | - #$output .= ", textPreloadingCarousel: '" . wfMsg("smoothgallery-loading") . "'"; |
272 | | - |
273 | | - $output .= '});'; |
274 | | - #$output .= 'HistoryManager.start();'; |
275 | | - $output .= '}'; |
276 | | - $output .= "window.addEvent('domready', startGallery_$name);"; |
277 | | - #$output .= 'addOnloadHook(startGallery_' . $name . ');'; |
278 | | - $output .= '</script>'; |
279 | | - |
280 | | - return $output; |
281 | | - } |
282 | | - |
283 | | - static function setGalleryHeaders( &$outputPage ) { |
284 | | - global $wgSmoothGalleryExtensionPath; |
285 | | - |
286 | | - $extensionpath = $wgSmoothGalleryExtensionPath; |
287 | | - |
288 | | - //Add mootools (required by SmoothGallery) |
289 | | - //You can use the compressed js if you want, but I |
290 | | - //generally don't trust them unless I wrote them myself |
291 | | - $outputPage->addScript( '<script src="' . $extensionpath . '/scripts/mootools.uncompressed.js" type="text/javascript"></script>' ); |
292 | | - |
293 | | - //Add SmoothGallery javascript |
294 | | - $outputPage->addScript( '<script src="' . $extensionpath . '/scripts/jd.gallery.js" type="text/javascript"></script>' ); |
295 | | - $outputPage->addScript( '<script src="' . $extensionpath . '/scripts/HistoryManager.js" type="text/javascript"></script>' ); |
296 | | - |
297 | | - //Add SmoothGallery css |
298 | | - $outputPage->addLink( |
299 | | - array( |
300 | | - 'rel' => 'stylesheet', |
301 | | - 'type' => 'text/css', |
302 | | - 'href' => $extensionpath . '/css/jd.gallery.css' |
303 | | - ) |
304 | | - ); |
305 | | - |
306 | | - #$outputPage->addScript( '<link rel="stylesheet" href="' . $extensionpath . '/css/jd.gallery.css" type="text/css" media="screen" charset="utf-8" />' ); |
307 | | - |
308 | | - $outputPage->addScript( '<style type="text/css">.jdGallery .slideInfoZone { overflow:auto ! important; }</style>' ); |
309 | | - |
310 | | - return true; |
311 | | - } |
312 | | - |
313 | | - static function setGallerySetHeaders( &$outputPage ) { |
314 | | - global $wgSmoothGalleryExtensionPath; |
315 | | - |
316 | | - $extensionpath = $wgSmoothGalleryExtensionPath; |
317 | | - $outputPage->addScript( '<script src="' . $extensionpath . '/scripts/jd.gallery.set.js" type="text/javascript"></script>' ); |
318 | | - |
319 | | - return true; |
320 | | - } |
321 | | - |
322 | | - static function debug( $debugText, $debugArr = null ) { |
323 | | - global $wgSmoothGalleryDebug; |
324 | | - |
325 | | - if ( isset( $debugArr ) ) { |
326 | | - if ( $wgSmoothGalleryDebug > 0 ) { |
327 | | - $text = $debugText . " " . implode( "::", $debugArr ); |
328 | | - wfDebugLog( 'sgallery', $text, false ); |
329 | | - } |
330 | | - } else { |
331 | | - if ( $wgSmoothGalleryDebug > 0 ) { |
332 | | - wfDebugLog( 'sgallery', $debugText, false ); |
333 | | - } |
334 | | - } |
335 | | - } |
336 | | -} |
Index: trunk/extensions/Plotter/SmoothGalleryParser.php |
— | — | @@ -1,330 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class SmoothGalleryParser { |
5 | | - |
6 | | - var $set; |
7 | | - var $argumentArray; |
8 | | - var $galleriesArray; |
9 | | - |
10 | | - function SmoothGalleryParser( $input, $argv, &$parser, $calledAsSet=false ) { |
11 | | - $this->set = $calledAsSet; |
12 | | - $this->parseArguments( $argv ); |
13 | | - $this->parseGalleries( $input, $parser ); |
14 | | - } |
15 | | - |
16 | | - function getArguments() { |
17 | | - return $this->argumentArray; |
18 | | - } |
19 | | - |
20 | | - function getGalleries() { |
21 | | - return $this->galleriesArray; |
22 | | - } |
23 | | - |
24 | | - function parseArguments( $argv ) { |
25 | | - //Parse arguments, set defaults, and do sanity checks |
26 | | - if ( isset( $argv["height"] ) && is_numeric( $argv["height"] ) ) { |
27 | | - $this->argumentArray["height"] = $argv["height"] . "px"; |
28 | | - } else { |
29 | | - $this->argumentArray["height"] = "300px"; |
30 | | - } |
31 | | - |
32 | | - if ( isset( $argv["width"] ) && is_numeric( $argv["width"] ) ) { |
33 | | - $this->argumentArray["width"] = $argv["width"] . "px"; |
34 | | - } else { |
35 | | - $this->argumentArray["width"] = "400px"; |
36 | | - } |
37 | | - |
38 | | - if ( isset( $argv["showcarousel"] ) && $argv["showcarousel"] == "false" ) { |
39 | | - $this->argumentArray["carousel"] = false; |
40 | | - } else { |
41 | | - $this->argumentArray["carousel"] = true; |
42 | | - } |
43 | | - |
44 | | - if ( isset( $argv["timed"] ) && $argv["timed"] == "true" ) { |
45 | | - $this->argumentArray["timed"] = true; |
46 | | - } else { |
47 | | - $this->argumentArray["timed"] = false; |
48 | | - } |
49 | | - |
50 | | - if ( isset( $argv["delay"] ) && is_numeric($argv["delay"]) ) { |
51 | | - $this->argumentArray["delay"] = $argv["delay"]; |
52 | | - } else { |
53 | | - $this->argumentArray["delay"] = "9000"; |
54 | | - } |
55 | | - |
56 | | - if ( isset( $argv["showarrows"] ) && $argv["showarrows"] == "false" ) { |
57 | | - $this->argumentArray["showarrows"] = false; |
58 | | - } else { |
59 | | - $this->argumentArray["showarrows"] = true; |
60 | | - } |
61 | | - |
62 | | - if ( isset( $argv["showinfopane"] ) && $argv["showinfopane"] == "false" ) { |
63 | | - $this->argumentArray["showinfopane"] = false; |
64 | | - } else { |
65 | | - $this->argumentArray["showinfopane"] = true; |
66 | | - } |
67 | | - |
68 | | - if ( isset( $argv["slideinfozoneslide"] ) && $argv["slideinfozoneslide"] == "false" ) { |
69 | | - $this->argumentArray["slideinfozoneslide"] = false; |
70 | | - } else { |
71 | | - $this->argumentArray["slideinfozoneslide"] = true; |
72 | | - } |
73 | | - |
74 | | - if ( isset( $argv["slideinfozoneopacity"] ) && is_numeric($argv["slideinfozoneopacity"]) ) { |
75 | | - $this->argumentArray["slideinfozoneopacity"] = $argv["slideinfozoneopacity"]; |
76 | | - } else { |
77 | | - $this->argumentArray["slideinfozoneopacity"] = "0.7"; |
78 | | - } |
79 | | - |
80 | | - if ( isset( $argv["fallback"] ) ) { |
81 | | - $this->argumentArray["fallback"] = htmlspecialchars( $argv["fallback"] ); |
82 | | - } else { |
83 | | - $this->argumentArray["fallback"] = "gallery"; |
84 | | - } |
85 | | - |
86 | | - if ( isset( $argv["nolink"] ) && $argv["nolink"] == "true" ) { |
87 | | - $this->argumentArray["nolink"] = true; |
88 | | - } else { |
89 | | - $this->argumentArray["nolink"] = false; |
90 | | - } |
91 | | - } |
92 | | - |
93 | | - function parseGalleries( $input, $parser ) { |
94 | | - $this->galleriesArray = Array(); |
95 | | - |
96 | | - if ( $this->set ) { |
97 | | - //This isn't currently working right, I need to enter |
98 | | - //a bug report with smooth gallery, so we'll leave |
99 | | - //the name alone for now. |
100 | | - #$this->galleriesArray["gallery_set_name"] = "MediaWikiSGallerySet" . mt_rand(); |
101 | | - $this->galleriesArray["gallery_set_name"] = "MediaWikiSGallerySet"; |
102 | | - |
103 | | - //parse set into separate galleries |
104 | | - preg_match_all( "/<sgallery([\w]+)?[^>]*>(.*)<\/sgallery>/smU", $input, $galleries, PREG_SET_ORDER ); |
105 | | - |
106 | | - //iterate through galleries, call renderGallery on each, and |
107 | | - //collect the fallback output |
108 | | - $i = 0; |
109 | | - foreach ( $galleries as $galleryInput ) { |
110 | | - //TOFIX: |
111 | | - //This couldn't possibly be right... If these are different |
112 | | - //galleries in a gallery set, shouldn't they have unique names? |
113 | | - $name = "MediaWikiSGallery" . $i; |
114 | | - |
115 | | - $this->galleriesArray["galleries"][$i] = $this->parseGallery( $galleryInput[2], $parser ); |
116 | | - $this->galleriesArray["galleries"][$i]["gallery_name"] = $name; |
117 | | - |
118 | | - $i++; |
119 | | - } |
120 | | - } else { |
121 | | - $name = "MediaWikiSGallery" . mt_rand(); |
122 | | - |
123 | | - $this->galleriesArray["galleries"][0] = $this->parseGallery( $input, $parser); |
124 | | - $this->galleriesArray["galleries"][0]["gallery_name"] = $name; |
125 | | - } |
126 | | - |
127 | | - return $this->galleriesArray; |
128 | | - } |
129 | | - |
130 | | - function parseGallery( $input, $parser ) { |
131 | | - global $wgTitle; |
132 | | - global $wgSmoothGalleryDelimiter; |
133 | | - global $wgSmoothGalleryAllowExternal; |
134 | | - |
135 | | - $galleryArray = Array(); |
136 | | - |
137 | | - //Expand templates in the input |
138 | | - $input = $parser->recursiveTagParse( $input ); |
139 | | - |
140 | | - //The image array is a delimited list of images (strings) |
141 | | - $line_arr = preg_split( "/$wgSmoothGalleryDelimiter/", $input, -1, PREG_SPLIT_NO_EMPTY ); |
142 | | - |
143 | | - foreach ( $line_arr as $line ) { |
144 | | - $img_arr = explode( "|", $line, 2 ); |
145 | | - $img = $img_arr[0]; |
146 | | - if ( count( $img_arr ) > 1 ) { |
147 | | - $img_desc = $img_arr[1]; |
148 | | - } else { |
149 | | - $img_desc = ''; |
150 | | - } |
151 | | - |
152 | | - if ( $wgSmoothGalleryAllowExternal && |
153 | | - ( ( strlen( $img ) >= 7 && substr( $img, 0, 7 ) == "http://" ) || |
154 | | - ( strlen( $img ) >= 7 && substr( $img, 0, 8 ) == "https://" ) ) |
155 | | - ) { |
156 | | - $imageArray["title"] = null; |
157 | | - //TODO: internationalize |
158 | | - $imageArray["heading"] = "External Image"; |
159 | | - $imageArray["description"] = $img_desc; |
160 | | - $imageArray["full_url"] = $img; |
161 | | - $imageArray["view_url"] = $img; |
162 | | - $imageArray["full_thumb_url"] = $img; |
163 | | - $imageArray["icon_thumb_url"] = $img; |
164 | | - $imageArray["image_object"] = null; |
165 | | - $imageArray["external"] = true; |
166 | | - |
167 | | - $galleryArray["images"][] = $imageArray; |
168 | | - |
169 | | - continue; |
170 | | - } |
171 | | - |
172 | | - $title = Title::newFromText( $img, NS_IMAGE ); |
173 | | - |
174 | | - if ( is_null($title) ) { |
175 | | - $galleryArray["missing_images"][] = $title; |
176 | | - continue; |
177 | | - } |
178 | | - |
179 | | - $ns = $title->getNamespace(); |
180 | | - |
181 | | - if ( $ns == NS_IMAGE ) { |
182 | | - if ( $img_desc != '' ) { |
183 | | - $galleryArray = $this->parseImage( $title, $parser, $galleryArray, true ); |
184 | | - if ( isset( $galleryArray["descriptions"]["$title"] ) ) { |
185 | | - $galleryArray["descriptions"]["$title"] = $img_desc; |
186 | | - } |
187 | | - } else { |
188 | | - $galleryArray = $this->parseImage( $title, $parser, $galleryArray ); |
189 | | - } |
190 | | - } else if ( $ns == NS_CATEGORY ) { |
191 | | - //list images in category |
192 | | - $cat_images = $this->smoothGalleryImagesByCat( $title ); |
193 | | - if ( $cat_images ) { |
194 | | - foreach ( $cat_images as $title ) { |
195 | | - $galleryArray = $this->parseImage( $title, $parser, $galleryArray ); |
196 | | - } |
197 | | - } |
198 | | - } |
199 | | - } |
200 | | - |
201 | | - return $galleryArray; |
202 | | - } |
203 | | - |
204 | | - function parseImage( $title, $parser, $galleryArray, $getDescription=false ) { |
205 | | - global $wgUser; |
206 | | - global $wgSmoothGalleryThumbHeight, $wgSmoothGalleryThumbWidth; |
207 | | - |
208 | | - $imageArray = Array(); |
209 | | - |
210 | | - //Get the image object from the database |
211 | | - $img_obj = wfFindFile( $title ); |
212 | | - |
213 | | - if ( !$img_obj ) { |
214 | | - //The user asked for an image that doesn't exist, let's |
215 | | - //add this to the list of missing objects |
216 | | - $galleryArray["missing_images"][] = htmlspecialchars( $title->getDBkey() ); |
217 | | - |
218 | | - return $galleryArray; |
219 | | - } |
220 | | - |
221 | | - //check media type. Only images are supported |
222 | | - $mtype = $img_obj->getMediaType(); |
223 | | - if ( $mtype != MEDIATYPE_DRAWING && $mtype != MEDIATYPE_BITMAP ) { |
224 | | - $galleryArray["invalid_images"][] = htmlspecialchars( $title->getDBkey() ); |
225 | | - |
226 | | - return $galleryArray; |
227 | | - } |
228 | | - |
229 | | - //Create a thumbnail the same size as our gallery so that |
230 | | - //full images fit correctly |
231 | | - $full_thumb_obj = $img_obj->getThumbnail( $this->argumentArray["width"], $this->argumentArray["height"] ); |
232 | | - if ( !is_null($full_thumb_obj) ) { |
233 | | - $full_thumb = $full_thumb_obj->getUrl(); |
234 | | - } else { |
235 | | - $galleryArray["missing_images"][] = htmlspecialchars( $title->getDBkey() ); |
236 | | - |
237 | | - return $galleryArray; |
238 | | - } |
239 | | - |
240 | | - if ( $full_thumb == '' ) { |
241 | | - //The thumbnail we requested was larger than the image; |
242 | | - //we need to just provide the image |
243 | | - $full_thumb = $img_obj->getUrl(); |
244 | | - } |
245 | | - |
246 | | - $icon_thumb = ''; |
247 | | - if ( $this->argumentArray["carousel"] ) { |
248 | | - //We are going to show a carousel to the user; we need |
249 | | - //to make icon thumbnails |
250 | | - //$thumb_obj = $img_obj->getThumbnail( 120, 120 ); //would be nice to reuse images already loaded... |
251 | | - $thumb_obj = $img_obj->getThumbnail( $wgSmoothGalleryThumbWidth, $wgSmoothGalleryThumbHeight ); |
252 | | - if ( $thumb_obj ) { |
253 | | - $icon_thumb = $thumb_obj->getUrl(); |
254 | | - } |
255 | | - else { |
256 | | - //The thumbnail we requested was larger than the image; |
257 | | - //we need to just provide the image |
258 | | - $icon_thumb = $img_obj->getUrl(); |
259 | | - } |
260 | | - } |
261 | | - |
262 | | - $fulldesc = ''; |
263 | | - |
264 | | - if ( $this->argumentArray["showinfopane"] ) { |
265 | | - if ( $getDescription ) { |
266 | | - //Load the image page from the database with the provided title from |
267 | | - //the image object |
268 | | - $db = wfGetDB( DB_SLAVE ); |
269 | | - $img_rev = Revision::loadFromTitle( $db, $title ); |
270 | | - |
271 | | - //Get the text from the image page's description |
272 | | - $fulldesc = $img_rev->getText(); |
273 | | - } |
274 | | - |
275 | | - //convert wikitext to HTML |
276 | | - //TODO: find out why this doesn't work with special pages |
277 | | - if ( $parser ) { |
278 | | - $pout = $parser->recursiveTagParse( $fulldesc, $title, $parser->mOptions, true ); |
279 | | - $fulldesc = strip_tags( $pout ); |
280 | | - #$fulldesc = strip_tags( $pout->getText() ); |
281 | | - } else { //fall back to HTML-escaping |
282 | | - $fulldesc = htmlspecialchars( $fulldesc ); |
283 | | - } |
284 | | - } |
285 | | - |
286 | | - $skin = $wgUser->getSkin(); |
287 | | - |
288 | | - //Everything is checked, and converted; add to the array and return |
289 | | - $imageArray["title"] = $title; |
290 | | - |
291 | | - # We need the following for the image's div |
292 | | - $imageArray["heading"] = $skin->makeKnownLinkObj($img_obj->getTitle(), $img_obj->getName()); |
293 | | - $imageArray["description"] = $fulldesc; |
294 | | - $imageArray["full_url"] = $title->getFullURL(); |
295 | | - $imageArray["view_url"] = $img_obj->getViewURL(); |
296 | | - $imageArray["full_thumb_url"] = $full_thumb; |
297 | | - $imageArray["icon_thumb_url"] = $icon_thumb; |
298 | | - |
299 | | - # We need the image object for plain galleries |
300 | | - $imageArray["image_object"] = $img_obj; |
301 | | - |
302 | | - $galleryArray["images"][] = $imageArray; |
303 | | - |
304 | | - return $galleryArray; |
305 | | - } |
306 | | - |
307 | | - function smoothGalleryImagesByCat( $title ) { |
308 | | - $name = $title->getDBkey(); |
309 | | - |
310 | | - $dbr = wfGetDB( DB_SLAVE ); |
311 | | - |
312 | | - list( $page, $categorylinks ) = $dbr->tableNamesN( 'page', 'categorylinks' ); |
313 | | - $sql = "SELECT page_namespace, page_title FROM $page " . |
314 | | - "JOIN $categorylinks ON cl_from = page_id " . |
315 | | - "WHERE cl_to = " . $dbr->addQuotes( $name ) . " " . |
316 | | - "AND page_namespace = " . NS_IMAGE . " " . |
317 | | - "ORDER BY cl_sortkey"; |
318 | | - |
319 | | - $images = array(); |
320 | | - $res = $dbr->query( $sql, 'smoothGalleryImagesByCat' ); |
321 | | - while ( $row = $dbr->fetchObject( $res ) ) { |
322 | | - $img = Title::makeTitle( $row->page_namespace, $row->page_title ); |
323 | | - |
324 | | - $images[] = $img; |
325 | | - } |
326 | | - $dbr->freeResult($res); |
327 | | - |
328 | | - return $images; |
329 | | - } |
330 | | - |
331 | | -} |
Index: trunk/extensions/Plotter/README |
— | — | @@ -1,5 +0,0 @@ |
2 | | -This is an extension that integrates JonDesign's SmoothGallery, which is a set of Javascript and CSS that lets you make picture galleries. A number of features are available from SmoothGallery, and this extension aims to be an easy to use, and full featured integration with MediaWiki. JonDesign's SmoothGallery is released under the GPL. |
3 | | - |
4 | | -For more information on the SmoothGallery javascript gallery, see: http://smoothgallery.jondesign.net/what |
5 | | - |
6 | | -For more information on the SmoothGallery extension, see: http://www.mediawiki.org/wiki/Extension:SmoothGallery |
Index: trunk/extensions/Plotter/SmoothGallery.i18n.php |
— | — | @@ -1,779 +0,0 @@ |
2 | | -<?php |
3 | | -/** |
4 | | - * Internationalisation file for extension SmoothGallery. |
5 | | - * |
6 | | - * @addtogroup Extensions |
7 | | - */ |
8 | | - |
9 | | -$messages = array(); |
10 | | - |
11 | | -$messages['en'] = array( |
12 | | - 'smoothgallery' => 'SmoothGallery', |
13 | | - 'smoothgallery-desc' => 'Allows users to create galleries with images that have been uploaded. |
14 | | -Allows most options of SmoothGallery', |
15 | | - 'smoothgallery-title' => 'SmoothGallery', |
16 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
17 | | - 'smoothgallery-pagetext' => '', |
18 | | - |
19 | | - 'smoothgallery-error' => '<b>SmoothGallery error:</b>', |
20 | | - 'smoothgallery-gallery-not-found' => 'The gallery requested does not exist.', |
21 | | - 'smoothgallery-not-found' => 'No images were added into the gallery. |
22 | | -Please add at least one image.', |
23 | | - 'smoothgallery-no-images' => 'No images were found in this gallery. |
24 | | -Make sure {{PLURAL:$3|the image|all images}} requested exist. |
25 | | -The following {{PLURAL:$2|image|images}} were not found: $1', |
26 | | - 'smoothgallery-invalid-images' => 'The following requested {{PLURAL:$2|image was|images were}} of an invalid type: $1', |
27 | | - 'smoothgallery-unexpected-error' => 'There was an unexpected error. |
28 | | -Please file a bug report.', |
29 | | - 'smoothgallery-javascript-disabled' => 'JavaScript is required to view this gallery properly.', |
30 | | -); |
31 | | - |
32 | | -/** Message documentation (Message documentation) |
33 | | - * @author Purodha |
34 | | - */ |
35 | | -$messages['qqq'] = array( |
36 | | - 'smoothgallery-desc' => 'Shown in [[Special:Version]] as a short description of this extension. Do not translate links.', |
37 | | - 'smoothgallery-no-images' => '* $1 is a comma separated list |
38 | | -* $2 is the number of elements in the list |
39 | | -* $3 is the number of images actually requested', |
40 | | - 'smoothgallery-invalid-images' => '* $1 is a comma separated list |
41 | | -* $2 is the number of elements in the list', |
42 | | -); |
43 | | - |
44 | | -/** Afrikaans (Afrikaans) |
45 | | - * @author Naudefj |
46 | | - */ |
47 | | -$messages['af'] = array( |
48 | | - 'smoothgallery-javascript-disabled' => 'JavaScript word benodig om die galery ordentlik te besigtig.', |
49 | | -); |
50 | | - |
51 | | -/** Arabic (العربية) |
52 | | - * @author Meno25 |
53 | | - */ |
54 | | -$messages['ar'] = array( |
55 | | - 'smoothgallery' => 'معرض ناعم', |
56 | | - 'smoothgallery-desc' => 'يسمح للمستخدمين بإنشاء معارض بالصور التي تم رفعها. |
57 | | -يسمح بمعظم خيارات المعرض الناعم', |
58 | | - 'smoothgallery-title' => 'معرض ناعم', |
59 | | - 'smoothgallery-smoothgallerytitle' => 'معرض ناعم: $1', |
60 | | - 'smoothgallery-error' => '<b>خطأ في المعرض الناعم:</b>', |
61 | | - 'smoothgallery-gallery-not-found' => 'المعرض المطلوب غير موجود.', |
62 | | - 'smoothgallery-not-found' => 'لا صور تمت إضافتها للمعرض. |
63 | | -من فضلك أضف صورة واحدة على الأقل.', |
64 | | - 'smoothgallery-no-images' => 'لم يتم العثور على صور في هذا المعرض. |
65 | | -تأكد من أن {{PLURAL:$3|الصورة|كل الصور}} المطلوبة موجودة. |
66 | | -{{PLURAL:$2|الصورة|الصور}} التالية لم يتم العثور عليها: $1', |
67 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|الصورة|الصور}} المطلوبة التالية كانت من نوع غير صحيح: $1', |
68 | | - 'smoothgallery-unexpected-error' => 'حدث خطأ غير متوقع. |
69 | | -من فضلك أبلغ عن هذا الخطأ.', |
70 | | - 'smoothgallery-javascript-disabled' => 'الجافاسكريبت مطلوب لرؤية هذا المعرض جيدا.', |
71 | | -); |
72 | | - |
73 | | -/** Egyptian Spoken Arabic (مصرى) |
74 | | - * @author Ghaly |
75 | | - * @author Meno25 |
76 | | - */ |
77 | | -$messages['arz'] = array( |
78 | | - 'smoothgallery' => 'معرض ناعم', |
79 | | - 'smoothgallery-desc' => 'يسمح للمستخدمين بإنشاء معارض بالصور التى تم رفعها. |
80 | | -يسمح بمعظم خيارات المعرض الناعم', |
81 | | - 'smoothgallery-title' => 'معرض ناعم', |
82 | | - 'smoothgallery-smoothgallerytitle' => 'معرض ناعم: $1', |
83 | | - 'smoothgallery-error' => '<b>خطأ فى المعرض الناعم:</b>', |
84 | | - 'smoothgallery-gallery-not-found' => 'المعرض المطلوب غير موجود.', |
85 | | - 'smoothgallery-not-found' => 'لا صور تمت إضافتها للمعرض. |
86 | | -من فضلك أضف صورة واحدة على الأقل.', |
87 | | - 'smoothgallery-no-images' => 'مافيش صور فى المعرض ده. |
88 | | -اتأكد من ان {{PLURAL:$3|الصوره|كل الصور}} المطلوبة موجودة. |
89 | | -{{PLURAL:$2|الصوره|الصور}} التالية مالقينهاش: $1', |
90 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|الصوره|الصور}} المطلوبة دى كانت من نوع مش صحيح: $1', |
91 | | - 'smoothgallery-unexpected-error' => 'حدث خطأ غير متوقع. |
92 | | -من فضلك أبلغ عن هذا الخطأ.', |
93 | | - 'smoothgallery-javascript-disabled' => 'الجافاسكريبت مطلوب لرؤية هذا المعرض جيدا.', |
94 | | -); |
95 | | - |
96 | | -/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
97 | | - * @author EugeneZelenko |
98 | | - */ |
99 | | -$messages['be-tarask'] = array( |
100 | | - 'smoothgallery' => 'Плыўная галерэя', |
101 | | - 'smoothgallery-desc' => 'Дазваляе ўдзельнікам ствараць галерэі з выявамі, якія яны загрузілі. |
102 | | -Падтрымлівае большасьць установак плыўнай галерэі', |
103 | | - 'smoothgallery-title' => 'Плыўная галерэя', |
104 | | - 'smoothgallery-smoothgallerytitle' => 'Плыўная галерэя: $1', |
105 | | - 'smoothgallery-error' => '<b>Памылка плыўнай галерэі:</b>', |
106 | | - 'smoothgallery-gallery-not-found' => 'Запатрабаваная галерэя не існуе.', |
107 | | - 'smoothgallery-not-found' => 'Выявы не былі дададзеныя ў галерэю. |
108 | | -Калі ласка, дадайце хаця б адну.', |
109 | | - 'smoothgallery-no-images' => 'У гэтай галерэі не было знойдзена выяваў. |
110 | | -Упэўніцеся, што {{PLURAL:$3|запытаная выява існуе|запытаныя выявы існуюць}}. |
111 | | -{{PLURAL:$2|Наступная выява ня знойдзеная|Наступныя выявы ня знойдзеныя}}: $1', |
112 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Наступная запытаная выява мае|Наступныя запытаныя выявы маюць}} няслушны тып: $1', |
113 | | - 'smoothgallery-unexpected-error' => 'Адбылася нечаканая памылка. |
114 | | -Калі ласка, дашліце паведамленьне пра памылку.', |
115 | | - 'smoothgallery-javascript-disabled' => 'Для прагляду гэтай галерэі неабходны JavaScript.', |
116 | | -); |
117 | | - |
118 | | -/** Bulgarian (Български) |
119 | | - * @author DCLXVI |
120 | | - * @author Spiritia |
121 | | - */ |
122 | | -$messages['bg'] = array( |
123 | | - 'smoothgallery-desc' => 'Позволява на потребителите да създават галерии с качените от тях файлове.', |
124 | | - 'smoothgallery-gallery-not-found' => 'Поисканата галерия не съществува', |
125 | | - 'smoothgallery-not-found' => 'Не бяха добавени картинки в галерията. Необходимо е да се добави поне една картинка.', |
126 | | - 'smoothgallery-no-images' => 'Не бяха открити картинки в галерията. |
127 | | -Уверете се, че {{PLURAL:$3|картинката съществува|всички картинки съществуват}}. |
128 | | -{{PLURAL:$2|Следната картинка не беше намерена|Следните картинки не бяха намерени}}: $1', |
129 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Следният заявен файл е|Следните заявени файлове са}} от невалиден тип: $1', |
130 | | - 'smoothgallery-unexpected-error' => 'Възникна неочаквана грешка. |
131 | | -Моля, съобщете за нея на администратор.', |
132 | | - 'smoothgallery-javascript-disabled' => 'За правилно показване на галерията е необходим Javascript.', |
133 | | -); |
134 | | - |
135 | | -/** Bosnian (Bosanski) |
136 | | - * @author CERminator |
137 | | - */ |
138 | | -$messages['bs'] = array( |
139 | | - 'smoothgallery' => 'SmoothGallery', |
140 | | - 'smoothgallery-desc' => 'Omogućuje korisnicima da naprave galerije sa slikama koje su postavili. |
141 | | -Omogućuje većinu opcija iz SmoothGallery', |
142 | | - 'smoothgallery-title' => 'SmoothGallery', |
143 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
144 | | - 'smoothgallery-error' => '<b>Greška u SmoothGallery:</b>', |
145 | | - 'smoothgallery-gallery-not-found' => 'Zahtijevana galerija ne postoji.', |
146 | | - 'smoothgallery-not-found' => 'Nijedna slika nije dodana u galeriju. |
147 | | -Molimo dodajte barem jednu sliku.', |
148 | | - 'smoothgallery-no-images' => 'Nijedna slika nije pronađena u ovoj galeriji. |
149 | | -Provjerite da {{PLURAL:$3|zahtjevana slika postoji|sve zahtijevane slike postoje}}. |
150 | | -{{PLURAL:$2|Slijedeća slika nije pronađena|Slijedeće slike nisu pronađene}}: $1', |
151 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Slijedeća zatražena slika je|Slijedeće zatražene slike su}} nevaljanog tipa: $1', |
152 | | - 'smoothgallery-unexpected-error' => 'Desila se nepredviđena greška. |
153 | | -Molimo ispunite izvještaj o grešci.', |
154 | | - 'smoothgallery-javascript-disabled' => 'Da bi ste pravilno pregledali ovu galeriju neophodna Vam je Javascript.', |
155 | | -); |
156 | | - |
157 | | -/** German (Deutsch) |
158 | | - * @author MF-Warburg |
159 | | - * @author Purodha |
160 | | - * @author Raimond Spekking |
161 | | - * @author Umherirrender |
162 | | - */ |
163 | | -$messages['de'] = array( |
164 | | - 'smoothgallery' => 'SmoothGallery', |
165 | | - 'smoothgallery-desc' => 'Ermöglicht die Erstellung von interaktiven Bildgalerien', |
166 | | - 'smoothgallery-title' => 'SmoothGallery', |
167 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
168 | | - 'smoothgallery-error' => '<b>SmoothGallery-Fehler:</b>', |
169 | | - 'smoothgallery-gallery-not-found' => 'Die angeforderte Galerie ist nicht vorhanden.', |
170 | | - 'smoothgallery-not-found' => 'Die Galerie enthält keine Bilder. Bitte mindestens ein Bild hinzufügen.', |
171 | | - 'smoothgallery-no-images' => 'In dieser Galerie sind keine Bilder zu finden. {{PLURAL:$3|Ist das angeforderte Bild|Sind alle angeforderten Bilder}} vorhanden? Es {{PLURAL:$2|fehlt|fehlen}}: $1', |
172 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Das folgende Bild hat|Die folgenden Bilder haben}} einen ungültigen Typ: $1', |
173 | | - 'smoothgallery-unexpected-error' => 'Es ist ein unerwarteter Fehler aufgetreten. Bitte schreibe eine Fehlermeldung.', |
174 | | - 'smoothgallery-javascript-disabled' => 'JavaScript wird benötigt, um die Galerie darzustellen.', |
175 | | -); |
176 | | - |
177 | | -/** Lower Sorbian (Dolnoserbski) |
178 | | - * @author Michawiki |
179 | | - */ |
180 | | -$messages['dsb'] = array( |
181 | | - 'smoothgallery' => 'SmoothGallery', |
182 | | - 'smoothgallery-desc' => 'Zmóžnja wužywarjam napóraś galerije z wobrazami, kótarež su se nagrali. |
183 | | -Zmóžnja nejwěcej opcijow SmoothGallery', |
184 | | - 'smoothgallery-title' => 'SmoothGallery', |
185 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
186 | | - 'smoothgallery-error' => '<b>SmoothGallery zmólka:</b>', |
187 | | - 'smoothgallery-gallery-not-found' => 'Pominana galerija njeeksistěrujo.', |
188 | | - 'smoothgallery-not-found' => 'Galerija njewopśimujo wobraze. |
189 | | -Pšosym pśidaj nanejmjenjej jaden wobraz.', |
190 | | - 'smoothgallery-no-images' => 'W toś tej galeriji njejsu se wobraze namakali. |
191 | | -Pśeznań se, lěc {{PLURAL:$3|pominany wobraz eksistěrujo|wšej $3 pominanej wobraza eksistěrujotej|wše $3 pominane wobraze eksistěruju|wšych $3 pominanych wobrazow eksistěrujo}}. |
192 | | -{{PLURAL:$2|Slědujucy wobraz njejo se namakał|Slědujucej wobraza njejstej se namakałej|Slědujuce wobraze njejsu se namakali|Slědujucych wobrazow njejo se namakało}}: $1', |
193 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Slědujucy pominany wobraz ma|Slědujucej pominanej wobraza matej|Slědujuce pominane wobraze maju|Slědujucych pominanych wobrazow ma}} njepłaśiwy typ: $1', |
194 | | - 'smoothgallery-unexpected-error' => 'Njewócakana zmólka jo nastała. |
195 | | -Pšosym napiš powěźeńku zmólki.', |
196 | | - 'smoothgallery-javascript-disabled' => 'JavaScript jo trěbny, aby se galerija korektnje zwobrazniła.', |
197 | | -); |
198 | | - |
199 | | -/** Esperanto (Esperanto) |
200 | | - * @author Yekrats |
201 | | - */ |
202 | | -$messages['eo'] = array( |
203 | | - 'smoothgallery' => 'GlataGalerio', |
204 | | - 'smoothgallery-title' => 'GlataGalerio', |
205 | | - 'smoothgallery-smoothgallerytitle' => 'GlataGalerio: $1', |
206 | | - 'smoothgallery-error' => '<b>Eraro en GlataGalerio:</b>', |
207 | | - 'smoothgallery-gallery-not-found' => 'La petita galerio ne ekzistas.', |
208 | | - 'smoothgallery-unexpected-error' => 'Okazis neatendita eraro. |
209 | | -Bonvolu fari ciman raporton.', |
210 | | - 'smoothgallery-javascript-disabled' => 'Javascript estas deviga pro vidi ĉi tiun galerion ĝuste.', |
211 | | -); |
212 | | - |
213 | | -/** Spanish (Español) |
214 | | - * @author Crazymadlover |
215 | | - */ |
216 | | -$messages['es'] = array( |
217 | | - 'smoothgallery' => 'SmoothGallery', |
218 | | - 'smoothgallery-desc' => 'Permite usuarios crear galerías con imágenes que han sido cargadas. |
219 | | -Permite más opciones de SmoothGallery', |
220 | | - 'smoothgallery-title' => 'SmoothGallery', |
221 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
222 | | - 'smoothgallery-error' => '<b>error SmoothGallery:</b>', |
223 | | - 'smoothgallery-gallery-not-found' => 'La galería solicitada no existe.', |
224 | | - 'smoothgallery-not-found' => 'Ninguna imágen fue agregada dentro de la galería. |
225 | | -Por favor agregue al menos una imagen.', |
226 | | - 'smoothgallery-no-images' => 'Ninguna imagen fue encontrada en esta galería. |
227 | | -Asegúrese que {{PLURAL:$3|la imagen|todas las imágenes}} solicitadas existen. |
228 | | -las siguientes {{PLURAL:$2|imagen|imágenes}} no fueron encontradas: $1', |
229 | | - 'smoothgallery-invalid-images' => 'La siguiente {{PLURAL:$2|imagen solicitada fue|imágenes solicitadas fueron}} de un tipo inválido: $1', |
230 | | - 'smoothgallery-unexpected-error' => 'Hubo un error error inesperado. |
231 | | -Por favor archive un reporte de errores.', |
232 | | - 'smoothgallery-javascript-disabled' => 'JavaScript es requerido para ver esta galería apropiadamente.', |
233 | | -); |
234 | | - |
235 | | -/** Finnish (Suomi) |
236 | | - * @author Str4nd |
237 | | - */ |
238 | | -$messages['fi'] = array( |
239 | | - 'smoothgallery-gallery-not-found' => 'Pyydettyä galleriaa ei ole.', |
240 | | -); |
241 | | - |
242 | | -/** French (Français) |
243 | | - * @author Crochet.david |
244 | | - * @author Dereckson |
245 | | - * @author Grondin |
246 | | - * @author IAlex |
247 | | - * @author Sherbrooke |
248 | | - */ |
249 | | -$messages['fr'] = array( |
250 | | - 'smoothgallery' => 'SmoothGallery', |
251 | | - 'smoothgallery-desc' => 'Autorise les utilisateurs à créer des galeries avec des images téléchargées. Autorise plus d’options de SmoothGallery', |
252 | | - 'smoothgallery-title' => 'SmoothGallery', |
253 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery : $1', |
254 | | - 'smoothgallery-error' => "'''Erreur de SmoothGallery :'''", |
255 | | - 'smoothgallery-gallery-not-found' => 'La galerie demandée n’existe pas.', |
256 | | - 'smoothgallery-not-found' => 'Aucune image ajoutée à la galerie. Ajoutez au moins une image.', |
257 | | - 'smoothgallery-no-images' => 'Aucune image n’a été trouvée dans cette galerie. |
258 | | -Vérifiez que {{PLURAL:$3|l’image requise existe|toutes les images requises existent}}. |
259 | | -{{PLURAL:$2|Cette image n’a pas été trouvée|Ces images n’ont pas été trouvées}} : $1.', |
260 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|L’image demandée suivante est|Les images demandées suivantes sont}} d’un format incorrect : $1', |
261 | | - 'smoothgallery-unexpected-error' => 'Erreur inattendue. Prière de remplir un rapport de bogue.', |
262 | | - 'smoothgallery-javascript-disabled' => 'JavaScript est nécessaire pour voir cette galerie d’images (<code><nowiki><gallery>...</gallery></nowiki></code>).', |
263 | | -); |
264 | | - |
265 | | -/** Galician (Galego) |
266 | | - * @author Alma |
267 | | - * @author Toliño |
268 | | - * @author Xosé |
269 | | - */ |
270 | | -$messages['gl'] = array( |
271 | | - 'smoothgallery' => 'Galería con transicións', |
272 | | - 'smoothgallery-desc' => 'Permítelle aos usuarios que creen galerías con imaxes que teñan cargado. |
273 | | -Permite a maioría das opcións da SmoothGallery', |
274 | | - 'smoothgallery-title' => 'Galería con transicións', |
275 | | - 'smoothgallery-smoothgallerytitle' => 'Galería con transicións: $1', |
276 | | - 'smoothgallery-error' => '<b>Erro na Galería de transicións:</b>', |
277 | | - 'smoothgallery-gallery-not-found' => 'A galería que solicitou non existe.', |
278 | | - 'smoothgallery-not-found' => 'Non se engadiron imaxes á galería. Engada polo menos unha imaxe.', |
279 | | - 'smoothgallery-no-images' => 'Non se atoparon imaxes nesta galería. |
280 | | -Asegúrese de que {{PLURAL:$3|existe a imaxe solicitada|existen todas as imaxes solicitadas}}. |
281 | | -Non se {{PLURAL:$2|atopou a seguinte imaxe|atoparon as seguintes imaxes}}: $1', |
282 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|A seguinte imaxe solicitada tiña|As seguintes imaxes solicitadas tiñan}} un tipo inválido: $1', |
283 | | - 'smoothgallery-unexpected-error' => 'Produciuse un erro inesperado. Informe deste erro, por favor.', |
284 | | - 'smoothgallery-javascript-disabled' => 'Requírese o Javascript para ver correctamente esta galería.', |
285 | | -); |
286 | | - |
287 | | -/** Swiss German (Alemannisch) |
288 | | - * @author Als-Holder |
289 | | - */ |
290 | | -$messages['gsw'] = array( |
291 | | - 'smoothgallery' => 'SmoothGallery', |
292 | | - 'smoothgallery-desc' => 'Macht s Benutzer megli Galerie aazlege mit Bilder, wu uffeglade wore sin. |
293 | | -Erlaubt di meischte Optione vu SmoothGallery', |
294 | | - 'smoothgallery-title' => 'SmoothGallery', |
295 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
296 | | - 'smoothgallery-error' => '<b>SmoothGallery-Fähler:</b>', |
297 | | - 'smoothgallery-gallery-not-found' => 'Di aagforderet Galerii git s nit.', |
298 | | - 'smoothgallery-not-found' => 'In dr Galerii het s no kei Bilder. Bitte setz zmindescht ei Bild dryy.', |
299 | | - 'smoothgallery-no-images' => 'In däre Galerii sin kei Bilder gfunde wore. Git s {{PLURAL:$3|des aagforderet Bild|die aagforderete Bilder}} iberhaupt? S {{PLURAL:$2|fählt|fähle}}: $1', |
300 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Des Bild het|Die Bilder hän}} e uugiltige Typ: $1', |
301 | | - 'smoothgallery-unexpected-error' => 'S isch e nit erwartete Fähler ufträtte. Bitte schryyb e Fählermäldig.', |
302 | | - 'smoothgallery-javascript-disabled' => 'S bruucht JavaScript go die Gallerii bschaue.', |
303 | | -); |
304 | | - |
305 | | -/** Hebrew (עברית) |
306 | | - * @author Rotemliss |
307 | | - * @author YaronSh |
308 | | - */ |
309 | | -$messages['he'] = array( |
310 | | - 'smoothgallery' => 'SmoothGallery', |
311 | | - 'smoothgallery-desc' => 'הוספת אפשרות למשתמשים ליצור גלריות עם תמונות שהועלו. |
312 | | -אפשר להשתמש ברוב האפשרויות של SmoothGallery', |
313 | | - 'smoothgallery-title' => 'SmoothGallery', |
314 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
315 | | - 'smoothgallery-error' => '<b>שגיאת SmoothGallery:</b>', |
316 | | - 'smoothgallery-gallery-not-found' => 'הגלריה המבוקשת אינה קיימת.', |
317 | | - 'smoothgallery-not-found' => 'לא נוספו תמונות לגלריה. |
318 | | -אנא הוסיפו לפחות תמונה אחת.', |
319 | | - 'smoothgallery-no-images' => 'לא נמצאו תמונות בגלריה זו. |
320 | | -ודאו ש{{PLURAL:$3|התמונה שביקשתם אכן קיימת|כל התמונות שביקשתם אכן קיימות}}. |
321 | | -{{PLURAL:$2|התמונה הבאה לא נמצאה|התמונות הבאות לא נמצאו}}: $1', |
322 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|התמונה הבאה שביקשתם היא|התמונות הבאות שביקשתם הן}} מסוג בלתי תקין: $1', |
323 | | - 'smoothgallery-unexpected-error' => 'אירעה שגיאה בלתי צפויה. |
324 | | -אנא דווחו על תקלה זו.', |
325 | | - 'smoothgallery-javascript-disabled' => 'על מנת לצפות בדף זה כראוי נדרש JavaScript.', |
326 | | -); |
327 | | - |
328 | | -/** Upper Sorbian (Hornjoserbsce) |
329 | | - * @author Michawiki |
330 | | - */ |
331 | | -$messages['hsb'] = array( |
332 | | - 'smoothgallery' => 'SmoothGallery', |
333 | | - 'smoothgallery-desc' => 'Dowola wužiwarjam galerije z wobrazami, kotrež su so naharali, wutworić. Dowola najwjace opcijow ze SmoothGallery', |
334 | | - 'smoothgallery-title' => 'SmoothGallery', |
335 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
336 | | - 'smoothgallery-error' => '<b>SmoothGallery zmylk:</b>', |
337 | | - 'smoothgallery-gallery-not-found' => 'Požadana galerija njeeksistuje.', |
338 | | - 'smoothgallery-not-found' => 'Žane wobrazy njebuchu ke galeriji přidate. Prošu přidaj znajmjeńša jedyn wobraz.', |
339 | | - 'smoothgallery-no-images' => 'W tutej galeriji njebuchu wobrazy namakane. Zawěsć, zo {{PLURAL:$3|požadany wobraz eksistuje|wšě $3 požadanej wobrazaj eksistujetej|wšě $3 požadane wobrazy eksistuja |wšěch $3 požadanych wobrazow eksistuje}}. {{PLURAL:$2|Slědowacy wobraz njebu namakany|Slědowacej wobrazaj njebuštej namakanej|Slědowace wobrazy njebuchu namakane|Slědowace wobraze njebuchu namakane}}: $1', |
340 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Slědowacy požadany wobraz ma|Slědowacej $2 požadanej wobrazaj matej|Slědowace $2 požadane wobrazy maja|Slědowaych $2 požadanych wobrazow ma}} njepłaćiwy typ: $1', |
341 | | - 'smoothgallery-unexpected-error' => 'Běše njewočakowany zmylk. Prošu spisaj zmylkowu rozprawu.', |
342 | | - 'smoothgallery-javascript-disabled' => 'Javascript je trjeba, zo by so tuta galerija prawje zwobrazniła.', |
343 | | -); |
344 | | - |
345 | | -/** Interlingua (Interlingua) |
346 | | - * @author McDutchie |
347 | | - */ |
348 | | -$messages['ia'] = array( |
349 | | - 'smoothgallery' => 'SmoothGallery', |
350 | | - 'smoothgallery-desc' => 'Permitte al usatores crear galerias con imagines que ha essite cargate. |
351 | | -Permitte le major parte del optiones de SmoothGallery', |
352 | | - 'smoothgallery-title' => 'SmoothGallery', |
353 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
354 | | - 'smoothgallery-error' => '<b>Error de SmoothGallery:</b>', |
355 | | - 'smoothgallery-gallery-not-found' => 'Le galeria requestate non existe.', |
356 | | - 'smoothgallery-not-found' => 'Nulle imagine esseva addite al galeria. |
357 | | -Per favor adde al minus un imagine.', |
358 | | - 'smoothgallery-no-images' => 'Nulle imagine esseva trovate in iste galeria. |
359 | | -Assecura te que {{PLURAL:$3|le imagine|tote le imagines}} requestate existe. |
360 | | -Le sequente {{PLURAL:$2|imagine|imagines}} non esseva trovate: $1', |
361 | | - 'smoothgallery-invalid-images' => 'Le sequente {{PLURAL:$2|imagine|imagines}} requestate esseva de un typo invalide: $1', |
362 | | - 'smoothgallery-unexpected-error' => 'Il occurreva un error non expectate. |
363 | | -Per favor reporta isto como un error in le software.', |
364 | | - 'smoothgallery-javascript-disabled' => 'JavaScript es requirite pro vider iste galeria correctemente.', |
365 | | -); |
366 | | - |
367 | | -/** Japanese (日本語) |
368 | | - * @author Fryed-peach |
369 | | - */ |
370 | | -$messages['ja'] = array( |
371 | | - 'smoothgallery' => 'スムースギャラリー', |
372 | | - 'smoothgallery-desc' => 'アップロードされている画像を使ってギャラリーを作ることができるようにする。 |
373 | | -SmoothGallery のほとんどのオプションを利用可能とする', |
374 | | - 'smoothgallery-title' => 'スムースギャラリー', |
375 | | - 'smoothgallery-smoothgallerytitle' => 'スムースギャラリー: $1', |
376 | | - 'smoothgallery-error' => '<b>スムースギャラリーのエラー:</b>', |
377 | | - 'smoothgallery-gallery-not-found' => '要求したギャラリーは存在しません。', |
378 | | - 'smoothgallery-not-found' => 'このギャラリーには画像がありません。最低でも1つは画像を指定してください。', |
379 | | - 'smoothgallery-no-images' => 'このギャラリーには画像がありません。指定した{{PLURAL:$3|画像が|画像がすべて}}存在するか確認してください。次の画像は見つかりませんでした: $1', |
380 | | - 'smoothgallery-invalid-images' => '要求された次の画像は不正な形式です: $1', |
381 | | - 'smoothgallery-unexpected-error' => '予期せぬエラーが発生しました。バグ報告を提出してください。', |
382 | | - 'smoothgallery-javascript-disabled' => 'このギャラリーを正しく閲覧するには JavaScript が必要です。', |
383 | | -); |
384 | | - |
385 | | -/** Javanese (Basa Jawa) |
386 | | - * @author Meursault2004 |
387 | | - */ |
388 | | -$messages['jv'] = array( |
389 | | - 'smoothgallery-gallery-not-found' => 'Galeri sing disuwun ora ana.', |
390 | | - 'smoothgallery-javascript-disabled' => 'Javascript iku diperlokaké kanggo ndeleng galeri iki sacara bener.', |
391 | | -); |
392 | | - |
393 | | -/** Khmer (ភាសាខ្មែរ) |
394 | | - * @author Chhorran |
395 | | - * @author Thearith |
396 | | - */ |
397 | | -$messages['km'] = array( |
398 | | - 'smoothgallery' => 'វិចិត្រសាលរាបស្មើ', |
399 | | - 'smoothgallery-desc' => 'អនុញ្ញាតឱ្យបង្កើតវិចិត្រសាលជាមួយរូបភាពដែលបានផ្ទុកឡើង។ |
400 | | - |
401 | | -អនុញ្ញាតជម្រើសភាគច្រើននៃវិចិត្រសាលរាបស្មើ', |
402 | | - 'smoothgallery-title' => 'វិចិត្រសាលរាបស្មើ', |
403 | | - 'smoothgallery-smoothgallerytitle' => 'វិចិត្រសាលរាបស្មើ៖ $1', |
404 | | - 'smoothgallery-error' => 'កំហុសវិចិត្រសាលរាបស្មើ៖', |
405 | | - 'smoothgallery-gallery-not-found' => 'មិនមានវិចិត្រសាលដែលត្រូវបានស្នើ។', |
406 | | - 'smoothgallery-not-found' => 'មិនមានរូបភាពត្រូវបានបន្ថែមទៅក្នុងវិចិត្រសាលទេ។ |
407 | | - |
408 | | -សូមបន្ថែមរូបភាពយ៉ាងហោចមួយ។', |
409 | | - 'smoothgallery-javascript-disabled' => 'តម្រូវឱ្យមាន Javascript ដើម្បីមើលបានល្អវិចិត្រសាលនេះ។', |
410 | | -); |
411 | | - |
412 | | -/** Ripoarisch (Ripoarisch) |
413 | | - * @author Purodha |
414 | | - */ |
415 | | -$messages['ksh'] = array( |
416 | | - 'smoothgallery' => '<i lang="en">SmoothGallery</i>', |
417 | | - 'smoothgallery-desc' => 'Määt et müjjelesch, Jallerieje met huhjelade Bellder opzebouwe, met de miehßte Enstellunge fun <i lang="en">SmoothGallery</i>.', |
418 | | - 'smoothgallery-title' => '<i lang="en">SmoothGallery</i>', |
419 | | - 'smoothgallery-smoothgallerytitle' => '<i lang="en">SmoothGallery</i>: $1', |
420 | | - 'smoothgallery-error' => '<b><i lang="en">SmoothGallery</i> hät ene Fähler jefonge:</b>', |
421 | | - 'smoothgallery-gallery-not-found' => 'Die Jalleri jit et nit.', |
422 | | - 'smoothgallery-not-found' => 'En dä Jalleri sen kein Bellder dren. |
423 | | -Bes esu joot, un donn winnichstens ein dobei!', |
424 | | - 'smoothgallery-no-images' => 'En dä Jalleri sen kein Belder dren. |
425 | | -Bes de secher, dat et {{PLURAL:$3|dat Beld|die Belder|—}} övverhoup jitt? |
426 | | -Hee {{PLURAL:$2|dat Beld wohr|die Belder wohre|—}} nit ze fenge: $1', |
427 | | - 'smoothgallery-invalid-images' => 'Hee {{PLURAL:$2|Hee dat Beld es en verkeehte Zoot Datei|die Belder hatte de verkeehte Dateitüp|—}}: $1', |
428 | | - 'smoothgallery-unexpected-error' => 'Ene Fähler es opjetrodde, wo mer nit automattesch met önjonn künne. |
429 | | -Bes esu joot, un donn dä Fähler melde.', |
430 | | - 'smoothgallery-javascript-disabled' => 'Do moß JavaSkrip aanjeschalldt han, öm die Jalleri öhndlesch ze sinn ze krijje.', |
431 | | -); |
432 | | - |
433 | | -/** Luxembourgish (Lëtzebuergesch) |
434 | | - * @author Robby |
435 | | - */ |
436 | | -$messages['lb'] = array( |
437 | | - 'smoothgallery' => 'SmoothGallerie', |
438 | | - 'smoothgallery-desc' => 'Erméiglecht de Benotzer et fir Gallerie mat Biller unzelleën déi eropgeluede goufen. |
439 | | -Erméiglecht déi meescht Optioune vun SmoothGallerie', |
440 | | - 'smoothgallery-title' => 'SmoothGallerie', |
441 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallerie: $1', |
442 | | - 'smoothgallery-error' => '<b>SmoothGallerie Feeler:</b>', |
443 | | - 'smoothgallery-gallery-not-found' => 'Déi ugefrote Gallerie gëtt et net.', |
444 | | - 'smoothgallery-not-found' => "Et goufe keng Biller an d'Gallerie derbäigesat. |
445 | | -Setzt w.e.g. mindestens ee Bild derbäi.", |
446 | | - 'smoothgallery-javascript-disabled' => 'JavaScriot gëtt gebraucht fir dës Gallerie korrekt ze gesinn.', |
447 | | -); |
448 | | - |
449 | | -/** Marathi (मराठी) |
450 | | - * @author Kaustubh |
451 | | - * @author Mahitgar |
452 | | - */ |
453 | | -$messages['mr'] = array( |
454 | | - 'smoothgallery' => 'मुलायमप्रेक्षा', |
455 | | - 'smoothgallery-desc' => 'उपयोगकर्त्यांना चढवलेल्या चित्रणांपासून दीर्घा(प्रेक्षा)बनवण्याकरिता अनुमति देते. |
456 | | -मुलायमदिर्घा(प्रेक्षा) बनविण्याकरिता सर्वाधिक पर्याय उपलब्ध करून देते.', |
457 | | - 'smoothgallery-title' => 'मुलायमप्रेक्षा', |
458 | | - 'smoothgallery-smoothgallerytitle' => 'मुलायमप्रेक्षा $1', |
459 | | - 'smoothgallery-error' => 'मुलायमप्रेक्षा त्रूटी', |
460 | | - 'smoothgallery-gallery-not-found' => 'विनंती केलेली प्रेक्षा(दिर्घा) अस्तित्वात नाही.', |
461 | | - 'smoothgallery-not-found' => 'प्रदर्शनात चित्रे वाढविलेली नाहीत. |
462 | | -कृपया कमीतकमी एक चित्र वाढवा.', |
463 | | - 'smoothgallery-no-images' => 'प्रदर्शनात एकही चित्र सापडले नाही. |
464 | | -कृपया खात्री करा की मागितलेली सर्व चित्रे अस्तित्वात आहेत. |
465 | | -खालील चित्रे सापडली नाहीत: $1', |
466 | | - 'smoothgallery-invalid-images' => 'खालील मागितलेली चित्रे चुकीच्या प्रकारातील आहेत: $1', |
467 | | - 'smoothgallery-unexpected-error' => 'एक अनपेक्षित त्रुटी आलेली आहे. |
468 | | -कृपया त्रुटी अहवाल पाठवा.', |
469 | | - 'smoothgallery-javascript-disabled' => 'हे प्रदर्शन पाहण्यासाठी जावास्क्रीप्टची गरज आहे.', |
470 | | -); |
471 | | - |
472 | | -/** Dutch (Nederlands) |
473 | | - * @author SPQRobin |
474 | | - * @author Siebrand |
475 | | - * @author Tvdm |
476 | | - */ |
477 | | -$messages['nl'] = array( |
478 | | - 'smoothgallery' => 'SmoothGallery', |
479 | | - 'smoothgallery-desc' => 'Stelt gebruikers in staat galerijen te maken met aanwezige afbeeldingen. Ondersteunt bijna alle mogelijkheden van SmoothGallery', |
480 | | - 'smoothgallery-title' => 'SmoothGallery', |
481 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
482 | | - 'smoothgallery-error' => '<b>SmoothGallery fout:</b>', |
483 | | - 'smoothgallery-gallery-not-found' => 'De gevraagde galerij bestaat niet.', |
484 | | - 'smoothgallery-not-found' => 'Er zijn geen afbeeldingen opgenomen in een galerij. |
485 | | -Voeg alstublieft tenminste één afbeelding toe.', |
486 | | - 'smoothgallery-no-images' => 'Er zijn geen bestanden aangetroffen in deze galerij. |
487 | | -Zorg ervoor dat {{PLURAL:$3|het bestand bestaat|alle bestanden bestaan}}. |
488 | | -De volgende {{PLURAL:$2|afbeelding is|afbeeldingen zijn}} niet aangetroffen: $1', |
489 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Het|De}} volgende aangevraagde {{PLURAL:$2|bestand heeft|bestanden hebben}} een ongeldig type: $1', |
490 | | - 'smoothgallery-unexpected-error' => 'Er is een onverwachte fout opgetreden. Dien alstublieft een foutrapport in.', |
491 | | - 'smoothgallery-javascript-disabled' => 'JavaScript dient ingeschakeld te zijn om deze galerij goed te kunnen bekijken.', |
492 | | -); |
493 | | - |
494 | | -/** Norwegian Nynorsk (Norsk (nynorsk)) |
495 | | - * @author Harald Khan |
496 | | - */ |
497 | | -$messages['nn'] = array( |
498 | | - 'smoothgallery' => 'Jamnt galleri', |
499 | | - 'smoothgallery-desc' => 'Lèt brukarar oppretta galleri med bilete som er blitt lasta opp. |
500 | | -Inneheld dei fleste av SmoothGallery sine valalternativ.', |
501 | | - 'smoothgallery-title' => 'Jamnt galleri', |
502 | | - 'smoothgallery-smoothgallerytitle' => 'Jamnt galleri: $1', |
503 | | - 'smoothgallery-error' => '<b>Feil med jamnt galleri:</b>', |
504 | | - 'smoothgallery-gallery-not-found' => 'Det etterspurde galleriet finst ikkje.', |
505 | | - 'smoothgallery-not-found' => 'Ingen bilete blei lagt til i galleriet. |
506 | | -Legg til minst eitt bilete.', |
507 | | - 'smoothgallery-no-images' => 'Ingen bilete blei funne i dette galleriet. |
508 | | -Forsikra deg om at {{PLURAL:$3|biletet|bileta}} finst. |
509 | | -Følgjande {{PLURAL:$2|bilete|bilete}} blei ikkje funne: $1', |
510 | | - 'smoothgallery-invalid-images' => 'Følgjande etterspurde bilete var av ein ugyldig type: $1 <!--{{PLURAL:$2||}}-->', |
511 | | - 'smoothgallery-unexpected-error' => 'Ein uventa feil oppstod. |
512 | | -Lever ein feilrapport.', |
513 | | - 'smoothgallery-javascript-disabled' => 'Javascript er nødvendig for å visa dette galleriet på rett måte.', |
514 | | -); |
515 | | - |
516 | | -/** Norwegian (bokmål) (Norsk (bokmål)) |
517 | | - * @author Jon Harald Søby |
518 | | - */ |
519 | | -$messages['no'] = array( |
520 | | - 'smoothgallery' => 'Mykt galleri', |
521 | | - 'smoothgallery-desc' => 'Lar brukere opprette gallerier med bilder som er blitt lastet opp. Inneholder de fleste av SmoothGallerys valgmuligheter.', |
522 | | - 'smoothgallery-title' => 'Mykt galleri', |
523 | | - 'smoothgallery-smoothgallerytitle' => 'Mykt galleri: $1', |
524 | | - 'smoothgallery-error' => '<b>Feil med mykt galleri:</b>', |
525 | | - 'smoothgallery-gallery-not-found' => 'Det etterspurte galleriet finnes ikke.', |
526 | | - 'smoothgallery-not-found' => 'Ingen bilder ble lagt til i galleriet. Legg til minst ett bilde.', |
527 | | - 'smoothgallery-no-images' => 'Ingen bilder ble funnet i dette galleriet. Forsikre deg om at alle bilder finnes. Følgende bilder ble ikke funnet. $1', |
528 | | - 'smoothgallery-invalid-images' => 'Følgende etterspurte bilder var av en ugyldig type: $1', |
529 | | - 'smoothgallery-unexpected-error' => 'Det var en uventet feil. Lever en feilrapport.', |
530 | | - 'smoothgallery-javascript-disabled' => 'Javascript er nødvendig for å vise dette galleriet korrekt.', |
531 | | -); |
532 | | - |
533 | | -/** Occitan (Occitan) |
534 | | - * @author Cedric31 |
535 | | - */ |
536 | | -$messages['oc'] = array( |
537 | | - 'smoothgallery' => 'Smoothgallery', |
538 | | - 'smoothgallery-desc' => "Autoriza los utilizaires a crear de galariás amb d'imatges telecargats. Autoriza mai d'opcions de SmoothGallery", |
539 | | - 'smoothgallery-title' => 'SmoothGallery', |
540 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
541 | | - 'smoothgallery-error' => "'''Error de SmoothGallery :'''", |
542 | | - 'smoothgallery-gallery-not-found' => "Cap d'imatge pas apondut a la galariá. Apondètz almens un imatge.", |
543 | | - 'smoothgallery-not-found' => "Cap d'imatge pas apondut a la galariá. Apondètz almens un imatge.", |
544 | | - 'smoothgallery-no-images' => "Cap d'imatge es pas estat trobat dins aquesta galariá. |
545 | | -Verificatz que {{PLURAL:$3|l'imatge requerit existís|totes los imatges requerits existisson}}. |
546 | | -{{PLURAL:$2|Aqueste imatge es pas estat trobat|Aquestes imatges son pas estats trobats}} : $1.", |
547 | | - 'smoothgallery-invalid-images' => "{{PLURAL:$2|L'imatge demandat seguent es|Los imatges demandats seguents son}} d’un format incorrècte : $1", |
548 | | - 'smoothgallery-unexpected-error' => "Error imprevista. Mercés d'emplenar un rapòrt de bòg.", |
549 | | - 'smoothgallery-javascript-disabled' => "JavaScript es necessari per veire aquesta galariá d'imatges (<code><nowiki><gallery>...</gallery></nowiki></code>).", |
550 | | -); |
551 | | - |
552 | | -/** Polish (Polski) |
553 | | - * @author Derbeth |
554 | | - * @author Maikking |
555 | | - * @author Sp5uhe |
556 | | - */ |
557 | | -$messages['pl'] = array( |
558 | | - 'smoothgallery' => 'Płynna galeria', |
559 | | - 'smoothgallery-desc' => 'Pozwala użytkownikom na tworzenie galerii przesłanych zdjęć. |
560 | | -Udostępnia większości opcji SmoothGallery', |
561 | | - 'smoothgallery-title' => 'Płynna galeria', |
562 | | - 'smoothgallery-smoothgallerytitle' => 'Płynna galeria: $1', |
563 | | - 'smoothgallery-error' => '<b>Błąd płynnej galerii:</b>', |
564 | | - 'smoothgallery-gallery-not-found' => 'Żądana galeria nie istnieje.', |
565 | | - 'smoothgallery-not-found' => 'Nie dodano żadnych grafik do tej galerii. Dodaj przynajmniej jedną grafikę.', |
566 | | - 'smoothgallery-no-images' => 'Nie odnaleziono grafik w tej galerii. |
567 | | -Upewnij się, czy {{PLURAL:$3|szukana grafika istnieje|szukane grafiki istnieją}}. |
568 | | -{{PLURAL:$2|Następująca grafika nie została odnaleziona|Następujące grafiki nie zostały odnalezione}}: $1', |
569 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Następująca żądana grafika jest|Następujące żądane grafiki są}} nieprawidłowego typu – $1', |
570 | | - 'smoothgallery-unexpected-error' => 'Wystąpił niespodziewany błąd. Prosimy o wypełnienie zgłoszenia błędu.', |
571 | | - 'smoothgallery-javascript-disabled' => 'Do obejrzenia tej galerii wymagany jest JavaScript.', |
572 | | -); |
573 | | - |
574 | | -/** Piedmontese (Piemontèis) |
575 | | - * @author Bèrto 'd Sèra |
576 | | - */ |
577 | | -$messages['pms'] = array( |
578 | | - 'smoothgallery' => 'SmoothGallery', |
579 | | - 'smoothgallery-title' => 'SmoothGallery', |
580 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
581 | | - 'smoothgallery-error' => '<b>SmoothGallery eror:</b>', |
582 | | - 'smoothgallery-not-found' => "A l'é pa giontasse gnun-a figura a la galerìa. Për piasì, ch'a në gionta almanch un-a.", |
583 | | - 'smoothgallery-no-images' => "Pa gnun-a figura trovà ant sta galerìa-sì. Ch'a contròla che le figure dont a fa da manca a-i sio da bon. A son nen trovasse ste figure-sì: $1", |
584 | | - 'smoothgallery-unexpected-error' => "A l'é sta-ie n'eror amprevist. Për piasì, ch'a-j lo segnala aj programator.", |
585 | | -); |
586 | | - |
587 | | -/** Pashto (پښتو) |
588 | | - * @author Ahmed-Najib-Biabani-Ibrahimkhel |
589 | | - */ |
590 | | -$messages['ps'] = array( |
591 | | - 'smoothgallery-javascript-disabled' => 'د همدې نندارتون د ښه ليدو لپاره Javascript |
592 | | -ته اړتيا ده.', |
593 | | -); |
594 | | - |
595 | | -/** Portuguese (Português) |
596 | | - * @author Malafaya |
597 | | - */ |
598 | | -$messages['pt'] = array( |
599 | | - 'smoothgallery' => 'SmoothGallery', |
600 | | - 'smoothgallery-desc' => 'Permite aos utilizadores criarem galerias com images que foram carregadas. |
601 | | -Permite a maioria das opções do SmoothGallery', |
602 | | - 'smoothgallery-title' => 'SmoothGallery', |
603 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
604 | | - 'smoothgallery-error' => '<b>Erro no SmoothGallery:</b>', |
605 | | - 'smoothgallery-gallery-not-found' => 'A galeria requisitada não existe.', |
606 | | - 'smoothgallery-not-found' => 'Nenhuma imagem foi adicionada à galeria. |
607 | | -Por favor, adicione pelo menos uma imagem.', |
608 | | - 'smoothgallery-no-images' => 'Nenhuma imagem foi encontrada nesta galeria. |
609 | | -Cerifique-se que {{PLURAL:$3|a imagem pedida existe|todas as imagens pedidas existem}}. |
610 | | -{{PLURAL:$2|A seguinte imagem não foi encontrada|As seguintes imagens não foram encontradas}}: $1', |
611 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|A seguinte imagem pedida era|As seguintes imagens pedidas eram}} de um tipo inválido: $1', |
612 | | - 'smoothgallery-unexpected-error' => 'Houve um erro inesperado. |
613 | | -Por favor, reporte o problema.', |
614 | | - 'smoothgallery-javascript-disabled' => 'Javascript é requerido para visualizar esta galeria adequadamente.', |
615 | | -); |
616 | | - |
617 | | -/** Brazilian Portuguese (Português do Brasil) |
618 | | - * @author Eduardo.mps |
619 | | - */ |
620 | | -$messages['pt-br'] = array( |
621 | | - 'smoothgallery' => 'SmoothGallery', |
622 | | - 'smoothgallery-desc' => 'Permite aos utilizadores criarem galerias com imagens que foram carregadas. |
623 | | -Permite a maioria das opções do SmoothGallery', |
624 | | - 'smoothgallery-title' => 'SmoothGallery', |
625 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
626 | | - 'smoothgallery-error' => '<b>Erro no SmoothGallery:</b>', |
627 | | - 'smoothgallery-gallery-not-found' => 'A galeria requisitada não existe.', |
628 | | - 'smoothgallery-not-found' => 'Nenhuma imagem foi adicionada à galeria. |
629 | | -Por favor, adicione pelo menos uma imagem.', |
630 | | - 'smoothgallery-no-images' => 'Nenhuma imagem foi encontrada nesta galeria. |
631 | | -Cerifique-se que {{PLURAL:$3|a imagem requisitada existe|todas as imagens requisitadas existem}}. |
632 | | -{{PLURAL:$2|A seguinte imagem não foi encontrada|As seguintes imagens não foram encontradas}}: $1', |
633 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|A seguinte imagem requisitada era|As seguintes imagens requisitadas eram}} de um tipo inválido: $1', |
634 | | - 'smoothgallery-unexpected-error' => 'Houve um erro inesperado. |
635 | | -Por favor, reporte o problema.', |
636 | | - 'smoothgallery-javascript-disabled' => 'Javascript é requerido para visualizar esta galeria adequadamente.', |
637 | | -); |
638 | | - |
639 | | -/** Romanian (Română) |
640 | | - * @author KlaudiuMihaila |
641 | | - */ |
642 | | -$messages['ro'] = array( |
643 | | - 'smoothgallery-gallery-not-found' => 'Galeria cerută nu există.', |
644 | | -); |
645 | | - |
646 | | -/** Russian (Русский) |
647 | | - * @author Александр Сигачёв |
648 | | - */ |
649 | | -$messages['ru'] = array( |
650 | | - 'smoothgallery' => 'Плавная галерея', |
651 | | - 'smoothgallery-desc' => 'Позволяет участникам создавать галереи загруженных изображений . Поддерживает большинство настроек SmoothGallery', |
652 | | - 'smoothgallery-title' => 'Плавная галерея', |
653 | | - 'smoothgallery-smoothgallerytitle' => 'Плавная галерея: $1', |
654 | | - 'smoothgallery-error' => '<b>Ошибка плавной галереи:</b>', |
655 | | - 'smoothgallery-gallery-not-found' => 'Запрашиваемой галереи не существует.', |
656 | | - 'smoothgallery-not-found' => 'В галерею не было добавлено изображений. Пожалуйста, добавте хотя бы одно.', |
657 | | - 'smoothgallery-no-images' => 'Не найдено изображений для этой галереи. |
658 | | -Убедитесь, что {{PLURAL:$3|требуемое изображение существует|все требуемые изображения существуют}}. |
659 | | -{{PLURAL:$2|Следующее изображение не найдено|Следующие изображения не найдены}}: $1', |
660 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Следующее требуемое изображение имеет|Следующие требуемые изображения имеют}} неправильный тип: $1', |
661 | | - 'smoothgallery-unexpected-error' => 'Произошла непредвиденная ошибка. |
662 | | -Пожалуйста, отправьте отчёт об ошибке.', |
663 | | - 'smoothgallery-javascript-disabled' => 'Для правильной работы этой галереи требуется Javascript.', |
664 | | -); |
665 | | - |
666 | | -/** Slovak (Slovenčina) |
667 | | - * @author Helix84 |
668 | | - */ |
669 | | -$messages['sk'] = array( |
670 | | - 'smoothgallery' => 'SmoothGallery', |
671 | | - 'smoothgallery-desc' => 'Umožňuje používateľom vytvárať galérie z nahraných obrázkov. Ponúka väčšinu z možností SmoothGallery', |
672 | | - 'smoothgallery-title' => 'SmoothGallery', |
673 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery: $1', |
674 | | - 'smoothgallery-error' => '<b>Chyba SmoothGallery:</b>', |
675 | | - 'smoothgallery-gallery-not-found' => 'Požadovaná galéria neexistuje.', |
676 | | - 'smoothgallery-not-found' => 'Žiadne obrázky neboli pridané do galérie. Prosím, pridajte aspoň jeden obrázok.', |
677 | | - 'smoothgallery-no-images' => 'V tejto galérii neboli nájdené žiadne obrázky. |
678 | | -Uistite sa, že {{PLURAL:$3|požadovaný obrázok existuje|všetky požadované obrázky existujú}}. |
679 | | -{{PLURAL:$2|Nasledovný obrázok nebol nájdený|Nasledovné obrázky neboli nájdené}}: $1', |
680 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Nasledovný požadovaný obrázok bol|Nasledovné požadované obrázky boli}} neplatného typu: $1', |
681 | | - 'smoothgallery-unexpected-error' => 'Nastala neočakávaná chyba. Prosím, podajte správu o chybe.', |
682 | | - 'smoothgallery-javascript-disabled' => 'Správne zobrazenie tejto galérie vyžaduje JavaScript.', |
683 | | -); |
684 | | - |
685 | | -/** Serbian Cyrillic ekavian (ћирилица) |
686 | | - * @author Sasa Stefanovic |
687 | | - * @author Михајло Анђелковић |
688 | | - */ |
689 | | -$messages['sr-ec'] = array( |
690 | | - 'smoothgallery' => 'ЛакаГалерија', |
691 | | - 'smoothgallery-desc' => 'Омогућује корисницима да праве галерије са сликама које су послали. |
692 | | -Омогућује већи број опција за SmoothGallery.', |
693 | | - 'smoothgallery-title' => 'ЛакаГалерија', |
694 | | - 'smoothgallery-smoothgallerytitle' => 'ЛакаГалерија: $1', |
695 | | - 'smoothgallery-error' => '<b>ЛакаГалерија грешка:</b>', |
696 | | - 'smoothgallery-gallery-not-found' => 'Захтевана галерија не постоји.', |
697 | | - 'smoothgallery-not-found' => 'Нема слика у галерији. Додајте најмање једну слику.', |
698 | | - 'smoothgallery-no-images' => 'Нису нађене слике у овој галерији. |
699 | | -Осигурајте се да {{PLURAL:$3|захтевана слика постоји|све захтеване слике постоје}}. |
700 | | -{{PLURAL:$2|Следећа слика није нађена|Следеће слике нису нађене}}: $1', |
701 | | - 'smoothgallery-invalid-images' => 'Тип {{PLURAL:$2|следеће захтеване слике|следећих захтеваних слика}} је био непознат: $1', |
702 | | - 'smoothgallery-unexpected-error' => 'Десила се неочекивана грешка. Молимо обавестите администраторе.', |
703 | | - 'smoothgallery-javascript-disabled' => 'Јаваскрипт је потребан да би се галерија нормално приказала.', |
704 | | -); |
705 | | - |
706 | | -/** Swedish (Svenska) |
707 | | - * @author M.M.S. |
708 | | - * @author Najami |
709 | | - */ |
710 | | -$messages['sv'] = array( |
711 | | - 'smoothgallery' => 'SmoothGalleri', |
712 | | - 'smoothgallery-desc' => 'Låter användare skapa gallerier med bilder som blivit uppladdade. |
713 | | -Innehåller de flesta av SmoothGalleris alternativ', |
714 | | - 'smoothgallery-title' => 'SmoothGalleri', |
715 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGalleri: $1', |
716 | | - 'smoothgallery-error' => '<b>Fel med SmoothGalleri:</b>', |
717 | | - 'smoothgallery-gallery-not-found' => 'Galleriet som du efterfrågade finns inte.', |
718 | | - 'smoothgallery-not-found' => 'Inga bilder lades till i galleriet. |
719 | | -Lägg till minst en bild.', |
720 | | - 'smoothgallery-no-images' => 'Inga bilder hittades i det här galleriet. |
721 | | -Försäkra dig om att {{PLURAL:$3|bilden|alla bilder}} finns. |
722 | | -Följande {{PLURAL:$2|bild|bilder}} hittades inte: $1', |
723 | | - 'smoothgallery-invalid-images' => 'Följande efterfrågade {{PLURAL:$2|bild|bilder}} var av en ogiltig typ: $1', |
724 | | - 'smoothgallery-unexpected-error' => 'Du var ett oväntat fel. |
725 | | -Var god lämna en felrapport.', |
726 | | - 'smoothgallery-javascript-disabled' => 'Javascript behövs för att visa det här galleriet korrekt.', |
727 | | -); |
728 | | - |
729 | | -/** Tagalog (Tagalog) |
730 | | - * @author AnakngAraw |
731 | | - */ |
732 | | -$messages['tl'] = array( |
733 | | - 'smoothgallery' => 'SmoothGallery ("Makinis na Tanghalan/Galerya")', |
734 | | - 'smoothgallery-desc' => 'Nagpapahintulot sa mga tagagamit na makalikha ng mga galerya/tanghalan ng naikarga/ikinargang mga larawan. |
735 | | -Nagpapahintulot sa lahat ng mga pilian (opsyon) ng SmoothGallery ("Makinis na Tanghalan/Galerya")', |
736 | | - 'smoothgallery-title' => 'SmoothGallery ("Makinis na Tanghalan/Galerya")', |
737 | | - 'smoothgallery-smoothgallerytitle' => 'SmoothGallery ("Makinis na Tanghalan/Galerya"): $1', |
738 | | - 'smoothgallery-error' => '<b>Kamalian sa SmoothGallery:</b>', |
739 | | - 'smoothgallery-gallery-not-found' => 'Hindi umiiral ang hiniling na tanghalan/galerya.', |
740 | | - 'smoothgallery-not-found' => 'Walang mga larawang naidagdag patungo sa tanghalan/galerya. |
741 | | -Magdagdag po ng kahit na isang larawan lamang.', |
742 | | - 'smoothgallery-no-images' => 'Walang mga larawang natagpuan mula sa loob ng tanghalan/galeryang ito. |
743 | | -Pakitiyak lamang na umiiral nga {{PLURAL:$3|ang larawan|ang mga larawang}}g hiniling. |
744 | | -Hindi natagpuan ang sumusunod na {{PLURAL:$2|larawan|mga larawan}}: $1', |
745 | | - 'smoothgallery-invalid-images' => 'Ang sumusunod na hiniling na {{PLURAL:$2|larawan ay|mga larawan ay}} isang hindi tanggap na uri: $1', |
746 | | - 'smoothgallery-unexpected-error' => "Nagkaroon ng isang hindi inaasahang kamalian. |
747 | | -Magpadala/magpasa lamang po ng isang ulat (report) ng depekto (''bug'').", |
748 | | - 'smoothgallery-javascript-disabled' => 'Kinakailangan ang Javascript upang matanaw/matingnan ng tama/wasto ang galerya/tanghalang ito.', |
749 | | -); |
750 | | - |
751 | | -/** Vietnamese (Tiếng Việt) |
752 | | - * @author Minh Nguyen |
753 | | - * @author Vinhtantran |
754 | | - */ |
755 | | -$messages['vi'] = array( |
756 | | - 'smoothgallery' => 'Trang ảnh mượt mà', |
757 | | - 'smoothgallery-desc' => 'Cho phép thành viên tạo trang ảnh với những ảnh đã được tải lên. |
758 | | -Cho phép phần lớn tùy chọn của SmoothGallery', |
759 | | - 'smoothgallery-title' => 'Trang ảnh mượt mà', |
760 | | - 'smoothgallery-smoothgallerytitle' => 'Trang ảnh mượt mà: $1', |
761 | | - 'smoothgallery-error' => '<b>Lỗi SmoothGallery:</b>', |
762 | | - 'smoothgallery-gallery-not-found' => 'Trang ảnh yêu cầu không tồn tại.', |
763 | | - 'smoothgallery-not-found' => 'Không có hình nào được thêm vào trang ảnh. |
764 | | -Xin hãy thêm ít nhất một hình.', |
765 | | - 'smoothgallery-no-images' => 'Không tìm thấy hình nào trong trang trưng bày ảnh. |
766 | | -Hãy chắc chắn rằng {{PLURAL:$3|hình|tất cả các hình}} được yêu cầu có tồn tại. |
767 | | -{{PLURAL:$2|Hình|Những hình}} sau không tìm thấy: $1', |
768 | | - 'smoothgallery-invalid-images' => '{{PLURAL:$2|Hình|Những hình}} được yêu cầu sau có kiểu không phù hợp: $1', |
769 | | - 'smoothgallery-unexpected-error' => 'Xảy ra lỗi không lường được. |
770 | | -Xin hãy đăng một báo cáo lỗi.', |
771 | | - 'smoothgallery-javascript-disabled' => 'Cần phải kích hoạt Javascript để trang ảnh hiển thị đúng.', |
772 | | -); |
773 | | - |
774 | | -/** Volapük (Volapük) |
775 | | - * @author Smeira |
776 | | - */ |
777 | | -$messages['vo'] = array( |
778 | | - 'smoothgallery-gallery-not-found' => 'Magodem pavilöl no dabinon.', |
779 | | -); |
780 | | - |
Index: trunk/extensions/Plotter/Plotter.php |
— | — | @@ -0,0 +1,249 @@ |
| 2 | +<?php |
| 3 | +# Copyright (C) 2009 Ryan Lane <rlane32+mwext@gmail.com> |
| 4 | +# |
| 5 | +# This program is free software; you can redistribute it and/or modify |
| 6 | +# it under the terms of the GNU General Public License as published by |
| 7 | +# the Free Software Foundation; either version 2 of the License, or |
| 8 | +# (at your option) any later version. |
| 9 | +# |
| 10 | +# This program is distributed in the hope that it will be useful, |
| 11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +# GNU General Public License for more details. |
| 14 | +# |
| 15 | +# You should have received a copy of the GNU General Public License along |
| 16 | +# with this program; if not, write to the Free Software Foundation, Inc., |
| 17 | +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | +# http://www.gnu.org/copyleft/gpl.html |
| 19 | + |
| 20 | +# Based off of the Gadgets and SmoothGallery extensions |
| 21 | + |
| 22 | +if( !defined( 'MEDIAWIKI' ) ) |
| 23 | + die( -1 ); |
| 24 | + |
| 25 | +/** |
| 26 | + * Add extension information to Special:Version |
| 27 | + */ |
| 28 | +$wgExtensionCredits['other'][] = array( |
| 29 | + 'path' => __FILE__, |
| 30 | + 'name' => 'Plotter parser extension', |
| 31 | + 'version' => '0.1a', |
| 32 | + 'author' => 'Ryan Lane', |
| 33 | + 'description' => 'Allows users to create client side graphs and plots.', |
| 34 | + 'descriptionmsg' => 'plotter-desc', |
| 35 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Plotter', |
| 36 | +); |
| 37 | + |
| 38 | +$wgExtensionFunctions[] = "efPlotter"; |
| 39 | + |
| 40 | +$wgHooks['OutputPageParserOutput'][] = 'PlotterParserOutput'; |
| 41 | +$wgHooks['LanguageGetMagic'][] = 'PlotterLanguageGetMagic'; |
| 42 | +$wgHooks['ArticleSaveComplete'][] = 'wfPlottersArticleSaveComplete'; |
| 43 | + |
| 44 | +$dir = dirname(__FILE__) . '/'; |
| 45 | +$wgExtensionMessagesFiles['Plotters'] = $dir . 'Plotters.i18n.php'; |
| 46 | +$wgExtensionAliasesFiles['Plotters'] = $dir . 'Plotters.i18n.alias.php'; |
| 47 | +$wgAutoloadClasses['Plotter'] = $dir . 'PlotterClass.php'; |
| 48 | +$wgAutoloadClasses['PlotterParser'] = $dir . 'PlotterParser.php'; |
| 49 | +$wgAutoloadClasses['SpecialPlotters'] = $dir . 'SpecialPlotters.php'; |
| 50 | +$wgSpecialPages['Plotters'] = 'SpecialPlotters'; |
| 51 | +$wgSpecialPageGroups['Plotters'] = 'wiki'; |
| 52 | + |
| 53 | +//sane defaults. always initialize to avoid register_globals vulnerabilities |
| 54 | +$wgPlotterExtensionPath = $wgScriptPath . '/extensions/Plotter'; |
| 55 | + |
| 56 | +function wfPlottersArticleSaveComplete( &$article, &$wgUser, &$text ) { |
| 57 | + //update cache if MediaWiki:Plotters-definition was edited |
| 58 | + $title = $article->mTitle; |
| 59 | + if( $title->getNamespace() == NS_MEDIAWIKI && $title->getText() == 'Plotters-definition' ) { |
| 60 | + wfLoadPlottersStructured( $text ); |
| 61 | + } |
| 62 | + return true; |
| 63 | +} |
| 64 | + |
| 65 | +function wfLoadPlotters() { |
| 66 | + static $plotters = NULL; |
| 67 | + |
| 68 | + if ( $plotters !== NULL ) return $plotters; |
| 69 | + |
| 70 | + $struct = wfLoadPlottersStructured(); |
| 71 | + if ( !$struct ) { |
| 72 | + $plotters = $struct; |
| 73 | + return $plotters; |
| 74 | + } |
| 75 | + |
| 76 | + $plotters = array(); |
| 77 | + foreach ( $struct as $section => $entries ) { |
| 78 | + $plotters = array_merge( $plotters, $entries ); |
| 79 | + } |
| 80 | + |
| 81 | + return $plotters; |
| 82 | +} |
| 83 | + |
| 84 | +function wfLoadPlottersStructured( $forceNewText = NULL ) { |
| 85 | + global $wgMemc; |
| 86 | + |
| 87 | + static $plotters = NULL; |
| 88 | + if ( $plotters !== NULL && $forceNewText !== NULL ) return $plotters; |
| 89 | + |
| 90 | + $key = wfMemcKey( 'plotters-definition' ); |
| 91 | + |
| 92 | + if ( $forceNewText === NULL ) { |
| 93 | + //cached? |
| 94 | + $plotters = $wgMemc->get( $key ); |
| 95 | + if ( is_array($plotters) ) return $plotters; |
| 96 | + |
| 97 | + $p = wfMsgForContentNoTrans( "plotters-definition" ); |
| 98 | + if ( wfEmptyMsg( "plotters-definition", $p ) ) { |
| 99 | + $plotters = false; |
| 100 | + return $plotters; |
| 101 | + } |
| 102 | + } else { |
| 103 | + $p = $forceNewText; |
| 104 | + } |
| 105 | + |
| 106 | + $p = preg_replace( '/<!--.*-->/s', '', $p ); |
| 107 | + $p = preg_split( '/(\r\n|\r|\n)+/', $p ); |
| 108 | + |
| 109 | + $plotters = array(); |
| 110 | + $section = ''; |
| 111 | + |
| 112 | + foreach ( $p as $line ) { |
| 113 | + if ( preg_match( '/^==+ *([^*:\s|]+?)\s*==+\s*$/', $line, $m ) ) { |
| 114 | + $section = $m[1]; |
| 115 | + } |
| 116 | + else if ( preg_match( '/^\*+ *([a-zA-Z](?:[-_:.\w\d ]*[a-zA-Z0-9])?)\s*((\|[^|]*)+)\s*$/', $line, $m ) ) { |
| 117 | + //NOTE: the plotter name is used as part of the name of a form field, |
| 118 | + // and must follow the rules defined in http://www.w3.org/TR/html4/types.html#type-cdata |
| 119 | + // Also, title-normalization applies. |
| 120 | + $name = str_replace(' ', '_', $m[1] ); |
| 121 | + |
| 122 | + $code = preg_split( '/\s*\|\s*/', $m[2], -1, PREG_SPLIT_NO_EMPTY ); |
| 123 | + |
| 124 | + if ( $code ) { |
| 125 | + $plotters[$section][$name] = $code; |
| 126 | + } |
| 127 | + } |
| 128 | + } |
| 129 | + |
| 130 | + //cache for a while. gets purged automatically when MediaWiki:Plotters-definition is edited |
| 131 | + $wgMemc->set( $key, $plotters, 60*60*24 ); |
| 132 | + $source = $forceNewText !== NULL ? 'input text' : 'MediaWiki:Plotters-definition'; |
| 133 | + wfDebug( __METHOD__ . ": $source parsed, cache entry $key updated\n"); |
| 134 | + |
| 135 | + return $plotters; |
| 136 | +} |
| 137 | + |
| 138 | +function wfApplyPlotterCode( $code, &$out, &$done ) { |
| 139 | + global $wgSkin, $wgJsMimeType; |
| 140 | + |
| 141 | + //FIXME: stuff added via $out->addScript appears below usercss and userjs in the head tag. |
| 142 | + // but we'd want it to appear above explicit user stuff, so it can be overwritten. |
| 143 | + foreach ( $code as $codePage ) { |
| 144 | + //include only once |
| 145 | + if ( isset( $done[$codePage] ) ) continue; |
| 146 | + $done[$codePage] = true; |
| 147 | + |
| 148 | + $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Plotters-$codePage" ); |
| 149 | + if ( !$t ) continue; |
| 150 | + |
| 151 | + if ( preg_match( '/\.js/', $codePage ) ) { |
| 152 | + $u = $t->getLocalURL( 'action=raw&ctype=' . $wgJsMimeType ); |
| 153 | + $out->addScript( '<script type="' . $wgJsMimeType . '" src="' . htmlspecialchars( $u ) . '"></script>' . "\n" ); |
| 154 | + } |
| 155 | + else if ( preg_match( '/\.css/', $codePage ) ) { |
| 156 | + $u = $t->getLocalURL( 'action=raw&ctype=text/css' ); |
| 157 | + $out->addScript( '<style type="text/css">/*<![CDATA[*/ @import "' . $u . '"; /*]]>*/</style>' . "\n" ); |
| 158 | + } |
| 159 | + } |
| 160 | +} |
| 161 | + |
| 162 | +function efPlotter() { |
| 163 | + global $wgParser; |
| 164 | + |
| 165 | + $wgParser->setHook( 'plot', 'initPlotter' ); |
| 166 | + $wgParser->setFunctionHook( 'plot', 'initPlotterPF' ); |
| 167 | +} |
| 168 | + |
| 169 | +function initPlotterPF( &$parser ) { |
| 170 | + global $wgPlotterDelimiter; |
| 171 | + |
| 172 | + $numargs = func_num_args(); |
| 173 | + if ( $numargs < 2 ) { |
| 174 | + $input = "#Plotter: no arguments specified"; |
| 175 | + return str_replace( '§', '<', '§pre>§nowiki>' . $input . '§/nowiki>§/pre>' ); |
| 176 | + } |
| 177 | + |
| 178 | + // fetch all user-provided arguments (skipping $parser) |
| 179 | + $input = ""; |
| 180 | + $argv = array(); |
| 181 | + $arg_list = func_get_args(); |
| 182 | + for ( $i = 1; $i < $numargs; $i++ ) { |
| 183 | + $p1 = $arg_list[$i]; |
| 184 | + |
| 185 | + $aParam = explode( '=', $p1, 2 ); |
| 186 | + if ( count( $aParam ) < 2 ) { |
| 187 | + continue; |
| 188 | + } |
| 189 | + Plotter::debug( 'plot tag parameter: ', $aParam ); |
| 190 | + if ( $aParam[0] == "data" ) { |
| 191 | + $input = $aParam[1]; |
| 192 | + continue; |
| 193 | + } |
| 194 | + $sKey = trim( $aParam[0] ); |
| 195 | + $sVal = trim( $aParam[1] ); |
| 196 | + |
| 197 | + if ( $sKey != '' ){ |
| 198 | + $argv[$sKey] = $sVal; |
| 199 | + } |
| 200 | + } |
| 201 | + |
| 202 | + $output = initPlotter( $input, $argv, $parser ); |
| 203 | + return array( $output, 'noparse' => true, 'isHTML' => true); |
| 204 | +} |
| 205 | + |
| 206 | +function initPlotter( $input, $argv, &$parser ) { |
| 207 | + $pParser = new PlotterParser( $input, $argv, $parser ); |
| 208 | + $pPlotter = new Plotter( $pParser, $parser ); |
| 209 | + |
| 210 | + $pPlotter->checkForErrors(); |
| 211 | + if ( $pPlotter->hasErrors() ) { |
| 212 | + return $pPlotter->getErrors(); |
| 213 | + } else { |
| 214 | + return $pPlotter->toHTML(); |
| 215 | + } |
| 216 | +} |
| 217 | + |
| 218 | +/** |
| 219 | + * Hook callback that injects messages and things into the <head> tag |
| 220 | + * Does nothing if $parserOutput->mPlotterTag is not set |
| 221 | + */ |
| 222 | +function PlotterParserOutput( &$outputPage, &$parserOutput ) { |
| 223 | + if ( !empty( $parserOutput->mPlotterTag ) ) { |
| 224 | + // Output required javascript |
| 225 | + Plotter::setPlotterHeaders( $outputPage ); |
| 226 | + |
| 227 | + // Output user defined javascript |
| 228 | + $plotters = wfLoadPlotters(); |
| 229 | + if ( !$plotters ) return true; |
| 230 | + |
| 231 | + $done = array(); |
| 232 | + |
| 233 | + foreach ( $plotters as $pname => $code ) { |
| 234 | + $tname = strtolower( "mplotter-$pname" ); |
| 235 | + if ( !empty( $parserOutput->$tname ) ) { |
| 236 | + wfApplyPlotterCode( $code, $outputPage, $done ); |
| 237 | + } |
| 238 | + } |
| 239 | + } |
| 240 | + return true; |
| 241 | +} |
| 242 | + |
| 243 | +/** |
| 244 | + * We ignore langCode - parser function names can be translated but |
| 245 | + * we are not using this feature |
| 246 | + */ |
| 247 | +function PlotterLanguageGetMagic( &$magicWords, $langCode ) { |
| 248 | + $magicWords['plot'] = array(0, 'plot'); |
| 249 | + return true; |
| 250 | +} |
Property changes on: trunk/extensions/Plotter/Plotter.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 251 | + native |
Index: trunk/extensions/Plotter/Plotters.i18n.php |
— | — | @@ -0,0 +1,26 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension Plotters. Based on the Gadgets extension. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | + * @author Ryan Lane, rlane32+mwext@gmail.com |
| 8 | + * @copyright © 2009 Ryan Lane |
| 9 | + * @license GNU General Public Licence 2.0 or later |
| 10 | + */ |
| 11 | + |
| 12 | +$messages = array(); |
| 13 | + |
| 14 | +/** English |
| 15 | + * @author Ryan Lane, rlane32+mwext@gmail.com |
| 16 | + */ |
| 17 | +$messages['en'] = array( |
| 18 | + #for Special:Version |
| 19 | + 'plotters-desc' => 'Lets users use custom javascript in their jsplot tags.', |
| 20 | + |
| 21 | + #for Special:Gadgets |
| 22 | + 'plotters' => 'Plotters', |
| 23 | + 'plotters-title' => 'Plotters', |
| 24 | + 'plotters-pagetext' => "Below is a list of special plotters users can use in their jsplot tags, as defined by [[MediaWiki:Plotters-definition]]. |
| 25 | +This overview provides easy access to the system message pages that define each plotter's description and code.", |
| 26 | + 'plotters-uses' => 'Uses', |
| 27 | +); |
Property changes on: trunk/extensions/Plotter/Plotters.i18n.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 28 | + native |
Index: trunk/extensions/Plotter/SpecialPlotters.php |
— | — | @@ -0,0 +1,98 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Special:Plotters, provides a preview of MediaWiki:Plotters. Based on the Gadgets extension. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | + * @author Ryan Lane, rlane32+mwext@gmail.com |
| 8 | + * @copyright © 2009 Ryan Lane |
| 9 | + * @license GNU General Public Licence 2.0 or later |
| 10 | + */ |
| 11 | + |
| 12 | +if( !defined( 'MEDIAWIKI' ) ) { |
| 13 | + echo( "not a valid entry point.\n" ); |
| 14 | + die( 1 ); |
| 15 | +} |
| 16 | + |
| 17 | +/** |
| 18 | + * |
| 19 | + */ |
| 20 | +class SpecialPlotters extends SpecialPage { |
| 21 | + |
| 22 | + /** |
| 23 | + * Constructor |
| 24 | + */ |
| 25 | + function __construct() { |
| 26 | + SpecialPage::SpecialPage( 'Plotters', '', true ); |
| 27 | + } |
| 28 | + |
| 29 | + /** |
| 30 | + * Main execution function |
| 31 | + * @param $par Parameters passed to the page |
| 32 | + */ |
| 33 | + function execute( $par ) { |
| 34 | + global $wgOut, $wgUser; |
| 35 | + |
| 36 | + wfLoadExtensionMessages( 'Plotters' ); |
| 37 | + $skin = $wgUser->getSkin(); |
| 38 | + |
| 39 | + $this->setHeaders(); |
| 40 | + $wgOut->setPagetitle( wfMsg( "plotters-title" ) ); |
| 41 | + $wgOut->addWikiText( wfMsg( "plotters-pagetext" ) ); |
| 42 | + |
| 43 | + $plotters = wfLoadPlottersStructured(); |
| 44 | + if ( !$plotters ) return; |
| 45 | + |
| 46 | + $listOpen = false; |
| 47 | + |
| 48 | + $msgOpt = array( 'parseinline', 'parsemag' ); |
| 49 | + |
| 50 | + foreach ( $plotters as $section => $entries ) { |
| 51 | + if ( $section !== false && $section !== '' ) { |
| 52 | + $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Plotter-section-$section" ); |
| 53 | + $lnk = $t ? $skin->makeLinkObj( $t, wfMsgHTML("edit"), 'action=edit' ) : htmlspecialchars($section); |
| 54 | + $ttext = wfMsgExt( "plotter-section-$section", $msgOpt ); |
| 55 | + |
| 56 | + if( $listOpen ) { |
| 57 | + $wgOut->addHTML( '</ul>' ); |
| 58 | + $listOpen = false; |
| 59 | + } |
| 60 | + $wgOut->addHTML( "\n<h2>$ttext [$lnk]</h2>\n" ); |
| 61 | + } |
| 62 | + |
| 63 | + foreach ( $entries as $pname => $code ) { |
| 64 | + $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Plotter-$pname" ); |
| 65 | + if ( !$t ) continue; |
| 66 | + |
| 67 | + $lnk = $skin->makeLinkObj( $t, wfMsgHTML("edit"), 'action=edit' ); |
| 68 | + $ttext = wfMsgExt( "plotter-$pname", $msgOpt ); |
| 69 | + |
| 70 | + if( !$listOpen ) { |
| 71 | + $listOpen = true; |
| 72 | + $wgOut->addHTML( '<ul>' ); |
| 73 | + } |
| 74 | + $wgOut->addHTML( "<li>" ); |
| 75 | + $wgOut->addHTML( "$ttext [$lnk]<br />" ); |
| 76 | + |
| 77 | + $wgOut->addHTML( wfMsgHTML("plotters-uses") . ": " ); |
| 78 | + |
| 79 | + $first = true; |
| 80 | + foreach ( $code as $codePage ) { |
| 81 | + $t = Title::makeTitleSafe( NS_MEDIAWIKI, "Plotters-$codePage" ); |
| 82 | + if ( !$t ) continue; |
| 83 | + |
| 84 | + if ( $first ) $first = false; |
| 85 | + else $wgOut->addHTML(", "); |
| 86 | + |
| 87 | + $lnk = $skin->makeLinkObj( $t, htmlspecialchars( $t->getText() ) ); |
| 88 | + $wgOut->addHTML($lnk); |
| 89 | + } |
| 90 | + |
| 91 | + $wgOut->addHtml( "</li>" ); |
| 92 | + } |
| 93 | + } |
| 94 | + |
| 95 | + if( $listOpen ) { |
| 96 | + $wgOut->addHTML( '</ul>' ); |
| 97 | + } |
| 98 | + } |
| 99 | +} |
Property changes on: trunk/extensions/Plotter/SpecialPlotters.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 100 | + native |
Index: trunk/extensions/Plotter/PlotterClass.php |
— | — | @@ -0,0 +1,152 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Plotter class. Renders html and javascript for the Plotters extension. |
| 6 | + * |
| 7 | + * @addtogroup Extensions |
| 8 | + * @author Ryan Lane, rlane32+mwext@gmail.com |
| 9 | + * @copyright © 2009 Ryan Lane |
| 10 | + * @license GNU General Public Licence 2.0 or later |
| 11 | + */ |
| 12 | + |
| 13 | +class Plotter { |
| 14 | + |
| 15 | + var $parser; |
| 16 | + var $set; |
| 17 | + var $argumentArray, $dataArray; |
| 18 | + var $errors; |
| 19 | + |
| 20 | + function Plotter( $pParser, &$parser ) { |
| 21 | + $this->parser = $parser; |
| 22 | + $this->argumentArray = $pParser->getArguments(); |
| 23 | + $this->dataArray = $pParser->getData(); |
| 24 | + } |
| 25 | + |
| 26 | + function hasErrors() { |
| 27 | + if ( $this->errors == '' ) { |
| 28 | + return false; |
| 29 | + } else { |
| 30 | + return true; |
| 31 | + } |
| 32 | + } |
| 33 | + |
| 34 | + function getErrors() { |
| 35 | + return $this->errors; |
| 36 | + } |
| 37 | + |
| 38 | + function checkForErrors() { |
| 39 | + // Check for a script |
| 40 | + // Check for data |
| 41 | + return ''; |
| 42 | + } |
| 43 | + |
| 44 | + function toHTML() { |
| 45 | + // Add html |
| 46 | + $output = $this->renderPlot(); |
| 47 | + |
| 48 | + // Add fallback |
| 49 | + $output .= $this->renderFallback(); |
| 50 | + |
| 51 | + // Add javascript |
| 52 | + $output .= $this->renderJavascript(); |
| 53 | + |
| 54 | + // Add tags to parser |
| 55 | + $this->parser->mOutput->mPlotterTag = true; |
| 56 | + |
| 57 | + foreach ( $this->argumentArray["preprocessors"] as $preprocessor ) { |
| 58 | + $preprocessor = "mplotter-" . $preprocessor; |
| 59 | + $this->parser->mOutput->$preprocessor = true; |
| 60 | + } |
| 61 | + |
| 62 | + $script = "mplotter-" . $this->argumentArray["script"]; |
| 63 | + $this->parser->mOutput->$script = true; |
| 64 | + |
| 65 | + // output |
| 66 | + return $output; |
| 67 | + } |
| 68 | + |
| 69 | + function renderPlot() { |
| 70 | + //TODO: allow user defined height and width |
| 71 | + //TODO: allow user defined graph id |
| 72 | + return '<div><canvas id="graph" height="300" width="300"></canvas></div>'; |
| 73 | + } |
| 74 | + |
| 75 | + function renderFallback() { |
| 76 | + // Return an html table of the data |
| 77 | + return ''; |
| 78 | + } |
| 79 | + |
| 80 | + function renderJavascript() { |
| 81 | + // Prepare data |
| 82 | + $data = "["; |
| 83 | + foreach ( $this->dataArray as $line ) { |
| 84 | + $data .= "[" . implode( $this->argumentArray["datasep"], $line ) . "]" . ", "; |
| 85 | + } |
| 86 | + $data = substr( $data, 0, -2 ); |
| 87 | + $data .= "]"; |
| 88 | + |
| 89 | + // Run preprocessors |
| 90 | + $output = '<script type="text/javascript">'; |
| 91 | + //TODO: allow user defined graph id |
| 92 | + $output .= 'function drawGraph() {'; |
| 93 | + $output .= 'var data = ' . $data . ';'; |
| 94 | + foreach ( $this->argumentArray["preprocessors"] as $preprocessor ) { |
| 95 | + $output .= 'data = plotter_' . $preprocessor . '_process( data, '; |
| 96 | + foreach ( $this->argumentArray["preprocessorarguments"] as $argument ) { |
| 97 | + $output .= $argument . ', '; |
| 98 | + } |
| 99 | + // Strip the last ', ' |
| 100 | + $output = substr( $output, 0, -2 ); |
| 101 | + $output .= " );"; |
| 102 | + } |
| 103 | + |
| 104 | + // Run script |
| 105 | + $output .= 'plotter_' . $this->argumentArray["script"] . '_draw( data, '; |
| 106 | + foreach ( $this->argumentArray["scriptarguments"] as $argument ) { |
| 107 | + $output .= $argument . ', '; |
| 108 | + } |
| 109 | + $output = substr( $output, 0, -2 ); |
| 110 | + $output .= " );"; |
| 111 | + |
| 112 | + $output .= "}"; |
| 113 | + |
| 114 | + // Add hook event |
| 115 | + //TODO: allow user defined graph id |
| 116 | + $output .= 'hookEvent("load", drawGraph);'; |
| 117 | + $output .= "</script>"; |
| 118 | + |
| 119 | + return $output; |
| 120 | + } |
| 121 | + |
| 122 | + static function setPlotterHeaders( &$outputPage ) { |
| 123 | + global $wgPlotterExtensionPath; |
| 124 | + |
| 125 | + $extensionpath = $wgPlotterExtensionPath; |
| 126 | + |
| 127 | + //Add mochikit (required by PlotKit) |
| 128 | + $outputPage->addScript( '<script src="' . $extensionpath . '/mochikit/MochiKit.js" type="text/javascript"></script>' ); |
| 129 | + |
| 130 | + //Add PlotKit javascript |
| 131 | + $outputPage->addScript( '<script src="' . $extensionpath . '/plotkit/Base.js" type="text/javascript"></script>' ); |
| 132 | + $outputPage->addScript( '<script src="' . $extensionpath . '/plotkit/Layout.js" type="text/javascript"></script>' ); |
| 133 | + $outputPage->addScript( '<script src="' . $extensionpath . '/plotkit/Canvas.js" type="text/javascript"></script>' ); |
| 134 | + $outputPage->addScript( '<script src="' . $extensionpath . '/plotkit/SweetCanvas.js" type="text/javascript"></script>' ); |
| 135 | + |
| 136 | + return true; |
| 137 | + } |
| 138 | + |
| 139 | + static function debug( $debugText, $debugArr = null ) { |
| 140 | + global $wgPlotterDebug; |
| 141 | + |
| 142 | + if ( isset( $debugArr ) ) { |
| 143 | + if ( $wgPlotterDebug > 0 ) { |
| 144 | + $text = $debugText . " " . implode( "::", $debugArr ); |
| 145 | + wfDebugLog( 'plot', $text, false ); |
| 146 | + } |
| 147 | + } else { |
| 148 | + if ( $wgPlotterDebug > 0 ) { |
| 149 | + wfDebugLog( 'plot', $debugText, false ); |
| 150 | + } |
| 151 | + } |
| 152 | + } |
| 153 | +} |
Property changes on: trunk/extensions/Plotter/PlotterClass.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 154 | + native |
Index: trunk/extensions/Plotter/Plotters.i18n.alias.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Aliases for Special:Plotters. Based on the Gadgets extension. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | + */ |
| 8 | + |
| 9 | +$aliases = array(); |
| 10 | + |
| 11 | +/** English |
| 12 | + * @author Ryan Lane, rlane32+mwext@gmail.com |
| 13 | + */ |
| 14 | +$aliases['en'] = array( |
| 15 | + 'Plotters' => array( 'Plotters' ), |
| 16 | +); |
Property changes on: trunk/extensions/Plotter/Plotters.i18n.alias.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 17 | + native |
Index: trunk/extensions/Plotter/PlotterParser.php |
— | — | @@ -0,0 +1,115 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +/** |
| 5 | + * Plotter parser. Parses arguments and data for the Plotters extension. |
| 6 | + * |
| 7 | + * @addtogroup Extensions |
| 8 | + * @author Ryan Lane, rlane32+mwext@gmail.com |
| 9 | + * @copyright © 2009 Ryan Lane |
| 10 | + * @license GNU General Public Licence 2.0 or later |
| 11 | + */ |
| 12 | + |
| 13 | +if( !defined( 'MEDIAWIKI' ) ) { |
| 14 | + echo( "not a valid entry point.\n" ); |
| 15 | + die( 1 ); |
| 16 | +} |
| 17 | + |
| 18 | +class PlotterParser { |
| 19 | + |
| 20 | + var $argumentArray; |
| 21 | + var $dataArray; |
| 22 | + |
| 23 | + function PlotterParser( $input, $argv, &$parser ) { |
| 24 | + $this->parseArguments( $argv ); |
| 25 | + $this->parseData( $input, $parser ); |
| 26 | + } |
| 27 | + |
| 28 | + function getArguments() { |
| 29 | + return $this->argumentArray; |
| 30 | + } |
| 31 | + |
| 32 | + function getData() { |
| 33 | + return $this->dataArray; |
| 34 | + } |
| 35 | + |
| 36 | + function parseArguments( $argv ) { |
| 37 | + //Parse arguments, set defaults, and do sanity checks |
| 38 | + $this->argumentArray = array ( "renderer" => "plotkit", "preprocessors" => array(), "preprocessorarguments" => array(), |
| 39 | + "script" => "", "scriptarguments" => array(), "datasep" => "," ); |
| 40 | + if ( isset( $argv["renderer"] ) ) { |
| 41 | + $this->argumentArray["renderer"] = $argv["renderer"]; |
| 42 | + } |
| 43 | + if ( isset( $argv["preprocessors"] ) ) { |
| 44 | + // Sanitize scripts - alphanumerics only |
| 45 | + $this->argumentArray["preprocessors"] = explode( ',', $argv["preprocessors"] ); |
| 46 | + foreach ( $this->argumentArray["preprocessors"] as &$preprocessor ) { |
| 47 | + $preprocessor = preg_replace( '/[^A-Z0-9]/i', '', $preprocessor ); |
| 48 | + } |
| 49 | + } |
| 50 | + if ( isset( $argv["preprocessorarguments"] ) ) { |
| 51 | + // Replace escaped separators |
| 52 | + $argv["preprocessorarguments"] = preg_replace( '/\\:/', '§UNIQ§', $argv["preprocessorarguments"] ); |
| 53 | + $argv["preprocessorarguments"] = preg_replace( '/\\,/', '§UNIQ2§', $argv["preprocessorarguments"] ); |
| 54 | + |
| 55 | + // Parse and sanitize arguments - escape single quotes and backslashes |
| 56 | + $arguments = explode( ':', $argv["preprocessorarguments"] ); |
| 57 | + foreach ( $arguments as $argument ) { |
| 58 | + list($argumentkey, $argumentvalue) = explode( '=', $argument ); |
| 59 | + $argumentkey = preg_replace( '/[^A-Z0-9]/i', '', $argumentkey ); |
| 60 | + $argumentvalue = preg_replace( "/\\\\/", '\\\\', $argumentvalue ); |
| 61 | + $argumentvalue = preg_replace( "/'/", "\\'", $argumentvalue ); |
| 62 | + |
| 63 | + // Fix escaped separators |
| 64 | + $argumentvalue = preg_replace( "/§UNIQ§/", ":", $argumentvalue ); |
| 65 | + $argumentvalue = preg_replace( "/§UNIQ2§/", ",", $argumentvalue ); |
| 66 | + $this->argumentArray["preprocessorarguments"][$argumentkey] = $argumentvalue; |
| 67 | + } |
| 68 | + |
| 69 | + } |
| 70 | + if ( isset( $argv["script"] ) ) { |
| 71 | + // Sanitize scripts - alphanumerics only |
| 72 | + $this->argumentArray["script"] = preg_replace( '/[^A-Z0-9]/i', '', $argv["script"] ); |
| 73 | + } |
| 74 | + if ( isset( $argv["scriptarguments"] ) ) { |
| 75 | + // Replace escaped separators |
| 76 | + $argv["scriptarguments"] = preg_replace( '/\\,/', '§UNIQ§', $argv["scriptarguments"] ); |
| 77 | + |
| 78 | + // Parse and sanitize arguments - escape single quotes and backslashes |
| 79 | + $arguments = explode( ',', $argv["scriptarguments"] ); |
| 80 | + foreach ( $arguments as &$argument ) { |
| 81 | + list($argumentkey, $argumentvalue) = explode( '=', $argument ); |
| 82 | + $argumentkey = preg_replace( '/[^A-Z0-9]/i', '', $argumentkey ); |
| 83 | + $argumentvalue = preg_replace( "/\\\\/", '\\\\', $argumentvalue ); |
| 84 | + $argumentvalue = preg_replace( "/'/", "\\'", $argumentvalue ); |
| 85 | + |
| 86 | + // Fix escaped separators |
| 87 | + $argumentvalue = preg_replace( "/§UNIQ§/", ",", $argumentvalue ); |
| 88 | + $this->argumentArray["scriptarguments"][$argumentkey] = $argumentvalue; |
| 89 | + } |
| 90 | + } |
| 91 | + if ( isset( $argv["datasep"] ) ) { |
| 92 | + $this->argumentArray["datasep"] = $argv["datasep"]; |
| 93 | + } |
| 94 | + } |
| 95 | + |
| 96 | + function parseData( $input, $parser ) { |
| 97 | + // Replace escaped separators |
| 98 | + $sep = $this->argumentArray["datasep"]; |
| 99 | + $input = preg_replace( "/\\\\$sep/", '§UNIQ§', $input ); |
| 100 | + |
| 101 | + // Parse and sanitize data - escape single quotes and backslashes |
| 102 | + $lines = preg_split( "/\n/", $input, -1, PREG_SPLIT_NO_EMPTY ); |
| 103 | + foreach ( $lines as $line ) { |
| 104 | + $values = explode( ',', $line ); |
| 105 | + foreach ( $values as &$value ) { |
| 106 | + $value = preg_replace( "/\\\\/", "\\\\", $value ); |
| 107 | + $value = preg_replace( "/'/", "\\'", $value ); |
| 108 | + |
| 109 | + // Fix escaped separators |
| 110 | + $value = preg_replace( "/§UNIQ§/", "\\$sep", $value ); |
| 111 | + } |
| 112 | + $this->dataArray[] = $values; |
| 113 | + Plotter::debug( 'plot data values: ', $values ); |
| 114 | + } |
| 115 | + } |
| 116 | +} |
Property changes on: trunk/extensions/Plotter/PlotterParser.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 117 | + native |