Index: trunk/extensions/ReaderFeedback/specialpages/RatingHistory_body.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | ); |
79 | 79 | if( $html ) { |
80 | 80 | $wgOut->addHTML( '<h2>'.wfMsgHtml('ratinghistory-table')."</h2>\n". |
81 | | - "<div class='fr_reader_feedback_ratings'>$html</div>" ); |
| 81 | + "<div class='rfb-reader_feedback_ratings'>$html</div>" ); |
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
— | — | @@ -138,9 +138,9 @@ |
139 | 139 | case 'svg': |
140 | 140 | if( $exists ) { |
141 | 141 | $html .= "<h3>" . wfMsgHtml("readerfeedback-$tag") . "</h3>\n" . |
142 | | - Xml::openElement( 'div', array('class' => 'fr_reader_feedback_graph') ) . |
| 142 | + Xml::openElement( 'div', array('class' => 'rfb-reader_feedback_graph') ) . |
143 | 143 | Xml::element( 'embed', array('src' => $url, 'type' => 'image/svg+xml', |
144 | | - 'class' => 'fr_reader_feedback_plot', 'width' => '1000', 'height' => '410') ) . |
| 144 | + 'class' => 'rfb-reader_feedback_plot', 'width' => '1000', 'height' => '410') ) . |
145 | 145 | Xml::closeElement( 'div' ) . "\n"; |
146 | 146 | } |
147 | 147 | break; |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | wfMsgHtml("readerfeedback-svg")."</a>]</small>"; |
156 | 156 | } |
157 | 157 | $html .= "<h3>" . wfMsgHtml("readerfeedback-$tag") . "$viewLink</h3>\n" . |
158 | | - Xml::openElement( 'div', array('class' => 'fr_reader_feedback_graph') ) . |
| 158 | + Xml::openElement( 'div', array('class' => 'rfb-reader_feedback_graph') ) . |
159 | 159 | Xml::openElement( 'img', array('src' => $url,'alt' => $tag) ) . |
160 | 160 | Xml::closeElement( 'img' ) . |
161 | 161 | Xml::closeElement( 'div' ) . "\n"; |
— | — | @@ -186,7 +186,7 @@ |
187 | 187 | $userTable = $this->getUserList(); |
188 | 188 | if( $userTable ) { |
189 | 189 | $html .= '<h2>' . wfMsgHtml('ratinghistory-users') . '</h2>' . |
190 | | - Xml::openElement( 'div', array('class' => 'fr_reader_feedback_users') ) . |
| 190 | + Xml::openElement( 'div', array('class' => 'rfb-reader_feedback_users') ) . |
191 | 191 | $userTable . Xml::closeElement( 'div' ) . "\n"; |
192 | 192 | } |
193 | 193 | } else { |
— | — | @@ -624,7 +624,7 @@ |
625 | 625 | return ''; // don't give away votes that easily |
626 | 626 | $columns = 4; |
627 | 627 | $count = 0; |
628 | | - $html = "<table class='fr_reader_feedback_users'><tr>"; |
| 628 | + $html = "<table class='rfb-reader_feedback_users'><tr>"; |
629 | 629 | while( $row = $res->fetchObject() ) { |
630 | 630 | $title = Title::makeTitleSafe( NS_USER, $row->name ); |
631 | 631 | if( is_null($title) ) continue; // bad IP? |
Index: trunk/extensions/ReaderFeedback/ReaderFeedback.class.php |
— | — | @@ -86,7 +86,8 @@ |
87 | 87 | array( 'rfh_page_id' => $article->getId(), 'rfh_tag' => $tag,
|
88 | 88 | "rfh_date >= {$cutoff_unixtime}" ),
|
89 | 89 | __METHOD__ );
|
90 | | - $data = $row ? array($row->ave,$row->count) : array(0,0);
|
| 90 | + $data = $row && $row->count ?
|
| 91 | + array($row->ave,$row->count) : array(0,0);
|
91 | 92 | return $data;
|
92 | 93 | }
|
93 | 94 |
|
— | — | @@ -201,7 +202,7 @@ |
202 | 203 | $wgMemc->set( $key, array( $votes, $now ), 24*3600 );
|
203 | 204 | }
|
204 | 205 | // Output multi-column list
|
205 | | - $html = "<table class='fr_reader_feedback_table' cellspacing='0'><tr>";
|
| 206 | + $html = "<table class='rfb-reader_feedback_table' cellspacing='0'><tr>";
|
206 | 207 | foreach( ReaderFeedback::getFeedbackTags() as $tag => $w ) {
|
207 | 208 | // Get tag average...
|
208 | 209 | $dist = isset($votes[$tag]) ? $votes[$tag] : array();
|
— | — | @@ -220,7 +221,7 @@ |
221 | 222 | $html .= '<td><table>';
|
222 | 223 | $html .= '<tr><th align="left">'.wfMsgHtml('ratinghistory-table-rating').'</th>';
|
223 | 224 | for( $i = 1; $i <= 5; $i++ ) {
|
224 | | - $html .= "<td align='center' class='fr-rating-option-".($i-1)."'>$i</td>";
|
| 225 | + $html .= "<td align='center' class='rfb-rating-option-".($i-1)."'>$i</td>";
|
225 | 226 | }
|
226 | 227 | $html .= '</tr><tr>';
|
227 | 228 | $html .= '<th align="left">'.wfMsgHtml("ratinghistory-table-votes").'</th>';
|
Index: trunk/extensions/ReaderFeedback/readerfeedback.css |
— | — | @@ -24,24 +24,24 @@ |
25 | 25 | }
|
26 | 26 |
|
27 | 27 | /* Reader feedback form */
|
28 | | -.fr_reader_feedback_plot {
|
| 28 | +.rfb-reader_feedback_plot {
|
29 | 29 | background-color: #F8F8F8;
|
30 | 30 | }
|
31 | 31 |
|
32 | | -.fr_reader_feedback_graph,
|
33 | | -.fr_reader_feedback_ratings,
|
34 | | -.fr_reader_feedback_users {
|
| 32 | +.rfb-reader_feedback_graph,
|
| 33 | +.rfb-reader_feedback_ratings,
|
| 34 | +.rfb-reader_feedback_users {
|
35 | 35 | width: 100%;
|
36 | 36 | overflow: auto;
|
37 | 37 | }
|
38 | 38 |
|
39 | | -.fr_reader_feedback_users {
|
| 39 | +.rfb-reader_feedback_users {
|
40 | 40 | background-color: #F0F0F0;
|
41 | 41 | max-height:410px;
|
42 | 42 | font-size: 90%;
|
43 | 43 | }
|
44 | 44 |
|
45 | | -.fr_reader_feedback_table {
|
| 45 | +.rfb-reader_feedback_table {
|
46 | 46 | margin: .5em .5em .5em .5em;
|
47 | 47 | background: #f9f9f9;
|
48 | 48 | border: 1px #AAA solid;
|
— | — | @@ -49,7 +49,7 @@ |
50 | 50 | font-size: 85%;
|
51 | 51 | }
|
52 | 52 |
|
53 | | -.fr_reader_feedback_table th, .fr_reader_feedback_table td {
|
| 53 | +.rfb-reader_feedback_table th, .rfb-reader_feedback_table td {
|
54 | 54 | border: 1px #AAA solid;
|
55 | 55 | padding: 0.3em;
|
56 | 56 | }
|