TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 353
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 293
  • Total: 293

Formating Issue in Rss Block

Started by pjr, March 07, 2006, 04:29:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pjr

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.

pjr

#1
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;



}

This website is proudly hosted on Crocweb Cloud Website Hosting.