Index: trunk/extensions/UploadWizard/UploadWizard.config.php |
— | — | @@ -24,6 +24,9 @@ |
25 | 25 | // Categories to list by default in the list of cats to add. |
26 | 26 | 'defaultCategories' => array( 'Foobar', 'Locations' ), |
27 | 27 | |
| 28 | + // WikiText to automatically (and silently) add to all uploaded images. |
| 29 | + 'autoWikiText' => '', |
| 30 | + |
28 | 31 | // 'licenses' is a list of licenses you could possibly use elsewhere, for instance in |
29 | 32 | // licensesOwnWork or licensesThirdParty. |
30 | 33 | // It just describes what licenses go with what wikitext, and how to display them in |
Index: trunk/extensions/UploadWizard/includes/specials/SpecialUploadCampaign.php |
— | — | @@ -69,16 +69,17 @@ |
70 | 70 | // Special handling for lists of values per input type. |
71 | 71 | if ( is_array( $data['default'] ) ) { |
72 | 72 | switch ( $data['type'] ) { |
73 | | - case 'text': |
| 73 | + case 'text': case 'textarea': |
74 | 74 | $data['default'] = implode( ', ', $data['default'] ); |
75 | 75 | break; |
76 | 76 | } |
77 | | - |
78 | | - $fields[$name] = $data; |
79 | 77 | } |
80 | | - else { |
81 | | - $fields[$name] = $data; |
| 78 | + |
| 79 | + if ( $data['type'] == 'textarea' ) { |
| 80 | + $data['rows'] = 4; |
82 | 81 | } |
| 82 | + |
| 83 | + $fields[$name] = $data; |
83 | 84 | } |
84 | 85 | |
85 | 86 | return $fields; |
Index: trunk/extensions/UploadWizard/includes/UploadWizardCampaign.php |
— | — | @@ -154,6 +154,7 @@ |
155 | 155 | 'skipTutorial' => 'check', |
156 | 156 | 'autoCategories' => 'text', |
157 | 157 | 'defaultCategories' => 'text', |
| 158 | + 'autoWikiText' => 'textarea', |
158 | 159 | ); |
159 | 160 | } |
160 | 161 | |
Index: trunk/extensions/UploadWizard/UploadWizard.i18n.php |
— | — | @@ -301,6 +301,7 @@ |
302 | 302 | 'mwe-upwiz-campaign-conf-skipTutorial' => 'Skip the licensing tutorial', |
303 | 303 | 'mwe-upwiz-campaign-conf-autoCategories' => 'Categories to add the files to automatically and silently', |
304 | 304 | 'mwe-upwiz-campaign-conf-defaultCategories' => 'Default categories to list in the describe tab', |
| 305 | + 'mwe-upwiz-campaign-conf-autoWikiText' => 'WikiText to automatically add to all uploaded images', |
305 | 306 | |
306 | 307 | // Coolcats |
307 | 308 | 'mw-coolcats-confirm-new-title' => 'Confirm new category', |
Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardDetails.js |
— | — | @@ -688,6 +688,10 @@ |
689 | 689 | wikiText += "=={{int:license-header}}==\n"; |
690 | 690 | wikiText += deed.getLicenseWikiText() + "\n\n"; |
691 | 691 | |
| 692 | + if ( mw.isDefined( mw.UploadWizard.config.autoWikiText ) ) { |
| 693 | + wikiText += mw.UploadWizard.config.autoWikiText; |
| 694 | + } |
| 695 | + |
692 | 696 | // add categories |
693 | 697 | wikiText += _this.div.find( '.categoryInput' ).get(0).getWikiText() + "\n\n"; |
694 | 698 | |