TinyPortal

Development => Feedback => Topic started by: libo on January 04, 2006, 02:36:51 AM

Title: Rss Feed Block
Post by: libo on January 04, 2006, 02:36:51 AM
I'm smf 1.1 rc1 and tinyportal 0.75b.

My question is what port do i need open to access rss feeds in the rss feed block and if that port can be changed.
Title: Re: Rss Feed Block
Post by: IchBin on January 04, 2006, 05:45:12 AM
You shouldn't need to open a port. It should be accessing it right over the webserver port 80. Unless you're blocking port 80 which would be crazy. :)
Title: Re: Rss Feed Block
Post by: libo on January 04, 2006, 04:26:18 PM
Well, it isn't blocked. My host says port 80 is open..

Are you sure its port 80 because in tportal.php the function for the rss feed has 4096 i think as the port..
Title: Re: Rss Feed Block
Post by: libo on January 06, 2006, 01:26:28 AM
weird it works now. No idea why.. oh well.
Title: Re: Rss Feed Block
Post by: IchBin on January 06, 2006, 01:38:52 AM
The internet gods were mad I guess....  :uglystupid2:
Title: Re: Rss Feed Block
Post by: bloc on January 06, 2006, 08:47:23 AM
Quote from: DemonicInfluence on January 04, 2006, 04:26:18 PM
Well, it isn't blocked. My host says port 80 is open..

Are you sure its port 80 because in tportal.php the function for the rss feed has 4096 i think as the port..

No, the 4096 is the number of bytes to collect in each collected data chunk. Not the port number. :)
Title: Re: Rss Feed Block
Post by: libo on January 06, 2006, 12:28:17 PM
o. well, now, it messed up again.... Really wacky...
Title: Re: Rss Feed Block
Post by: elpvn on January 11, 2006, 09:42:22 AM
In version SMF 1.1RC2, I found a link same as RSS feeds of forum in the themes/default/Index.template.php:

Ex: http://www.tinyportal.net/smf/index.php?type=rss;action=.xml

And if use it as RSS adress to add on RSS block in TP admin then we've get an RSS news feeds of owner forum:

Ex: I pust my RSS source to RSS block address:
http://www.elpvn.org/index.php?type=rss;action=.xml (with http://www.elpvn.org is a path of SMF&TP)

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fusera.imagecave.com%2FelpvnORG%2Ftest2.JPG&hash=88065ec6cec597fb82de85991bfd2a967af3131b)

And result is:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fusera.imagecave.com%2FelpvnORG%2Ftest1.JPG&hash=7a357dd8a01d2df4175b2cdc379ebe5c7c35312c)

(still some problem with width and height of RSS block ...)

How do you feel ?  ;D


Title: Re: Rss Feed Block
Post by: Xarcell on January 11, 2006, 01:01:05 PM
The reason why that block is so wide is because of teh constant string or whatever you wanna call it. The URL address. It looks like it's trying to use BB code and the block isn't supporting it.

Block support BB code don't they? I dunno, I'm not much help really...
Title: Re: Rss Feed Block
Post by: libo on January 25, 2006, 02:03:14 AM
Do u know why my rss feed block might be as messed up as it is?

I'm using smf rc1 and tp 0.75b...

OCcasionally the block works, however it just fails right afterwards.... My host says the port is always open, but this is just weird...
Title: Re: Rss Feed Block
Post by: IchBin on January 25, 2006, 02:19:58 AM
It could be the rss feed itself and not your TP. Try another rss feed and see if there's any improvement.
Title: Re: Rss Feed Block
Post by: libo on January 25, 2006, 03:06:13 AM
lol. I already did.
Title: Re: Rss Feed Block
Post by: Xarcell on January 25, 2006, 03:13:42 AM
rss feed block is buggy on v7.
Title: Re: Rss Feed Block
Post by: libo on January 25, 2006, 12:28:04 PM
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..
Title: Re: Rss Feed Block
Post by: Xarcell on January 25, 2006, 02:38:41 PM
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.
Title: Re: Rss Feed Block
Post by: libo on January 25, 2006, 05:57:37 PM
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?
Title: Re: Rss Feed Block
Post by: bloc on January 25, 2006, 06:29:37 PM
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.
Title: Re: Rss Feed Block
Post by: Nokonium on January 25, 2006, 07:18:49 PM
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>';


Title: Re: Rss Feed Block
Post by: libo on January 25, 2006, 07:59:15 PM
errr.. That still gives errors...
Title: Re: Rss Feed Block
Post by: libo on January 25, 2006, 08:09:15 PM
plus, shouldn't this rss feed block at least work 1/2 the time because right now it is erratic..
Title: Re: Rss Feed Block
Post by: bloc on January 27, 2006, 09:03:30 AM
What is the errors ( sorry if has been mentioned before) exactly? can't show the feed? parts missing? can't reach the source? and by that: what sources specifically?
Title: Re: Rss Feed Block
Post by: libo on January 27, 2006, 12:29:14 PM
THese 3 errors:

http://thehouseofpolitics.com/index.php?action=tpadmin;sub=blocks 
2: fclose(): supplied argument is not a valid stream resource
File: /home/u1/libo/html/Sources/TPortal.php
Line: 1043

http://thehouseofpolitics.com/index.php?action=tpadmin;sub=blocks 
2: fread(): supplied argument is not a valid stream resource
File: /home/u1/libo/html/Sources/TPortal.php
Line: 1034

http://thehouseofpolitics.com/index.php?action=tpadmin;sub=blocks 
2: fopen(http://news.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml#): failed to open stream: Permission denied
File: /home/u1/libo/html/Sources/TPortal.php
Line: 1030