1
deanloh
Feed only selected news
  • 2004/6/15 16:26

  • deanloh

  • Just popping in

  • Posts: 6

  • Since: 2004/5/17


I'll try my best to explain this:

I have Site-A that features news-A. Now, I'm building Site-B, and I intend to get feeds from Site-A, but I want only selected news to be fed to Site-B, not every news.

Can it be done?

2
Mithrandir
Re: Feed only selected news

Of course
However not without some coding.

the root file backend.php fetches the news items with the NewsStory::getAllPublished

In News 1.2, this method can take a parameter to select only certain news topic(s) so the call in backend.php can be modified to to take advantage of this.

If you are using the older version of News, you will have to work around it a bit differently (If I recall correctly... you may be able to specify ONE topic, but not multiple, in this earlier version)

I have some plans for the RSS feeds and backend.php for XOOPS 2.2 so it may be easier in the future.

3
deanloh
Re: Feed only selected news
  • 2004/6/15 17:01

  • deanloh

  • Just popping in

  • Posts: 6

  • Since: 2004/5/17


Thanks for the reply, Mithrandir

So how exactly should I modify the backend.php file? Do I change the code NewsStory::getAllPublished to NewsStory::mytopic or something?

4
Mithrandir
Re: Feed only selected news

Look at the getAllPublished method on the NewsStory class in modules/news/class/class.newsstory.php and see which parameters it takes and how it's used.

I have made so many changes in News 1.2 that I simply cannot remember how the original module is used.

Login

Who's Online

189 user(s) are online (122 user(s) are browsing Support Forums)


Members: 0


Guests: 189


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits