Hello,
My vision is to use TP articles to make a blog-type front page. So here is what I'm looking for; I'm going to be writing "news" articles and displaying them on the front page using TP. Is there a way to have an RSS feed for those articles? I'm not looking to suck information from other RSS feeds; I want an outgoing RSS feed for articles that I write. A search on this forum, and on Google, came up dry.
Is there a way to do this with TP? Or, even just with SMF?
I could, of course, setup some blog software like WordPress to do this, but I was hoping to find a native way to do it with TinyPortal or SMF.
The environment is SMF 1.1.2 and TP 0.9.8.
Hopefully the question is clear.
Thanks for your help.
At this time i dont think this is possible in any way with TP :-\
Think this will be available ever? RSS feeds seem to be pretty standard these days, and I'd certainly rather use TinyPortal than all the other bloated CMSs I've looked at over the last couple of years. But this one thing is rather make-or-break right now. *begs* Please don't make me try to figure out Mambo again! :D
I'm going to second this request. My reasoning is because right now, with the guy way XML pulls from my site, it includes the recent posts the feed. I just want the front page articles to be pulled.
So, I'm seconding this :)
bump?
When some one have the answer you want (or hope to get) they will post it here ;)
I would also like to see this, it seems to be a major ommission IMHO, as I would like to export my articles to an rss feed and can find no way of implementing it, does anyone know how to do this? ???
I'm gonna bump this in the vain hope someone takes it seriously. I would really love to see this. Kind of pointless to have articles without rss these days, no? Is there a way to publish articles to your forum and then to rss that way?
Its really two-sided this requst..is it the ability to display another rss feed inside an article natively thats the goal? ...or to display articles/categories through rss?
Blue-c is requesting RSS output for articles it seems to me.
For me it's articles/categories if I understand your question correctly.
In other words. I write an article in x category, and I post it on my front page. Some guy who's reading it can decide to subscribe to that category of articles, or even all categories via rss.
If you're asking if an alteration needs to be to the rss block or the article block itself, I don't know. Either would be fine with me.
Yeah Ichbin you are correct, I would like a way for something like newsnow to get an RSS feed of my articles.
dont know if this is at all possible
Ok, good. I wasn't certain what you meant. TP 1.0 will see al ot of new features, and RSS feed for the articles/categories will be on that list.
That is good to hear. I've been wanting this as well. Actually, I was just searching for this on this site.
Any idea when 1.0 is going to be available?
Quote from: Greyhound on March 25, 2008, 03:09:12 PM
Any idea when 1.0 is going to be available?
The 'stock' answer is, "When its ready"... there is no date set for the next release, nor will one be set.
Quote from: Bloc on October 20, 2007, 08:36:55 AM
Ok, good. I wasn't certain what you meant. TP 1.0 will see al ot of new features, and RSS feed for the articles/categories will be on that list.
Hi. Is there any update to this or am I missing it?
I am running TP 1.0.5
This issue hasn't been adressed yet.
Thanks for the quick reply.
And...
Thanks for all of your hard work, TP is a great addition to SMF.
Just to throw my two cents in the ring, I would love to see this feature as well. Either for articles or for the first post in a certain category within the forum itself.
Would this be something that's difficult to write? I'm tempted to go ahead and see about writing an SMF mod to do this....
This is, for the most part, no means perfect or complete. It does not in fact account for every situation that the front page could be set up for. This will only work for situations where ONLY articles are displayed on the front page. It will not show PHP based articles either. This was all I needed, so all I coded for and it works great for me.
I am however providing it regardless because it could perhaps provide a jumping off point for someone who would like to expand on it.
For TP 0.9.8 and SMF 1.1.7
This is the function to be included in News.php:
function getXmlArticles($xml_format)
{
global $db_prefix, $user_info, $scripturl, $modSettings, $board, $context;
global $query_this_board, $func;
$query = db_query(
"SELECT id, date, subject, body, author, views, category
FROM {$db_prefix}tp_articles
WHERE frontpage = 1 AND approved = 1 AND off = 0 AND useintro >= 0
ORDER BY date DESC
LIMIT $_GET[limit]", __FILE__, __LINE__);
$data = array();
while ($row = mysql_fetch_assoc($query))
{
// Limit the length of the article, if the option is set.
if (!empty($modSettings['xmlnews_maxlen']) && $func['strlen'](str_replace('<br />', "\n", $row['body'])) > $modSettings['xmlnews_maxlen'])
$row['body'] = strip_tags(strtr($func['substr'](str_replace('<br />', "\n", html_entity_decode($row['body'])), 0, $modSettings['xmlnews_maxlen'] + 50), array("\n" => '<br />'))) . '...';
//$row['body'] = $row['useintro'] == -1 ? $row['body'] : html_entity_decode($row['body']);
if ($xml_format == 'rss' || $xml_format == 'rss2')
$data[] = array(
'title' => cdata_parse($row['subject']),
'link' => $scripturl . '?page=' . $row['id'],
'description' => cdata_parse($row['body']),
'author' => $row['author'],
'category' => cdata_parse($context['TPortal']['catnames'][$row['category']]),
'pubDate' => gmdate('D, d M Y H:i:s \G\M\T', $row['date']),
'guid' => $scripturl . '?page=' . $row['id'],
);
elseif ($xml_format == 'rdf')
$data[] = array(
'title' => cdata_parse($row['subject']),
'link' => $scripturl . '?page=' . $row['id'],
'description' => cdata_parse($row['body']),
);
elseif ($xml_format == 'atom')
$data[] = array(
'title' => cdata_parse($row['subject']),
'link' => $scripturl . '?page=' . $row['id'],
'summary' => cdata_parse($row['body']),
'author' => array('name' => $row['author']),
'created' => gmstrftime('%Y-%m-%dT%H:%M:%SZ', $row['date']),
'issued' => gmstrftime('%Y-%m-%dT%H:%M:%SZ', $row['date']),
'modified' => gmstrftime('%Y-%m-%dT%H:%M:%SZ', $row['date']),
'id' => $scripturl . '?page=' . $row['id'],
);
// A lot of information here. Should be enough to please the rss-ers.
else
$data[] = array(
'time' => strip_tags(timeformat($row['date'])),
'id' => $row['id'],
'subject' => cdata_parse($row['subject']),
'body' => cdata_parse($row['body']),
'link' => $scripturl . '?page=' . $row['id'],
);
}
mysql_free_result($request);
return $data;
}
Additionally, a small change would need to be made to the ShowXmlFeed() function within the same file.
// List all the different types of data they can pull.
$subActions = array(
'recent' => array('getXmlRecent', 'recent-post'),
'news' => array('getXmlNews', 'article'),
'members' => array('getXmlMembers', 'member'),
'profile' => array('getXmlProfile', null),
);
CHANGED TO
// List all the different types of data they can pull.
$subActions = array(
'recent' => array('getXmlRecent', 'recent-post'),
'news' => array('getXmlNews', 'article'),
'articles' => array('getXmlArticles', 'news'),
'members' => array('getXmlMembers', 'member'),
'profile' => array('getXmlProfile', null),
);