Announcement

Collapse
No announcement yet.

How can the <content:encoded> from a forum rss feed be displayed?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can the <content:encoded> from a forum rss feed be displayed?

    How can the <content:encoded> from a forum rss feed be displayed?

    I am currently using the following code to display the feed:

    Code:
     //
    $feed = 'http://www.mysite.net/discussions/external?type=rss2&nodeid=26'; //replace this with the RSS's URL
    $xml = simplexml_load_file($feed);
    if ($xml!=''){
    foreach ($xml->channel->item as $item){
    $title = $item->title;
    $description = $item->description;
    $date = $item->pubDate;
    $user = $item->children('dc', true)->creator;
    $link = $item->link;
    $content = $item->content->encoded;
    echo '<p><a href="'.$link.'"><b>'.$title.'</b></a> - Posted on '.$date.' by '.$user.' <br />'.$description.' <br> '.$content.' <hr>
    Everything workjs great except for the $content. Have tried everythinh I can think of to get the full content/description to bew displayed wiuth no avail.

    Any help would be appreciated.

  • #2
    Same as you did for dc:creator

    PHP Code:
    $content $item->children('content'true)->encoded

    GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

    Comment


    • #3
      thanx m8

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X