News RSS in sidebar (Design/Themes)

by Angelos @, Saturday, September 06, 2008, 09:46 (5704 days ago)

I would like to ask if anyone can help me integrating a box (like the latest postings/ recent tags) in sidebar where I would be able to add rss feeds from my website (eg latest news stories)

Thank you for the great job with MLF.

PS. I have translated MLF into Greek. Where shall I send it so that it is available for anyone interested?

locked
6219 views
Avatar

News RSS in sidebar

by Alex ⌂, Saturday, September 06, 2008, 12:48 (5704 days ago) @ Angelos

Hi Angelos,

I would like to ask if anyone can help me integrating a box (like the latest postings/ recent tags) in sidebar where I would be able to add rss feeds from my website (eg latest news stories)

See here: http://mylittleforum.net/latest_postings_on_website

PS. I have translated MLF into Greek. Where shall I send it so that it is available for anyone interested?

Excellent! :ok: Please send it to mylittleforum at mylittleforum dot net so I can put it into the next release.

Alex

locked
6248 views

News RSS in sidebar

by Angelos @, Saturday, September 06, 2008, 15:47 (5704 days ago) @ Alex

Hello Alex,

thank you for you answer, but this is not what I was asking for.

You explained how to show the latest topics on my website. Actually I want to do it the other way round. I want to add rss feeds of my website news stories on the sidebar of the forum. ;-)

I do have the rss feeds of my website news stories but I do not know how to add them on the sidebar of the MLF template.

locked
6094 views
Avatar

News RSS in sidebar

by Alex ⌂, Tuesday, September 09, 2008, 10:05 (5701 days ago) @ Angelos

You explained how to show the latest topics on my website. Actually I want to do it the other way round. I want to add rss feeds of my website news stories on the sidebar of the forum. ;-)

OK, I see! Well, generally the code has to be separated into a program part and a display part. The program part (e.g. in includes/index.inc.php) would be something like this:

// include Magpie RSS:
require('path/to/magpierss/rss_fetch.inc'); 
// set charset:
define("MAGPIE_OUTPUT_ENCODING", "UTF-8"); 
// read the RSS Feed:
$rss = fetch_rss('URL_OF_THE_RSS_FEED'); 
// pass the data to Smarty:
$smarty->assign("rss_items",$rss->items);

The template code (e.g. in templates/defult/subtemplates/index.tpl.inc) should then read this way:

<ul>
{foreach from=$rss_items item=rss_item}
<li><a href="{$rss_item.link}">{$rss_item.title}</a></li>
{/foreach}
</ul>

Alex

locked
6098 views

News RSS in sidebar

by d0d @, Tuesday, September 16, 2008, 16:17 (5694 days ago) @ Alex

Onother option, if I get the gist of your post correctly, is using google's ajax feed api with this script.

locked
6077 views

RSS Feed of thread