TinyPortal
Development => Support => Topic started by: pjr on March 07, 2006, 04:29:37 AM
This feed http://syndicated.livejournal.com/scifiwire/data/rss has thumbnail graphics associated with it and short text. When displayed it produces a stair step effect as the second news item starts just to the right of the graphic and so on.
I believe the preferred method is to start the second item directly below the first. I haven't had a chance to look at the code yet, it may be as simple as adding a
at the end of each item display.
The formating problem was fixed by changing the following code in TPortal.php.
function endElement($parser, $tagName) {
// This function is used when an end-tag is encountered.
global $insideitem, $tag, $title, $description, $link, $tpimage;
if ($tagName == "ITEM") {
echo '<div style="font-size: larger; font-weight: bold;">';
printf("<a href='%s'>%s</a>", trim($link),htmlspecialchars(trim($title)));
echo '</div><div class="smalltext" style="margin-bottom: 4px;">';
printf("%s",$description); // Print out the live journal entry
echo '</div>';
$title = $description = $link = $insideitem = false;
}
}
to
echo '</div><div style="clear:both"></div>';
$title = $description = $link = $insideitem = false;
}