Jump to content

Recommended Posts

Posted (edited)

File Name: rss2news

File Submitter: clydelion

File Submitted: 06 Jul 2012

File Category: Web Resources

Content Author: clydelion a.k.a. Rad/Skullcandy

This addon for FluxCP enables the control panel to retrieve rss feeds. rss2news utilizes MagpieRSS to integrate FluxCP with IPB(and other forums that can generate RSS 2.0) and tinyscrollbar for neat display of news.

Requirement:

FluxCP

RSS 2.0

The sample below retrieves news from a live rss feed.

News Source : 'http://www.gmanetwork.com/news/rss/news'

Screenshot:

250ngcw.png

config:

'NewsUrl' => 'http://www.gmanetwork.com/news/rss/news',
'scrollbarbuttonsize' => '30', // WARNING! scrollbarbuttonsize must be less that scrollbarsize
'scrollbarsize' => '100',

Reference:

http://magpierss.sourceforge.net

http://baijs.nl/tinyscrollbar/

For suggestions contact me via forums or messenger.

yahooid: [email protected]

To use, edit this...

themes/default/main/index.php

should look like..

<?php if (!defined('FLUX_ROOT')) exit;
$this->redirect($this->url('news','index'));
?>

Thank you for using this add-on.. /gawi

88x31.png

rss2news by clydelion is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Click here to download this file

Edited by clydelion
  • Upvote 5
Posted (edited)

how do you make your IPB an RSS feed?

Solved.

Thanks! it really worked :)

Edited by Zeref
Posted

Added a screenshot for a better preview..

TODO: Add a facebook-like updating of news feed.. (not necessary if you do not update every hour but will make a better user-experience)

Posted

If you got this working with SMF, I'd cream my pants.

Sexy overall! Just not all of us can afford IPB. qq

Posted (edited)

Actually it is working with SMF :D

Change the NewsURL to this for SMF

'NewsUrl' => 'http://www.yourwebsite.com/forum/index.php?action=.xml;sa=news;board=1;limit=10',

change the values accordingly..

limit=x - display only "x" items

board=y - display only news topics from board "y"

Edited by clydelion
  • 2 weeks later...
Posted

You're a genius - exactly what i was looking for!

SMF is easy enough to integrate to a page as their SSI file is very helpful, however IPB has been giving me a headache for the last 2 days with no light at the end of the tunnel :/

<3

Posted (edited)

I'm trying to get it to work on my control panel with IPB feed, the default url does not work either. all what i see is a blank page. control panels works fine though.

Edited by aluze
Posted

did you edit themes/<YOUR THEME>/main/index.php ?

it should look like this

<?php if (!defined('FLUX_ROOT')) exit;
$this->redirect($this->url('news','index'));
?>

Posted (edited)

Hi,

I've a problem with permission. For some reason I can only see the News & Update with my admin acc. This is how my access.php is set up;

return array(
'modules' => array(
	'ipbrss'  => array(
		'index'  =>  AccountLevel::ANYONE,
	),
),
)

Do I need to configure something else? Besides addons > rss2news > config > access.php?

Edited by Decimal
Posted (edited)

Odd. Even admin acc doesn't work now.

return array(
'modules' => array(
	'news'  => array(
		'index'  =>  AccountLevel::ANYONE,
	),
),
)

Or am I doing something wrong?

//Edit:

Alright! I figured out that the problem was a conflict with an AddOn (CMS AddOn made by CalciumKid) that I had installed; I uninstalled the AddOn and now your AddOn works perfectly fine.

Sorry for the trouble caused!

Edited by Decimal
Posted

@Decimal

I'll take note of that. Anyway, that's good to hear.

@GM Helena Harper Momoe

That's great. If you have any suggestion to further improve this add-on, just tell me. /no1

Posted

I don't have a forum to try it on yet, but I am wondering if it can be used on websites other than Flux integrated sites XD (Edit: I just saw the Magpie reference, so I guess I should refer to that?). Another question, is it flexible where I can decide how many words can be shown? How about just showing the title of the forum threads in a particular section?

Thanks =D!

Posted

I don't have a forum to try it on yet, but I am wondering if it can be used on websites other than Flux integrated sites XD (Edit: I just saw the Magpie reference, so I guess I should refer to that?)

Yes, it can be used in other websites, as well as other RO control panels. That can be done c/o MagpieRSS :]

Another question, is it flexible where I can decide how many words can be shown?

Yes if you can control the rss generated by your website OR if you know string manipulation in php.

substr("string to be manipulated", 0, 80);

where 80 is the number of characters to be shown..

How about just showing the title of the forum threads in a particular section?

Yes, below is an example to show only the Title + date

<?php foreach($rss->items as $item):?>
  <h4><?php echo $item['title'] ?>
  <?php if(isset($item['pubdate'])): ?>
	 <small>on <?php $item['pubdate'] = date ('l, F dS, Y', strtotime ($item['pubdate']));  echo $item['pubdate'];?></small>
  <?php endif; ?>
  </h4>
  <hr/>
<?php endforeach; ?>

another example where you can click the title to direct you to the thread.

<?php foreach($rss->items as $item):?>
  <h4><a class="news_link" href="<?php echo $item['link'] ?>" target="_blank"><?php echo $item['title'] ?></a>
  <?php if(isset($item['pubdate'])): ?>
	 <small>on <?php $item['pubdate'] = date ('l, F dS, Y', strtotime ($item['pubdate']));  echo $item['pubdate'];?></small>
  <?php endif; ?>
  </h4>
  <hr/>
<?php endforeach; ?>

  • Upvote 1
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...