PageRenderTime 46ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/extensions/UploadWizard/UploadWizard.config.php

https://github.com/ChuguluGames/mediawiki-svn
PHP | 398 lines | 253 code | 50 blank | 95 comment | 0 complexity | aefb9a86b4da2d97e189a94f91ffb134 MD5 | raw file
  1. <?php
  2. /**
  3. * Upload Wizard Configuration
  4. * Do not modify this file, instead use localsettings.php and set:
  5. * $wgUploadWizardConfig[ 'name'] = 'value';
  6. */
  7. global $wgFileExtensions, $wgServer, $wgScriptPath, $wgAPIModules;
  8. return array(
  9. // Upload wizard has an internal debug flag
  10. 'debug' => false,
  11. // File extensions acceptable in this wiki
  12. 'fileExtensions' => $wgFileExtensions,
  13. // The default api url is for the current wiki ( can override at run time )
  14. 'apiUrl' => $wgServer . $wgScriptPath . '/api.php',
  15. // Categories to automatically (and silently) add all uploaded images into.
  16. 'autoCategories' => array(),
  17. // Deprecated: use autoCategories
  18. 'autoCategory' => '',
  19. // Categories to list by default in the list of cats to add.
  20. 'defaultCategories' => array(),
  21. // If the user didn't add categories, or removed the default categories, add this wikitext.
  22. // Use this to indicate that some human should categorize this file. Does not consider autoCategories, which are hidden.
  23. 'missingCategoriesWikiText' => '',
  24. // WikiText to automatically (and silently) add to all uploaded images.
  25. 'autoWikiText' => '',
  26. // Page containing the (wiki)text to display above the UploadWizard UI.
  27. // $1 is replaced by the language code.
  28. 'headerLabelPage' => '',
  29. // Page containing the (wiki)text to display on top of the "use" page.
  30. // $1 is replaced by the language code.
  31. // When not provided, the message mwe-upwiz-thanks-intro will be used.
  32. 'thanksLabelPage' => '',
  33. // Should the own work option be shown, and if not, what option should be set?
  34. // Possible values: choice, own, notown
  35. 'ownWorkOption' => 'choice',
  36. // Name of the tutorial on Wikimedia Commons. The $1 is replaced with the language desired.
  37. 'tutorialTemplate' => 'Licensing_tutorial_$1.svg',
  38. // The width we want to scale the tutorial to, for our interface.
  39. 'tutorialWidth' => 720,
  40. // Imagemap coordinates of the "helpdesk" button at the bottom, which is supposed to be clickable.
  41. // Empty string or false to not have an imagemap linked to the helpdesk.
  42. 'tutorialHelpdeskCoords' => '27, 1319, 691, 1384',
  43. // Field via which an ID can be provided.
  44. // When non empty, this field will be shown, and $1 will be replaced by it's value.
  45. 'idField' => '',
  46. // Label text to display with the id field.
  47. 'idFieldLabel' => '',
  48. // Page on which the text to display with the id field is stored.
  49. // Overrides idFieldLabel when set. $1 is replaced by the language code.
  50. 'idFieldLabelPage' => '',
  51. // The maximum length of the id field.
  52. 'idFieldMaxLength' => 25,
  53. // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in
  54. // licensesOwnWork or licensesThirdParty.
  55. // It just describes what licenses go with what wikitext, and how to display them in
  56. // a menu of license choices. There probably isn't any reason to delete any entry here.
  57. // Under normal circumstances, the license name is the name of the wikitext template to insert.
  58. // For those that aren't, there is a "templates" property.
  59. 'licenses' => array(
  60. 'cc-by-sa-3.0' => array(
  61. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0',
  62. 'icons' => array( 'cc-by', 'cc-sa' )
  63. ),
  64. 'cc-by-sa-3.0-gfdl' => array(
  65. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-gfdl',
  66. 'templates' => array( 'GFDL', 'cc-by-sa-3.0' ),
  67. 'icons' => array( 'cc-by', 'cc-sa' )
  68. ),
  69. 'cc-by-sa-3.0-at' => array(
  70. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-at',
  71. 'templates' => array( 'cc-by-sa-3.0-at' ),
  72. 'icons' => array( 'cc-by', 'cc-sa' )
  73. ),
  74. 'cc-by-sa-3.0-de' => array(
  75. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-de',
  76. 'templates' => array( 'cc-by-sa-3.0-de' ),
  77. 'icons' => array( 'cc-by', 'cc-sa' )
  78. ),
  79. 'cc-by-sa-3.0-ee' => array(
  80. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-ee',
  81. 'templates' => array( 'cc-by-sa-3.0-ee' ),
  82. 'icons' => array( 'cc-by', 'cc-sa' )
  83. ),
  84. 'cc-by-sa-3.0-es' => array(
  85. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-es',
  86. 'templates' => array( 'cc-by-sa-3.0-es' ),
  87. 'icons' => array( 'cc-by', 'cc-sa' )
  88. ),
  89. 'cc-by-sa-3.0-hr' => array(
  90. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-hr',
  91. 'templates' => array( 'cc-by-sa-3.0-hr' ),
  92. 'icons' => array( 'cc-by', 'cc-sa' )
  93. ),
  94. 'cc-by-sa-3.0-lu' => array(
  95. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-lu',
  96. 'templates' => array( 'cc-by-sa-3.0-lu' ),
  97. 'icons' => array( 'cc-by', 'cc-sa' )
  98. ),
  99. 'cc-by-sa-3.0-nl' => array(
  100. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-nl',
  101. 'templates' => array( 'cc-by-sa-3.0-nl' ),
  102. 'icons' => array( 'cc-by', 'cc-sa' )
  103. ),
  104. 'cc-by-sa-3.0-no' => array(
  105. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-no',
  106. 'templates' => array( 'cc-by-sa-3.0-no' ),
  107. 'icons' => array( 'cc-by', 'cc-sa' )
  108. ),
  109. 'cc-by-sa-3.0-pl' => array(
  110. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-pl',
  111. 'templates' => array( 'cc-by-sa-3.0-pl' ),
  112. 'icons' => array( 'cc-by', 'cc-sa' )
  113. ),
  114. 'cc-by-sa-3.0-ro' => array(
  115. 'msg' => 'mwe-upwiz-license-cc-by-sa-3.0-ro',
  116. 'templates' => array( 'cc-by-sa-3.0-ro' ),
  117. 'icons' => array( 'cc-by', 'cc-sa' )
  118. ),
  119. 'cc-by-3.0' => array(
  120. 'msg' => 'mwe-upwiz-license-cc-by-3.0',
  121. 'icons' => array( 'cc-by' )
  122. ),
  123. 'cc-zero' => array(
  124. 'msg' => 'mwe-upwiz-license-cc-zero',
  125. 'icons' => array( 'cc-zero' )
  126. ),
  127. 'own-pd' => array(
  128. 'msg' => 'mwe-upwiz-license-own-pd',
  129. 'icons' => array( 'cc-zero' ),
  130. 'templates' => array( 'cc-zero' )
  131. ),
  132. 'cc-by-sa-2.5' => array(
  133. 'msg' => 'mwe-upwiz-license-cc-by-sa-2.5',
  134. 'icons' => array( 'cc-by', 'cc-sa' )
  135. ),
  136. 'cc-by-2.5' => array(
  137. 'msg' => 'mwe-upwiz-license-cc-by-2.5',
  138. 'icons' => array( 'cc-by' )
  139. ),
  140. 'cc-by-sa-2.0' => array(
  141. 'msg' => 'mwe-upwiz-license-cc-by-sa-2.0',
  142. 'icons' => array( 'cc-by', 'cc-sa' )
  143. ),
  144. 'cc-by-2.0' => array(
  145. 'msg' => 'mwe-upwiz-license-cc-by-2.0',
  146. 'icons' => array( 'cc-by' )
  147. ),
  148. 'fal' => array(
  149. 'msg' => 'mwe-upwiz-license-fal',
  150. 'templates' => array( 'FAL' )
  151. ),
  152. 'pd-old-100' => array(
  153. 'msg' => 'mwe-upwiz-license-pd-old-100',
  154. 'templates' => array( 'PD-old-100' )
  155. ),
  156. 'pd-old' => array(
  157. 'msg' => 'mwe-upwiz-license-pd-old',
  158. 'templates' => array( 'PD-old' )
  159. ),
  160. 'pd-art' => array(
  161. 'msg' => 'mwe-upwiz-license-pd-art',
  162. 'templates' => array( 'PD-Art' )
  163. ),
  164. 'pd-us' => array(
  165. 'msg' => 'mwe-upwiz-license-pd-us',
  166. 'templates' => array( 'PD-US' )
  167. ),
  168. 'pd-usgov' => array(
  169. 'msg' => 'mwe-upwiz-license-pd-usgov',
  170. 'templates' => array( 'PD-USGov' )
  171. ),
  172. 'pd-usgov-nasa' => array(
  173. 'msg' => 'mwe-upwiz-license-pd-usgov-nasa',
  174. 'templates' => array( 'PD-USGov-NASA' )
  175. ),
  176. 'pd-ineligible' => array(
  177. 'msg' => 'mwe-upwiz-license-pd-ineligible'
  178. ),
  179. 'pd-textlogo' => array(
  180. 'msg' => 'mwe-upwiz-license-pd-textlogo',
  181. 'templates' => array( 'trademarked', 'PD-textlogo' )
  182. ),
  183. 'attribution' => array(
  184. 'msg' => 'mwe-upwiz-license-attribution'
  185. ),
  186. 'gfdl' => array(
  187. 'msg' => 'mwe-upwiz-license-gfdl',
  188. 'templates' => array( 'GFDL' )
  189. )
  190. ),
  191. // radio button selection of some licenses
  192. 'licensesOwnWork' => array(
  193. 'type' => 'or',
  194. 'filterTemplate' => 'self',
  195. 'licenses' => array(
  196. 'cc-by-sa-3.0',
  197. 'cc-by-3.0',
  198. 'own-pd'
  199. ),
  200. 'defaults' => array( 'cc-by-sa-3.0' )
  201. ),
  202. // checkbox selection of all licenses
  203. 'licensesThirdParty' => array(
  204. 'type' => 'and',
  205. 'licenseGroups' => array(
  206. array(
  207. // This should be a list of all CC licenses we can reasonably expect to find around the web
  208. 'head' => 'mwe-upwiz-license-cc-head',
  209. 'subhead' => 'mwe-upwiz-license-cc-subhead',
  210. 'licenses' => array(
  211. 'cc-by-sa-3.0',
  212. 'cc-by-sa-2.5',
  213. 'cc-by-3.0',
  214. 'cc-by-2.5',
  215. 'cc-zero'
  216. )
  217. ),
  218. array(
  219. // n.b. as of April 2011, Flickr still uses CC 2.0 licenses.
  220. // The White House also has an account there, hence the Public Domain US Government license
  221. 'head' => 'mwe-upwiz-license-flickr-head',
  222. 'subhead' => 'mwe-upwiz-license-flickr-subhead',
  223. 'prependTemplates' => array( 'flickrreview' ),
  224. 'licenses' => array(
  225. 'cc-by-sa-2.0',
  226. 'cc-by-2.0',
  227. 'pd-usgov',
  228. )
  229. ),
  230. array(
  231. 'head' => 'mwe-upwiz-license-public-domain-head',
  232. 'licenses' => array(
  233. 'pd-old-100',
  234. 'pd-old',
  235. 'pd-art',
  236. 'pd-us',
  237. )
  238. ),
  239. array(
  240. // omitted navy because it is believed only MultiChil uses it heavily. Could add it back
  241. 'head' => 'mwe-upwiz-license-usgov-head',
  242. 'licenses' => array(
  243. 'pd-usgov',
  244. 'pd-usgov-nasa'
  245. )
  246. ),
  247. array(
  248. 'head' => 'mwe-upwiz-license-misc',
  249. 'licenses' => array(
  250. 'fal'
  251. )
  252. ),
  253. array(
  254. 'head' => 'mwe-upwiz-license-none-applicable-head',
  255. 'subhead' => 'mwe-upwiz-license-none-applicable-subhead',
  256. 'special' => 'delete'
  257. )
  258. ),
  259. 'defaults' => array(),
  260. ),
  261. // Default thumbnail width
  262. 'thumbnailWidth' => 100,
  263. // Max thumbnail height:
  264. 'thumbnailMaxHeight' => 100,
  265. // Large thumbnail width
  266. 'largeThumbnailWidth' => 500,
  267. // Large thumbnail max height
  268. 'largeThumbnailMaxHeight' => 500,
  269. // Max author string length
  270. 'maxAuthorLength' => 100,
  271. // Min author string length
  272. 'minAuthorLength' => 1,
  273. // Max source string length
  274. 'maxSourceLength' => 200,
  275. // Min source string length
  276. 'minSourceLength' => 5,
  277. // Max file title string length
  278. 'maxTitleLength' => 200,
  279. // Min file title string length
  280. 'minTitleLength' => 5,
  281. // Max file description length
  282. 'maxDescriptionLength' => 4096,
  283. // Min file description length
  284. 'minDescriptionLength' => 5,
  285. // Max length for other file information:
  286. 'maxOtherInformationLength' => 4096,
  287. // Max number of simultaneous upload requests
  288. 'maxSimultaneousConnections' => 3,
  289. // Max number of uploads for a given form
  290. 'maxUploads' => 10,
  291. // not for use with all wikis.
  292. // The ISO 639 code for the language tagalog is "tl".
  293. // Normally we name templates for languages by the ISO 639 code.
  294. // Commons already had a template called 'tl: though.
  295. // so, this workaround will cause tagalog descriptions to be saved with this template instead.
  296. 'languageTemplateFixups' => array( 'tl' => 'tgl' ),
  297. // XXX this is horribly confusing -- some file restrictions are client side, others are server side
  298. // the filename prefix blacklist is at least server side -- all this should be replaced with PHP regex config
  299. // or actually, in an ideal world, we'd have some way to reliably detect gibberish, rather than trying to
  300. // figure out what is bad via individual regexes, we'd detect badness. Might not be too hard.
  301. //
  302. // we can export these to JS if we so want.
  303. // filenamePrefixBlacklist: wgFilenamePrefixBlacklist,
  304. //
  305. // filenameRegexBlacklist: [
  306. // /^(test|image|img|bild|example?[\s_-]*)$/, // test stuff
  307. // /^(\d{10}[\s_-][0-9a-f]{10}[\s_-][a-z])$/ // flickr
  308. // ]
  309. // Check if we want to enable firefogg, will result in
  310. // 1) firefogg install recommendation when users try to upload media asset with an extension in the
  311. // transcodeExtensionList
  312. // 2) Once the user installs firefogg its used for all uploads because of the security model
  313. // of the file select box, you can't pass off local file references to add ons. Firefogg
  314. // supports "passthrough" mode so that assets that don't need conversions behave very similar
  315. // to a normal XHR post.
  316. 'enableFirefogg' => false,
  317. // Check if we want to enable FormData upload
  318. 'enableFormData' => false,
  319. // Setup list of video extensions for recomending firefogg.
  320. 'transcodeExtensionList' => array( 'avi','asf','asx','wmv','wmx','dv','rm','ra','3gp','mkv',
  321. 'mp4','m4v','mov','qt','mpeg','mpeg2','mp2','mpg'),
  322. // Firefogg encode settings copied from TimedMediHandler high end ogg. Once Timed Media Handler
  323. // is added, these videos will be transcoded by the server to lower resolutions for web playback.
  324. // Also we should switch uploadWizard to encode to high quality WebM once TMH is deployed since it
  325. // will provide a higher quality source upload file.
  326. 'firefoggEncodeSettings' => array(
  327. 'maxSize' => '1280', // 720P
  328. 'videoQuality' => 6,
  329. 'audioQuality' => 3,
  330. 'noUpscaling' => 'true',
  331. 'keyframeInterval' => '128',
  332. 'videoCodec' => 'theora',
  333. ),
  334. // Set skipTutorial to true to always skip tutorial step
  335. 'skipTutorial' => false,
  336. // Wiki page for leaving Upload Wizard feedback, for example 'Commons:Upload wizard feedback'
  337. 'feedbackPage' => '',
  338. // Bugzilla page for UploadWizard bugs
  339. 'bugList' => 'http://bugzilla.wikimedia.org/buglist.cgi?query_format=advanced&component=UploadWizard&resolution=---&product=MediaWiki+extensions',
  340. // TranslateWiki page for help with translations
  341. 'translateHelp' => 'http://translatewiki.net/w/i.php?title=Special:Translate&group=ext-uploadwizard',
  342. // URL for alternative uploading form
  343. 'altUploadForm' => '',
  344. // Is titleBlacklist API even available?
  345. 'useTitleBlacklistApi' => array_key_exists( 'titleblacklist', $wgAPIModules ),
  346. // Wiki page for reporting issues with the blacklist
  347. 'blacklistIssuesPage' => '',
  348. );