Index: trunk/extensions/LastModified/LastModified.i18n.php |
— | — | @@ -37,6 +37,7 @@ |
38 | 38 | 'lastmodified-label-years' => 'years', |
39 | 39 | 'lastmodified-options' => 'Options', |
40 | 40 | 'lastmodified-display-range-value' => 'Display range value:', |
| 41 | + 'lastmodified-title-tag' => 'View the revision history for this article.', |
41 | 42 | 'lastmodified-seconds' => 'Last updated $1 seconds ago', |
42 | 43 | 'lastmodified-minutes' => 'Last updated $1 minutes ago', |
43 | 44 | 'lastmodified-hours' => 'Last updated $1 hours ago', |
Index: trunk/extensions/LastModified/modules/lastmodified.js |
— | — | @@ -213,13 +213,13 @@ |
214 | 214 | |
215 | 215 | var html = ''; |
216 | 216 | |
217 | | - html += '<div style="float: right;" class="lastmodified">'; |
218 | | - html += '<a href="' + historyLink + '" title="View the revision history for this article.">'; |
| 217 | + html += '<div style="float: right; position: absolute; right: 10px; font-size: 85%;" class="lastmodified">'; |
| 218 | + html += '<a href="' + historyLink + '" title="' + mw.msg( 'lastmodified-title-tag' ) + '">'; |
219 | 219 | html += lastModifiedText; |
220 | 220 | html += '</a>'; |
221 | 221 | html += '</div>'; |
222 | 222 | |
223 | | - $('.mw-content-ltr').prepend( html ); |
| 223 | + $('#content').prepend( html ); |
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
Index: trunk/extensions/LastModified/LastModified.php |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | 'lastmodified-days', |
66 | 66 | 'lastmodified-months', |
67 | 67 | 'lastmodified-years', |
| 68 | + 'lastmodified-title-tag', |
68 | 69 | ), |
69 | 70 | ) + $wgResourceTemplate; |
70 | 71 | |
— | — | @@ -82,7 +83,8 @@ |
83 | 84 | $context = $out->getContext(); |
84 | 85 | $title = $context->getTitle(); |
85 | 86 | $article = Article::newFromTitle( $title, $context ); |
86 | | - if ( $article ){ |
| 87 | + |
| 88 | + if ( $article && ( method_exists( $title, 'getNamespace' ) && $title->getNamespace() == 0 ) ) { |
87 | 89 | $timestamp = $article->getTimestamp(); |
88 | 90 | $out->addMeta( 'last-edited', wfTimestamp ( TS_UNIX, $timestamp ) ); |
89 | 91 | $out->addMeta( 'last-modified-range', $wgLastModifiedRange ); |