PDA

View Full Version : "Latest News" Plugin: Can we Separate?


CocteauBoy
06-09-2004, 05:25 PM
Is there a way to make the LATEST NEWS Plugin relative to a specific thread of NEWS relative to a category? Currently, it looks like NEWS can be specific to a category, but the LATEST NEWS draws from all NEWS.

I would like, for instance, to have NEWS about the site, but also have a category where I post what I call "energy reports" as "news" and have the "latest news" read only from that.

Is this possible?

Troy

Ziad
06-09-2004, 06:11 PM
You mean have the latest news only display the latest news from the category which its placed in? If so, then just do this:

Find and open this file:
subdreamer/plugins/p3_latestnews/latestnews.php

Then find this line: (should be line 27)

$getarticles = $DB->query("SELECT articleid, categoryid, title FROM p2_news WHERE `activated` = '1'

and replace it with this one:

$getarticles = $DB->query("SELECT articleid, categoryid, title FROM p2_news WHERE `activated` = '1' and `categoryid` = '$categoryid'

CocteauBoy
06-09-2004, 06:41 PM
IT WORKED! YOU ARE A GENIE! -troy