Index: trunk/extensions/EtherpadLite/EtherpadLite.php |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | 'path' => __FILE__, |
66 | 66 | 'name' => 'EtherpadLite', |
67 | 67 | 'author' => array( 'Thomas Gries' ), |
68 | | - 'version' => '1.11 20120219', |
| 68 | + 'version' => '1.12 20120309', |
69 | 69 | 'url' => 'https://www.mediawiki.org/wiki/Extension:EtherpadLite', |
70 | 70 | 'descriptionmsg' => 'etherpadlite-desc', |
71 | 71 | ); |
— | — | @@ -104,3 +104,20 @@ |
105 | 105 | |
106 | 106 | # include "*" if you expressly want to allow all urls (you should not do this) |
107 | 107 | # $wgEtherpadLiteUrlWhitelist = array( "*" ); |
| 108 | + |
| 109 | +// If you want to see images in feed items, then you need to globally allow |
| 110 | +// image tags in your wiki by using the MediaWiki parameter; default: false |
| 111 | +// $wgAllowImageTag = true; |
| 112 | + |
| 113 | +// Parameter to enable the automatic tracking category |
| 114 | +// for all pages using this parser extension |
| 115 | +// |
| 116 | +// Category name [[MediaWiki:etherpadlite-tracking-category]] (default) |
| 117 | +// $wgEtherpadLiteTrackingCategory = true; |
| 118 | +// |
| 119 | +// you can assign a specific category name [[MediaWiki:Etherpadlite-mycategory]] |
| 120 | +// $wgEtherpadLiteTrackingCategory = 'etherpadlite-mycategory'; |
| 121 | +// |
| 122 | +// you can disable the use of a tracking category |
| 123 | +// $wgEtherpadLiteTrackingCategory = false; |
| 124 | +$wgEtherpadLiteTrackingCategory = true; |
Index: trunk/extensions/EtherpadLite/EtherpadLite_body.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | global $wgEtherpadLiteDefaultPadUrl, $wgEtherpadLiteDefaultWidth, $wgEtherpadLiteDefaultHeight, |
41 | 41 | $wgEtherpadLiteMonospacedFont, $wgEtherpadLiteShowControls, $wgEtherpadLiteShowLineNumbers, |
42 | 42 | $wgEtherpadLiteShowChat, $wgEtherpadLiteShowAuthorColors, $wgEtherpadLiteUrlWhitelist, |
43 | | - $wgEtherpadLitePadsOnThisPage; |
| 43 | + $wgEtherpadLitePadsOnThisPage, $wgEtherpadLiteTrackingCategory; |
44 | 44 | |
45 | 45 | # check the user input |
46 | 46 | |
— | — | @@ -168,24 +168,30 @@ |
169 | 169 | |
170 | 170 | wfDebug( "EtherpadLite::EtherpadLiteRender $output\n" ); |
171 | 171 | |
| 172 | + if ( $wgEtherpadLiteTrackingCategory === true ) { |
| 173 | + $parser->addTrackingCategory( 'etherpadlite-tracking-category' ); |
| 174 | + } elseif ( is_string( $wgEtherpadLiteTrackingCategory ) ) { |
| 175 | + $parser->addTrackingCategory( $wgEtherpadLiteTrackingCategory ); |
| 176 | + } |
| 177 | + |
172 | 178 | return $output; |
173 | 179 | |
174 | 180 | } |
175 | 181 | |
176 | 182 | /** |
177 | 183 | * Output an error message, all wraped up nicely. |
178 | | - * @param String $errorName The system message that this error is |
| 184 | + * @param String $errorMessageName The system message that this error is |
179 | 185 | * @param String|Array $param Error parameter (or parameters) |
180 | 186 | * @return String Html that is the error. |
181 | 187 | */ |
182 | | - private static function EtherpadLiteError( $errorName, $param ) { |
| 188 | + private static function EtherpadLiteError( $errorMessageName, $param ) { |
183 | 189 | |
184 | 190 | // Anything from a parser tag should use Content lang for message, |
185 | 191 | // since the cache doesn't vary by user language: do not use wfMsgForContent but wfMsgForContent |
186 | 192 | // The ->parse() part makes everything safe from an escaping standpoint. |
187 | 193 | |
188 | 194 | return Html::rawElement( 'span', array( 'class' => 'error' ), |
189 | | - wfMessage( $errorName )->inContentLanguage()->params( $param )->parse() |
| 195 | + "Extension:EtherpadLite: -- Error: " . wfMessage( $errorMessageName )->inContentLanguage()->params( $param )->parse() |
190 | 196 | ); |
191 | 197 | |
192 | 198 | } |
Index: trunk/extensions/EtherpadLite/EtherpadLite.i18n.php |
— | — | @@ -13,6 +13,7 @@ |
14 | 14 | */ |
15 | 15 | $messages['en'] = array( |
16 | 16 | 'etherpadlite-desc' => 'Adds <eplite> parser tag to embed one or many Etherpad Lite pads (which are hosted on local or external Etherpad Lite server/s) on pages', |
| 17 | + 'etherpadlite-tracking-category' => 'Etherpad', |
17 | 18 | 'etherpadlite-invalid-pad-url' => '"$1" is not a valid Etherpad Lite URL or pad name.', |
18 | 19 | 'etherpadlite-url-is-not-whitelisted' => '"$1" is not in the whitelist of allowed Etherpad Lite servers. {{PLURAL:$3|$2 is the only allowed server|The allowed servers are as follows: $2}}.', |
19 | 20 | 'etherpadlite-empty-whitelist' => '"$1" is not in the whitelist of allowed Etherpad Lite servers. There are no allowed servers in the whitelist.', |
— | — | @@ -32,6 +33,7 @@ |
33 | 34 | * $1 is a URL not in the whitelist for Etherpad Lite servers.', |
34 | 35 | 'etherpadlite-pad-used-more-than-once' => 'Error if users try to show multiple frames of the very same pad. Each pad must be unique on a wiki page. Parameters: |
35 | 36 | * $1 is a full pad URL (server/padid).', |
| 37 | + 'etherpadlite-tracking-category' => 'The name of a category for all pages which use the <eplite> parser extension tag. The category is automatically added unless the feature is disabled.', |
36 | 38 | ); |
37 | 39 | |
38 | 40 | /** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |