Saturday, December 13, 2008

FeedMe News is ready(ish)


I really enjoyed working on this project. It was great to imagine something and finally have the ability bring it to life.

Here's the link.... FeedMe News.

It's an RSS Feed news aggregator that's supposed to be easy to use for non-internet savvy people. You navigate by clicking on the section headings and then going page by page. You can also search for a subject. For each news item, there is a discussion area. Viewing the site and the discussions is open to anyone, but posting is limited to those who login.

I built it using Simplepie. The Simplepie loads about 30 or so feeds into a mySQL database. When you click on a section heading or run a search, it runs a query to pull the correct news items. There is a short delay when you click because the section gets updated before the items are pulled. A better way would be for the feeds to load constantly in the background, but that was a bit out of my ability.

I had planned to incorporate more Javascript and use it to create a "reading list" feature to the site, but I ran out of time. :( Currently, the only Javascript exists in the search and text boxes which get altered when you click on them.

I am planning to continue working on this and would love any feedback you guys might have!


And for nostalgia's sake, here is my petshop again. :) I sure learned a lot! Thanks!

Thursday, December 11, 2008

MySQL - help needed please!

Hi everyone,

I'm running into a brick wall when it comes to joining two tables together in mysql. Can anyone help?

Here's the situation: I have two tables. One table contains a list of news items from a bunch of different RSS feeds (feeditem table). The other table contains a list of all the feed titles and the category for each feed (feeds table). Both tables contain a field with the feed title.

I would like to construct a query that takes a category as input and then pulls the relevant news items. I've been trying various forms of join queries, but I don't seem to be getting anywhere. My latest attempt at a function is below.

Some of my questions:
Is it ok to have a query broken up on different lines for easier readability? Will it still run?

If the array is made successfully, am I correct in assuming that the variables will all have new names? What used to be "id" will now be "table_name.id"?

Should I be using something other than a left join?

I would appreciate any help!
- Sharon


function getSectionFeedItems($section) {

$myQuery = "SELECT snikfarjam_feeditem.id, snikfarjam_feeditem.feedid, snikfarjam_feeditem.feedurl, snikfarjam_feeditem.hash, snikfarjam_feeditem.guid, snikfarjam_feeditem.linkurl snikfarjam_feeditem.enclosureurl, snikfarjam_feeditem.title, snikfarjam_feeditem.content, snikfarjam_feeditem.pubdate, snikfarjam_feeditem.created, snikfarjam_feeds.category
FROM snikfarjam_feeds
LEFT JOIN snikfarjam_feeditem
ON snikfarjam_feeditem.feedid = snikfarjam_feeds.feed_name
WHERE snikfarjam_feeds.category={$section}
ORDER BY pubdate desc";

//run the query
$result = mysql_query($myQuery);


if ($result) {
//create an array that will store the results
$arrSectionItems = array();

//loop through the results returned from the database here
while($row = mysql_fetch_array($result)) {
$arrSectionItems[] = $row;
}
} //end if results

return $arrSectionItems;
}

Friday, December 5, 2008

Final Project Progress

Update: Perhaps it would be helpful if I actually included a link!



My project is coming along! I have to say it's looking better than I imagined it. It's supposed to be a news aggregator where you can see article summaries at a glance (similar to the layout of a newspaper). I still need to fix the article formatting and the selection of which news feeds to share. Currently, I'm only using Yahoo news feeds because they look the best. I intend to add a lot more bells and whistles including:
  • user login & registration (mySql)
  • sectional navigation
  • pagination (maybe using Javascript)
  • search
  • comments and favoriting - I wanted to do this by connecting the Simplepie feeds to a mySql database. The problem is that Simplepie will be adding support for this into it's next version. This is something I am still trying to figure out, so far it's not working.
By the way, I would love for some help naming the site. FeedMe News sounded really great a few days ago. Now it just sounds silly. :)

Thursday, November 20, 2008

Final Project Wireframes

Hi everyone,

Here are some of the wireframes for my final project:

My latest vision for the project is a news feed aggregator that would resemble the top picture to the right. It's a bit like Netvibes and a bit like Google reader. The main difference between this and existing aggregators is that this one will have multi-column format that's simple to glance through. You won't have to click on links to see the headlines. You only click if you want to read the whole article.

As you can see in the picture, each item will have some nav icons (the ones in the wireframe are just temporary) that will give the reader three options... 1. go to the article now 2. star the article and save it to a reading list... 3. close the article and hide it from view.

Another thing I am thinking about is whether to have all the items be various heights (as in picture #1 and #2) or whether to impose a standard size (as in picture #3). I'm leaning towards the various sizes, but I think it would be both easier and maybe more elegant if everything isthe same size. When I get further along, I'll probably mock up both ways and see which works better.

An important aspect of the site is the reading of the articles. In picture #4, you can see how I envisioned it. I really wanted to have the ability to keep my site on top and let it help the reader navigate through all the articles that were starred. I wanted to have the original article show up in a frame that people could comment on. However, I did some research and it seems that many news sites specifically forbid doing this with their pages. (D'oh!) So, I'm still pondering what to do. I might have just comments on the click through page (kind of like the way digg and reddit work).

Depending on what we go over in the next class, I would like to also incorporate some social networking aspects into the site. I would like to be able to show people the feeds based on most popular of the day/week/etc... (Does that count as something social?)

I'm not sure if I'm biting off too much or not. So far it seems doable! I guess we'll see.

I would love any comments you guys would care to share! Thanks!

My RSS Feeds

RSS is now working with both the Blog and the Image Uploader.

Friday, November 14, 2008

Final Project

I'm really enjoying thinking about all the different possibilities for the Final Project. I find myself first thinking about the audience I want to attract and then trying to formulate a page to fit that crowd. So far, I have lots of ideas and all of them are vague. It's hard to choose! At first I really wanted to do more food pictures, but now I am leaning towards something more newsy.

I would like to make a news page that shows you top headlines at a glance in a more pictorial format than usual. My main issue is that I am unsure where one gets news from! I hope to get some advice about whether this is feasible in class tomorrow. I might also focus it on a specific subject if that makes content easier to get. Hopefully, I'll be better able to make a decision once I have more information.

If that does not work out, I have this whole sideways internet idea that I'll tell you guys about.

Thursday, November 13, 2008

My Blog...

After using blogs so often now, it's kind of neat to make your own.

Mine is located at http://onepotcooking.com/sharonnikfarjam/class8/sharonblog/

It's an eyesore, but I think it's working. It has the logging in and stores usernames with comments and posts.

Things to do:
  • Clean up some stray code leftover from Amos' examples that I used
  • Make it pretty
  • Add some functionality so that users can only edit/delete their own comments and posts

Please feel free to test. Let me know if anything seems off.