Index: trunk/extensions/LiquidThreads/Lqt.i18n.php |
— | — | @@ -85,6 +85,11 @@ |
86 | 86 | 'lqt_delete_return_link' => 'the talkpage', // subst above |
87 | 87 | 'lqt_delete_unallowed' => 'You are not allowed to delete threads.', |
88 | 88 | 'lqt_talkpage_autocreate_summary' => 'Talkpage autocreated when first thread was posted.', |
| 89 | + 'lqt_header_warning_before_big' => '', |
| 90 | + 'lqt_header_warning_big' => 'You are editing a $1. ', |
| 91 | + 'lqt_header_warning_after_big' => 'You might instead want to $2.', |
| 92 | + 'lqt_header_warning_bold' => 'talkpage header', |
| 93 | + 'lqt_header_warning_new_discussion' => 'start a new discussion', |
89 | 94 | ); |
90 | 95 | |
91 | 96 | $messages['ar'] = array( |
Index: trunk/extensions/LiquidThreads/LqtPages.php |
— | — | @@ -556,7 +556,7 @@ |
557 | 557 | * Cheap views that just pass through to MW functions. |
558 | 558 | */ |
559 | 559 | |
560 | | -class TalkpageHeaderView { |
| 560 | +class TalkpageHeaderView extends LqtView { |
561 | 561 | function customizeTabs( $skintemplate, $content_actions ) { |
562 | 562 | unset($content_actions['edit']); |
563 | 563 | unset($content_actions['addsection']); |
— | — | @@ -573,8 +573,20 @@ |
574 | 574 | } |
575 | 575 | |
576 | 576 | function show() { |
577 | | - global $wgHooks; |
| 577 | + global $wgHooks, $wgOut, $wgTitle, $wgRequest; |
578 | 578 | $wgHooks['SkinTemplateTabs'][] = array($this, 'customizeTabs'); |
| 579 | + |
| 580 | + if( $wgRequest->getVal('action') === 'edit' ) { |
| 581 | + $warn_bold = '<strong>' . wfMsg('lqt_header_warning_bold') . '</strong>'; |
| 582 | + $warn_link = '<a href="'.$this->talkpageUrl($wgTitle, 'talkpage_new_thread').'">'. |
| 583 | + wfMsg('lqt_header_warning_new_discussion').'</a>'; |
| 584 | + $wgOut->addHTML('<p class="lqt_header_warning">' . |
| 585 | + wfMsg('lqt_header_warning_before_big', $warn_bold, $warn_link) . |
| 586 | + '<big>' . wfMsg('lqt_header_warning_big', $warn_bold, $warn_link) . '</big>' . |
| 587 | + wfMsg('lqt_header_warning_after_big', $warn_bold, $warn_link) . |
| 588 | + '</p>'); |
| 589 | + } |
| 590 | + |
579 | 591 | return true; |
580 | 592 | } |
581 | 593 | } |