[jonah] newsfeed.php finally working!
Eric Rostetter
eric.rostetter at physics.utexas.edu
Fri Jan 24 04:16:56 PST 2003
Okay, I finally got jonah's newsfeed.php working (CVS HEAD as of a few hours ago)
and it works great. Created a custom channel, added it to my channels-site.php
file, got it to update with it, subscribed to it, viewed it, it all works.
It appears it won't work with https: (ssl) urls though -- is that right?
Chuck left some debugging in there where it should actually show the story,
but that is cool. I made a quick and (very) dirty hack as shown below. It
at least displays the story. I won't commit this, as I'm sure the intent
is to grow this to do a template or something cool. But if anyone else is
playing, er, I mean testing, this code, they might want to use the following
patch to see their stories. Warning: it doesn't sanitize the output in
any way!!! Use at your own risk...
Thanks for all the recent and way cool code Chuck!
Index: newsfeed.php
===================================================================
RCS file: /usr/repository/jonah/newsfeed.php,v
retrieving revision 1.4
diff -u -r1.4 newsfeed.php
--- newsfeed.php 19 Jan 2003 18:15:52 -0000 1.4
+++ newsfeed.php 24 Jan 2003 10:07:41 -0000
@@ -37,8 +37,12 @@
if (is_a($story, 'PEAR_Error')) {
exit('invalid story');
}
-
- var_dump($story);
+ //var_dump($story);
+ echo "<html>\n";
+ echo "<title>" . $story['title'] . "</title>\n";
+ echo "<body>\n";
+ echo $story['fulltext'] . "\n";
+ echo "</body></html>\n";
} else {
// Showing a specific channel.
$format = Horde::getFormData('f', 'xml');
--
Eric Rostetter
The Department of Physics
The University of Texas at Austin
Why get even? Get odd!
More information about the jonah
mailing list