Index: trunk/extensions/Collection/Collection.php |
— | — | @@ -93,6 +93,8 @@ |
94 | 94 | 'rl' => 'PDF', |
95 | 95 | ); |
96 | 96 | |
| 97 | +$wgCollectionPortletFormats = array( 'pdf' ); |
| 98 | + |
97 | 99 | $wgCollectionPortletForLoggedInUsersOnly = false; |
98 | 100 | |
99 | 101 | $wgCollectionNavPopups = true; |
Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -65,6 +65,7 @@ |
66 | 66 | global $wgUser; |
67 | 67 | global $wgCollectionArticleNamespaces; |
68 | 68 | global $wgCollectionFormats; |
| 69 | + global $wgCollectionPortletFormats; |
69 | 70 | global $wgScriptPath; |
70 | 71 | |
71 | 72 | $namespace = $wgTitle->getNamespace(); |
— | — | @@ -110,16 +111,16 @@ |
111 | 112 | } |
112 | 113 | } |
113 | 114 | |
114 | | - foreach ( $wgCollectionFormats as $writer => $name ) { |
| 115 | + foreach ( $wgCollectionPortletFormats as $writer ) { |
115 | 116 | $params['writer'] = $writer; |
116 | 117 | $out .= Xml::tags( 'li', |
117 | 118 | array( 'id' => 'coll-download-as-' . $writer ), |
118 | 119 | $sk->link( |
119 | 120 | SpecialPage::getTitleFor( 'Book', 'render_article/' ), |
120 | | - wfMsgHtml( 'coll-download_as', htmlspecialchars( $name ) ), |
| 121 | + wfMsgHtml( 'coll-download_as', htmlspecialchars( $wgCollectionFormats[$writer] ) ), |
121 | 122 | array( |
122 | 123 | 'rel' => 'nofollow', |
123 | | - 'title' => wfMsg( 'coll-download_as_tooltip', $name ) |
| 124 | + 'title' => wfMsg( 'coll-download_as_tooltip', $wgCollectionFormats[$writer] ) |
124 | 125 | ), |
125 | 126 | $params, |
126 | 127 | array( 'known', 'noclasses' ) |
Index: trunk/extensions/Collection/README.txt |
— | — | @@ -118,6 +118,15 @@ |
119 | 119 | |
120 | 120 | $ mw-render --list-writers |
121 | 121 | |
| 122 | + *$wgCollectionPortletFormats (array)* |
| 123 | + An array containing formats (keys in $wgCollectionFormats) that shall be |
| 124 | + displayed as "Download as XYZ" links in the "Print/export" portlet. |
| 125 | + The default value is:: |
| 126 | + |
| 127 | + array( 'pdf' ); |
| 128 | + |
| 129 | + i.e. there's one link "Download as PDF". |
| 130 | + |
122 | 131 | *$wgCollectionArticleNamespaces (array)* |
123 | 132 | List of namespace numbers for pages which can be added to a collection. |
124 | 133 | Category pages (NS_CATEGORY) are always an exception (all articles in a |