Ticket #489: forum_forum_php.patch

File forum_forum_php.patch, 4.2 kB (added by Simek, 10 months ago)
  • forum_forum.php

    old new  
    4242    $category = BoincCategory::lookup_id($forum->category);  
    4343    if ($category->is_helpdesk){ 
    4444        page_head(tra("Questions and Answers").' : '.$forum->title); 
    45         echo '<link href="forum_help_desk.php" rel="up" title="Forum Index">'
     45        echo "<link href=\"forum_help_desk.php\" rel=\"up\" title=\"Forum Index\">"
    4646    } else { 
    4747        page_head(tra("Message boards").' : '.$forum->title); 
    48         echo '<link href="forum_index.php" rel="up" title="Forum Index">'
     48        echo "<link href=\"forum_index.php\" rel=\"up\" title=\"Forum Index\">"
    4949    } 
    5050    show_forum_header($user); 
    5151    show_forum_title($category, $forum, NULL); 
    5252    break; 
    5353case 1: 
    5454    $team = BoincTeam::lookup_id($forum->category);  
    55     page_head("Team message board for <a href=team_display.php?teamid=$team->id>$team->name</a>"); 
     55    page_head("Team message board for <a href=\"team_display.php?teamid=$team->id\">$team->name</a>"); 
    5656    show_forum_header($user); 
    5757    break; 
    5858} 
    5959 
    60 echo ' 
    61     <table width="100%" cellspacing="0" cellpadding="0"> 
    62     <tr valign="top"> 
    63     <td colspan=2
    64 '
     60echo " 
     61    <table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"> 
     62    <tr valign=\"top\"> 
     63    <td colspan=\"2\"
     64"
    6565 
    6666show_button("forum_post.php?id=$id", "New thread", "Add a new thread to this forum"); 
    6767 
     
    7373} 
    7474 
    7575echo " <br><br></td>"; 
    76 echo '<td valign=top align="right">'
    77 echo '    <form action="forum_forum.php" method="get"> 
    78     <input type="hidden" name="id" value="'.$forum->id.'">'
     76echo "<td valign=\"top\" align=\"right\">"
     77echo "<form action=\"forum_forum.php\" method=\"get\"> 
     78       <input type=\"hidden\" name=\"id\" value=\"'.$forum->id.'\">"
    7979echo select_from_array("sort", $forum_sort_styles, $sort_style); 
    80 echo '<input type="submit" value="Sort"></form></td>'
     80echo "<input type=\"submit\" value=\"Sort\"></form></td>"
    8181echo "</tr></table>"; 
    8282 
    8383show_forum($forum, $start, $sort_style, $user); 
     
    9393    $gotoStr = ""; 
    9494    $nav = show_page_nav($forum, $start); 
    9595    if ($nav) { 
    96         $gotoStr = "<div align=\"right\">$nav</div><br>"; 
     96        $gotoStr = "<div align=\"right\">$nav</div><br/>"; 
    9797    } 
    9898    echo $gotoStr; // Display the navbar 
    9999    start_forum_table(array("", tra("Threads"), tra("Posts"), tra("Author"), tra("Views"), "<nobr>".tra("Last post")."</nobr>")); 
     
    115115         
    116116        if ($thread->status==1){ 
    117117            // This is an answered helpdesk thread 
    118             echo '<tr class="row_hd'.$n.'">'
     118            echo "<tr class=\"row_hd'.$n.'\">"
    119119        } else { 
    120120            // Just a standard thread. 
    121             echo '<tr class="row'.$n.'">';     
     121            echo "<tr class=\"row'.$n.'\">";     
    122122        } 
    123123         
    124         echo "<td width=\"1%\" align=\"right\"><nobr>"; 
     124        echo "<td class=\"threadicon\"><nobr>"; 
    125125        if ($user && ($thread->rating()>$user->prefs->high_rating_threshold)) { 
    126126            show_image(EMPHASIZE_IMAGE, "This message has a high average rating"); 
    127127        } 
     
    166166            $title = substr($title,0,$titlelength)."..."; 
    167167        } 
    168168        $title = cleanup_title($title); 
    169         echo '<td class="threadline"><a href="forum_thread.php?id='.$thread->id.'"><b>'.$title.'</b></a><br></td>'
     169        echo "<td class=\"threadline\"><a href=\"forum_thread.php?id='.$thread->id.'\">'.$title.'</a><br/></td>"
    170170        $n = ($n+1)%2; 
    171171 
    172         echo ' 
     172        echo " 
    173173            <td>'.($thread->replies+1).'</td> 
    174             <td align="left"><div class="authorcol">'.user_links($owner).'</div></td> 
     174            <td class=\"threadauthor\"><div class=\"authorcol\">'.user_links($owner).'</div></td> 
    175175            <td>'.$thread->views.'</td> 
    176             <td style="text-align:right">'.time_diff_str($thread->timestamp, time()).'</td> 
     176            <td class=\"lastpost\">'.time_diff_str($thread->timestamp, time()).'</td> 
    177177            </tr> 
    178         '
     178        "
    179179        flush(); 
    180180    } 
    181181    end_table(); 
    182     echo "<br>$gotoStr";    // show page links 
     182    echo "<br/>$gotoStr";    // show page links 
    183183} 
    184184 
    185185?> 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.