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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 572
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Rss Feed Block

Started by libo, January 04, 2006, 02:36:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

It could be the rss feed itself and not your TP. Try another rss feed and see if there's any improvement.

libo


Xarcell

rss feed block is buggy on v7.

libo

O? really that bad....

In v8 will it be fixed?

oh, yes I cannont try another site as my host only allows it from one ip right now..

Xarcell

I haven't messed with it in v8 yet. I'll try it out tonight. I know Bloc said he did some work on it though.

libo

well, the problem is isn't it supposed to work at least somewhat? mine works 1/10 of the time and doesn't work the rest of the time... Is there any explanation or should i just wait for v8?

bloc

The RSS block type really isn't very advanced - in the sense it only read *some* rss tags, not all of them.

TP v.0.8 does not have any special changes in that section, because I am expanding it quite a bit, and need more time for testing it.

Nokonium

You can get RSS feeds working reasonably well, I have 4 in php articles, by adding variations of this to TPortal.php:

// RSS newsfeed for Computer Weekly
function RSSCW()
{
                global $context, $settings, $options, $scripturl, $txt, $modSettings;

$backend = 'http://www.computerweekly.com/Feeds/RSS.aspx?cat=108';
$insideitem = false;
$tag = "";
$title = "";
$description = "";
$link = "";
// end


// Now to the parsing itself. Starts by creating it:

$xml_parser = xml_parser_create();

// Then setup the handlers:

xml_set_element_handler($xml_parser, "startElement", "endElementNews");
xml_set_character_data_handler($xml_parser, "characterData");

// Open the actual datafile:

$fp = fopen($backend, "r");

// Run through it line by line and parse:

while ($data = fread($fp, 4096)) {
  xml_parse($xml_parser, $data, feof($fp))
        or die(sprintf("XML error: %s at line %d",
                   xml_error_string(xml_get_error_code($xml_parser)),
                   xml_get_current_line_number($xml_parser)));
}

// Close the datafile

fclose($fp);

// Free any memmory used

xml_parser_free($xml_parser);
echo '</div>';
}


and this in a php article and I presume, a block as well.

global $context, $settings, $options, $scripturl, $txt, $modSettings;

         echo '<div style="padding: 5px;" class="smalltext">';
        RSSCW();
         echo '</div>';



libo

errr.. That still gives errors...

libo

plus, shouldn't this rss feed block at least work 1/2 the time because right now it is erratic..

This website is proudly hosted on Crocweb Cloud Website Hosting.