Index: branches/liquidthreads/extensions/LqtBaseView.php |
— | — | @@ -507,32 +507,35 @@ |
508 | 508 | function showThreadFooter( $thread ) { |
509 | 509 | global $wgLang; // TODO global. |
510 | 510 | |
511 | | - $color_number = $this->selectNewUserColor( $thread->root()->originalAuthor() ); |
512 | | - $this->output->addHTML(wfOpenElement('ul', array('class'=>"lqt_footer" ))); |
513 | | - |
514 | | - $this->output->addHTML( wfOpenElement( 'li', array('class'=>"lqt_author_sig lqt_post_color_$color_number") ) ); |
515 | | - $p = new Parser(); $sig = $p->getUserSig( $thread->root()->originalAuthor() ); |
516 | | - $this->output->addWikitext( $sig, false ); |
517 | | - $this->output->addHTML( wfCloseElement( 'li' ) ); |
| 511 | + $thread_author = $thread->root()->originalAuthor(); |
| 512 | + $color_number = $this->selectNewUserColor($thread_author); |
| 513 | + $p = new Parser(); $sig = $p->getUserSig($thread_author); |
| 514 | + $timestamp = $wgLang->timeanddate($thread->timestamp()); |
518 | 515 | |
519 | | - $this->output->addHTML( wfOpenElement( 'li' ) ); |
520 | | - $this->output->addHTML( $wgLang->timeanddate($thread->timestamp()) ); |
521 | | - $this->output->addHTML( wfCloseElement( 'li' ) ); |
| 516 | + $this->output->addHTML(<<<HTML |
| 517 | +<ul class="lqt_footer"> |
| 518 | +<li class="lqt_author_sig lqt_post_color_{$color_number}"> |
| 519 | +HTML |
| 520 | +); |
| 521 | + $this->output->addWikitext($sig); #gah! |
| 522 | + $this->output->addHTML(<<<HTML |
| 523 | +</li> |
| 524 | +<li>$timestamp</li> |
| 525 | +HTML |
| 526 | +); |
522 | 527 | |
523 | 528 | foreach( $this->applicableThreadCommands($thread) as $command ) { |
524 | 529 | $label = $command['label']; |
525 | 530 | $href = $command['href']; |
526 | 531 | $enabled = $command['enabled']; |
527 | | - $this->output->addHTML( wfOpenElement( 'li' ) ); |
| 532 | + |
528 | 533 | if( $enabled ) { |
529 | | - $this->output->addHTML( wfElement('a', array('href'=>$href), $label) ); |
| 534 | + $this->output->addHTML( "<li><a href=\"$href\">$label</a></li>" ); |
530 | 535 | } else { |
531 | | - $this->output->addHTML( wfElement('span', array('class'=>'lqt_footer_disabled'), $label) ); |
| 536 | + $this->output->addHTML( "<li><span class=\"lqt_footer_disabled\">$label</span></li>" ); |
532 | 537 | } |
533 | | - $this->output->addHTML( wfCloseElement( 'li' ) ); |
534 | 538 | } |
535 | | - |
536 | | - $this->output->addHTML(wfCloseELement('ul')); |
| 539 | + $this->output->addHTML('</ul>'); |
537 | 540 | } |
538 | 541 | |
539 | 542 | function selectNewUserColor( $user ) { |