Changeset 90
- Timestamp:
- 2007-12-08 15:16:54 (1 year ago)
- Files:
-
- trunk/classes/misc/Post.php (modified) (1 diff)
- trunk/classes/misc/Table.php (modified) (2 diffs)
- trunk/classes/pages/Forum.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/misc/Post.php
r57 r90 92 92 } 93 93 // add this post 94 $table->addRow(Array('<td valign="top" width="' . ($SETTINGS['maxavatarsize'] + 10) . '">' . $_member->getPostside() . '</td>', '<td valign="top">' . $_post . '</td>') );94 $table->addRow(Array('<td valign="top" width="' . ($SETTINGS['maxavatarsize'] + 10) . '">' . $_member->getPostside() . '</td>', '<td valign="top">' . $_post . '</td>'), FALSE, TRUE); 95 95 // post footer 96 96 $table->addRow(Array(''), Array('colspan'=>'2', 'class'=>'postfooter')); trunk/classes/misc/Table.php
r1 r90 76 76 * $attr - Array containing key=>value attributes common 77 77 * to all columns 78 * $decode - decode entities? 78 79 * Returns: - 79 80 **/ 80 public function addRow($cols, $attr = FALSE ) {81 public function addRow($cols, $attr = FALSE, $decode = FALSE) { 81 82 $tr = $this->table->addChild('tr'); 82 83 if ($attr) { … … 90 91 // add the columns 91 92 while ($cols[$i] !== NULL) { 92 if ($xml = @simplexml_load_string($cols[$i], 'XMLElement')) { 93 if ($decode) { 94 $xml = @simplexml_load_string(html_entity_decode($cols[$i], ENT_NOQUOTES, 'UTF-8'), 'XMLELement'); 95 } else { 96 $xml = @simplexml_load_string($cols[$i], 'XMLELement'); 97 } 93 98 // contents for this column given as XML tree 94 99 $tr->addElement($xml); trunk/classes/pages/Forum.php
r24 r90 135 135 } 136 136 // add all the previously compiled topic information to table 137 $table->addRow(Array($_mark,'<td><h3>' . $_prefix . '<a href="' . $F->link('topic') . 'id=' . $row2['topicid'] . '">' . $row2['topictitle'] . '</a></h3>' . $_multipages . '</td>', '<td align="center">' . $row2['posts'] . '</td>', '<td align="center">' . $row2['views'] . '</td>', '<td><div>' . $LANG['by'] . ' ' . $_poster1->getProfileLink() . '</div><div>' . $LANG['at'] . ' ' . $F->datetime($row3->posttime, FALSE, TRUE) . '</div><div>' . $LANG['on'] . ' ' . $F->datetime($row3->posttime, TRUE, FALSE) . '</div></td>', '<td><div>' . $LANG['by'] . ' ' . $_poster2->getProfileLink() . '</div><div>' . $LANG['at'] . ' ' . $F->datetime($row4->posttime, FALSE, TRUE) . '</div><div>' . $LANG['on'] . ' ' . $F->datetime($row4->posttime, TRUE, FALSE) . '</div></td>'));137 $table->addRow(Array($_mark,'<td><h3>' . $_prefix . '<a href="' . $F->link('topic') . 'id=' . $row2['topicid'] . '">' . htmlentities($row2['topictitle']) . '</a></h3>' . $_multipages . '</td>', '<td align="center">' . $row2['posts'] . '</td>', '<td align="center">' . $row2['views'] . '</td>', '<td><div>' . $LANG['by'] . ' ' . $_poster1->getProfileLink() . '</div><div>' . $LANG['at'] . ' ' . $F->datetime($row3->posttime, FALSE, TRUE) . '</div><div>' . $LANG['on'] . ' ' . $F->datetime($row3->posttime, TRUE, FALSE) . '</div></td>', '<td><div>' . $LANG['by'] . ' ' . $_poster2->getProfileLink() . '</div><div>' . $LANG['at'] . ' ' . $F->datetime($row4->posttime, FALSE, TRUE) . '</div><div>' . $LANG['on'] . ' ' . $F->datetime($row4->posttime, TRUE, FALSE) . '</div></td>'), FALSE, TRUE); 138 138 } 139 139 // add finished table to parent HTML element
