r52358 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52357‎ | r52358 | r52359 >
Date:14:27, 24 June 2009
Author:werdna
Status:deferred
Tags:
Comment:
LiquidThreads visual refresh:
* Except for the reply button, move the actions and signature above the post, in a mini-header.
* Revamp "edited" display, with separate messages for edited by author and by others, highlighting the fact that it was edited by others in red.
* Add icon for replying.
* Fix bug where clicking on a thread in the TOC went below, not above the header.
* Refactor some of the thread display code to be more readable and maintainable.
* Usual conversion of messages from raw to wikitext.
* Move reply context inside post, underneath header.
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/LqtView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php (modified) (history)
  • /trunk/extensions/LiquidThreads/icons (added) (history)
  • /trunk/extensions/LiquidThreads/icons/arrow-down-icon.png (added) (history)
  • /trunk/extensions/LiquidThreads/icons/reply.png (added) (history)
  • /trunk/extensions/LiquidThreads/lqt.css (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/i18n/Lqt.i18n.php
@@ -154,6 +154,9 @@
155155 'lqt-history-time' => 'Time',
156156 'lqt-history-user' => 'User',
157157 'lqt-history-action' => 'Activity',
 158+ 'lqt-thread-edited-author'=> 'Edited by author',
 159+ 'lqt-thread-edited-others'=> 'Edited by other users',
 160+ 'lqt-header-actions' => 'Actions',
158161
159162 // Logging
160163 'lqt-log-name' => 'Threaded discussion log',
Index: trunk/extensions/LiquidThreads/lqt.css
@@ -310,7 +310,6 @@
311311
312312 .lqt_footer {
313313 margin: 0;
314 - font-size: smaller;
315314 color: #777;
316315 padding-top: 0;
317316 padding-bottom: 0;
@@ -322,12 +321,6 @@
323322 .lqt_footer li {
324323 display: inline;
325324 list-style-type: none;
326 - padding-right: 0.6em;
327 - margin-top: 0;
328 - margin-bottom: 0;
329 -
330 - background-color: #efefef;
331 - border-bottom: solid 1px #ddd;
332325 }
333326
334327 /* This doesn't work in IE, so we need to replace it. What we want is
@@ -466,3 +459,96 @@
467460 vertical-align: top;
468461 padding-top: 1em;
469462 }
 463+
 464+.lqt-thread-header {
 465+ border-bottom: 1px solid #aaaaaa;
 466+ clear: both;
 467+ line-height: 2em;
 468+}
 469+
 470+.lqt-thread-header-info > span {
 471+ padding-left: 1em;
 472+ padding-right: 1em;
 473+}
 474+
 475+.lqt-thread-header-author {
 476+ font-weight: bold;
 477+}
 478+
 479+.lqt-thread-header-edited-author {
 480+ font-weight: bold;
 481+}
 482+
 483+.lqt-thread-header-edited-others {
 484+ font-weight: bold;
 485+ color: #880000;
 486+}
 487+
 488+.lqt-command-icon {
 489+ width: 1.5em;
 490+ height: 1.5em;
 491+}
 492+
 493+li.lqt-command-reply {
 494+ text-align: right;
 495+}
 496+
 497+.lqt-thread-header-commands {
 498+ float: right;
 499+ font-size: 85%;
 500+ margin: 0;
 501+ margin-right: 2em;
 502+}
 503+
 504+.lqt-thread-header-commands:hover {
 505+ background-color: #eeeeee;
 506+}
 507+
 508+.lqt-thread-actions-trigger {
 509+ padding: 0.5em;
 510+}
 511+
 512+.lqt-thread-header-commands:hover .lqt-thread-actions-trigger {
 513+ border: 1px solid #aaaaaa;
 514+ border-bottom: none;
 515+}
 516+
 517+.lqt-thread-header-commands ul {
 518+ display: none;
 519+ position: absolute;
 520+ list-style-type: none !important;
 521+ list-style-image: none !important;
 522+ border: 1px solid #aaaaaa;
 523+ border-top: none;
 524+ background-color: #eeeeee;
 525+ margin: 0 !important;
 526+}
 527+
 528+.lqt-thread-header-commands:hover ul {
 529+ display: block;
 530+}
 531+
 532+.lqt-thread-header-command-list li {
 533+ padding-left: 0.5em;
 534+ padding-right: 0.5em;
 535+ margin-top: 0;
 536+ margin-bottom: 0;
 537+ list-style-type: none;
 538+ list-style-image: none;
 539+}
 540+
 541+.lqt-thread-actions-trigger {
 542+ margin-bottom: 0;
 543+}
 544+
 545+.lqt-thread-actions-icon {
 546+ background-image: url('icons/arrow-down-icon.png');
 547+ background-position: center-bottom;
 548+ background-repeat: no-repeat;
 549+ height: 80%;
 550+ width: 1em;
 551+ height: 1em;
 552+ display: inline-block;
 553+ vertical-align: middle;
 554+ padding-bottom: 0.5em;
 555+}
Index: trunk/extensions/LiquidThreads/classes/LqtView.php
@@ -548,45 +548,59 @@
549549 /**
550550 * Example return value:
551551 * array (
552 - * 0 => array( 'label' => 'Edit',
 552+ * edit => array( 'label' => 'Edit',
553553 * 'href' => 'http...',
554554 * 'enabled' => false ),
555 - * 1 => array( 'label' => 'Reply',
 555+ * reply => array( 'label' => 'Reply',
556556 * 'href' => 'http...',
557557 * 'enabled' => true )
558558 * )
559559 */
560 - function threadFooterCommands( $thread ) {
 560+ function threadCommands( $thread ) {
561561 wfLoadExtensionMessages( 'LiquidThreads' );
562562 $commands = array();
563563
564564 $user_can_edit = $thread->root()->getTitle()->quickUserCan( 'edit' );
 565+ $editMsg = $user_can_edit ? 'edit' : 'viewsource';
565566
566 - $commands[] = array( 'label' => $user_can_edit
567 - ? wfMsg( 'edit' ) : wfMsg( 'viewsource' ),
 567+ $commands['edit'] = array( 'label' => wfMsgExt( $editMsg, 'parseinline' ),
568568 'href' => $this->talkpageUrl( $this->title, 'edit', $thread ),
569569 'enabled' => true );
570570
571 - $commands[] = array( 'label' => wfMsg( 'history_short' ),
572 - 'href' => self::permalinkUrlWithQuery( $thread, 'action=history' ),
 571+ $history_url = self::permalinkUrlWithQuery( $thread, array( 'action' => 'history' ) );
 572+ $commands['history'] = array( 'label' => wfMsgExt( 'history_short', 'parseinline' ),
 573+ 'href' => $history_url,
573574 'enabled' => true );
574575
575 - $commands[] = array( 'label' => wfMsg( 'lqt_permalink' ),
 576+ $commands['permalink'] = array( 'label' => wfMsgExt( 'lqt_permalink', 'parseinline' ),
576577 'href' => self::permalinkUrl( $thread ),
577578 'enabled' => true );
578579
579 - if ( in_array( 'delete', $this->user->getRights() ) ) {
580 - $delete_url = SpecialPage::getTitleFor( 'DeleteThread' )->getFullURL()
581 - . '/' . $thread->title()->getPrefixedURL();
582 - $commands[] = array( 'label' => $thread->type() == Threads::TYPE_DELETED ? wfMsg( 'lqt_undelete' ) : wfMsg( 'delete' ),
583 - 'href' => $delete_url,
 580+ if ( $this->user->isAllowed( 'delete' ) ) {
 581+ $threadText = $thread->title()->getPrefixedText();
 582+ $deleteTitle = SpecialPage::getTitleFor( 'DeleteThread', $threadText );
 583+ $delete_url = $deleteTitle->getFullURL();
 584+ $deleteMsg = $thread->type() == Threads::TYPE_DELETED ? 'lqt_undelete' : 'delete';
 585+
 586+ $commands['delete'] = array( 'label' => wfMsgExt( $deleteMsg, 'parseinline' ),
 587+ 'href' => $delete_url,
584588 'enabled' => true );
585589 }
586590
587 - $commands[] = array( 'label' => '<b class="lqt_reply_link">' . wfMsg( 'lqt_reply' ) . '</b>',
 591+ return $commands;
 592+ }
 593+
 594+ // Commands for the bottom.
 595+ function threadFooterCommands( $thread ) {
 596+ wfLoadExtensionMessages( 'LiquidThreads' );
 597+
 598+ $commands = array();
 599+
 600+ $commands['reply'] = array( 'label' => wfMsgExt( 'lqt_reply', 'parseinline' ),
588601 'href' => $this->talkpageUrl( $this->title, 'reply', $thread ),
589 - 'enabled' => $user_can_edit );
590 -
 602+ 'enabled' => true,
 603+ 'icon' => 'reply.png');
 604+
591605 return $commands;
592606 }
593607
@@ -594,23 +608,23 @@
595609 wfLoadExtensionMessages( 'LiquidThreads' );
596610 $commands = array();
597611
598 - $commands[] = array( 'label' => wfMsg( 'history_short' ),
 612+ $commands['history'] = array( 'label' => wfMsg( 'history_short' ),
599613 'href' => self::permalinkUrl( $thread, 'thread_history' ),
600614 'enabled' => true );
601615
602616 if ( in_array( 'move', $this->user->getRights() ) ) {
603617 $move_href = SpecialPage::getTitleFor( 'MoveThread' )->getFullURL()
604618 . '/' . $thread->title()->getPrefixedURL();
605 - $commands[] = array( 'label' => wfMsg( 'move' ),
 619+ $commands['move'] = array( 'label' => wfMsg( 'move' ),
606620 'href' => $move_href,
607621 'enabled' => true );
608622 }
609623 if ( !$this->user->isAnon() && !$thread->title()->userIsWatching() ) {
610 - $commands[] = array( 'label' => wfMsg( 'watch' ),
 624+ $commands['watch'] = array( 'label' => wfMsg( 'watch' ),
611625 'href' => self::permalinkUrlWithQuery( $thread, 'action=watch' ),
612626 'enabled' => true );
613627 } else if ( !$this->user->isAnon() ) {
614 - $commands[] = array( 'label' => wfMsg( 'unwatch' ),
 628+ $commands['unwatch'] = array( 'label' => wfMsg( 'unwatch' ),
615629 'href' => self::permalinkUrlWithQuery( $thread, 'action=unwatch' ),
616630 'enabled' => true );
617631 }
@@ -620,7 +634,7 @@
621635 $thread->title()->getPrefixedText() );
622636 $delete_href = $delete_title->getFullURL();
623637
624 - $commands[] = array( 'label' => wfMsg( 'delete' ),
 638+ $commands['delete'] = array( 'label' => wfMsg( 'delete' ),
625639 'href' => $delete_href,
626640 'enabled' => true );
627641 }
@@ -667,35 +681,71 @@
668682 }
669683 $this->output->addHTML( '</li></div>' );
670684 }
 685+
 686+ function showThreadHeader( $thread ) {
 687+ global $wgLang;
 688+
 689+ $sk = $this->user->getSkin();
 690+ $html = '';
 691+
 692+ $infoElements = array();
 693+
 694+ // Author name.
 695+ $author = $thread->root()->originalAuthor();
 696+ $signature = $sk->userLink( $author->getId(), $author->getName() );
 697+ $signature = Xml::tags( 'span', array( 'class' => 'lqt-thread-header-author' ),
 698+ $signature );
 699+ $signature .= $sk->userToolLinks( $author->getId(), $author->getName() );
 700+ $infoElements[] = Xml::tags( 'span', array( 'class' => 'lqt-thread-header-signature' ),
 701+ $signature );
 702+
 703+ $timestamp = $wgLang->timeanddate( $thread->created(), true );
 704+ $infoElements[] = Xml::element( 'span', array( 'class' => 'lqt-thread-header-timestamp' ),
 705+ $timestamp );
 706+
 707+ // Check for edited flag.
 708+ $editedFlag = $thread->editedness();
 709+ $ebLookup = array( Threads::EDITED_BY_AUTHOR => 'author',
 710+ Threads::EDITED_BY_OTHERS => 'others' );
 711+ if ( isset( $ebLookup[$editedFlag] ) ) {
671712
 713+ $editedBy = $ebLookup[$editedFlag];
 714+ $editedNotice = wfMsgExt( 'lqt-thread-edited-'.$editedBy, 'parseinline' );
 715+ $infoElements[] = Xml::element( 'span', array( 'class' =>
 716+ 'lqt-thread-header-edited-'.$editedBy ),
 717+ $editedNotice );
 718+ }
 719+
 720+ $html .= Xml::tags( 'span', array( 'class' => 'lqt-thread-header-info' ),
 721+ $wgLang->pipeList( $infoElements ) );
 722+
 723+ /// RHS � actions. Show as a drop-down
 724+ $commands = $this->threadCommands( $thread );
 725+ $commandHTML = Xml::tags( 'ul', array( 'class' => 'lqt-thread-header-command-list' ),
 726+ $this->listItemsForCommands( $commands ) );
 727+
 728+ $triggerText = wfMsgExt( 'lqt-header-actions', 'parseinline' ) .
 729+ Xml::tags( 'span', array('class' => 'lqt-thread-actions-icon'),
 730+ '&nbsp;');
 731+ $dropDownTrigger = Xml::tags( 'span',
 732+ array( 'class' => 'lqt-thread-actions-trigger' ),
 733+ $triggerText );
 734+ $dropDown = Xml::tags( 'div',
 735+ array( 'class' => 'lqt-thread-header-commands' ),
 736+ $dropDownTrigger . $commandHTML );
 737+ $html .= $dropDown;
 738+
 739+ $html = Xml::tags( 'div', array( 'class' => 'lqt-thread-header' ), $html );
 740+
 741+ $this->output->addHTML( $html );
 742+ }
 743+
672744 function showThreadFooter( $thread ) {
673745 global $wgLang, $wgUser;
674746
675747 $sk = $wgUser->getSkin();
676748 $html = '';
677749
678 - // Author signature.
679 - $author = $thread->root()->originalAuthor();
680 - $sig = $this->user->getSkin()->userLink( $author->getID(), $author->getName() ) .
681 - $this->user->getSkin()->userToolLinks( $author->getID(), $author->getName() );
682 - $html .= Xml::tags( 'li', array( 'class' => 'lqt_author_sig' ), $sig );
683 -
684 - // Edited flag
685 - if ( $thread->editedness() == Threads::EDITED_BY_AUTHOR || $thread->editedness() == Threads::EDITED_BY_OTHERS ) {
686 - wfLoadExtensionMessages( 'LiquidThreads' );
687 - list($edited_title) = self::permalinkData( $thread );
688 - $edited_text = wfMsgExt( 'lqt_edited_notice', 'parseinline' );
689 - $edited_link = $sk->link( $edited_title, $edited_text,
690 - array( 'class' => 'lqt_edited_notice'),
691 - array( 'action' => 'history' ) );
692 -
693 - $html .= Xml::tags( 'li', array( 'class' => 'lqt_edited_notice' ), $edited_link );
694 - }
695 -
696 - // Timestamp
697 - $timestamp = $wgLang->timeanddate( $thread->created(), true );
698 - $html .= Xml::element( 'li', null, $timestamp );
699 -
700750 // Footer commands
701751 $footerCommands =
702752 $this->listItemsForCommands( $this->threadFooterCommands( $thread ) );
@@ -709,35 +759,57 @@
710760
711761 function listItemsForCommands( $commands ) {
712762 $result = array();
713 - foreach ( $commands as $command ) {
 763+ foreach ( $commands as $key => $command ) {
714764 $label = $command['label'];
715765 $href = $command['href'];
716766 $enabled = $command['enabled'];
 767+
 768+ if ( isset( $command['icon'] ) ) {
 769+ global $wgScriptPath;
 770+ $src = $wgScriptPath . '/extensions/LiquidThreads/icons/'.$command['icon'];
 771+ $icon = Xml::element( 'img', array( 'src' => $src,
 772+ 'alt' => $label,
 773+ 'class' => 'lqt-command-icon' ) );
 774+ $label = $icon.'&nbsp;'.$label;
 775+ }
 776+
 777+ $thisCommand = '';
717778
718779 if ( $enabled ) {
719 - $result[] = "<li><a href=\"$href\">$label</a></li>";
 780+ $thisCommand = Xml::tags( 'a', array( 'href' => $href ), $label );
720781 } else {
721 - $result[] = "<li><span class=\"lqt_command_disabled\">$label</span></li>";
 782+ $thisCommand = Xml::tags( 'span', array( 'class' => 'lqt_command_disabled' ),
 783+ $label );
722784 }
 785+
 786+ $thisCommand = Xml::tags( 'li',
 787+ array( 'class' => 'lqt-command lqt-command-'.$key ),
 788+ $thisCommand );
 789+
 790+ $result[] = $thisCommand;
723791 }
724 - return join( "", $result );
 792+ return join( ' ', $result );
725793 }
726794
727 - function showRootPost( $thread ) {
 795+ /** Shows a normal (i.e. not deleted or moved) thread body */
 796+ function showThreadBody( $thread ) {
 797+
 798+ // Remove 'editsection', it won't work.
728799 $popts = $this->output->parserOptions();
729800 $previous_editsection = $popts->getEditSection();
730801 $popts->setEditSection( false );
731802 $this->output->parserOptions( $popts );
732803
733804 $post = $thread->root();
 805+
 806+ $divClass = $this->postDivClass( $thread );
 807+ $html = Xml::openElement( 'div', array( 'class' => $divClass ) );
734808
735809 // This is a bit of a hack to have individual histories work.
736810 // We can grab oldid either from lqt_oldid (which is a thread rev),
737811 // or from oldid (which is a page rev). But oldid only applies to the
738812 // thread being requested, not any replies. TODO: eliminate the need
739813 // for article-level histories.
740 - $divClass = $this->postDivClass( $thread );
741 - $html = Xml::openElement( 'div', array( 'class' => $divClass ) );
742814 $page_rev = $this->request->getVal( 'oldid', null );
743815 if ( $page_rev !== null && $this->title->equals( $thread->root()->getTitle() ) ) {
744816 $oldid = $page_rev;
@@ -745,6 +817,7 @@
746818 $oldid = $thread->isHistorical() ? $thread->rootRevision() : null;
747819 }
748820
 821+ // If we're editing the thread, show the editing form.
749822 if ( $this->methodAppliesToThread( 'edit', $thread ) ) {
750823 $this->output->addHTML( $html );
751824 $html = '';
@@ -753,13 +826,17 @@
754827 // so I'm just flushing the HTML and displaying it as-is.
755828 $this->showPostEditingForm( $thread );
756829 } else {
 830+ $html .= $this->showThreadHeader( $thread );
 831+ $html .= $this->getReplyContext( $thread );
757832 $html .= $this->showPostBody( $post, $oldid );
758833 $html .= $this->showThreadFooter( $thread );
759834 }
760835
761836 // wish I didn't have to use this open/closeElement cruft.
762837 $html .= Xml::closeElement( 'div' );
763 -
 838+
 839+
 840+ // If we're replying to this thread, show the reply form after it.
764841 if ( $this->methodAppliesToThread( 'reply', $thread ) ) {
765842 // As with above, flush HTML to avoid refactoring EditPage.
766843 $html .= $this->indent( $thread );
@@ -774,6 +851,8 @@
775852 $this->output->parserOptions( $popts );
776853 }
777854
 855+ /** Shows the headING for a thread (as opposed to the headeER for a post within
 856+ a thread). */
778857 function showThreadHeading( $thread ) {
779858 if ( $thread->hasDistinctSubject() ) {
780859 if ( $thread->hasSuperthread() ) {
@@ -803,21 +882,9 @@
804883 static function anchorName( $thread ) {
805884 return "lqt_thread_{$thread->id()}";
806885 }
807 -
808 - function showThread( $thread ) {
809 - global $wgLang;
810 -
811 - $sk = $this->user->getSkin();
812 -
813 - $html = '';
814 -
815 - // Safeguard
816 - if ( $thread->type() == Threads::TYPE_DELETED
817 - && ! ($this->request->getBool( 'lqt_show_deleted_threads' )
818 - && $this->user->isAllowed( 'deletedhistory' ) ) ) {
819 - return;
820 - }
821 -
 886+
 887+ // Gets HTML for the 'in reply to' thing if warranted.
 888+ function getReplyContext( $thread ) {
822889 if ( $this->lastUnindentedSuperthread ) {
823890 wfLoadExtensionMessages( 'LiquidThreads' );
824891 $tmp = $this->lastUnindentedSuperthread;
@@ -826,52 +893,72 @@
827894 $msg = wfMsgExt( 'lqt_in_response_to', array( 'parseinline', 'replaceafter' ),
828895 array( $replyLink, $tmp->root()->originalAuthor()->getName() ) );
829896
830 - $html .= Xml::tags( 'span', array( 'class' => 'lqt_nonindent_message' ),
 897+ return Xml::tags( 'span', array( 'class' => 'lqt_nonindent_message' ),
831898 "&larr; $msg" );
832899 }
 900+
 901+ return '';
 902+ }
 903+
 904+ // Display a moved thread
 905+ function showMovedThread( $thread ) {
 906+ global $wgLang;
 907+
 908+ // Grab target thread
 909+ $article = new Article( $thread->title() );
 910+ $target = Title::newFromRedirect( $article->getText() );
 911+ $t_thread = Threads::withRoot( new Article( $target ) );
 912+
 913+ // Grab data about the new post.
 914+ $author = $thread->root()->originalAuthor();
 915+ $sig = $sk->userLink( $author->getID(), $author->getName() ) .
 916+ $sk->userToolLinks( $author->getID(), $author->getName() );
 917+
 918+ $html =
 919+ wfMsgExt( 'lqt_move_placeholder', array( 'parseinline', 'replaceafter' ),
 920+ $sk->link( $target ),
 921+ $sig,
 922+ $wgLang->date( $thread->modified() ),
 923+ $wgLang->time( $thread->modified() )
 924+ );
 925+
 926+ $this->output->addHTML( $html );
 927+ }
 928+
 929+ /** Shows a deleted thread. Returns true to show the thread body */
 930+ function showDeletedThread( $thread ) {
 931+ if ( $this->user->isAllowed( 'deletedhistory' ) ) {
 932+ $this->output->addWikiMsg( 'lqt_thread_deleted_for_sysops' );
 933+ return true;
 934+ } else {
 935+ $msg = wfMsgExt( 'lqt_thread_deleted', 'parseinline' );
 936+ $msg = Xml::tags( 'em', null, $msg );
 937+ $msg = Xml::tags( 'p', null, $msg );
833938
834 -
835 - $html .= $this->showThreadHeading( $thread );
836 -
837 - $html .= Xml::element( 'a', array( 'name' => $this->anchorName($thread) ), ' ' );
838 -
 939+ $this->output->addHTML( $msg );
 940+ return false;
 941+ }
 942+ }
 943+
 944+ // Shows a single thread, rather than a thread tree.
 945+ function showSingleThread( $thread ) {
 946+ wfLoadExtensionMessages( 'LiquidThreads' );
 947+
 948+ $html = '';
 949+
 950+ // If it's a 'moved' thread, show the placeholder
839951 if ( $thread->type() == Threads::TYPE_MOVED ) {
840 - wfLoadExtensionMessages( 'LiquidThreads' );
 952+ $this->showMovedThread( $thread );
 953+ return;
 954+ } elseif ( $thread->type() == Threads::TYPE_DELETED ) {
 955+ $res = $this->showDeletedThread( $thread );
841956
842 - $revision = Revision::newFromTitle( $thread->title() );
843 - $target = Title::newFromRedirect( $revision->getText() );
844 - $t_thread = Threads::withRoot( new Article( $target ) );
845 - $author = $thread->root()->originalAuthor();
846 - $sig = $sk->userLink( $author->getID(), $author->getName() ) .
847 - $sk->userToolLinks( $author->getID(), $author->getName() );
848 -
849 - $html .=
850 - wfMsgExt( 'lqt_move_placeholder', array( 'parseinline', 'replaceafter' ),
851 - $sk->link( $target ),
852 - $sig,
853 - $wgLang->date( $thread->modified() ),
854 - $wgLang->time( $thread->modified() )
855 - );
856 - return $html;
 957+ if (!$res) return;
857958 }
858 -
859 - if ( $thread->type() == Threads::TYPE_DELETED ) {
860 - wfLoadExtensionMessages( 'LiquidThreads' );
861 - if ( in_array( 'deletedhistory', $this->user->getRights() ) ) {
862 - $html .= wfMsgExt( 'lqt_thread_deleted_for_sysops', 'parse' );
863 - }
864 - else {
865 - $msg = wfMsgExt( 'lqt_thread_deleted', 'parseinline' );
866 - $msg = Xml::tags( 'em', null, $msg );
867 - $msg = Xml::tags( 'p', null, $msg );
868 - $html .= $msg;
869 - return $html;
870 - }
871 - }
 959+
872960 if ( $thread->summary() ) {
873961 $html .= $this->showPostBody( $thread->summary() );
874 - } elseif( $thread->isArchiveEligible() )
875 - {
 962+ } elseif ( $thread->isArchiveEligible() ) {
876963 wfLoadExtensionMessages( 'LiquidThreads' );
877964
878965 $permalink_text = wfMsgNoTrans( 'lqt_summary_notice_link' );
@@ -882,17 +969,41 @@
883970
884971 $html .= $msg;
885972 }
 973+
 974+ // Unfortunately, I can't rewrite showRootPost() to pass back HTML
 975+ // as it would involve rewriting EditPage, which I do NOT intend to do.
886976
 977+ $this->output->addHTML( $html );
 978+
 979+ $this->showThreadBody( $thread );
 980+
 981+ }
 982+
 983+ function showThread( $thread ) {
 984+ global $wgLang;
 985+
 986+ // Safeguard
 987+ if ( $thread->type() == Threads::TYPE_DELETED
 988+ && ! ($this->request->getBool( 'lqt_show_deleted_threads' )
 989+ && $this->user->isAllowed( 'deletedhistory' ) ) ) {
 990+ return;
 991+ }
 992+
 993+ $sk = $this->user->getSkin();
 994+
 995+ $html = '';
 996+
 997+ $html .= Xml::element( 'a', array( 'name' => $this->anchorName($thread) ), ' ' );
 998+ $html .= $this->showThreadHeading( $thread );
 999+
8871000 // Sigh.
8881001 $html .= Xml::openElement( 'div', array( 'class' => 'lqt_thread',
8891002 'id' => 'lqt_thread_id_'. $thread->id() ) );
890 -
891 - // Unfortunately, I can't rewrite showRootPost() to pass back HTML
892 - // as it would involve rewriting EditPage, which I do NOT intend to do.
8931003
 1004+ // Flush output to display thread
8941005 $this->output->addHTML( $html );
8951006
896 - $this->showRootPost( $thread );
 1007+ $this->showSingleThread( $thread );
8971008
8981009 if ( $thread->hasSubthreads() ) {
8991010 $this->output->addHTML( $this->indent( $thread ) );
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -269,7 +269,7 @@
270270 $recently_archived_threads = $this->queries->query( 'recently-archived' );
271271
272272 $toc = '';
273 - if ( count( $threads ) > 3 || count( $recently_archived_threads ) > 0 ) {
 273+ if ( count( $threads ) > 1 || count( $recently_archived_threads ) > 0 ) {
274274 $toc = $this->getTOC( $threads );
275275 }
276276
Index: trunk/extensions/LiquidThreads/icons/arrow-down-icon.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/LiquidThreads/icons/arrow-down-icon.png
___________________________________________________________________
Name: svn:mime-type
277277 + application/octet-stream
Index: trunk/extensions/LiquidThreads/icons/reply.png
@@ -0,0 +1,39 @@
 2+�PNG
 3+
 4+ +IHDR3.��!osBIT|d� pHYs +� +�B(�xtEXtSoftwarewww.inkscape.org��< �IDATh��Yy���}�������Sم�!�I�!��ETbL�1�Q��#��"D + e��$��á��Zʊ�0^�)�����=�����13��콬���zӯ_���;��R"K˗/�87�SG��B0 �TEuM��]�I�u� �|h��`.�_���N��}�K㙮{�ؠ�@�d2��[��wGS���{� +���I)1o�<_ ���[���>�f�� Z(cE����p��a��ʪ�5���9s�BݻI)�dٟ�_}�w��֎�x|h?`II ����>�x�_S�j۱� !�+J$UU�*�0S�kw��~K�H����kɲ�C�566�ڴ�� W]~�2r�H�x� ���"�uKb�����X�Ȣ�ļ�o���.P���o��DϢA����]��[�,�B$Bn�1�`���{���;�m��P����d��лs��w�|�53U��cp]g�@�tbI�,�bQ�5q�2bĈ .�v����U�B�iڊ+D��H)(��TTT�Ņ��Ι<UWH���� D`P� �)R�*<w����[UU)��'e���u]�������:��Sj�9�g���1�_@���$3�Ra�?{}1"(ٙ<��� + +���BlG�X�V%��44U��W@h?87�A�NE���ЙPEF-W +'R�CӘ(���s•�H
 5+�}�� +I>(
 6+# 06������pj Y�HF���hnu��R�dw���2C&m�(7p���dE��i����� o���ф����ѥ1M�E�'��й�q���Y.�9�:h~t�=`�P M � +ێx�>qX(X����]��f�DB_߰�����/�b�S\��mP����KBfv^��)+-��5�Щ5c�>�w��y���& P��A�a�-V��t]�6��b��#�us"}v�����66n��� �y/��r��� +ڂ�s=�U<�����'���O������+�y5~�#���������P����C�]���*y�hk`K㖟��Y�� �4�F0ؽVG���U���MR=uᄑ#����*�-�0b���-�f F0<���iKY�Fv��#�������ګ���a��dž�٪>~}�\S�v�kÙ�jQ��CU��;��0��;�`��8E�Q�t���h���%MW +�OsH��1��;�_}Ŏ��y�' �^;b$����x
 7+uK0PS]�1�k`9�d
 8+����4�$b����[�l��x=^�-a�Z�r���hq�яEdY�_�r�eY�uO<���k�a�6��.�(RU���w�5�{4Ǹ�PT�G�t7�LQ
 9+��=Y��־��T;lXeʴ]-a�$�@�p��"IϾ/�����z�7�tm眍�7ֺ�=�ЍA�e�X�l#V�Մ`Y)��A�pL
 10+#Rv� ��d�����b�so���*{ڈ�-����II �T�P8�H[���=��3.����m? +N<묇
 11+d��c������@�)P4 + �F�`����.�����ys�{�5�����k����>�і�+�0�1$��JY"3�ea��R����O�s]��^~�X�1��J��<�#�9e l��^lҷx�?���:�5U2͠S�LaHq�:��D�$ci!�e��i[��j��Go#]򺀑��go��p�]Z����e�Pu�O����ぢ�`��D+o9�
 12+$ "0�$�䜃K2���!�Xձ�Y�H����@:)[vzꭤV�݁e�����WZ��� �{� +Hr9��U��bDZ#ɶ����f;I'���)�;7k>��'�� �A3<�q�d[�Nbֱ��ʽ�i�B@Z�B��k�Ǹ��P +�ʪ�;�M�p���X�AG����3�wꙻX�h҄�_$���:�s�=���8 ��D
 13+�d$$��q�-����L�:yR� ����&2C�@@�R^!�uw�dV=x=�|3��$�r�a�ckU�Jx�қ7�2��#'�e����I)����͘4��/�1n�b�aƢ٨=)B��L�Cn{K����?1(y�g�����a۶QQQ M�2e
 14+����Iou��3��lf� w�x���xܱhZ�۠��+5�� +'eAH )�\خc ���G� +܉=yxÃ�@�j�?���57��e�^�(�P����c|��I����d���՝�I�� <�|#}����?�k�NF#𐃀�:r��󢔲B�O���i}sYs����X��n�᫸�N�.T����tvQ�����<��z8���KQ~���q���q��5��h��4����2�cT�w���i��H_�P ���_�
 15+~U��^c&�J���K�'S)���p��
 16+�Yz3~���`�;`�"=�� �_/��lFY!��9,d>;����3�����fD��̻���p��W�3V�{��BY��t��Ek��P;t�q�J�h�D���k����=�� �n��M�g�y�\M�.v��y�c ]8]�=i�FDy���X�z����м^����Xd����\�#�)���d�P���ZSS�q\W�3ι, +z�{͌�U�����zJJJ�X���0�\��;
 17+��k��`f��.��`:A�=�����'�3e�S�2�L�cy���]� +�=� ���}m(��U4e7cw,�>�����-�vC����e�y�hk�1*p�w�bօ^�Ig�����_(�\� G�L�f؍�#���,ټ���Ϭ\�c��WM�y^6�>�k�G_�V�Dǂ�'G}e� ^E��(P�@U�O��9����Ï,��ۿ�ͦ�H$"�<�蝌Lw?Y�7�d�B �Y#�N����hEc���ʋ�ϭZi�R)���O���[<����`����0�',�)g̭�ٱK�͝w�e�@����_h���65}z��9�
 18+ ����xH�%
 19+��2�s.w����#��� +���g�g]�g`��� e�I�\���*;J�W�C �*�?�tvݜ!q���qe�}�hIEND�B`�
\ No newline at end of file

Status & tagging log