Closed stevethomas19 closed 8 years ago
@trevren11 Good question. To be fully honest I don't understand the purpose of this file. I don't understand the format of the select addcol or even if we are supposed to add the new table here.
Looks good. I haven't played with it—just looked at the code—so you might want to walk someone through its use when you get the chance.
In the future you'll probably want to use the template tag to make the JavaScript work less onerous: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template. Since we're only targeting modern browsers with the possible exception of the calendar, feel free to use any cutting edge features.
Ok we have an RSS feed that works! When we are ready to implement these changes live (or when there is news in the production db) this is the code to put in news.php at hlr.byu.edu.
<?php
$xml = file_get_contents('http://hlrdesk.byu.edu/rss');
$x = new SimpleXMLElement($xml);
echo "<div id=\"news\">
<h2>HLR News</h2>";
foreach($x->channel->item as $entry) {
echo "<div>
<h3>$entry->title</h3>
<a href='$entry->link' title=\"Image retrieved from $entry->link\"><img src='$entry->link' alt=\"image representing this news\" /></a>
<p>$entry->description</p>
</div>";
}
echo "</div>";
?>
For testing purposes do the following:
'http://hlrdesk.byu.edu/rss'
use your hostname i.e 'http://Stephens-Air.app.byu.edu:8080/rss'
The main thing I see is just a potentially inappropriate URL being used for the RSS feed. It likely won't affect anything, but it's worth looking into since it's an easy fix. Once that's done, I see no reason not to go ahead and merge.
Barring the merge conflict, everything LGTM.
This is the new area where people can edit the news box found here.
Things I still need to do: